@zipify/wysiwyg 4.9.2 → 4.9.3
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.
|
@@ -0,0 +1,940 @@
|
|
|
1
|
+
|
|
2
|
+
.zw-toolbar__group[data-v-8467d9b8] {
|
|
3
|
+
display: flex;
|
|
4
|
+
column-gap: var(--zw-offset-xxs);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.zw-toolbar__divider[data-v-1a453fb5] {
|
|
8
|
+
border-color: rgba(var(--zw-color-n90), 0.1);
|
|
9
|
+
border-style: solid;
|
|
10
|
+
border-width: 0;
|
|
11
|
+
}
|
|
12
|
+
.zw-toolbar__divider--vertical[data-v-1a453fb5] {
|
|
13
|
+
border-left-width: 1px;
|
|
14
|
+
}
|
|
15
|
+
.zw-toolbar__divider--horizontal[data-v-1a453fb5] {
|
|
16
|
+
border-bottom-width: 1px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.zw-toolbar__row[data-v-14a4e361] {
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: space-between;
|
|
22
|
+
column-gap: var(--zw-offset-xs);
|
|
23
|
+
padding: var(--zw-offset-xxs) var(--zw-offset-xs);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.zw-button[data-v-9ea2a71b] {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
vertical-align: middle;
|
|
30
|
+
touch-action: manipulation;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
background-image: none;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
border: 0;
|
|
35
|
+
padding: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
appearance: none;
|
|
39
|
+
user-select: none;
|
|
40
|
+
text-transform: none;
|
|
41
|
+
letter-spacing: normal;
|
|
42
|
+
color: inherit;
|
|
43
|
+
transition: 0.1s opacity ease-out;
|
|
44
|
+
will-change: opacity;
|
|
45
|
+
}
|
|
46
|
+
.zw-button[data-v-9ea2a71b]::-moz-focus-inner {
|
|
47
|
+
border: 0 !important;
|
|
48
|
+
}
|
|
49
|
+
.zw-button[data-v-9ea2a71b]:hover,
|
|
50
|
+
.zw-button[data-v-9ea2a71b]:focus {
|
|
51
|
+
text-decoration: none;
|
|
52
|
+
outline: none;
|
|
53
|
+
}
|
|
54
|
+
.zw-button[data-v-9ea2a71b]:disabled {
|
|
55
|
+
user-select: none;
|
|
56
|
+
box-shadow: none;
|
|
57
|
+
cursor: not-allowed;
|
|
58
|
+
opacity: 0.35;
|
|
59
|
+
}
|
|
60
|
+
.zw-button--toolbar[data-v-9ea2a71b] {
|
|
61
|
+
border-radius: 1px;
|
|
62
|
+
min-height: 28px;
|
|
63
|
+
font-weight: var(--zw-font-weight-semibold);
|
|
64
|
+
font-size: var(--zw-font-size-xs);
|
|
65
|
+
line-height: var(--zw-line-height-xxs);
|
|
66
|
+
color: rgb(var(--zw-color-n70));
|
|
67
|
+
transition-property: background-color, color, opacity;
|
|
68
|
+
will-change: background-color, color, opacity;
|
|
69
|
+
}
|
|
70
|
+
.zw-button--primary[data-v-9ea2a71b] {
|
|
71
|
+
background-color: rgb(var(--zw-color-n500));
|
|
72
|
+
color: rgb(var(--zw-color-white));
|
|
73
|
+
padding: var(--zw-offset-xxs) var(--zw-offset-sm);
|
|
74
|
+
line-height: var(--zw-line-height-md);
|
|
75
|
+
}
|
|
76
|
+
.zw-button--primary[data-v-9ea2a71b],
|
|
77
|
+
.zw-button--secondary[data-v-9ea2a71b] {
|
|
78
|
+
color: rgb(var(--zw-color-white));
|
|
79
|
+
padding: var(--zw-offset-xxs) var(--zw-offset-sm);
|
|
80
|
+
font-weight: 600;
|
|
81
|
+
font-size: var(--zw-font-size-xs);
|
|
82
|
+
}
|
|
83
|
+
.zw-button--primary[data-v-9ea2a71b]:not(:disabled):hover,
|
|
84
|
+
.zw-button--secondary[data-v-9ea2a71b]:not(:disabled):hover {
|
|
85
|
+
opacity: 0.9;
|
|
86
|
+
}
|
|
87
|
+
.zw-button--toolbar[data-v-9ea2a71b]:not(.zw-button--icon) {
|
|
88
|
+
padding: var(--zw-offset-xxs) var(--zw-offset-xs);
|
|
89
|
+
}
|
|
90
|
+
.zw-button--toolbar[data-v-9ea2a71b]:not(:disabled):hover,
|
|
91
|
+
.zw-button--toolbar[data-v-9ea2a71b]:not(:disabled):focus,
|
|
92
|
+
.zw-button--toolbar.zw-button--active[data-v-9ea2a71b]:not(:disabled) {
|
|
93
|
+
color: rgb(var(--zw-color-white));
|
|
94
|
+
background-color: rgb(var(--zw-color-n5));
|
|
95
|
+
}
|
|
96
|
+
[data-v-9ea2a71b] .zw-button__customized-indicator {
|
|
97
|
+
width: 4px;
|
|
98
|
+
height: 4px;
|
|
99
|
+
background-color: rgb(var(--zw-color-y300));
|
|
100
|
+
border-radius: 50%;
|
|
101
|
+
position: absolute;
|
|
102
|
+
top: 3px;
|
|
103
|
+
right: 3px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.zw-button-toggle[data-v-bbdc7b20] {
|
|
107
|
+
display: flex;
|
|
108
|
+
column-gap: var(--zw-offset-xxs);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.zw-icon[data-v-09bee8af] {
|
|
112
|
+
display: flex;
|
|
113
|
+
}
|
|
114
|
+
.zw-icon--auto-color[data-v-09bee8af] {
|
|
115
|
+
--zw-icon-foreground: currentColor;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.zw-scroll-view[data-v-07fd5408] .simplebar-placeholder {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
.zw-scroll-view[data-v-07fd5408] .simplebar-track {
|
|
122
|
+
width: 4px;
|
|
123
|
+
background-color: rgb(var(--zw-color-n20));
|
|
124
|
+
pointer-events: initial;
|
|
125
|
+
}
|
|
126
|
+
.zw-scroll-view[data-v-07fd5408] .simplebar-scrollbar {
|
|
127
|
+
width: 4px;
|
|
128
|
+
}
|
|
129
|
+
.zw-scroll-view[data-v-07fd5408] .simplebar-scrollbar::before {
|
|
130
|
+
top: 0;
|
|
131
|
+
left: 0;
|
|
132
|
+
background-color: rgb(var(--zw-color-n5));
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
height: 100%;
|
|
135
|
+
width: 100%;
|
|
136
|
+
opacity: 1;
|
|
137
|
+
border-radius: 0;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.zw-field-label[data-v-7ab8105c] {
|
|
141
|
+
font-weight: var(--zw-font-weight-thin);
|
|
142
|
+
font-size: var(--zw-font-size-xxs);
|
|
143
|
+
line-height: var(--zw-line-height-xxs);
|
|
144
|
+
color: rgb(var(--zw-color-n70));
|
|
145
|
+
display: block;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.zw-range[data-v-c0059745] {
|
|
149
|
+
width: 100%;
|
|
150
|
+
height: 32px;
|
|
151
|
+
background: none;
|
|
152
|
+
cursor: pointer;
|
|
153
|
+
flex-grow: 1;
|
|
154
|
+
-webkit-appearance: none;
|
|
155
|
+
|
|
156
|
+
--zw-range-track-background-color: transparent;
|
|
157
|
+
--zw-range-track-background-image: linear-gradient(to right, #B3B3B3 var(--zw-range-progress), #3B3B3B var(--zw-range-progress));
|
|
158
|
+
--zw-range-thumb-background: rgb(var(--zw-color-white));
|
|
159
|
+
--zw-range-thumb-box-shadow: -1px -1px 3px rgba(59, 59, 59, 0.35), 1px 1px 3px rgba(59, 59, 59, 0.35);
|
|
160
|
+
}
|
|
161
|
+
.zw-range[data-v-c0059745]::-webkit-slider-runnable-track {
|
|
162
|
+
width: 100%;
|
|
163
|
+
height: 4px;
|
|
164
|
+
border: 0;
|
|
165
|
+
border-radius: 0;
|
|
166
|
+
background-size: 100%;
|
|
167
|
+
background-color: var(--zw-range-track-background-color);
|
|
168
|
+
background-image: var(--zw-range-track-background-image);
|
|
169
|
+
}
|
|
170
|
+
.zw-range[data-v-c0059745]::-moz-range-track {
|
|
171
|
+
width: 100%;
|
|
172
|
+
height: 4px;
|
|
173
|
+
border: 0;
|
|
174
|
+
border-radius: 0;
|
|
175
|
+
background-size: 100%;
|
|
176
|
+
background-color: var(--zw-range-track-background-color);
|
|
177
|
+
background-image: var(--zw-range-track-background-image);
|
|
178
|
+
}
|
|
179
|
+
.zw-range[data-v-c0059745]::-ms-track {
|
|
180
|
+
width: 100%;
|
|
181
|
+
height: 4px;
|
|
182
|
+
border: 0;
|
|
183
|
+
border-radius: 0;
|
|
184
|
+
background-size: 100%;
|
|
185
|
+
background-color: var(--zw-range-track-background-color);
|
|
186
|
+
background-image: var(--zw-range-track-background-image);
|
|
187
|
+
}
|
|
188
|
+
.zw-range[data-v-c0059745]::-webkit-slider-thumb {
|
|
189
|
+
height: 13px;
|
|
190
|
+
width: 13px;
|
|
191
|
+
border-radius: 100%;
|
|
192
|
+
margin-top: -5px;
|
|
193
|
+
background: var(--zw-range-thumb-background);
|
|
194
|
+
box-shadow: var(--zw-range-thumb-box-shadow);
|
|
195
|
+
-webkit-appearance: none;
|
|
196
|
+
transition: box-shadow 150ms cubic-bezier(0, 0, 0.2, 1);
|
|
197
|
+
}
|
|
198
|
+
.zw-range[data-v-c0059745]::-moz-range-thumb {
|
|
199
|
+
height: 13px;
|
|
200
|
+
width: 13px;
|
|
201
|
+
border-radius: 100%;
|
|
202
|
+
margin-top: -5px;
|
|
203
|
+
background: var(--zw-range-thumb-background);
|
|
204
|
+
box-shadow: var(--zw-range-thumb-box-shadow);
|
|
205
|
+
-webkit-appearance: none;
|
|
206
|
+
transition: box-shadow 150ms cubic-bezier(0, 0, 0.2, 1);
|
|
207
|
+
}
|
|
208
|
+
.zw-range[data-v-c0059745]::-ms-thumb {
|
|
209
|
+
height: 13px;
|
|
210
|
+
width: 13px;
|
|
211
|
+
border-radius: 100%;
|
|
212
|
+
margin-top: -5px;
|
|
213
|
+
background: var(--zw-range-thumb-background);
|
|
214
|
+
box-shadow: var(--zw-range-thumb-box-shadow);
|
|
215
|
+
-webkit-appearance: none;
|
|
216
|
+
transition: box-shadow 150ms cubic-bezier(0, 0, 0.2, 1);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Browser hacks */
|
|
220
|
+
.zw-range[data-v-c0059745]::-moz-focus-outer,
|
|
221
|
+
.zw-range[data-v-c0059745]::-moz-range-thumb {
|
|
222
|
+
border: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* In IE don't know how it count margin for thumb */
|
|
226
|
+
/* but it works */
|
|
227
|
+
.zw-range[data-v-c0059745]::-ms-thumb {
|
|
228
|
+
margin-top: -2px;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* END browser hacks */
|
|
232
|
+
.zw-range[data-v-c0059745]:focus {
|
|
233
|
+
outline: none;
|
|
234
|
+
}
|
|
235
|
+
.zw-range[data-v-c0059745]:disabled {
|
|
236
|
+
cursor: not-allowed;
|
|
237
|
+
opacity: 0.6;
|
|
238
|
+
--zw-range-track-background-color: #3B3B3B;
|
|
239
|
+
--zw-range-track-background-image: linear-gradient(to right, #B3B3B3 var(--zw-range-progress), #3B3B3B var(--zw-range-progress));
|
|
240
|
+
}
|
|
241
|
+
.zw-range[data-v-c0059745]:disabled {
|
|
242
|
+
--zw-range-thumb-background: #B3B3B3;
|
|
243
|
+
--zw-range-thumb-box-shadow: 0 0 6px rgba(0, 0, 0, 0.35);
|
|
244
|
+
}
|
|
245
|
+
.zw-range[data-v-c0059745]:not(:disabled):hover {
|
|
246
|
+
--zw-range-thumb-box-shadow: 0 0 0 8px rgba(240, 240, 240, 0.15);
|
|
247
|
+
}
|
|
248
|
+
.zw-range[data-v-c0059745]:not(:disabled):active {
|
|
249
|
+
--zw-range-thumb-box-shadow: 0 0 0 12px rgba(240, 240, 240, 0.15);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.zw-number-field[data-v-e462abc1] {
|
|
253
|
+
--border-color: rgb(var(--zw-color-n60));
|
|
254
|
+
--text-color: rgb(var(--zw-color-n85));
|
|
255
|
+
--buttons-color: rgb(var(--zw-color-n70));
|
|
256
|
+
|
|
257
|
+
padding: 2px 4px;
|
|
258
|
+
border: solid 1px var(--border-color);
|
|
259
|
+
align-items: stretch;
|
|
260
|
+
display: flex;
|
|
261
|
+
}
|
|
262
|
+
.zw-number-field[data-v-e462abc1]:hover {
|
|
263
|
+
--border-color: rgb(var(--zw-color-n80));
|
|
264
|
+
--text-color: rgb(var(--zw-color-n85));
|
|
265
|
+
}
|
|
266
|
+
.zw-number-field[data-v-e462abc1]:focus,
|
|
267
|
+
.zw-number-field[data-v-e462abc1]:focus-within {
|
|
268
|
+
--border-color: rgb(var(--zw-color-white));
|
|
269
|
+
--text-color: rgb(var(--zw-color-white));
|
|
270
|
+
}
|
|
271
|
+
.zw-number-field__input[data-v-e462abc1] {
|
|
272
|
+
color: var(--text-color);
|
|
273
|
+
background-color: rgb(var(--zw-color-n15));
|
|
274
|
+
border: 0;
|
|
275
|
+
display: block;
|
|
276
|
+
width: 100%;
|
|
277
|
+
outline: none !important;
|
|
278
|
+
line-height: var(--zw-line-height-md);
|
|
279
|
+
font-size: var(--zw-font-size-xs);
|
|
280
|
+
-moz-appearance: textfield;
|
|
281
|
+
}
|
|
282
|
+
.zw-number-field__buttons[data-v-e462abc1] {
|
|
283
|
+
display: none;
|
|
284
|
+
flex-direction: column;
|
|
285
|
+
height: 100%;
|
|
286
|
+
}
|
|
287
|
+
.zw-number-field:hover .zw-number-field__buttons[data-v-e462abc1],
|
|
288
|
+
.zw-number-field:focus .zw-number-field__buttons[data-v-e462abc1],
|
|
289
|
+
.zw-number-field:focus-within .zw-number-field__buttons[data-v-e462abc1] {
|
|
290
|
+
display: flex;
|
|
291
|
+
}
|
|
292
|
+
.zw-number-field__input[data-v-e462abc1]::placeholder {
|
|
293
|
+
color: var(--text-color);
|
|
294
|
+
}
|
|
295
|
+
.zw-number-field__input[data-v-e462abc1]::-webkit-outer-spin-button,
|
|
296
|
+
.zw-number-field__input[data-v-e462abc1]::-webkit-inner-spin-button {
|
|
297
|
+
color: var(--text-color);
|
|
298
|
+
-webkit-appearance: none;
|
|
299
|
+
}
|
|
300
|
+
.zw-number-field__controls[data-v-e462abc1] {
|
|
301
|
+
min-width: var(--zw-offset-sm);
|
|
302
|
+
}
|
|
303
|
+
.zw-number-field--disabled[data-v-e462abc1] {
|
|
304
|
+
opacity: 0.5;
|
|
305
|
+
}
|
|
306
|
+
.zw-number-field--disabled[data-v-e462abc1],
|
|
307
|
+
.zw-number-field--disabled .zw-number-field__input[data-v-e462abc1] {
|
|
308
|
+
cursor: not-allowed;
|
|
309
|
+
}
|
|
310
|
+
.zw-number-field__increment-button[data-v-e462abc1],
|
|
311
|
+
.zw-number-field__decrement-button[data-v-e462abc1] {
|
|
312
|
+
width: 100%;
|
|
313
|
+
height: 50%;
|
|
314
|
+
display: flex;
|
|
315
|
+
align-items: center;
|
|
316
|
+
justify-content: center;
|
|
317
|
+
}
|
|
318
|
+
.zw-number-field__increment-button[data-v-e462abc1]::after,
|
|
319
|
+
.zw-number-field__decrement-button[data-v-e462abc1]::after {
|
|
320
|
+
content: "";
|
|
321
|
+
border-left: 3px solid transparent;
|
|
322
|
+
border-right: 3px solid transparent;
|
|
323
|
+
}
|
|
324
|
+
.zw-number-field__increment-button[data-v-e462abc1]::after {
|
|
325
|
+
border-bottom: 3px solid var(--buttons-color);
|
|
326
|
+
}
|
|
327
|
+
.zw-number-field__decrement-button[data-v-e462abc1]::after {
|
|
328
|
+
border-top: 3px solid var(--buttons-color);
|
|
329
|
+
}
|
|
330
|
+
.zw-number-field__increment-button[data-v-e462abc1]:hover,
|
|
331
|
+
.zw-number-field__decrement-button[data-v-e462abc1]:hover {
|
|
332
|
+
background-color: rgb(var(--zw-color-n20));
|
|
333
|
+
--buttons-color: rgb(var(--zw-color-white));
|
|
334
|
+
}
|
|
335
|
+
.zw-number-field__units[data-v-e462abc1] {
|
|
336
|
+
color: rgb(var(--zw-color-n70));
|
|
337
|
+
font-size: var(--zw-font-size-xs);
|
|
338
|
+
line-height: var(--zw-line-height-md);
|
|
339
|
+
text-align: center;
|
|
340
|
+
display: inline-block;
|
|
341
|
+
width: 100%;
|
|
342
|
+
}
|
|
343
|
+
.zw-number-field:hover .zw-number-field__units[data-v-e462abc1],
|
|
344
|
+
.zw-number-field:focus .zw-number-field__units[data-v-e462abc1] {
|
|
345
|
+
display: none;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.zw-modal[data-v-b3c0b9ad] {
|
|
349
|
+
position: var(--8349ba3e);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.zw-modal[data-v-72ecfd23] {
|
|
353
|
+
border-radius: 2px;
|
|
354
|
+
box-shadow: 0 0 4px rgba(var(--zw-color-black), 0.3);
|
|
355
|
+
background-color: rgb(var(--zw-color-n15));
|
|
356
|
+
max-height: var(--3b807430);
|
|
357
|
+
max-width: var(--749527c6);
|
|
358
|
+
z-index: 1000;
|
|
359
|
+
will-change: transform;
|
|
360
|
+
}
|
|
361
|
+
.zw-modal--enter-active[data-v-72ecfd23] {
|
|
362
|
+
transition: opacity 0.15s ease-out;
|
|
363
|
+
}
|
|
364
|
+
.zw-modal--enter-from[data-v-72ecfd23],
|
|
365
|
+
.zw-modal--leave-to[data-v-72ecfd23] {
|
|
366
|
+
opacity: 0;
|
|
367
|
+
}
|
|
368
|
+
.zw-modal--leave-active[data-v-72ecfd23] {
|
|
369
|
+
transition: opacity 0.1s ease-in;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/* Scrollbar overrides in modal */
|
|
373
|
+
.zw-modal[data-v-72ecfd23] .simplebar-offset,
|
|
374
|
+
.zw-modal[data-v-72ecfd23] .simplebar-mask {
|
|
375
|
+
position: initial;
|
|
376
|
+
}
|
|
377
|
+
.zw-modal[data-v-72ecfd23] .simplebar-content {
|
|
378
|
+
max-height: var(--3b807430);
|
|
379
|
+
padding: 0 !important;
|
|
380
|
+
}
|
|
381
|
+
.zw-modal[data-v-72ecfd23] .simplebar-content-wrapper {
|
|
382
|
+
overscroll-behavior: contain;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.zw-field[data-v-dfa0d6f0] {
|
|
386
|
+
display: flex;
|
|
387
|
+
flex-direction: column;
|
|
388
|
+
}
|
|
389
|
+
.zw-field__input[data-v-dfa0d6f0] {
|
|
390
|
+
--border-color: rgb(var(--zw-color-n60));
|
|
391
|
+
--text-color: rgb(var(--zw-color-n85));
|
|
392
|
+
|
|
393
|
+
border: 1px solid var(--border-color);
|
|
394
|
+
background-color: transparent;
|
|
395
|
+
color: var(--text-color);
|
|
396
|
+
font-size: var(--zw-font-size-xxs);
|
|
397
|
+
outline: none;
|
|
398
|
+
padding: 6px;
|
|
399
|
+
line-height: var(--zw-line-height-xxs);
|
|
400
|
+
transition: 0.1s border ease-out, 0.1s color ease-out;
|
|
401
|
+
will-change: border, color;
|
|
402
|
+
}
|
|
403
|
+
.zw-field__input[data-v-dfa0d6f0]:hover {
|
|
404
|
+
--border-color: rgb(var(--zw-color-n80));
|
|
405
|
+
--text-color: rgb(var(--zw-color-n85));
|
|
406
|
+
}
|
|
407
|
+
.zw-field__input[data-v-dfa0d6f0]:focus,
|
|
408
|
+
.zw-field__input[data-v-dfa0d6f0]:focus-within {
|
|
409
|
+
--border-color: rgb(var(--zw-color-white));
|
|
410
|
+
--text-color: rgb(var(--zw-color-white));
|
|
411
|
+
}
|
|
412
|
+
.zw-field__label[data-v-dfa0d6f0] {
|
|
413
|
+
display: inline-block;
|
|
414
|
+
font-size: var(--zw-font-size-xxs);
|
|
415
|
+
padding-bottom: var(--zw-offset-xxs);
|
|
416
|
+
line-height: var(--zw-line-height-xxs);
|
|
417
|
+
}
|
|
418
|
+
.zw-field__label--error[data-v-dfa0d6f0] {
|
|
419
|
+
font-size: var(--zw-font-size-xxs);
|
|
420
|
+
margin: var(--zw-offset-xxs) 0 0;
|
|
421
|
+
color: rgb(var(--zw-color-red));
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.zw-checkbox[data-v-e1624b5d] {
|
|
425
|
+
display: inline-flex;
|
|
426
|
+
align-items: center;
|
|
427
|
+
position: relative;
|
|
428
|
+
cursor: pointer;
|
|
429
|
+
padding: var(--zw-offset-xxs) var(--zw-offset-xxs) var(--zw-offset-xxs) 0;
|
|
430
|
+
}
|
|
431
|
+
.zw-checkbox__field + .zw-checkbox__indicator[data-v-e1624b5d] {
|
|
432
|
+
color: var(--zw-color-n200);
|
|
433
|
+
box-shadow: inset 0 0 0 2px currentColor;
|
|
434
|
+
}
|
|
435
|
+
.zw-checkbox:hover .zw-checkbox__indicator[data-v-e1624b5d],
|
|
436
|
+
.zw-checkbox:focus .zw-checkbox__indicator[data-v-e1624b5d],
|
|
437
|
+
.zw-checkbox:focus-within .zw-checkbox__indicator[data-v-e1624b5d] {
|
|
438
|
+
box-shadow: inset 0 0 0 2px rgb(var(--zw-color-b200));
|
|
439
|
+
}
|
|
440
|
+
.zw-checkbox__field:checked + .zw-checkbox__indicator[data-v-e1624b5d] {
|
|
441
|
+
color: rgb(var(--zw-color-b200))
|
|
442
|
+
}
|
|
443
|
+
.zw-checkbox .zw-checkbox__field:checked + .zw-checkbox__indicator[data-v-e1624b5d] {
|
|
444
|
+
background-color: rgb(var(--zw-color-b200));
|
|
445
|
+
}
|
|
446
|
+
.zw-checkbox .zw-checkbox__indicator[data-v-e1624b5d]::after {
|
|
447
|
+
content: "";
|
|
448
|
+
display: block;
|
|
449
|
+
height: 16px;
|
|
450
|
+
transform: scale(0.6);
|
|
451
|
+
transition: transform 0.2s ease-out;
|
|
452
|
+
width: 16px;
|
|
453
|
+
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNiAyNiIgd2lkdGg9IjUxMiIgaGVpZ2h0PSI1MTIiPgogIDxwYXRoIGZpbGw9IiNGRkYiIGQ9Ik0uMyAxNGMtLjItLjItLjMtLjUtLjMtLjdzLjEtLjUuMy0uN2wxLjQtMS40Yy40LS40IDEtLjQgMS40IDBsLjEuMSA1LjUgNS45Yy4yLjIuNS4yLjcgMEwyMi44IDMuM2guMWMuNC0uNCAxLS40IDEuNCAwbDEuNCAxLjRjLjQuNC40IDEgMCAxLjRsLTE2IDE2LjZjLS4yLjItLjQuMy0uNy4zLS4zIDAtLjUtLjEtLjctLjNMLjUgMTQuMy4zIDE0eiIvPgo8L3N2Zz4K");
|
|
454
|
+
background-repeat: no-repeat;
|
|
455
|
+
background-size: 16px;
|
|
456
|
+
background-position: center center;
|
|
457
|
+
}
|
|
458
|
+
.zw-checkbox__field:not(:checked) + .zw-checkbox__indicator[data-v-e1624b5d]::after {
|
|
459
|
+
transform: scale(0);
|
|
460
|
+
}
|
|
461
|
+
.zw-checkbox__field[data-v-e1624b5d] {
|
|
462
|
+
position: absolute;
|
|
463
|
+
opacity: 0;
|
|
464
|
+
height: 0;
|
|
465
|
+
width: 0;
|
|
466
|
+
}
|
|
467
|
+
.zw-checkbox__label[data-v-e1624b5d] {
|
|
468
|
+
font-size: var(--zw-font-size-xs);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.zw-dropdown__activator[data-v-678de368] {
|
|
472
|
+
width: 100%;
|
|
473
|
+
}
|
|
474
|
+
.zw-dropdown__activator-title[data-v-678de368] {
|
|
475
|
+
margin-right: var(--zw-offset-xxs);
|
|
476
|
+
}
|
|
477
|
+
.zw-dropdown__activator-arrow[data-v-678de368] {
|
|
478
|
+
margin-left: auto;
|
|
479
|
+
}
|
|
480
|
+
.zw-dropdown__activator--active .zw-dropdown__activator-arrow[data-v-678de368] {
|
|
481
|
+
transform: rotateX(180deg);
|
|
482
|
+
}
|
|
483
|
+
.zw-dropdown__activator--gray[data-v-678de368] {
|
|
484
|
+
background-color: rgb(var(--zw-color-n20));
|
|
485
|
+
font-size: var(--zw-font-size-xxs);
|
|
486
|
+
color: rgb(var(--zw-color-white));
|
|
487
|
+
}
|
|
488
|
+
.zw-dropdown__customized-indicator[data-v-678de368] {
|
|
489
|
+
position: relative;
|
|
490
|
+
top: calc(0px - var(--zw-offset-xs));
|
|
491
|
+
min-width: 4px;
|
|
492
|
+
height: 4px;
|
|
493
|
+
background-color: rgb(var(--zw-color-y300));
|
|
494
|
+
border-radius: 50%;
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
.zw-dropdown__option[data-v-2e8320d2] {
|
|
498
|
+
width: 100%;
|
|
499
|
+
display: block;
|
|
500
|
+
color: rgb(var(--zw-color-white));
|
|
501
|
+
padding-top: var(--zw-offset-xxs);
|
|
502
|
+
padding-right: var(--zw-offset-sm);
|
|
503
|
+
padding-left: calc(var(--zw-offset-sm) + var(--zw-option-offset, 0px));
|
|
504
|
+
padding-bottom: var(--zw-offset-xxs);
|
|
505
|
+
text-align: left;
|
|
506
|
+
transition: 0.1s background-color ease-out;
|
|
507
|
+
will-change: background-color;
|
|
508
|
+
}
|
|
509
|
+
.zw-dropdown__option[data-v-2e8320d2]:hover,
|
|
510
|
+
.zw-dropdown__option[data-v-2e8320d2]:focus,
|
|
511
|
+
.zw-dropdown__option--active[data-v-2e8320d2] {
|
|
512
|
+
background-color: rgb(var(--zw-color-n30));
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
.zw-dropdown__group[data-v-2239aa7b] {
|
|
516
|
+
padding-top: var(--zw-offset-xs);
|
|
517
|
+
padding-bottom: var(--zw-offset-xs);
|
|
518
|
+
--zw-option-offset: var(--zw-offset-xs);
|
|
519
|
+
}
|
|
520
|
+
.zw-dropdown__group-title[data-v-2239aa7b] {
|
|
521
|
+
color: var(--zw-color-n70);
|
|
522
|
+
font-weight: var(--zw-font-weight-semibold);
|
|
523
|
+
padding-left: var(--zw-offset-sm);
|
|
524
|
+
padding-right: var(--zw-offset-sm);
|
|
525
|
+
margin-top: 0;
|
|
526
|
+
margin-bottom: var(--zw-offset-xs);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.zw-dropdown__divider[data-v-91a22273] {
|
|
530
|
+
padding: 0 var(--zw-offset-sm);
|
|
531
|
+
}
|
|
532
|
+
.zw-dropdown__divider[data-v-91a22273]::before {
|
|
533
|
+
content: "";
|
|
534
|
+
display: block;
|
|
535
|
+
border-bottom: 1px solid rgb(var(--zw-color-n30));
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
.zw-dropdown__menu {
|
|
539
|
+
padding-top: var(--zw-offset-xs);
|
|
540
|
+
padding-bottom: var(--zw-offset-xs);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.zw-dropdown[data-v-0d65726d] {
|
|
544
|
+
position: relative;
|
|
545
|
+
font-size: var(--zw-font-size-xs);
|
|
546
|
+
line-height: var(--zw-line-height-xxs);
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.zw-font-family-control[data-v-3931975f] {
|
|
550
|
+
width: 96px;
|
|
551
|
+
}
|
|
552
|
+
.zw-font-family-control__option[data-v-3931975f] {
|
|
553
|
+
font-weight: 400;
|
|
554
|
+
font-family: var(--zw-font-family-option);
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
.zw-font-weight-control[data-v-54f744a9] {
|
|
558
|
+
width: 60px;
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
.zw-font-size-control[data-v-9452b945] {
|
|
562
|
+
width: 72px;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
.zw-line-height-control__modal[data-v-8eb86211] {
|
|
566
|
+
padding: var(--zw-offset-sm);
|
|
567
|
+
}
|
|
568
|
+
.zw-line-height-control__row[data-v-8eb86211] {
|
|
569
|
+
display: flex;
|
|
570
|
+
align-items: center;
|
|
571
|
+
}
|
|
572
|
+
.zw-line-height-control__range[data-v-8eb86211] {
|
|
573
|
+
width: 156px;
|
|
574
|
+
}
|
|
575
|
+
.zw-line-height-control__field[data-v-8eb86211] {
|
|
576
|
+
width: 64px;
|
|
577
|
+
margin-left: var(--zw-offset-sm);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
.zpa-list-control[data-v-923a86d6] {
|
|
581
|
+
display: flex;
|
|
582
|
+
}
|
|
583
|
+
.zpa-list-control[data-v-923a86d6]:hover {
|
|
584
|
+
color: rgb(var(--zw-color-white));
|
|
585
|
+
background-color: rgb(var(--zw-color-n5));
|
|
586
|
+
}
|
|
587
|
+
.zw-list-control__activator[data-v-923a86d6] {
|
|
588
|
+
padding: 0 var(--zw-offset-xs);
|
|
589
|
+
}
|
|
590
|
+
.zw-list-control__option[data-v-923a86d6] {
|
|
591
|
+
padding: 0 var(--zw-offset-xs);
|
|
592
|
+
display: flex;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
.zw-link-modal-header[data-v-d721e93d] {
|
|
596
|
+
display: flex;
|
|
597
|
+
align-items: center;
|
|
598
|
+
justify-content: space-between;
|
|
599
|
+
padding: var(--zw-offset-sm);
|
|
600
|
+
border-bottom: 2px solid rgb(var(--zw-color-n5));
|
|
601
|
+
}
|
|
602
|
+
.zw-link-modal-header__title[data-v-d721e93d] {
|
|
603
|
+
text-transform: uppercase;
|
|
604
|
+
font-weight: var(--zw-font-weight-semibold);
|
|
605
|
+
font-size: var(--zw-font-size-xxs);
|
|
606
|
+
color: rgb(var(--zw-color-white));
|
|
607
|
+
}
|
|
608
|
+
.zw-link-modal-header__unlink-icon[data-v-d721e93d] {
|
|
609
|
+
margin-right: var(--zw-offset-xxs);
|
|
610
|
+
}
|
|
611
|
+
.zw-link-modal-header__unlink-button[data-v-d721e93d] {
|
|
612
|
+
color: rgb(var(--zw-color-n80));
|
|
613
|
+
font-size: var(--zw-font-size-xxs);
|
|
614
|
+
transition: 0.1s opacity ease-out, 0.1s color ease-out;
|
|
615
|
+
will-change: opacity, color;
|
|
616
|
+
}
|
|
617
|
+
.zw-link-modal-header__unlink-button[data-v-d721e93d]:disabled {
|
|
618
|
+
opacity: 0.35;
|
|
619
|
+
}
|
|
620
|
+
.zw-link-modal-header__unlink-button[data-v-d721e93d]:focus,
|
|
621
|
+
.zw-link-modal-header__unlink-button[data-v-d721e93d]:focus-within,
|
|
622
|
+
.zw-link-modal-header__unlink-button[data-v-d721e93d]:hover {
|
|
623
|
+
color: rgb(var(--zw-color-white));
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
.zw-link-modal[data-v-5d6cf980] {
|
|
627
|
+
width: 266px;
|
|
628
|
+
}
|
|
629
|
+
.zw-link-modal__body[data-v-5d6cf980] {
|
|
630
|
+
padding: var(--zw-offset-sm);
|
|
631
|
+
}
|
|
632
|
+
.zw-link-modal__actions[data-v-5d6cf980] {
|
|
633
|
+
display: flex;
|
|
634
|
+
justify-content: flex-end;
|
|
635
|
+
}
|
|
636
|
+
[data-v-5d6cf980] .zw-link-modal-dropdown__option {
|
|
637
|
+
width: 234px;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.zw-style-preset-control__option[data-v-c80fcebf] {
|
|
641
|
+
display: flex;
|
|
642
|
+
justify-content: space-between;
|
|
643
|
+
align-items: center;
|
|
644
|
+
}
|
|
645
|
+
.zw-style-preset-control__color[data-v-c80fcebf] {
|
|
646
|
+
width: 10px;
|
|
647
|
+
height: 10px;
|
|
648
|
+
border: 1px solid rgba(var(--zw-color-black), 0.15);
|
|
649
|
+
border-radius: 14.71%;
|
|
650
|
+
background-color: var(--zw-color-option);
|
|
651
|
+
}
|
|
652
|
+
.zw-style-preset-control__size[data-v-c80fcebf] {
|
|
653
|
+
font-size: 10px;
|
|
654
|
+
color: rgb(var(--zw-color-n70));
|
|
655
|
+
margin-left: var(--zw-offset-sm);
|
|
656
|
+
}
|
|
657
|
+
.zw-style-preset-control__title[data-v-c80fcebf] {
|
|
658
|
+
width: 82px;
|
|
659
|
+
margin-left: var(--zw-offset-xs);
|
|
660
|
+
font-size: var(--zw-font-size-xxs);
|
|
661
|
+
font-family: var(--zw-font-family-option);
|
|
662
|
+
font-style: var(--zw-font-style-option);
|
|
663
|
+
font-weight: var(--zw-font-weight-option);
|
|
664
|
+
text-decoration: var(--zw-text-decoration-option);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.zw-style-preset-control[data-v-a8aff4db] {
|
|
668
|
+
display: flex;
|
|
669
|
+
align-items: center;
|
|
670
|
+
}
|
|
671
|
+
.zw-style-preset-control__dropdown[data-v-a8aff4db] {
|
|
672
|
+
width: 120px;
|
|
673
|
+
}
|
|
674
|
+
.zw-style-preset-control__reset[data-v-a8aff4db] {
|
|
675
|
+
color: rgb(var(--zw-color-n70));
|
|
676
|
+
background-color: rgb(var(--zw-color-n20));
|
|
677
|
+
}
|
|
678
|
+
.zw-style-preset-control__reset[data-v-a8aff4db]:disabled {
|
|
679
|
+
background-color: transparent;
|
|
680
|
+
}
|
|
681
|
+
.zw-style-preset-control__reset[data-v-a8aff4db]:not(:disabled):hover,
|
|
682
|
+
.zw-style-preset-control__reset[data-v-a8aff4db]:not(:disabled):focus,
|
|
683
|
+
.zw-style-preset-control__reset[data-v-a8aff4db]:not(:disabled):focus-within {
|
|
684
|
+
color: rgb(var(--zw-color-white));
|
|
685
|
+
background-color: rgb(var(--zw-color-n30));
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.zw-toolbar[data-v-e9105a30] {
|
|
689
|
+
border: 1px solid rgba(var(--zw-color-white), 0.2);
|
|
690
|
+
border-radius: 2px;
|
|
691
|
+
background-color: rgba(var(--zw-color-n15), 0.9);
|
|
692
|
+
backdrop-filter: blur(8px);
|
|
693
|
+
-webkit-backdrop-filter: blur(8px);
|
|
694
|
+
color: rgb(var(--zw-color-n70));
|
|
695
|
+
z-index: 999999;
|
|
696
|
+
text-align: left;
|
|
697
|
+
position: fixed;
|
|
698
|
+
--zw-toolbar-offset-y: calc(var(--7b6bf359) * 1px)
|
|
699
|
+
}
|
|
700
|
+
.zw-toolbar[data-v-e9105a30]::before,
|
|
701
|
+
.zw-toolbar[data-v-e9105a30]::after {
|
|
702
|
+
content: "";
|
|
703
|
+
display: block;
|
|
704
|
+
width: 100%;
|
|
705
|
+
height: calc(var(--zw-toolbar-offset-y) + 4px);
|
|
706
|
+
position: absolute;
|
|
707
|
+
--zw-toolbar-safe-zone: calc(-1 * var(--zw-toolbar-offset-y));
|
|
708
|
+
}
|
|
709
|
+
.zw-toolbar[data-v-e9105a30]::before {
|
|
710
|
+
top: var(--zw-toolbar-safe-zone);
|
|
711
|
+
}
|
|
712
|
+
.zw-toolbar[data-v-e9105a30]::after {
|
|
713
|
+
bottom: var(--zw-toolbar-safe-zone);
|
|
714
|
+
}
|
|
715
|
+
.zw-toolbar--enter-active[data-v-e9105a30],
|
|
716
|
+
.zw-toolbar--leave-active[data-v-e9105a30] {
|
|
717
|
+
transition: opacity 150ms ease-out;
|
|
718
|
+
}
|
|
719
|
+
.zw-toolbar--leave-active[data-v-e9105a30] {
|
|
720
|
+
transition: opacity 0s ease-in;
|
|
721
|
+
}
|
|
722
|
+
.zw-toolbar--enter-from[data-v-e9105a30],
|
|
723
|
+
.zw-toolbar--leave-to[data-v-e9105a30] {
|
|
724
|
+
opacity: 0;
|
|
725
|
+
}
|
|
726
|
+
.zw-wysiwyg {
|
|
727
|
+
--zw-color-n5: 13, 13, 13; /* #0D0D0D */
|
|
728
|
+
--zw-color-n15: 38, 38, 38; /* #262626 */
|
|
729
|
+
--zw-color-n20: 59, 59, 59; /* #3B3B3B */
|
|
730
|
+
--zw-color-n30: 77, 77, 77; /* #4D4D4D */
|
|
731
|
+
--zw-color-n60: 153, 153, 153; /* #999999 */
|
|
732
|
+
--zw-color-n70: 179, 179, 179; /* #B3B3B3 */
|
|
733
|
+
--zw-color-n80: 196, 196, 196; /* #C4C4C4 */
|
|
734
|
+
--zw-color-n85: 217, 217, 217; /* #D9D9D9 */
|
|
735
|
+
--zw-color-n90: 230, 230, 230; /* #E6E6E6 */
|
|
736
|
+
--zw-color-n200: 194, 200, 209; /* #C2C8D1 */
|
|
737
|
+
--zw-color-n500: 54, 64, 76; /* #36404C */
|
|
738
|
+
--zw-color-y300: 255, 171, 0; /* #FFAB00 */
|
|
739
|
+
--zw-color-b200: 38, 132, 255; /* #0065FF */
|
|
740
|
+
--zw-color-black: 0, 0, 0;
|
|
741
|
+
--zw-color-white: 255, 255, 255;
|
|
742
|
+
--zw-color-red: 234, 58, 58; /* #EA3A3A */
|
|
743
|
+
|
|
744
|
+
--zw-offset-xxs: 4px;
|
|
745
|
+
--zw-offset-xs: 8px;
|
|
746
|
+
--zw-offset-xsm: 12px;
|
|
747
|
+
--zw-offset-sm: 16px;
|
|
748
|
+
--zw-offset-md: 24px;
|
|
749
|
+
|
|
750
|
+
--zw-font-weight-thin: 400;
|
|
751
|
+
--zw-font-weight-semibold: 500;
|
|
752
|
+
|
|
753
|
+
--zw-font-size-xxs: 12px;
|
|
754
|
+
--zw-font-size-xs: 14px;
|
|
755
|
+
|
|
756
|
+
--zw-line-height-xxs: 1.21;
|
|
757
|
+
--zw-line-height-md: 1.72;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/*
|
|
761
|
+
$builder-N5: #0D0D0D;
|
|
762
|
+
$builder-N10: #1A1A1A;
|
|
763
|
+
$builder-N15: #262626;
|
|
764
|
+
$builder-N20: #3B3B3B;
|
|
765
|
+
$builder-N30: #4D4D4D;
|
|
766
|
+
$builder-N40: #666;
|
|
767
|
+
$builder-N50: #808080;
|
|
768
|
+
$builder-N60: #999;
|
|
769
|
+
$builder-N70: #B3B3B3;
|
|
770
|
+
$builder-N80: #C4C4C4;
|
|
771
|
+
$builder-N85: #D9D9D9;
|
|
772
|
+
$builder-N90: #E6E6E6;
|
|
773
|
+
$builder-N94: #F0F0F0;
|
|
774
|
+
$builder-N96: #F5F5F5;
|
|
775
|
+
$builder-N98: #FAFAFA;
|
|
776
|
+
$builder-N200: #C2C8D1;
|
|
777
|
+
$builder-R50: #EA3A3A;
|
|
778
|
+
|
|
779
|
+
$font-size-xxs: 12px;
|
|
780
|
+
$font-size-xs: 14px;
|
|
781
|
+
$font-size-sm: 16px;
|
|
782
|
+
$font-size-md: 18px;
|
|
783
|
+
$font-size-lmd: 20px;
|
|
784
|
+
$font-size-lg: 24px;
|
|
785
|
+
|
|
786
|
+
$font-height--xxs: 1.2;
|
|
787
|
+
$font-height--xs: 1.33;
|
|
788
|
+
$font-height--sm: 1.43;
|
|
789
|
+
$font-height--md: 1.72;
|
|
790
|
+
*/
|
|
791
|
+
.zw-wysiwyg__placeholder::before {
|
|
792
|
+
content: attr(data-placeholder);
|
|
793
|
+
color: rgb(var(--zw-color-n70));
|
|
794
|
+
float: left;
|
|
795
|
+
height: 0;
|
|
796
|
+
pointer-events: none;
|
|
797
|
+
}
|
|
798
|
+
.zw-superscript {
|
|
799
|
+
font-size: 75%;
|
|
800
|
+
position: relative;
|
|
801
|
+
vertical-align: initial;
|
|
802
|
+
top: -0.5em;
|
|
803
|
+
}
|
|
804
|
+
.zw-style.zw-style.zw-style {
|
|
805
|
+
font-weight: var(--zw-font-weight, var(--zw-preset-font-weight));
|
|
806
|
+
font-family: var(--zw-font-family, var(--zw-preset-font-family));
|
|
807
|
+
color: var(--zw-font-color, var(--zw-preset-font-color));
|
|
808
|
+
font-style: var(--zw-font-style, var(--zw-preset-font-style));
|
|
809
|
+
text-decoration: var(--zw-text-decoration, var(--zw-preset-text-decoration));
|
|
810
|
+
background-color: var(--zw-background-color, var(--zw-preset-background-color));
|
|
811
|
+
margin: var(--zw-margin);
|
|
812
|
+
}
|
|
813
|
+
h1.zw-style.zw-style.zw-style,
|
|
814
|
+
h2.zw-style.zw-style.zw-style,
|
|
815
|
+
h3.zw-style.zw-style.zw-style,
|
|
816
|
+
h4.zw-style.zw-style.zw-style {
|
|
817
|
+
margin: var(--zw-margin, 8px 0);
|
|
818
|
+
}
|
|
819
|
+
@media (min-width: 1200px) {
|
|
820
|
+
.zw-style.zw-style.zw-style {
|
|
821
|
+
font-size: var(--zw-font-size-desktop, var(--zw-preset-font-size-desktop));
|
|
822
|
+
text-align: var(--zw-alignment-desktop, var(--zw-preset-alignment-desktop));
|
|
823
|
+
line-height: var(--zw-line-height-desktop, var(--zw-preset-line-height-desktop));
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
@media (min-width: 769px) and (max-width: 1199.98px) {
|
|
827
|
+
.zw-style.zw-style.zw-style {
|
|
828
|
+
font-size: var(--zw-font-size-tablet, var(--zw-preset-font-size-tablet));
|
|
829
|
+
text-align: var(--zw-alignment-tablet, var(--zw-preset-alignment-tablet));
|
|
830
|
+
line-height: var(--zw-line-height-tablet, var(--zw-preset-line-height-tablet));
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
@media (max-width: 768.98px) {
|
|
834
|
+
.zw-style.zw-style.zw-style {
|
|
835
|
+
font-size: var(--zw-font-size-mobile, var(--zw-preset-font-size-mobile));
|
|
836
|
+
text-align: var(--zw-alignment-mobile, var(--zw-preset-alignment-mobile));
|
|
837
|
+
line-height: var(--zw-line-height-mobile, var(--zw-preset-line-height-mobile));
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/* ProseMirror styles */
|
|
842
|
+
.ProseMirror {
|
|
843
|
+
position: relative;
|
|
844
|
+
outline: none;
|
|
845
|
+
}
|
|
846
|
+
.ProseMirror {
|
|
847
|
+
word-wrap: break-word;
|
|
848
|
+
white-space: break-spaces;
|
|
849
|
+
-webkit-font-variant-ligatures: none;
|
|
850
|
+
font-variant-ligatures: none;
|
|
851
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
852
|
+
}
|
|
853
|
+
.ProseMirror [contenteditable="false"] {
|
|
854
|
+
white-space: normal;
|
|
855
|
+
}
|
|
856
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
857
|
+
white-space: pre-wrap;
|
|
858
|
+
}
|
|
859
|
+
.ProseMirror pre {
|
|
860
|
+
white-space: pre-wrap;
|
|
861
|
+
}
|
|
862
|
+
img.ProseMirror-separator {
|
|
863
|
+
display: inline !important;
|
|
864
|
+
border: none !important;
|
|
865
|
+
margin: 0 !important;
|
|
866
|
+
width: 1px !important;
|
|
867
|
+
height: 1px !important;
|
|
868
|
+
}
|
|
869
|
+
.ProseMirror-gapcursor {
|
|
870
|
+
display: none;
|
|
871
|
+
pointer-events: none;
|
|
872
|
+
position: absolute;
|
|
873
|
+
margin: 0;
|
|
874
|
+
}
|
|
875
|
+
.ProseMirror-gapcursor::after {
|
|
876
|
+
content: "";
|
|
877
|
+
display: block;
|
|
878
|
+
position: absolute;
|
|
879
|
+
top: -2px;
|
|
880
|
+
width: 20px;
|
|
881
|
+
border-top: 1px solid #000;
|
|
882
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
883
|
+
}
|
|
884
|
+
.ProseMirror span {
|
|
885
|
+
display: block;
|
|
886
|
+
}
|
|
887
|
+
.ProseMirror :where(p, h1, h2, h3, h4) span {
|
|
888
|
+
display: initial;
|
|
889
|
+
}
|
|
890
|
+
@keyframes ProseMirror-cursor-blink {
|
|
891
|
+
to {
|
|
892
|
+
visibility: hidden;
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
.ProseMirror-hideselection *::selection {
|
|
896
|
+
background: transparent;
|
|
897
|
+
}
|
|
898
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
899
|
+
background: transparent;
|
|
900
|
+
}
|
|
901
|
+
.ProseMirror-hideselection * {
|
|
902
|
+
caret-color: transparent;
|
|
903
|
+
}
|
|
904
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
905
|
+
display: block;
|
|
906
|
+
}
|
|
907
|
+
.tippy-box[data-animation=fade][data-state=hidden] {
|
|
908
|
+
opacity: 0
|
|
909
|
+
}
|
|
910
|
+
.zw-dropdown__default-option {
|
|
911
|
+
font-size: var(--zw-font-size-xxs);
|
|
912
|
+
color: rgb(var(--zw-color-n70));
|
|
913
|
+
font-family: "Lato", sans-serif;
|
|
914
|
+
font-style: italic;
|
|
915
|
+
margin-left: var(--zw-offset-xxs);
|
|
916
|
+
}
|
|
917
|
+
.zw-text--truncate {
|
|
918
|
+
white-space: nowrap;
|
|
919
|
+
overflow: hidden;
|
|
920
|
+
text-overflow: ellipsis;
|
|
921
|
+
max-width: 100%;
|
|
922
|
+
}
|
|
923
|
+
.zw-position--relative {
|
|
924
|
+
position: relative;
|
|
925
|
+
}
|
|
926
|
+
.zw-margin-bottom--xxs {
|
|
927
|
+
margin-bottom: var(--zw-offset-xxs) !important;
|
|
928
|
+
}
|
|
929
|
+
.zw-margin-bottom--xs {
|
|
930
|
+
margin-bottom: var(--zw-offset-xs) !important;
|
|
931
|
+
}
|
|
932
|
+
.zw-margin-bottom--sm {
|
|
933
|
+
margin-bottom: var(--zw-offset-sm) !important;
|
|
934
|
+
}
|
|
935
|
+
.zw-margin-bottom--md {
|
|
936
|
+
margin-bottom: var(--zw-offset-md) !important;
|
|
937
|
+
}
|
|
938
|
+
.zw-margin-right--xs {
|
|
939
|
+
margin-right: var(--zw-offset-xs) !important;
|
|
940
|
+
}
|
package/dist/cli.js
CHANGED
|
@@ -56,4 +56,4 @@ __p += '`),he&&(F+=`' +
|
|
|
56
56
|
function print() { __p += __j.call(arguments, '') }
|
|
57
57
|
`:`;
|
|
58
58
|
`)+F+`return __p
|
|
59
|
-
}`;var se=Vp(function(){return be(w,J+"return "+F).apply(t,C)});if(se.source=F,Du(se))throw se;return se}function lx(s){return _e(s).toLowerCase()}function ux(s){return _e(s).toUpperCase()}function cx(s,l,c){if(s=_e(s),s&&(c||l===t))return Xh(s);if(!s||!(l=At(l)))return s;var d=sn(s),y=sn(l),w=Zh(d,y),C=Qh(d,y)+1;return lr(d,w,C).join("")}function fx(s,l,c){if(s=_e(s),s&&(c||l===t))return s.slice(0,td(s)+1);if(!s||!(l=At(l)))return s;var d=sn(s),y=Qh(d,sn(l))+1;return lr(d,0,y).join("")}function hx(s,l,c){if(s=_e(s),s&&(c||l===t))return s.replace(Dl,"");if(!s||!(l=At(l)))return s;var d=sn(s),y=Zh(d,sn(l));return lr(d,y).join("")}function dx(s,l){var c=Et,d=yt;if(Me(l)){var y="separator"in l?l.separator:y;c="length"in l?re(l.length):c,d="omission"in l?At(l.omission):d}s=_e(s);var w=s.length;if(li(s)){var C=sn(s);w=C.length}if(c>=w)return s;var M=c-ui(d);if(M<1)return d;var O=C?lr(C,0,M).join(""):s.slice(0,M);if(y===t)return O+d;if(C&&(M+=O.length-M),Fu(y)){if(s.slice(M).search(y)){var P,D=O;for(y.global||(y=Ql(y.source,_e(_h.exec(y))+"g")),y.lastIndex=0;P=y.exec(D);)var F=P.index;O=O.slice(0,F===t?M:F)}}else if(s.indexOf(At(y),M)!=M){var W=O.lastIndexOf(y);W>-1&&(O=O.slice(0,W))}return O+d}function px(s){return s=_e(s),s&&Cy.test(s)?s.replace(gh,Wb):s}var mx=gi(function(s,l,c){return s+(c?" ":"")+l.toUpperCase()}),$u=Wd("toUpperCase");function Hp(s,l,c){return s=_e(s),l=c?t:l,l===t?zb(s)?Kb(s):Tb(s):s.match(l)||[]}var Vp=oe(function(s,l){try{return Ct(s,t,l)}catch(c){return Du(c)?c:new te(c)}}),gx=Pn(function(s,l){return $t(l,function(c){c=_n(c),Rn(s,c,Lu(s[c],s))}),s});function yx(s){var l=s==null?0:s.length,c=X();return s=l?ke(s,function(d){if(typeof d[1]!="function")throw new Ht(a);return[c(d[0]),d[1]]}):[],oe(function(d){for(var y=-1;++y<l;){var w=s[y];if(Ct(w[0],this,d))return Ct(w[1],this,d)}})}function bx(s){return W2(Wt(s,p))}function Hu(s){return function(){return s}}function _x(s,l){return s==null||s!==s?l:s}var vx=qd(),wx=qd(!0);function wt(s){return s}function Vu(s){return wd(typeof s=="function"?s:Wt(s,p))}function Sx(s){return xd(Wt(s,p))}function xx(s,l){return Ed(s,Wt(l,p))}var Ex=oe(function(s,l){return function(c){return ds(c,s,l)}}),Cx=oe(function(s,l){return function(c){return ds(s,c,l)}});function Wu(s,l,c){var d=Ke(l),y=Co(l,d);c==null&&!(Me(l)&&(y.length||!d.length))&&(c=l,l=s,s=this,y=Co(l,Ke(l)));var w=!(Me(c)&&"chain"in c)||!!c.chain,C=Fn(s);return $t(y,function(M){var O=l[M];s[M]=O,C&&(s.prototype[M]=function(){var P=this.__chain__;if(w||P){var D=s(this.__wrapped__),F=D.__actions__=bt(this.__actions__);return F.push({func:O,args:arguments,thisArg:s}),D.__chain__=P,D}return O.apply(s,nr([this.value()],arguments))})}),s}function kx(){return Qe._===this&&(Qe._=Zb),this}function Uu(){}function Ax(s){return s=re(s),oe(function(l){return Cd(l,s)})}var Mx=wu(ke),Tx=wu(Kh),Ox=wu(Kl);function Wp(s){return Mu(s)?Gl(_n(s)):o_(s)}function Ix(s){return function(l){return s==null?t:Rr(s,l)}}var Nx=Gd(),Rx=Gd(!0);function qu(){return[]}function Ku(){return!1}function Lx(){return{}}function Px(){return""}function Dx(){return!0}function Fx(s,l){if(s=re(s),s<1||s>Ue)return[];var c=qe,d=ot(s,qe);l=X(l),s-=qe;for(var y=Yl(d,l);++c<s;)l(c);return y}function zx(s){return ne(s)?ke(s,_n):Mt(s)?[s]:bt(up(_e(s)))}function Bx(s){var l=++Yb;return _e(s)+l}var $x=Io(function(s,l){return s+l},0),Hx=Su("ceil"),Vx=Io(function(s,l){return s/l},1),Wx=Su("floor");function Ux(s){return s&&s.length?Eo(s,wt,au):t}function qx(s,l){return s&&s.length?Eo(s,X(l,2),au):t}function Kx(s){return jh(s,wt)}function Gx(s,l){return jh(s,X(l,2))}function Jx(s){return s&&s.length?Eo(s,wt,fu):t}function jx(s,l){return s&&s.length?Eo(s,X(l,2),fu):t}var Yx=Io(function(s,l){return s*l},1),Xx=Su("round"),Zx=Io(function(s,l){return s-l},0);function Qx(s){return s&&s.length?jl(s,wt):0}function e5(s,l){return s&&s.length?jl(s,X(l,2)):0}return v.after=Sw,v.ary=vp,v.assign=uS,v.assignIn=Lp,v.assignInWith=Uo,v.assignWith=cS,v.at=fS,v.before=wp,v.bind=Lu,v.bindAll=gx,v.bindKey=Sp,v.castArray=Lw,v.chain=yp,v.chunk=W_,v.compact=U_,v.concat=q_,v.cond=yx,v.conforms=bx,v.constant=Hu,v.countBy=Qv,v.create=hS,v.curry=xp,v.curryRight=Ep,v.debounce=Cp,v.defaults=dS,v.defaultsDeep=pS,v.defer=xw,v.delay=Ew,v.difference=K_,v.differenceBy=G_,v.differenceWith=J_,v.drop=j_,v.dropRight=Y_,v.dropRightWhile=X_,v.dropWhile=Z_,v.fill=Q_,v.filter=tw,v.flatMap=iw,v.flatMapDeep=sw,v.flatMapDepth=ow,v.flatten=dp,v.flattenDeep=ev,v.flattenDepth=tv,v.flip=Cw,v.flow=vx,v.flowRight=wx,v.fromPairs=nv,v.functions=wS,v.functionsIn=SS,v.groupBy=aw,v.initial=iv,v.intersection=sv,v.intersectionBy=ov,v.intersectionWith=av,v.invert=ES,v.invertBy=CS,v.invokeMap=uw,v.iteratee=Vu,v.keyBy=cw,v.keys=Ke,v.keysIn=vt,v.map=zo,v.mapKeys=AS,v.mapValues=MS,v.matches=Sx,v.matchesProperty=xx,v.memoize=$o,v.merge=TS,v.mergeWith=Pp,v.method=Ex,v.methodOf=Cx,v.mixin=Wu,v.negate=Ho,v.nthArg=Ax,v.omit=OS,v.omitBy=IS,v.once=kw,v.orderBy=fw,v.over=Mx,v.overArgs=Aw,v.overEvery=Tx,v.overSome=Ox,v.partial=Pu,v.partialRight=kp,v.partition=hw,v.pick=NS,v.pickBy=Dp,v.property=Wp,v.propertyOf=Ix,v.pull=fv,v.pullAll=mp,v.pullAllBy=hv,v.pullAllWith=dv,v.pullAt=pv,v.range=Nx,v.rangeRight=Rx,v.rearg=Mw,v.reject=mw,v.remove=mv,v.rest=Tw,v.reverse=Nu,v.sampleSize=yw,v.set=LS,v.setWith=PS,v.shuffle=bw,v.slice=gv,v.sortBy=ww,v.sortedUniq=xv,v.sortedUniqBy=Ev,v.split=ix,v.spread=Ow,v.tail=Cv,v.take=kv,v.takeRight=Av,v.takeRightWhile=Mv,v.takeWhile=Tv,v.tap=Uv,v.throttle=Iw,v.thru=Fo,v.toArray=Ip,v.toPairs=Fp,v.toPairsIn=zp,v.toPath=zx,v.toPlainObject=Rp,v.transform=DS,v.unary=Nw,v.union=Ov,v.unionBy=Iv,v.unionWith=Nv,v.uniq=Rv,v.uniqBy=Lv,v.uniqWith=Pv,v.unset=FS,v.unzip=Ru,v.unzipWith=gp,v.update=zS,v.updateWith=BS,v.values=_i,v.valuesIn=$S,v.without=Dv,v.words=Hp,v.wrap=Rw,v.xor=Fv,v.xorBy=zv,v.xorWith=Bv,v.zip=$v,v.zipObject=Hv,v.zipObjectDeep=Vv,v.zipWith=Wv,v.entries=Fp,v.entriesIn=zp,v.extend=Lp,v.extendWith=Uo,Wu(v,v),v.add=$x,v.attempt=Vp,v.camelCase=US,v.capitalize=Bp,v.ceil=Hx,v.clamp=HS,v.clone=Pw,v.cloneDeep=Fw,v.cloneDeepWith=zw,v.cloneWith=Dw,v.conformsTo=Bw,v.deburr=$p,v.defaultTo=_x,v.divide=Vx,v.endsWith=qS,v.eq=an,v.escape=KS,v.escapeRegExp=GS,v.every=ew,v.find=nw,v.findIndex=fp,v.findKey=mS,v.findLast=rw,v.findLastIndex=hp,v.findLastKey=gS,v.floor=Wx,v.forEach=bp,v.forEachRight=_p,v.forIn=yS,v.forInRight=bS,v.forOwn=_S,v.forOwnRight=vS,v.get=zu,v.gt=$w,v.gte=Hw,v.has=xS,v.hasIn=Bu,v.head=pp,v.identity=wt,v.includes=lw,v.indexOf=rv,v.inRange=VS,v.invoke=kS,v.isArguments=Dr,v.isArray=ne,v.isArrayBuffer=Vw,v.isArrayLike=_t,v.isArrayLikeObject=Ne,v.isBoolean=Ww,v.isBuffer=ur,v.isDate=Uw,v.isElement=qw,v.isEmpty=Kw,v.isEqual=Gw,v.isEqualWith=Jw,v.isError=Du,v.isFinite=jw,v.isFunction=Fn,v.isInteger=Ap,v.isLength=Vo,v.isMap=Mp,v.isMatch=Yw,v.isMatchWith=Xw,v.isNaN=Zw,v.isNative=Qw,v.isNil=tS,v.isNull=eS,v.isNumber=Tp,v.isObject=Me,v.isObjectLike=Ie,v.isPlainObject=_s,v.isRegExp=Fu,v.isSafeInteger=nS,v.isSet=Op,v.isString=Wo,v.isSymbol=Mt,v.isTypedArray=bi,v.isUndefined=rS,v.isWeakMap=iS,v.isWeakSet=sS,v.join=lv,v.kebabCase=JS,v.last=qt,v.lastIndexOf=uv,v.lowerCase=jS,v.lowerFirst=YS,v.lt=oS,v.lte=aS,v.max=Ux,v.maxBy=qx,v.mean=Kx,v.meanBy=Gx,v.min=Jx,v.minBy=jx,v.stubArray=qu,v.stubFalse=Ku,v.stubObject=Lx,v.stubString=Px,v.stubTrue=Dx,v.multiply=Yx,v.nth=cv,v.noConflict=kx,v.noop=Uu,v.now=Bo,v.pad=XS,v.padEnd=ZS,v.padStart=QS,v.parseInt=ex,v.random=WS,v.reduce=dw,v.reduceRight=pw,v.repeat=tx,v.replace=nx,v.result=RS,v.round=Xx,v.runInContext=T,v.sample=gw,v.size=_w,v.snakeCase=rx,v.some=vw,v.sortedIndex=yv,v.sortedIndexBy=bv,v.sortedIndexOf=_v,v.sortedLastIndex=vv,v.sortedLastIndexBy=wv,v.sortedLastIndexOf=Sv,v.startCase=sx,v.startsWith=ox,v.subtract=Zx,v.sum=Qx,v.sumBy=e5,v.template=ax,v.times=Fx,v.toFinite=zn,v.toInteger=re,v.toLength=Np,v.toLower=lx,v.toNumber=Kt,v.toSafeInteger=lS,v.toString=_e,v.toUpper=ux,v.trim=cx,v.trimEnd=fx,v.trimStart=hx,v.truncate=dx,v.unescape=px,v.uniqueId=Bx,v.upperCase=mx,v.upperFirst=$u,v.each=bp,v.eachRight=_p,v.first=pp,Wu(v,function(){var s={};return yn(v,function(l,c){we.call(v.prototype,c)||(s[c]=l)}),s}(),{chain:!1}),v.VERSION=r,$t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){v[s].placeholder=v}),$t(["drop","take"],function(s,l){ce.prototype[s]=function(c){c=c===t?1:Be(re(c),0);var d=this.__filtered__&&!l?new ce(this):this.clone();return d.__filtered__?d.__takeCount__=ot(c,d.__takeCount__):d.__views__.push({size:ot(c,qe),type:s+(d.__dir__<0?"Right":"")}),d},ce.prototype[s+"Right"]=function(c){return this.reverse()[s](c).reverse()}}),$t(["filter","map","takeWhile"],function(s,l){var c=l+1,d=c==en||c==Ve;ce.prototype[s]=function(y){var w=this.clone();return w.__iteratees__.push({iteratee:X(y,3),type:c}),w.__filtered__=w.__filtered__||d,w}}),$t(["head","last"],function(s,l){var c="take"+(l?"Right":"");ce.prototype[s]=function(){return this[c](1).value()[0]}}),$t(["initial","tail"],function(s,l){var c="drop"+(l?"":"Right");ce.prototype[s]=function(){return this.__filtered__?new ce(this):this[c](1)}}),ce.prototype.compact=function(){return this.filter(wt)},ce.prototype.find=function(s){return this.filter(s).head()},ce.prototype.findLast=function(s){return this.reverse().find(s)},ce.prototype.invokeMap=oe(function(s,l){return typeof s=="function"?new ce(this):this.map(function(c){return ds(c,s,l)})}),ce.prototype.reject=function(s){return this.filter(Ho(X(s)))},ce.prototype.slice=function(s,l){s=re(s);var c=this;return c.__filtered__&&(s>0||l<0)?new ce(c):(s<0?c=c.takeRight(-s):s&&(c=c.drop(s)),l!==t&&(l=re(l),c=l<0?c.dropRight(-l):c.take(l-s)),c)},ce.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},ce.prototype.toArray=function(){return this.take(qe)},yn(ce.prototype,function(s,l){var c=/^(?:filter|find|map|reject)|While$/.test(l),d=/^(?:head|last)$/.test(l),y=v[d?"take"+(l=="last"?"Right":""):l],w=d||/^find/.test(l);y&&(v.prototype[l]=function(){var C=this.__wrapped__,M=d?[1]:arguments,O=C instanceof ce,P=M[0],D=O||ne(C),F=function(le){var he=y.apply(v,nr([le],M));return d&&W?he[0]:he};D&&c&&typeof P=="function"&&P.length!=1&&(O=D=!1);var W=this.__chain__,J=!!this.__actions__.length,Z=w&&!W,se=O&&!J;if(!w&&D){C=se?C:new ce(this);var Q=s.apply(C,M);return Q.__actions__.push({func:Fo,args:[F],thisArg:t}),new Vt(Q,W)}return Z&&se?s.apply(this,M):(Q=this.thru(F),Z?d?Q.value()[0]:Q.value():Q)})}),$t(["pop","push","shift","sort","splice","unshift"],function(s){var l=lo[s],c=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",d=/^(?:pop|shift)$/.test(s);v.prototype[s]=function(){var y=arguments;if(d&&!this.__chain__){var w=this.value();return l.apply(ne(w)?w:[],y)}return this[c](function(C){return l.apply(ne(C)?C:[],y)})}}),yn(ce.prototype,function(s,l){var c=v[l];if(c){var d=c.name+"";we.call(di,d)||(di[d]=[]),di[d].push({name:l,func:c})}}),di[Oo(t,x).name]=[{name:"wrapper",func:t}],ce.prototype.clone=p2,ce.prototype.reverse=m2,ce.prototype.value=g2,v.prototype.at=qv,v.prototype.chain=Kv,v.prototype.commit=Gv,v.prototype.next=Jv,v.prototype.plant=Yv,v.prototype.reverse=Xv,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=Zv,v.prototype.first=v.prototype.head,ss&&(v.prototype[ss]=jv),v},ci=Gb();Mr?((Mr.exports=ci)._=ci,Vl._=ci):Qe._=ci}).call(sI)}(js,js.exports)),js.exports}var ay=oI();function ih(n){return n.type.create(ay.cloneDeep(n.attrs))}const aI=De.create({name:"node_processor",addCommands(){return{setBlockAttributes:B(({commands:n,state:e},t,r,i={})=>{const o=H(n.getBlockAttributes(t))??{},{doc:a,tr:u}=e,{from:f,to:h}=u.selection;a.nodesBetween(f,h,(m,p)=>{ie.blocks.includes(m.type.name)&&u.setNodeAttribute(p,t,{...i,...o,...r})})}),getBlockAttributes:B(({editor:n},e,t)=>me(()=>{let r=Object.assign({},t||{});for(const i of ie.blocks)Object.assign(r,n.getAttributes(i)?.[e]||{});return Object.keys(r).length?r:null})),removeBlockAttributes:B(({commands:n},e)=>{for(const t of ie.blocks)n.resetAttributes(t,e)}),applyMark:B(({state:n,commands:e},t,r,i={})=>{const{tr:o,doc:a,schema:u}=n,{$from:f,$to:h}=o.selection,m=wn(de.LINK,u),p=wn(t,u);if(!(p.spec.group||"").includes(dn.SETTINGS))return e.setMark(t,r);if(f.pos===h.pos)return;const S=E=>{if(!i.onAppliedToParent||i.onAppliedToParent(E)===!1){const{tr:g,node:_,position:x,mark:k}=E;e._removeNodeMark({tr:g,node:_,position:x,mark:k.type})}};a.nodesBetween(f.pos,h.pos,(E,g)=>{if(E.type.name===ie.LIST)return;const _=iI(E.marks,t),x=p.create({..._?.attrs||{},...r}),k=iy(f,h,E,g);if(!m.isInSet(E.marks)&&rI(o.doc,g,x,i.isAppliedToParent))return S({tr:o,node:E,position:g,mark:x});if(E.isText){o.addMark(k.from,k.to,x);return}tI(o.doc,o.selection,E,g)&&o.addNodeMark(g,x)})}),getMarks:B(({editor:n},e)=>{const t=xi(n,"state");return me(()=>{const{selection:r,doc:i}=H(t),{from:o,to:a}=H(r),u=[];return i.nodesBetween(o,a,f=>{for(const h of f.marks)h.type.name===e&&u.unshift(h.attrs)}),u})}),getMark:B(({commands:n},e)=>{const t=n.getMarks(e);return me(()=>H(t)[0]??null)}),hasMark:B(({commands:n},e)=>{const t=n.getMark(e);return me(()=>!!H(t))}),getCommonSettingMark:B(({commands:n},e,t)=>{const r=n.getMark(e);return me(()=>H(r)?.value??H(t))}),getDeviceSettingMark:B(({commands:n},e,t)=>{const r=n.getMarks(e),i=n.getDevice();return me(()=>{for(const o of H(r)){const a=o[H(i)];if(a)return a}return H(t)})}),removeAllMarks:B(({state:n,commands:e})=>{const{tr:t,doc:r}=n,{from:i,to:o}=t.selection;r.nodesBetween(i,o,(a,u)=>{for(const f of a.marks)e._removeNodeMark({tr:t,node:a,position:u,mark:f})})}),removeMarks:B(({state:n,commands:e},t)=>{const{tr:r,doc:i}=n,{from:o,to:a}=r.selection;i.nodesBetween(o,a,(u,f)=>{const h=u.marks.filter(m=>t.includes(m.type.name));for(const m of h)e._removeNodeMark({tr:r,node:u,position:f,mark:m})})}),_removeNodeMark:B((n,{tr:e,node:t,position:r,mark:i})=>t.isText?e.removeMark(r,r+t.nodeSize,i):e.removeNodeMark(r,i))}}}),lI=De.create({name:"text_processor",addCommands(){return{getSelectedText:B(({state:n})=>{const{from:e,to:t}=n.selection;return n.doc.textBetween(e,t," ")}),transformText:B(({state:n},e)=>{const{$from:t,$to:r}=n.tr.selection;t.pos!==r.pos&&n.doc.nodesBetween(t.pos,r.pos,(i,o)=>{if(!i.isText)return;const a=iy(t,r,i,o),u=Math.max(0,t.pos-o),f=Math.max(0,r.pos-o),h=e({text:i.textContent.substring(u,f)}),m=n.schema.text(h,i.marks);n.tr.replaceWith(a.from,a.to,m)})})}}}),uI=De.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:B(({state:n})=>{this.storage.selection=n.selection}),restoreSelection:B(({commands:n})=>{this.storage.selection&&n.setTextSelection(this.storage.selection)}),expandSelection:B(({tr:n,commands:e},t)=>{let r=n.selection.from,i=n.selection.to;n.doc.nodesBetween(r,i,(o,a,u)=>{if(t({node:o,parent:u})){const f=o.isText?0:sy(n.doc,a);r=Math.min(r,a+f),i=Math.max(i,a+o.nodeSize-f)}}),e.setTextSelection({from:r,to:i})}),expandSelectionToBlock:B(({commands:n})=>{n.expandSelection(({parent:e})=>e.type.name===ie.DOCUMENT)})}}}),cI=Xn.create({name:"doc",topNode:!0,content:"block+"});class Xs extends lt{constructor(e,t,r,i="SetDocAttr"){super(),this.key=e,this.value=t,this.schema=r,this.stepType=i}apply(e){this.prevValue=e.attrs.meta[this.key];const t=Wr.fromJSON(this.schema,e.toJSON());return t.attrs.meta[this.key]=this.value,Fe.ok(t)}invert(){return new Xs(this.key,this.prevValue,this.schema,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(e){return new Xs(e.key,e.value,e.stepType)}}lt.jsonID("setDocAttr",Xs);const fI=cI.extend({marks:dn.SETTINGS,addAttributes:()=>({meta:{default:{}}}),onCreate(){this.editor.view.dom.addEventListener("click",n=>{n.target.closest("a")&&n.preventDefault()})},addCommands(){return{setDocMetaAttributes:B(({state:n},e,t)=>{n.tr.step(new Xs(e,t,n.schema))})}}}),hI=Xn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Fi(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),dI=hI.extend({marks:dn.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),pI=Xn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Fi(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>GM({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}}),mI=pI.extend({marks:dn.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),gI=De.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[oT.create(this.editor),aT.create(this.editor)]}}),yI=()=>[fI,dI,mI,YM,sT,aI,lI,uI,gI],bI=Pt.create({name:de.FONT_FAMILY,group:dn.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:B(({commands:n},e)=>{n.applyMark(this.name,{value:e});const t=n.findFontByName(e);let r=H(n.getFontWeight());t.isWeightSupported(r)||(r=t.findClosestWeight(r),n.applyFontWeight(r));const i=n.isSettingCustomized(de.FONT_STYLE).value;!t.isItalicSupported(r)&&i&&n.removeItalic()}),getFont:B(({commands:n})=>{const e=H(this.options.defaultPreset),t=n.findFontByName(e.common.font_family),r=n.getFontFamily();return me(()=>n.findFontByName(H(r))||t)}),findFontByName:B((n,e)=>H(this.options.fonts).find(t=>t.name===e)??this.options.defaultFont),getFontFamily:B(({commands:n})=>n.getCommonSettingMark(this.name,n.getDefaultFontFamily())),getDefaultFontFamily:B(({commands:n})=>{const e=n.getPreset();return me(()=>H(e).common.font_family)})}},parseHTML(){const n=e=>({value:e.replace(/["']/g,"")});return[{style:"--zw-font-family",getAttrs:n},{style:"font-family",getAttrs:n}]},renderHTML({HTMLAttributes:n}){const e=n.value?`"${n.value}"`:null;return Qr({font_family:e})}}),_I=De.create({name:de.STYLE_PRESET,addGlobalAttributes(){return[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{preset:{isRequired:!1,default:{id:H(this.options.defaultId)},parseHTML:n=>{const e=H(this.options.presets);if(n.parentElement.tagName==="LI")return null;for(const{id:t,node:r,fallbackClass:i}of e){if(i&&n.classList.contains(i))return{id:t};const o=H(this.options.styleRenderer).makePresetCssClass({id:t});if(n.matches(o))return{id:t};if(n.tagName===`H${r?.level}`)return{id:t}}return n.tagName==="P"?{id:H(this.options.defaultId)}:null},renderHTML:n=>n.preset?{class:H(this.options.styleRenderer).makePresetHtmlClass(n.preset)}:null}}}]},addCommands(){function n(t,r){return t.find(i=>r===i.id)}function e(t,r){const i={};for(const o of Object.keys(t)){const a=t[o],u=r[o],f=!u||u.toLowerCase()==="inherit";i[o]=f?a:u}return i}return{getPresetList:B(()=>me(()=>H(this.options.presets).filter(t=>!t.hidden))),getPreset:B(({commands:t})=>{const r=t.getBlockAttributes("preset",{id:H(this.options.defaultId)}),i=t.getPresetList(),o=t.isLink(),a=t.getLinkPreset();return me(()=>{const u=n(H(i),H(r).id);if(!H(o))return u;const f=H(a);return{id:u.id,common:e(u.common,f.common),mobile:e(u.mobile,f.mobile),tablet:e(u.tablet,f.tablet),desktop:e(u.desktop,f.desktop)}})}),applyPreset:B(({commands:t,chain:r},i)=>{const o=H(t.getPresetList()),a=n(o,i),u=a.node?.type??ie.PARAGRAPH,f={preset:{id:i}};a.node&&(f.level=a.node.level);for(const h of de.attributes)f[h]=H(t.getBlockAttributes(h));r().removeList().setNode(u,f).run()}),applyDefaultPreset:B(({commands:t})=>{t.applyPreset(H(this.options.defaultId))}),removePreset:B(({commands:t})=>{t.setNode(ie.PARAGRAPH,{preset:null})}),getPresetCustomization:B(({editor:t,commands:r})=>{const i=xi(t,"state");return me(()=>{const{selection:o,doc:a}=H(i),{from:u,to:f}=o;return r._getSettingCustomization(a,u,f)})}),isSettingCustomized:B(({commands:t},r)=>{const i=t.getPresetCustomization(),o=de.presetAttributes.includes(r)?"attributes":"marks";return me(()=>H(i)[o]?.includes(r)??!1)}),getContentCustomization:B(({editor:t,commands:r})=>{const i=xi(t,"state");return me(()=>{const{doc:o}=H(i);return r._getSettingCustomization(o,0,o.content.size)})}),_getSettingCustomization:B((t,r,i,o)=>{const a=new Set,u=new Set;return r.nodesBetween(i,o,f=>{for(const[h,m]of Object.entries(f.attrs))de.presetAttributes.includes(h)&&m&&u.add(h);for(const{type:h}of f.marks)de.marks.includes(h.name)&&a.add(h.name)}),{attributes:Array.from(u),marks:Array.from(a)}}),removePresetCustomization:B(({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(de.marks).resetAttributes(ie.PARAGRAPH,de.presetAttributes).resetAttributes(ie.HEADING,de.presetAttributes).restoreSelection().run()}),removeFormat:B(({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()})}},onCreate(){this.options.styleRenderer.inject(Ki.head,H(this.options.presets))}}),vI=Pt.create({name:de.FONT_WEIGHT,group:dn.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:B(({commands:n},e)=>{n.applyMark(this.name,{value:e}),H(n.getFont()).isItalicSupported(e)||n.removeItalic()}),toggleBold:B(({commands:n})=>{const e=H(n.getFontWeight()),t=H(n.getFont()),i=Number(e)>=600?"400":"700",o=t.findClosestWeight(i);n.applyFontWeight(o)}),getFontWeight:B(({commands:n})=>{const e=n.getCommonSettingMark(this.name,n.getDefaultFontWeight()),t=n.getFont();return me(()=>{const r=H(e),i=H(t);return i.isWeightSupported(r)?r:i.findClosestWeight(r)})}),getDefaultFontWeight:B(({commands:n})=>{const e=n.getPreset();return me(()=>H(e).common.font_weight)})}},addKeyboardShortcuts:()=>({"Mod-b":Zt("toggleBold"),"Mod-B":Zt("toggleBold")}),parseHTML(){const n=e=>e==="bold"?{value:"700"}:Number(e)?{value:e}:!1;return[{style:"--zw-font-weight",getAttrs:n},{style:"font-weight",getAttrs:n},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML({HTMLAttributes:n}){return Qr({font_weight:n.value})}}),wI=Pt.create({name:de.FONT_SIZE,group:dn.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes(){return{mobile:{default:null},tablet:{default:null},desktop:{default:null}}},addCommands(){return{getFontSize:B(({commands:n})=>n.getDeviceSettingMark(this.name,n.getDefaultFontSize())),getDefaultFontSize:B(({commands:n})=>{const e=n.getDevice(),t=n.getPreset();return me(()=>H(t)[H(e)].font_size.replace("px",""))}),applyFontSize:B(({commands:n},e)=>{const t=H(n.getDevice());n.applyMark(this.name,{[t]:e},{isAppliedToParent:(r,i)=>r.type.name!==i.type.name?!1:r.attrs[t]===i.attrs[t],onAppliedToParent:({tr:r,node:i,position:o,mark:a})=>{const u={...a.attrs,[t]:null};if(!Object.values(u).some(m=>!!m))return!1;const h=a.type.create(u);if(i.isText){r.addMark(o,o+i.nodeSize,h);return}r.addNodeMark(o,h)}})}),increaseFontSize:B(({commands:n})=>{const e=Number(H(n.getFontSize())),t=Math.min(e+1,H(this.options.maxSize));n.applyFontSize(String(t))}),decreaseFontSize:B(({commands:n})=>{const e=Number(H(n.getFontSize())),t=Math.max(e-1,H(this.options.minSize));n.applyFontSize(String(t))})}},addKeyboardShortcuts:()=>({"Mod-Shift-=":Zt("increaseFontSize"),"Mod-Shift--":Zt("decreaseFontSize")}),parseHTML(){const n=e=>{if(!e)return null;const t=H(this.options.wrapperRef),r=ry(e,t);return String(r)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:e})=>({mobile:n(e.getPropertyValue("--zw-font-size-mobile")),tablet:n(e.getPropertyValue("--zw-font-size-tablet")),desktop:n(e.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:e=>{const t=n(e);return{desktop:t,tablet:t,mobile:null}}}]},renderHTML({HTMLAttributes:n}){const e=t=>t?`${t}px`:null;return Qr({font_size_mobile:e(n.mobile),font_size_tablet:e(n.tablet),font_size_desktop:e(n.desktop)})}}),SI=Pt.create({name:de.FONT_COLOR,group:dn.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:B(({commands:n})=>n.getCommonSettingMark(this.name,n.getDefaultFontColor())),getDefaultFontColor:B(({commands:n})=>{const e=n.getPreset();return me(()=>H(e).common.color)}),applyFontColor:B(({commands:n},e)=>{n.applyMark(this.name,{value:e})})}},parseHTML(){const n=e=>({value:ny(e)});return[{style:"--zw-font-color",getAttrs:n},{style:"color",getAttrs:n}]},renderHTML({HTMLAttributes:n}){return Qr({font_color:n.value})}}),xI=Pt.create({name:de.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:B(({commands:n})=>n.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)")),applyBackgroundColor:B(({commands:n},e)=>{n.applyMark(this.name,{value:e})})}},parseHTML(){const n=e=>({value:ny(e)});return[{style:"--zw-background-color",getAttrs:n},{style:"background-color",getAttrs:n}]},renderHTML({HTMLAttributes:n}){return Qr({background_color:n.value})}}),EI=De.create({name:"device_manager",addCommands(){return{getDevice:B(()=>xi(this.options,"device"))}}}),CI=Pt.create({name:de.FONT_STYLE,group:dn.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:B(({commands:n})=>{const e=n.getMark(this.name),t=n.getDefaultFontStyle();return me(()=>H(e)?.italic??H(t).italic)}),isItalicAvailable:B(({commands:n})=>{const e=n.getFont(),t=n.getFontWeight();return me(()=>{const r=H(e),i=H(t);return r.isItalicSupported(i)&&!r.isWeightItalicOnly(i)})}),getDefaultFontStyle:B(({commands:n})=>{const e=n.getPreset();return me(()=>({italic:H(e).common.font_style==="italic"}))}),toggleItalic:B(({commands:n})=>{H(n.isItalicAvailable())&&(H(n.isItalic())?n.removeItalic():n.applyItalic())}),applyItalic:B(({commands:n})=>{n.applyMark(this.name,{italic:!0})}),removeItalic:B(({commands:n})=>{n.applyMark(this.name,{italic:!1})})}},addKeyboardShortcuts:()=>({"Mod-i":Zt("toggleItalic"),"Mod-I":Zt("toggleItalic")}),parseHTML(){const n=e=>({italic:e.includes("italic")});return[{tag:"i",attrs:{italic:!0}},{style:"--zw-font-style",getAttrs:n},{style:"font-style",getAttrs:n}]},renderHTML({HTMLAttributes:n}){const e=n.italic?"italic":"normal";return Qr({font_style:e})}}),kI=Pt.create({name:de.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:B(({commands:n})=>{const e=n.getTextDecoration();return me(()=>H(e).underline)}),isStrikeThrough:B(({commands:n})=>{const e=n.getTextDecoration();return me(()=>H(e).strike_through)}),getTextDecoration:B(({commands:n})=>{const e=n.getMark(this.name),t=n.getDefaultTextDecoration();return me(()=>{const r=H(e)??{},i=H(t);return{underline:r.underline||i.underline,strike_through:r.strike_through||i.strike_through}})}),isUnderlineCustomized:B(({commands:n})=>{const e=n.isUnderline(),t=n.getDefaultTextDecoration();return me(()=>H(e)!==H(t).underline)}),getDefaultTextDecoration:B(({commands:n})=>{const e=n.getPreset();return me(()=>{const{text_decoration:t}=H(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}})}),toggleUnderline:B(({commands:n})=>{n.toggleTextDecoration("underline")}),toggleStrikeThrough:B(({commands:n})=>{n.toggleTextDecoration("strike_through")}),toggleTextDecoration:B(({commands:n},e,t=null)=>{const r=H(n.getTextDecoration()),i=t??!r[e];n.applyMark(this.name,{[e]:i})}),applyTextDecoration:B(({commands:n},e)=>{n.toggleTextDecoration(e,!0)}),removeTextDecoration:B(({commands:n},e)=>{n.toggleTextDecoration(e,!1)})}},addKeyboardShortcuts:()=>({"Mod-u":Zt("toggleUnderline"),"Mod-U":Zt("toggleUnderline")}),parseHTML(){const n=e=>{const t=e.includes("underline"),r=e.includes("line-through");return!t&&!r?!1:{underline:t,strike_through:r}};return[{style:"--zw-text-decoration",getAttrs:n},{style:"text-decoration-line",getAttrs:n},{style:"text-decoration",getAttrs:n},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:n}){const e=[];return n.underline&&e.push("underline"),n.strike_through&&e.push("line-through"),e.length||e.push("none"),Qr({text_decoration:e.join(" ")})}}),AI=De.create({name:"case_style",addCommands(){return{applyCaseStyle:B(({commands:n},e)=>{switch(e){case Sf.CAPITALIZE:return n.applyCapitalize();case Sf.LOWERCASE:return n.applyLowerCase();case Sf.UPPERCASE:return n.applyUpperCase()}}),applyCapitalize:B(({commands:n})=>{n.transformText(({text:e})=>MT(e))}),applyLowerCase:B(({commands:n})=>{n.transformText(({text:e})=>e.toLowerCase())}),applyUpperCase:B(({commands:n})=>{n.transformText(({text:e})=>e.toUpperCase())})}}}),ly={mobile:null,tablet:null,desktop:null},MI=De.create({name:de.ALIGNMENT,addGlobalAttributes:()=>[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{[de.ALIGNMENT]:{isRequired:!1,parseHTML({style:n}){const e=eI(n.textAlign);if(e)return{desktop:e,tablet:e,mobile:e};const t=n.getPropertyValue("--zw-alignment-mobile")||null,r=n.getPropertyValue("--zw-alignment-tablet")||null,i=n.getPropertyValue("--zw-alignment-desktop")||null;return!t&&!r&&!i?null:{desktop:i,tablet:r,mobile:t}},renderHTML(n){return n.alignment?cl({alignment_mobile:n.alignment.mobile,alignment_tablet:n.alignment.tablet,alignment_desktop:n.alignment.desktop}):null}}}}],addCommands(){return{applyAlignment:B(({commands:n},e)=>{const t=H(n.getDevice());n.setBlockAttributes(this.name,{[t]:e},ly)}),removeAlignment:B(({commands:n})=>n.removeBlockAttributes(this.name)),getAlignment:B(({commands:n})=>{const e=n.getBlockAttributes(this.name,ly),t=n.getDevice(),r=n.getDefaultAlignment();return me(()=>H(e)?.[H(t)]??H(r))}),getDefaultAlignment:B(({commands:n})=>{const e=n.getDevice(),t=n.getPreset();return me(()=>H(t)[H(e)].alignment??wr.LEFT)})}},addKeyboardShortcuts:()=>({"Mod-Shift-l":Zt("applyAlignment",wr.LEFT),"Mod-Shift-e":Zt("applyAlignment",wr.CENTER),"Mod-Shift-r":Zt("applyAlignment",wr.RIGHT),"Mod-Shift-j":Zt("applyAlignment",wr.JUSTIFY)})}),uy={mobile:null,tablet:null,desktop:null},TI=De.create({name:de.LINE_HEIGHT,addGlobalAttributes(){return[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{[de.LINE_HEIGHT]:{isRequired:!1,parseHTML:n=>{if(n.matches('[style*="--zw-line-height"]')){const o=n.style.getPropertyValue("--zw-line-height-tablet")||null,a=n.style.getPropertyValue("--zw-line-height-desktop")||null;return{mobile:null,tablet:o,desktop:a}}const e=n.style.lineHeight;if(!e)return null;const t=H(this.options.wrapperRef),r=ZO(e,n,t);return r?{desktop:r,tablet:r,mobile:null}:null},renderHTML(n){return n.line_height?cl({line_height_mobile:n.line_height.mobile,line_height_tablet:n.line_height.tablet,line_height_desktop:n.line_height.desktop}):null}}}}]},addCommands(){return{getLineHeight:B(({commands:n})=>{const e=n.getBlockAttributes(this.name,uy),t=n.getDevice(),r=n.getDefaultLineHeight();return me(()=>H(e)?.[H(t)]??H(r))}),getDefaultLineHeight:B(({commands:n})=>{const e=n.getDevice(),t=n.getPreset();return me(()=>H(t)[H(e)].line_height)}),applyLineHeight:B(({commands:n},e)=>{const t=H(n.getDevice());n.setBlockAttributes(this.name,{[t]:e},uy)})}}}),OI=Xn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Fi(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),II=OI.extend({name:ie.LIST_ITEM,marks:dn.SETTINGS,addCommands(){const n=({selection:e})=>e.$cursor.before(e.$cursor.depth-1);return{listItemNewline:B(({commands:e,tr:t})=>{const r=t.doc.nodeAt(n(t));if(!t.selection.$cursor.node().textContent)return!1;e.splitListItem(this.name);const o=n(t);for(const a of r.marks)t.addNodeMark(o,ih(a));return!0})}},addOptions:()=>({HTMLAttributes:{class:"zw-style"}}),addKeyboardShortcuts:()=>({Enter:n=>{const{state:e,commands:t}=n.editor;if(e.selection.$cursor?.path.some(i=>i.type?.name===ie.LIST))return t.listItemNewline()}})}),NI=Xn.create({name:ie.LIST,content:`${ie.LIST_ITEM}+`,group:"block list",marks:dn.SETTINGS,addExtensions:()=>[II],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:Yt.DISC}}}),parseHTML(){const n={a:Yt.ROMAN,i:Yt.LATIN,1:Yt.DECIMAL},e=t=>{for(const r of Yt.values){const i=`.${H(this.options.baseClass)}${r}`;if(t.matches(i)||n[t.type.toLowerCase()]===r)return r}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||Yt.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||Yt.DISC}})}]},renderHTML({HTMLAttributes:n}){const e=[H(this.options.baseClass)+n.bullet.type,H(this.options.presetClass)];return[Yt.ordered.includes(n.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands(){return{getListType:B(({commands:n})=>{const e=n.getBlockAttributes("bullet",{type:null});return me(()=>H(e).type??null)}),applyList:B(({commands:n,chain:e},t)=>{if(H(n.getListType())===t){n.removeList();return}return e().applyDefaultPreset().toggleList(ie.LIST,ie.LIST_ITEM).setBlockAttributes("bullet",{type:t}).command(({commands:i,tr:o})=>i._bubbleListItemMarks(o)).run()}),_bubbleListItemMarks:B((n,e)=>{const{doc:t,selection:r}=e,i=r.$from.start(),o=r.$to.end();function a(u,f){if(de.inlineMarks.includes(f.type)||f.type.isInSet(u.marks))return!1;for(const h of u.content.content)if(h.childCount&&(!h.marks||!f.isInSet(h.marks)))return!1;return!0}t.nodesBetween(i,o,(u,f)=>{if(u.type.name===ie.LIST)return;if(u.type.name!==ie.LIST_ITEM)return!1;const h=[];return u.forEach(m=>{for(const p of m.marks){if(p.isInSet(h)){e.removeNodeMark(f+1,p);continue}a(u,p)&&(e.removeNodeMark(f+1,p),e.addNodeMark(f,ih(p)),h.push(p))}}),!1})}),removeList:B(({commands:n,state:e})=>{const{tr:t,doc:r,selection:i}=e,o=i.$from.start(),a=i.$to.end();r.nodesBetween(o,a,(u,f,h)=>{if([ie.LIST,ie.LIST_ITEM].includes(u.type.name))return;if(h.type.name!==ie.LIST_ITEM)return!1;const m=h.marks.filter(function(p){return!p.type.isInSet(u.marks)});for(const p of m)t.addNodeMark(f,ih(p));return!1}),n.liftListItem(ie.LIST_ITEM)})}},addInputRules(){const n=(e,t)=>JM({find:t,type:this.type,getAttributes:{bullet:{type:e}},joinPredicate:(r,{attrs:i})=>i.bullet.type===e});return[n(Yt.DISC,/^\s*([-+*])\s$/),n(Yt.DECIMAL,/^(\d+)\.\s$/),n(Yt.LATIN,/^([ivx]{1,3})\.\s$/i),n(Yt.ROMAN,/^([a-z])\.\s$/i)]}});function RI(n){return new Rt({key:new fn("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(h=>h.docChanged)&&!t.doc.eq(r.doc),o=e.some(h=>h.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=r,u=gM(t.doc,[...e]);if(CM(u).forEach(({newRange:h})=>{const m=bM(r.doc,h,S=>S.isTextblock);let p,b;if(m.length>1?(p=m[0],b=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):m.length&&r.doc.textBetween(h.from,h.to," "," ").endsWith(" ")&&(p=m[0],b=r.doc.textBetween(p.pos,h.to,void 0," ")),p&&b){const S=b.split(" ").filter(_=>_!=="");if(S.length<=0)return!1;const E=S[S.length-1],g=p.pos+b.lastIndexOf(E);if(!E)return!1;Vf(E).filter(_=>_.isLink).map(_=>({..._,from:g+_.start+1,to:g+_.end+1})).filter(_=>r.schema.marks.code?!r.doc.rangeHasMark(_.from,_.to,r.schema.marks.code):!0).filter(_=>n.validate?n.validate(_.value):!0).forEach(_=>{I0(_.from,_.to,r.doc).some(x=>x.mark.type===n.type)||a.addMark(_.from,_.to,n.type.create({href:_.href}))})}}),!!a.steps.length)return a}})}function LI(n){return new Rt({key:new fn("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,o;if(r.button!==0||r.target.nodeName!=="A")return!1;const u=SM(e.state,n.type.name),f=r.target,h=(i=f?.href)!==null&&i!==void 0?i:u.href,m=(o=f?.target)!==null&&o!==void 0?o:u.target;return f&&h?(e.editable&&window.open(h,m),!0):!1}}})}function PI(n){return new Rt({key:new fn("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var i;const{state:o}=e,{selection:a}=o,{empty:u}=a;if(u)return!1;let f="";r.content.forEach(E=>{f+=E.textContent});const h=Vf(f).find(E=>E.isLink&&E.value===f);if(!f||!h)return!1;const m=(i=t.clipboardData)===null||i===void 0?void 0:i.getData("text/html"),p=/href="([^"]*)"/,b=m?.match(p),S=b?b[1]:h.href;return n.editor.commands.setMark(n.type,{href:S}),!0}}})}const DI=Pt.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){t1(n);return}t1(n.scheme,n.optionalSlashes)})},onDestroy(){ET()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){var e;return!((e=n.href)===null||e===void 0)&&e.startsWith("javascript:")?["a",Fi(this.options.HTMLAttributes,{...n,href:""}),0]:["a",Fi(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[jM({find:n=>Vf(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const i=(t=e?.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),o=/href="([^"]*)"/,a=i?.match(o);return a?{href:a[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(RI({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(LI({type:this.type})),this.options.linkOnPaste&&n.push(PI({editor:this.editor,type:this.type})),n}}),FI=DI.extend({name:de.LINK,addOptions(){return{...this.parent?.(),openOnClick:!1,linkOnPaste:!1}},addAttributes(){return{href:{default:null,parseHTML:n=>{const e=n.getAttribute("href");return e.startsWith("#")?parseFloat(n.getAttribute("href").replace("#","")):e}},target:{default:H0.SELF,parseHTML:n=>n.getAttribute("target")||H0.SELF},destination:{default:Bs.URL,parseHTML:n=>{const e=n.getAttribute("href");if(!e.startsWith("#"))return Bs.URL;const t=e.replace("#","");return H(this.options.pageBlocks).find(o=>o.id===parseInt(t))?Bs.BLOCK:Bs.URL}}}},addCommands(){const{unsetLink:n}=this.parent();return{removeLink:n,applyLink:B(({commands:e,chain:t},r)=>(e.setMeta("preventAutolink",!0),e.getSelectedText()?t().applyMark(this.name,r).expandSelectionToLink().command(({tr:i})=>(r.text&&i.insertText(r.text,i.selection.from,i.selection.to),!0)).run():e.insertContent(fy.text(r.text,[fy.mark(de.LINK,r)])))),expandSelectionToLink:B(({commands:e})=>{e.expandSelection(({node:t})=>this.type.isInSet(t.marks))}),isLink:B(({commands:e})=>e.hasMark(this.name)),getLinkPreset:B(()=>me(()=>H(this.options.preset)))}},addProseMirrorPlugins(){return[...this.parent(),AT.create(this.editor)]},renderHTML({HTMLAttributes:n}){const e=n.destination===Bs.BLOCK?`#${n.href}`:n.href,t=H(this.options.basePresetClass)+H(this.options.preset).id;return["a",{href:e,target:n.target,class:`${t} zw-style`},0]}}),zI=Pt.create({name:de.SUPERSCRIPT,addCommands(){return{applySuperscript:B(({commands:n})=>{n.setMark(this.name)}),removeSuperscript:B(({commands:n})=>{n.unsetMark(this.name)}),toggleSuperscript:B(({commands:n})=>{H(n.isSuperscript())?n.removeSuperscript():n.applySuperscript()}),isSuperscript:B(({commands:n})=>{const e=n.getMark(this.name);return me(()=>!!H(e))})}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs:n=>n!=="super"?!1:null}]},renderHTML(){return["sup",{class:"zw-superscript"},0]}}),BI=De.create({name:de.MARGIN,addGlobalAttributes:()=>[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{[de.MARGIN]:{isRequired:!1,parseHTML(n){const{margin:e,marginTop:t,marginRight:r,marginBottom:i,marginLeft:o}=n.style;return[e,t,r,i,o].some(f=>!!f)?e?{value:e}:{value:[t||0,r||0,i||0,o||0].join(" ")}:null},renderHTML(n){return n.margin?cl({margin:n.margin.value}):null}}}}]});function $I(n){const e=r=>n.presetsRef.value.find(i=>i.id===r),t=hc({default:null,link:null});return PE(n.presetsRef,()=>{t.default=e(n.defaultPresetId),t.link=e(n.linkPresetId)},{immediate:!0,deep:!0}),yI().concat([_I.configure({presets:n.presetsRef,defaultId:n.defaultPresetId,styleRenderer:new WI({baseClass:n.basePresetClass,makeVariable:n.makePresetVariable,linkPresetId:n.linkPresetId})}),NI.configure({baseClass:n.baseListClass,presetClass:n.basePresetClass+n.defaultPresetId}),EI.configure({device:n.deviceRef}),wI.configure({minSize:n.minFontSize,maxSize:n.maxFontSize,wrapperRef:n.wrapperRef}),bI.configure({fonts:n.fonts,defaultPreset:xi(t,"default"),defaultFont:n.defaultFont}),vI,SI,xI,CI,kI,AI,zI,MI,TI.configure({wrapperRef:n.wrapperRef}),FI.configure({preset:xi(t,"link"),basePresetClass:n.basePresetClass,pageBlocks:n.pageBlocksRef}),BI])}class HI{_domParser=new DOMParser;types=window;parse(e){return this._domParser.parseFromString(e,"text/html")}}class cy{content;constructor({content:e}){this.content=e}normalize(){throw new Error("Implement abstract method")}}class kn extends cy{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=kn.BLOCK_NODE_NAMES.concat("UL","OL");static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];_parser;constructor({content:e,parser:t}){super({content:e}),this._parser=t,this.dom=null}normalize(){return this.normalizeHTML(),this.normalizedHTML}normalizeHTML(){this.dom=this._parser.parse(this.content.replace(/(\r)?\n/g,"")),this._removeComments(),this._normalizeRootTags(),this._iterateNodes(this._normalizeBreakLines,e=>e.tagName==="BR"),this._iterateNodes(this._removeEmptyNodes,this._isBlockNode),this._iterateNodes(this._normalizeListItems,e=>e.tagName==="LI"),this._normalizeBlockTextDecoration(),this._normalizeBlockBackgroundColor()}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const e=this._createNodeIterator(this._NodeFilter.SHOW_COMMENT);this._runIterator(e,t=>t.remove())}_normalizeRootTags(){const e=Array.from(this.dom.body.childNodes),t=this.dom.createDocumentFragment();let r;for(const i of e){if(this._isRootNode(i)){t.append(i),r=null;continue}r||(r=this.dom.createElement("p"),t.append(r)),r.append(i)}this.dom.body.innerHTML="",this.dom.body.append(t)}_createNodeIterator(e,t){return this.dom.createNodeIterator(this.dom.body,e,t)}_iterateNodes(e,t=()=>!0){const r=o=>o.tagName!=="BODY"&&t.call(this,o),i=this._createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:o=>r(o)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this._runIterator(i,e)}_runIterator(e,t){let r=e.nextNode();for(;r;)t.call(this,r),r=e.nextNode()}_removeEmptyNodes(e){e.innerHTML.trim()||e.remove()}_normalizeListItems(e){const t=this.dom.createDocumentFragment(),r=Array.from(e.childNodes);let i,o;const a=u=>{this._assignElementProperties(u,e,kn.BLOCK_STYLES),t.append(u)};this._assignElementProperties(e,e.parentElement,kn.BLOCK_STYLES);for(const u of r){if(this._isBlockNode(u)){a(u),i=null,o=u;continue}if(u.tagName==="BR"&&o&&o?.tagName!=="BR"){u.remove(),o=u;continue}if(u.tagName==="BR"){const f=this.dom.createElement("p");f.append(u),a(f),i=null,o=u;continue}i||(i=this.dom.createElement("p"),a(i)),i.append(u),o=u}e.append(t),this._removeStyleProperties(e,kn.BLOCK_STYLES),this._removeStyleProperties(e.parentElement,kn.BLOCK_STYLES),this._assignElementProperties(e,e.parentElement),e.parentElement.lastElementChild===e&&this._removeStyleProperties(e.parentElement)}_isBlockNode(e){return kn.BLOCK_NODE_NAMES.includes(e.tagName)}_isRootNode(e){return kn.ROOT_NODE_NAMES.includes(e.tagName)}_assignElementProperties(e,t,r=Array.from(t.style)){for(const i of r){const o=t.style.getPropertyValue(i);o&&!e.style.getPropertyValue(i)&&e.style.setProperty(i,o)}}_removeStyleProperties(e,t=Array.from(e.style)){for(const r of t)e.style.removeProperty(r);e.style.length===0&&e.removeAttribute("style")}_normalizeBreakLines({parentElement:e}){if(!this._isBlockNode(e)||!e.textContent)return;const t=this.dom.createDocumentFragment(),r=Array.from(e.childNodes),i=e.cloneNode(!0);i.innerHTML="";let o=i.cloneNode();const a=u=>{this._assignElementProperties(u,e,kn.BLOCK_STYLES),t.append(u)};for(const u of r){if(u.tagName==="BR"){a(o),o=i.cloneNode();continue}o.append(u)}t.append(o),e.replaceWith(t)}_normalizeBlockTextDecoration(){const e=this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');for(const t of e)this._moveTextDecorationToChildren(t)}_moveTextDecorationToChildren(e){const t=this._parseTextDecoration(e);if(e.style.removeProperty("text-decoration-line"),e.style.removeProperty("text-decoration"),e.style.cssText||e.removeAttribute("style"),!t.none)for(const r of e.childNodes){const i=this._wrapTextNode(e,r),o=this._parseTextDecoration(i),a={underline:o.underline||t.underline,line_through:o.line_through||t.line_through};i.style.removeProperty("text-decoration-line"),i.style.removeProperty("text-decoration"),i.style.textDecoration=Object.entries(a).filter(([,u])=>u).map(([u])=>u.replace("_","-")).join(" ")}}_parseTextDecoration(e){const{textDecoration:t,textDecorationLine:r}=e.style,i=t||r||"";return{none:i.includes("none"),underline:i.includes("underline"),line_through:i.includes("line-through")}}_normalizeBlockBackgroundColor(){const e=this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');for(const t of e)this._moveBackgroundColorToChildren(t)}_moveBackgroundColorToChildren(e){const t=e.style.backgroundColor;e.style.removeProperty("background-color"),e.style.cssText||e.removeAttribute("style");for(const r of e.childNodes){const i=this._wrapTextNode(e,r),o=i.style.backgroundColor||t;i.style.backgroundColor=o}}_wrapTextNode(e,t){if(t.nodeType!==this._Node.TEXT_NODE)return t;const r=this.dom.createElement("span");return r.append(t.cloneNode()),e.replaceChild(r,t),r}}class VI extends cy{normalize(){return this._iterateNodes(this._bubbleMarks),this.content}_iterateNodes(e){this._iterateChildNodes(this.content,e)}_iterateChildNodes(e,t){for(const r of e.content)r.content&&this._iterateChildNodes(r,t),t.call(this,r)}_bubbleMarks(e){if(e.content&&e.type!==ie.LIST){for(const t of e.content)if(!this._isLink(t)&&t.marks)for(const r of t.marks.slice()){if(this._includesMark(e,r)){this._removeMark(t,r);continue}this._canBubbleMark(e,r)&&(this._removeMark(t,r),this._addMark(e,r))}}}_canBubbleMark(e,t){if(de.inlineMarks.includes(t.type)||this._includesMarkType(e,t.type))return!1;for(const r of e.content)if(!(!r.content&&e.type===ie.LIST_ITEM)&&(!r.marks||!this._includesMark(r,t)))return!1;return!0}_includesMark(e,t){return e.marks?.some(r=>ay.isEqual(r,t))??!1}_includesMarkType(e,t){return e.marks?.some(r=>r.type===t)??!1}_isLink(e){return e.type===ie.TEXT&&this._includesMarkType(e,de.LINK)}_removeMark(e,t){if(!e.marks)return;const r=this._findMarkIndexByType(e,t.type);r>=0&&e.marks.splice(r,1),e.marks.length||delete e.marks}_addMark(e,t){this._removeMark(e,t),e.marks??=[],e.marks.push(t)}_findMarkIndexByType(e,t){return e.marks?.findIndex(r=>r.type===t)??null}}class El{static build(e,t={}){return typeof e=="string"?this._buildHtml(e,t):this._buildJson(e)}static _buildHtml(e,t){return new kn({content:e,parser:t.parser||new HI})}static _buildJson(e){return new VI({content:e})}static normalize(e,t={}){return El.build(e,t).normalize()}}class Ki{static window=globalThis.window;static use(e){this.window=e}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(e){return this.window.getComputedStyle(e)}}class hh{static build({config:e,nodeDomParser:t}){const r=$I({fonts:e.fonts,minFontSize:0,maxFontSize:0,presetsRef:sa(e.presets),defaultPresetId:e.defaultPresetId,linkPresetId:e.linkPresetId,makePresetVariable:()=>"",basePresetClass:e.basePresetClass,baseListClass:e.baseListClass,deviceRef:sa(wf.DESKTOP),pageBlocksRef:sa([]),wrapperRef:Ki.document.createElement("p")}),i=vM(r);return new hh({schema:i,domParser:Mc.fromSchema(i),nodeDomParser:t})}_schema;_domParser;_nodeDomParser;constructor({schema:e,domParser:t,nodeDomParser:r}){this._schema=e,this._domParser=t,this._nodeDomParser=r}toJSON(e){const t=El.build(e,{parser:this._nodeDomParser});return t.normalizeHTML(),this._domParser.parse(t.dom.body).toJSON()}}class fy{static doc(e){return{type:ie.DOCUMENT,content:e}}static list(e,t){return{type:ie.LIST,attrs:{bullet:{type:e}},content:t.map(r=>r.type===ie.LIST_ITEM?r:this.listItem([].concat(r)))}}static listItem(...e){const{attrs:t,content:r,marks:i}=this._normalizeTextBlockArgs(e);return{type:ie.LIST_ITEM,...t?{attrs:t}:{},...i?{marks:i}:{},content:[].concat(r).map(o=>typeof o=="string"?this.paragraph(o):o)}}static heading(e,...t){const r=this._textBlock(t,this.text);return r.attrs??={},r.attrs.level=e,{type:ie.HEADING,...r}}static paragraph(...e){return{type:ie.PARAGRAPH,...this._textBlock(e,this.text)}}static _textBlock(e){const{attrs:t,content:r,marks:i}=this._normalizeTextBlockArgs(e);return{content:typeof r=="string"?[this.text(r)]:r,...t?{attrs:t}:{},...i?{marks:i}:{}}}static _normalizeTextBlockArgs(e){return e.length===1?{attrs:null,marks:null,content:e[0]}:e.length===2?{attrs:e[0],marks:null,content:e[1]}:{attrs:e[0],marks:e[1],content:e[2]}}static text(e,t){return{type:ie.TEXT,...t?{marks:t}:{},text:e}}static link(e,t,r=[]){return this.text(e,[this.mark(de.LINK,t),...r])}static mark(e,t){return{type:e,attrs:t}}static populateAllDevices(e){return{mobile:e,tablet:e,desktop:e}}}class WI{_baseClass;_makeVariable;_linkPresetId;constructor({baseClass:e,makeVariable:t,linkPresetId:r}){this._baseClass=e,this._makeVariable=t,this._linkPresetId=r}inject(e,t){let r=e.querySelector("[data-zw-styles]");r||(r=Ki.document.createElement("style"),r.dataset.zwStyles="",r.innerHTML=this.render(t),e.append(r))}render(e){let t="";for(const r of e){const i=r.id===this._linkPresetId,o=this.makePresetCssClass(r);t+=` ${o} {`;for(const a of wf.values)for(const u of Object.keys(r[a])){const f=this._makeVariable({device:a,preset:r,property:u}),h=this._makeInternalVariableName(u,a);if(t+=`${h}: var(${f}, inherit);`,i&&!de.attributes.includes(u)){const m=h.replace("preset-","");t+=`${m}: var(${h});`}}t+="}"}return t}_makeInternalVariableName(e,t){const r=e==="color"?"font-color":e.replace(/_/i,"-"),i=t===wf.COMMON?"":`-${t}`;return`--zw-preset-${r}${i}`}makePresetHtmlClass(e){return this._baseClass+e.id}makePresetCssClass(e){return this.makePresetHtmlClass(e).split(" ").map(t=>`.${t}`).join("")}}class dh{static _instance;static get instance(){return this._instance??=new dh,this._instance}static query(e,t){return this.instance.query(e,t)}query(e,t){let r=null;return e.descendants(i=>{if(r)return!1;if(this.matchNode(i,t))return r=i,!1}),r?t.getMark?this.getMark(r,t.getMark):r:null}matchNode(e,t){return!(t.typeName&&t.typeName!==e.type.name||t.mark&&!this.getMark(e,t.mark))}getMark(e,t){return e.marks.find(r=>this.matchMark(r,t))||null}matchMark(e,t){return e.type.name===t.typeName}}class hy{static createWindow(){return new Kp.JSDOM().window}types;parse(e){const{window:t}=new Kp.JSDOM(e);return this.types=t,t.document}}class dy{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(e){if(!this.name)throw new Error('Command "name" is required');let t=e.command(this.name);if(this.description&&(t=t.description(this.description)),this.argument&&(t=t.argument(this.argument)),this.options.length)for(const r of this.options)t=t.option(r.flags,r.description,r.default);t.action(this.doCommand.bind(this))}output(e){}}class UI extends dy{name="to-json";description="migrate html to json";argument="<html...>";options=[{flags:"-c, --config <path>",description:"Generator config",default:qp.resolve(__dirname,"../bin/zp.config.json")},{flags:"-f, --format <type>",description:"Set output format",default:"rb"}];doCommand(e,{config:t,format:r}){Ki.use(hy.createWindow());const i=qp.resolve(process.cwd(),t),o=hh.build({config:require(i).editor,nodeDomParser:new hy}),a=e.map(h=>o.toJSON(this._formatInputHtml(h))),u=a.length===1?a[0]:a,f=this._stringifyContent(u);this.output(r==="rb"?this._formatOutputRb(f):f)}_formatInputHtml(e){return e.replace(/\\(["'])/g,"$1").replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g,(t,r)=>t.replace(r,parseFloat(r)/100))}_stringifyContent(e){return JSON.stringify(e,(r,i)=>i===null?void 0:i,2)}_formatOutputRb(e){return e.replace(/\\"/g,'"').replace(/font-family: ?'(.+)'/g,'font-family: "$1"').replace(/'/g,"\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,t=>t.replace(/"/g,"")).replace(/: "(.+)"([,\n])/g,": '$1'$2")}}var qI="4.9.2";class KI extends dy{name="version";description="display cli version";doCommand(){this.output(qI)}}const py=new h5,GI=[UI,KI];for(const n of GI)new n().install(py);py.parse();
|
|
59
|
+
}`;var se=Vp(function(){return be(w,J+"return "+F).apply(t,C)});if(se.source=F,Du(se))throw se;return se}function lx(s){return _e(s).toLowerCase()}function ux(s){return _e(s).toUpperCase()}function cx(s,l,c){if(s=_e(s),s&&(c||l===t))return Xh(s);if(!s||!(l=At(l)))return s;var d=sn(s),y=sn(l),w=Zh(d,y),C=Qh(d,y)+1;return lr(d,w,C).join("")}function fx(s,l,c){if(s=_e(s),s&&(c||l===t))return s.slice(0,td(s)+1);if(!s||!(l=At(l)))return s;var d=sn(s),y=Qh(d,sn(l))+1;return lr(d,0,y).join("")}function hx(s,l,c){if(s=_e(s),s&&(c||l===t))return s.replace(Dl,"");if(!s||!(l=At(l)))return s;var d=sn(s),y=Zh(d,sn(l));return lr(d,y).join("")}function dx(s,l){var c=Et,d=yt;if(Me(l)){var y="separator"in l?l.separator:y;c="length"in l?re(l.length):c,d="omission"in l?At(l.omission):d}s=_e(s);var w=s.length;if(li(s)){var C=sn(s);w=C.length}if(c>=w)return s;var M=c-ui(d);if(M<1)return d;var O=C?lr(C,0,M).join(""):s.slice(0,M);if(y===t)return O+d;if(C&&(M+=O.length-M),Fu(y)){if(s.slice(M).search(y)){var P,D=O;for(y.global||(y=Ql(y.source,_e(_h.exec(y))+"g")),y.lastIndex=0;P=y.exec(D);)var F=P.index;O=O.slice(0,F===t?M:F)}}else if(s.indexOf(At(y),M)!=M){var W=O.lastIndexOf(y);W>-1&&(O=O.slice(0,W))}return O+d}function px(s){return s=_e(s),s&&Cy.test(s)?s.replace(gh,Wb):s}var mx=gi(function(s,l,c){return s+(c?" ":"")+l.toUpperCase()}),$u=Wd("toUpperCase");function Hp(s,l,c){return s=_e(s),l=c?t:l,l===t?zb(s)?Kb(s):Tb(s):s.match(l)||[]}var Vp=oe(function(s,l){try{return Ct(s,t,l)}catch(c){return Du(c)?c:new te(c)}}),gx=Pn(function(s,l){return $t(l,function(c){c=_n(c),Rn(s,c,Lu(s[c],s))}),s});function yx(s){var l=s==null?0:s.length,c=X();return s=l?ke(s,function(d){if(typeof d[1]!="function")throw new Ht(a);return[c(d[0]),d[1]]}):[],oe(function(d){for(var y=-1;++y<l;){var w=s[y];if(Ct(w[0],this,d))return Ct(w[1],this,d)}})}function bx(s){return W2(Wt(s,p))}function Hu(s){return function(){return s}}function _x(s,l){return s==null||s!==s?l:s}var vx=qd(),wx=qd(!0);function wt(s){return s}function Vu(s){return wd(typeof s=="function"?s:Wt(s,p))}function Sx(s){return xd(Wt(s,p))}function xx(s,l){return Ed(s,Wt(l,p))}var Ex=oe(function(s,l){return function(c){return ds(c,s,l)}}),Cx=oe(function(s,l){return function(c){return ds(s,c,l)}});function Wu(s,l,c){var d=Ke(l),y=Co(l,d);c==null&&!(Me(l)&&(y.length||!d.length))&&(c=l,l=s,s=this,y=Co(l,Ke(l)));var w=!(Me(c)&&"chain"in c)||!!c.chain,C=Fn(s);return $t(y,function(M){var O=l[M];s[M]=O,C&&(s.prototype[M]=function(){var P=this.__chain__;if(w||P){var D=s(this.__wrapped__),F=D.__actions__=bt(this.__actions__);return F.push({func:O,args:arguments,thisArg:s}),D.__chain__=P,D}return O.apply(s,nr([this.value()],arguments))})}),s}function kx(){return Qe._===this&&(Qe._=Zb),this}function Uu(){}function Ax(s){return s=re(s),oe(function(l){return Cd(l,s)})}var Mx=wu(ke),Tx=wu(Kh),Ox=wu(Kl);function Wp(s){return Mu(s)?Gl(_n(s)):o_(s)}function Ix(s){return function(l){return s==null?t:Rr(s,l)}}var Nx=Gd(),Rx=Gd(!0);function qu(){return[]}function Ku(){return!1}function Lx(){return{}}function Px(){return""}function Dx(){return!0}function Fx(s,l){if(s=re(s),s<1||s>Ue)return[];var c=qe,d=ot(s,qe);l=X(l),s-=qe;for(var y=Yl(d,l);++c<s;)l(c);return y}function zx(s){return ne(s)?ke(s,_n):Mt(s)?[s]:bt(up(_e(s)))}function Bx(s){var l=++Yb;return _e(s)+l}var $x=Io(function(s,l){return s+l},0),Hx=Su("ceil"),Vx=Io(function(s,l){return s/l},1),Wx=Su("floor");function Ux(s){return s&&s.length?Eo(s,wt,au):t}function qx(s,l){return s&&s.length?Eo(s,X(l,2),au):t}function Kx(s){return jh(s,wt)}function Gx(s,l){return jh(s,X(l,2))}function Jx(s){return s&&s.length?Eo(s,wt,fu):t}function jx(s,l){return s&&s.length?Eo(s,X(l,2),fu):t}var Yx=Io(function(s,l){return s*l},1),Xx=Su("round"),Zx=Io(function(s,l){return s-l},0);function Qx(s){return s&&s.length?jl(s,wt):0}function e5(s,l){return s&&s.length?jl(s,X(l,2)):0}return v.after=Sw,v.ary=vp,v.assign=uS,v.assignIn=Lp,v.assignInWith=Uo,v.assignWith=cS,v.at=fS,v.before=wp,v.bind=Lu,v.bindAll=gx,v.bindKey=Sp,v.castArray=Lw,v.chain=yp,v.chunk=W_,v.compact=U_,v.concat=q_,v.cond=yx,v.conforms=bx,v.constant=Hu,v.countBy=Qv,v.create=hS,v.curry=xp,v.curryRight=Ep,v.debounce=Cp,v.defaults=dS,v.defaultsDeep=pS,v.defer=xw,v.delay=Ew,v.difference=K_,v.differenceBy=G_,v.differenceWith=J_,v.drop=j_,v.dropRight=Y_,v.dropRightWhile=X_,v.dropWhile=Z_,v.fill=Q_,v.filter=tw,v.flatMap=iw,v.flatMapDeep=sw,v.flatMapDepth=ow,v.flatten=dp,v.flattenDeep=ev,v.flattenDepth=tv,v.flip=Cw,v.flow=vx,v.flowRight=wx,v.fromPairs=nv,v.functions=wS,v.functionsIn=SS,v.groupBy=aw,v.initial=iv,v.intersection=sv,v.intersectionBy=ov,v.intersectionWith=av,v.invert=ES,v.invertBy=CS,v.invokeMap=uw,v.iteratee=Vu,v.keyBy=cw,v.keys=Ke,v.keysIn=vt,v.map=zo,v.mapKeys=AS,v.mapValues=MS,v.matches=Sx,v.matchesProperty=xx,v.memoize=$o,v.merge=TS,v.mergeWith=Pp,v.method=Ex,v.methodOf=Cx,v.mixin=Wu,v.negate=Ho,v.nthArg=Ax,v.omit=OS,v.omitBy=IS,v.once=kw,v.orderBy=fw,v.over=Mx,v.overArgs=Aw,v.overEvery=Tx,v.overSome=Ox,v.partial=Pu,v.partialRight=kp,v.partition=hw,v.pick=NS,v.pickBy=Dp,v.property=Wp,v.propertyOf=Ix,v.pull=fv,v.pullAll=mp,v.pullAllBy=hv,v.pullAllWith=dv,v.pullAt=pv,v.range=Nx,v.rangeRight=Rx,v.rearg=Mw,v.reject=mw,v.remove=mv,v.rest=Tw,v.reverse=Nu,v.sampleSize=yw,v.set=LS,v.setWith=PS,v.shuffle=bw,v.slice=gv,v.sortBy=ww,v.sortedUniq=xv,v.sortedUniqBy=Ev,v.split=ix,v.spread=Ow,v.tail=Cv,v.take=kv,v.takeRight=Av,v.takeRightWhile=Mv,v.takeWhile=Tv,v.tap=Uv,v.throttle=Iw,v.thru=Fo,v.toArray=Ip,v.toPairs=Fp,v.toPairsIn=zp,v.toPath=zx,v.toPlainObject=Rp,v.transform=DS,v.unary=Nw,v.union=Ov,v.unionBy=Iv,v.unionWith=Nv,v.uniq=Rv,v.uniqBy=Lv,v.uniqWith=Pv,v.unset=FS,v.unzip=Ru,v.unzipWith=gp,v.update=zS,v.updateWith=BS,v.values=_i,v.valuesIn=$S,v.without=Dv,v.words=Hp,v.wrap=Rw,v.xor=Fv,v.xorBy=zv,v.xorWith=Bv,v.zip=$v,v.zipObject=Hv,v.zipObjectDeep=Vv,v.zipWith=Wv,v.entries=Fp,v.entriesIn=zp,v.extend=Lp,v.extendWith=Uo,Wu(v,v),v.add=$x,v.attempt=Vp,v.camelCase=US,v.capitalize=Bp,v.ceil=Hx,v.clamp=HS,v.clone=Pw,v.cloneDeep=Fw,v.cloneDeepWith=zw,v.cloneWith=Dw,v.conformsTo=Bw,v.deburr=$p,v.defaultTo=_x,v.divide=Vx,v.endsWith=qS,v.eq=an,v.escape=KS,v.escapeRegExp=GS,v.every=ew,v.find=nw,v.findIndex=fp,v.findKey=mS,v.findLast=rw,v.findLastIndex=hp,v.findLastKey=gS,v.floor=Wx,v.forEach=bp,v.forEachRight=_p,v.forIn=yS,v.forInRight=bS,v.forOwn=_S,v.forOwnRight=vS,v.get=zu,v.gt=$w,v.gte=Hw,v.has=xS,v.hasIn=Bu,v.head=pp,v.identity=wt,v.includes=lw,v.indexOf=rv,v.inRange=VS,v.invoke=kS,v.isArguments=Dr,v.isArray=ne,v.isArrayBuffer=Vw,v.isArrayLike=_t,v.isArrayLikeObject=Ne,v.isBoolean=Ww,v.isBuffer=ur,v.isDate=Uw,v.isElement=qw,v.isEmpty=Kw,v.isEqual=Gw,v.isEqualWith=Jw,v.isError=Du,v.isFinite=jw,v.isFunction=Fn,v.isInteger=Ap,v.isLength=Vo,v.isMap=Mp,v.isMatch=Yw,v.isMatchWith=Xw,v.isNaN=Zw,v.isNative=Qw,v.isNil=tS,v.isNull=eS,v.isNumber=Tp,v.isObject=Me,v.isObjectLike=Ie,v.isPlainObject=_s,v.isRegExp=Fu,v.isSafeInteger=nS,v.isSet=Op,v.isString=Wo,v.isSymbol=Mt,v.isTypedArray=bi,v.isUndefined=rS,v.isWeakMap=iS,v.isWeakSet=sS,v.join=lv,v.kebabCase=JS,v.last=qt,v.lastIndexOf=uv,v.lowerCase=jS,v.lowerFirst=YS,v.lt=oS,v.lte=aS,v.max=Ux,v.maxBy=qx,v.mean=Kx,v.meanBy=Gx,v.min=Jx,v.minBy=jx,v.stubArray=qu,v.stubFalse=Ku,v.stubObject=Lx,v.stubString=Px,v.stubTrue=Dx,v.multiply=Yx,v.nth=cv,v.noConflict=kx,v.noop=Uu,v.now=Bo,v.pad=XS,v.padEnd=ZS,v.padStart=QS,v.parseInt=ex,v.random=WS,v.reduce=dw,v.reduceRight=pw,v.repeat=tx,v.replace=nx,v.result=RS,v.round=Xx,v.runInContext=T,v.sample=gw,v.size=_w,v.snakeCase=rx,v.some=vw,v.sortedIndex=yv,v.sortedIndexBy=bv,v.sortedIndexOf=_v,v.sortedLastIndex=vv,v.sortedLastIndexBy=wv,v.sortedLastIndexOf=Sv,v.startCase=sx,v.startsWith=ox,v.subtract=Zx,v.sum=Qx,v.sumBy=e5,v.template=ax,v.times=Fx,v.toFinite=zn,v.toInteger=re,v.toLength=Np,v.toLower=lx,v.toNumber=Kt,v.toSafeInteger=lS,v.toString=_e,v.toUpper=ux,v.trim=cx,v.trimEnd=fx,v.trimStart=hx,v.truncate=dx,v.unescape=px,v.uniqueId=Bx,v.upperCase=mx,v.upperFirst=$u,v.each=bp,v.eachRight=_p,v.first=pp,Wu(v,function(){var s={};return yn(v,function(l,c){we.call(v.prototype,c)||(s[c]=l)}),s}(),{chain:!1}),v.VERSION=r,$t(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){v[s].placeholder=v}),$t(["drop","take"],function(s,l){ce.prototype[s]=function(c){c=c===t?1:Be(re(c),0);var d=this.__filtered__&&!l?new ce(this):this.clone();return d.__filtered__?d.__takeCount__=ot(c,d.__takeCount__):d.__views__.push({size:ot(c,qe),type:s+(d.__dir__<0?"Right":"")}),d},ce.prototype[s+"Right"]=function(c){return this.reverse()[s](c).reverse()}}),$t(["filter","map","takeWhile"],function(s,l){var c=l+1,d=c==en||c==Ve;ce.prototype[s]=function(y){var w=this.clone();return w.__iteratees__.push({iteratee:X(y,3),type:c}),w.__filtered__=w.__filtered__||d,w}}),$t(["head","last"],function(s,l){var c="take"+(l?"Right":"");ce.prototype[s]=function(){return this[c](1).value()[0]}}),$t(["initial","tail"],function(s,l){var c="drop"+(l?"":"Right");ce.prototype[s]=function(){return this.__filtered__?new ce(this):this[c](1)}}),ce.prototype.compact=function(){return this.filter(wt)},ce.prototype.find=function(s){return this.filter(s).head()},ce.prototype.findLast=function(s){return this.reverse().find(s)},ce.prototype.invokeMap=oe(function(s,l){return typeof s=="function"?new ce(this):this.map(function(c){return ds(c,s,l)})}),ce.prototype.reject=function(s){return this.filter(Ho(X(s)))},ce.prototype.slice=function(s,l){s=re(s);var c=this;return c.__filtered__&&(s>0||l<0)?new ce(c):(s<0?c=c.takeRight(-s):s&&(c=c.drop(s)),l!==t&&(l=re(l),c=l<0?c.dropRight(-l):c.take(l-s)),c)},ce.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},ce.prototype.toArray=function(){return this.take(qe)},yn(ce.prototype,function(s,l){var c=/^(?:filter|find|map|reject)|While$/.test(l),d=/^(?:head|last)$/.test(l),y=v[d?"take"+(l=="last"?"Right":""):l],w=d||/^find/.test(l);y&&(v.prototype[l]=function(){var C=this.__wrapped__,M=d?[1]:arguments,O=C instanceof ce,P=M[0],D=O||ne(C),F=function(le){var he=y.apply(v,nr([le],M));return d&&W?he[0]:he};D&&c&&typeof P=="function"&&P.length!=1&&(O=D=!1);var W=this.__chain__,J=!!this.__actions__.length,Z=w&&!W,se=O&&!J;if(!w&&D){C=se?C:new ce(this);var Q=s.apply(C,M);return Q.__actions__.push({func:Fo,args:[F],thisArg:t}),new Vt(Q,W)}return Z&&se?s.apply(this,M):(Q=this.thru(F),Z?d?Q.value()[0]:Q.value():Q)})}),$t(["pop","push","shift","sort","splice","unshift"],function(s){var l=lo[s],c=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",d=/^(?:pop|shift)$/.test(s);v.prototype[s]=function(){var y=arguments;if(d&&!this.__chain__){var w=this.value();return l.apply(ne(w)?w:[],y)}return this[c](function(C){return l.apply(ne(C)?C:[],y)})}}),yn(ce.prototype,function(s,l){var c=v[l];if(c){var d=c.name+"";we.call(di,d)||(di[d]=[]),di[d].push({name:l,func:c})}}),di[Oo(t,x).name]=[{name:"wrapper",func:t}],ce.prototype.clone=p2,ce.prototype.reverse=m2,ce.prototype.value=g2,v.prototype.at=qv,v.prototype.chain=Kv,v.prototype.commit=Gv,v.prototype.next=Jv,v.prototype.plant=Yv,v.prototype.reverse=Xv,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=Zv,v.prototype.first=v.prototype.head,ss&&(v.prototype[ss]=jv),v},ci=Gb();Mr?((Mr.exports=ci)._=ci,Vl._=ci):Qe._=ci}).call(sI)}(js,js.exports)),js.exports}var ay=oI();function ih(n){return n.type.create(ay.cloneDeep(n.attrs))}const aI=De.create({name:"node_processor",addCommands(){return{setBlockAttributes:B(({commands:n,state:e},t,r,i={})=>{const o=H(n.getBlockAttributes(t))??{},{doc:a,tr:u}=e,{from:f,to:h}=u.selection;a.nodesBetween(f,h,(m,p)=>{ie.blocks.includes(m.type.name)&&u.setNodeAttribute(p,t,{...i,...o,...r})})}),getBlockAttributes:B(({editor:n},e,t)=>me(()=>{let r=Object.assign({},t||{});for(const i of ie.blocks)Object.assign(r,n.getAttributes(i)?.[e]||{});return Object.keys(r).length?r:null})),removeBlockAttributes:B(({commands:n},e)=>{for(const t of ie.blocks)n.resetAttributes(t,e)}),applyMark:B(({state:n,commands:e},t,r,i={})=>{const{tr:o,doc:a,schema:u}=n,{$from:f,$to:h}=o.selection,m=wn(de.LINK,u),p=wn(t,u);if(!(p.spec.group||"").includes(dn.SETTINGS))return e.setMark(t,r);if(f.pos===h.pos)return;const S=E=>{if(!i.onAppliedToParent||i.onAppliedToParent(E)===!1){const{tr:g,node:_,position:x,mark:k}=E;e._removeNodeMark({tr:g,node:_,position:x,mark:k.type})}};a.nodesBetween(f.pos,h.pos,(E,g)=>{if(E.type.name===ie.LIST)return;const _=iI(E.marks,t),x=p.create({..._?.attrs||{},...r}),k=iy(f,h,E,g);if(!m.isInSet(E.marks)&&rI(o.doc,g,x,i.isAppliedToParent))return S({tr:o,node:E,position:g,mark:x});if(E.isText){o.addMark(k.from,k.to,x);return}tI(o.doc,o.selection,E,g)&&o.addNodeMark(g,x)})}),getMarks:B(({editor:n},e)=>{const t=xi(n,"state");return me(()=>{const{selection:r,doc:i}=H(t),{from:o,to:a}=H(r),u=[];return i.nodesBetween(o,a,f=>{for(const h of f.marks)h.type.name===e&&u.unshift(h.attrs)}),u})}),getMark:B(({commands:n},e)=>{const t=n.getMarks(e);return me(()=>H(t)[0]??null)}),hasMark:B(({commands:n},e)=>{const t=n.getMark(e);return me(()=>!!H(t))}),getCommonSettingMark:B(({commands:n},e,t)=>{const r=n.getMark(e);return me(()=>H(r)?.value??H(t))}),getDeviceSettingMark:B(({commands:n},e,t)=>{const r=n.getMarks(e),i=n.getDevice();return me(()=>{for(const o of H(r)){const a=o[H(i)];if(a)return a}return H(t)})}),removeAllMarks:B(({state:n,commands:e})=>{const{tr:t,doc:r}=n,{from:i,to:o}=t.selection;r.nodesBetween(i,o,(a,u)=>{for(const f of a.marks)e._removeNodeMark({tr:t,node:a,position:u,mark:f})})}),removeMarks:B(({state:n,commands:e},t)=>{const{tr:r,doc:i}=n,{from:o,to:a}=r.selection;i.nodesBetween(o,a,(u,f)=>{const h=u.marks.filter(m=>t.includes(m.type.name));for(const m of h)e._removeNodeMark({tr:r,node:u,position:f,mark:m})})}),_removeNodeMark:B((n,{tr:e,node:t,position:r,mark:i})=>t.isText?e.removeMark(r,r+t.nodeSize,i):e.removeNodeMark(r,i))}}}),lI=De.create({name:"text_processor",addCommands(){return{getSelectedText:B(({state:n})=>{const{from:e,to:t}=n.selection;return n.doc.textBetween(e,t," ")}),transformText:B(({state:n},e)=>{const{$from:t,$to:r}=n.tr.selection;t.pos!==r.pos&&n.doc.nodesBetween(t.pos,r.pos,(i,o)=>{if(!i.isText)return;const a=iy(t,r,i,o),u=Math.max(0,t.pos-o),f=Math.max(0,r.pos-o),h=e({text:i.textContent.substring(u,f)}),m=n.schema.text(h,i.marks);n.tr.replaceWith(a.from,a.to,m)})})}}}),uI=De.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:B(({state:n})=>{this.storage.selection=n.selection}),restoreSelection:B(({commands:n})=>{this.storage.selection&&n.setTextSelection(this.storage.selection)}),expandSelection:B(({tr:n,commands:e},t)=>{let r=n.selection.from,i=n.selection.to;n.doc.nodesBetween(r,i,(o,a,u)=>{if(t({node:o,parent:u})){const f=o.isText?0:sy(n.doc,a);r=Math.min(r,a+f),i=Math.max(i,a+o.nodeSize-f)}}),e.setTextSelection({from:r,to:i})}),expandSelectionToBlock:B(({commands:n})=>{n.expandSelection(({parent:e})=>e.type.name===ie.DOCUMENT)})}}}),cI=Xn.create({name:"doc",topNode:!0,content:"block+"});class Xs extends lt{constructor(e,t,r,i="SetDocAttr"){super(),this.key=e,this.value=t,this.schema=r,this.stepType=i}apply(e){this.prevValue=e.attrs.meta[this.key];const t=Wr.fromJSON(this.schema,e.toJSON());return t.attrs.meta[this.key]=this.value,Fe.ok(t)}invert(){return new Xs(this.key,this.prevValue,this.schema,"revertSetDocAttr")}map(){return null}toJSON(){return{stepType:this.stepType,key:this.key,value:this.value}}static fromJSON(e){return new Xs(e.key,e.value,e.stepType)}}lt.jsonID("setDocAttr",Xs);const fI=cI.extend({marks:dn.SETTINGS,addAttributes:()=>({meta:{default:{}}}),onCreate(){this.editor.view.dom.addEventListener("click",n=>{n.target.closest("a")&&n.preventDefault()})},addCommands(){return{setDocMetaAttributes:B(({state:n},e,t)=>{n.tr.step(new Xs(e,t,n.schema))})}}}),hI=Xn.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Fi(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),dI=hI.extend({marks:dn.ALL,addOptions:()=>({HTMLAttributes:{class:"zw-style"}})}),pI=Xn.create({name:"heading",addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:"inline*",group:"block",defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(n=>({tag:`h${n}`,attrs:{level:n}}))},renderHTML({node:n,HTMLAttributes:e}){return[`h${this.options.levels.includes(n.attrs.level)?n.attrs.level:this.options.levels[0]}`,Fi(this.options.HTMLAttributes,e),0]},addCommands(){return{setHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.setNode(this.name,n):!1,toggleHeading:n=>({commands:e})=>this.options.levels.includes(n.level)?e.toggleNode(this.name,"paragraph",n):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((n,e)=>({...n,[`Mod-Alt-${e}`]:()=>this.editor.commands.toggleHeading({level:e})}),{})},addInputRules(){return this.options.levels.map(n=>GM({find:new RegExp(`^(#{1,${n}})\\s$`),type:this.type,getAttributes:{level:n}}))}}),mI=pI.extend({marks:dn.ALL,addOptions:()=>({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})}),gI=De.create({name:"prose_mirror_plugins",addProseMirrorPlugins(){return[oT.create(this.editor),aT.create(this.editor)]}}),yI=()=>[fI,dI,mI,YM,sT,aI,lI,uI,gI],bI=Pt.create({name:de.FONT_FAMILY,group:dn.SETTINGS,addOptions:()=>({fonts:[]}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:B(({commands:n},e)=>{n.applyMark(this.name,{value:e});const t=n.findFontByName(e);let r=H(n.getFontWeight());t.isWeightSupported(r)||(r=t.findClosestWeight(r),n.applyFontWeight(r));const i=n.isSettingCustomized(de.FONT_STYLE).value;!t.isItalicSupported(r)&&i&&n.removeItalic()}),getFont:B(({commands:n})=>{const e=H(this.options.defaultPreset),t=n.findFontByName(e.common.font_family),r=n.getFontFamily();return me(()=>n.findFontByName(H(r))||t)}),findFontByName:B((n,e)=>H(this.options.fonts).find(t=>t.name===e)??this.options.defaultFont),getFontFamily:B(({commands:n})=>n.getCommonSettingMark(this.name,n.getDefaultFontFamily())),getDefaultFontFamily:B(({commands:n})=>{const e=n.getPreset();return me(()=>H(e).common.font_family)})}},parseHTML(){const n=e=>({value:e.replace(/["']/g,"")});return[{style:"--zw-font-family",getAttrs:n},{style:"font-family",getAttrs:n}]},renderHTML({HTMLAttributes:n}){const e=n.value?`"${n.value}"`:null;return Qr({font_family:e})}}),_I=De.create({name:de.STYLE_PRESET,addGlobalAttributes(){return[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{preset:{isRequired:!1,default:{id:H(this.options.defaultId)},parseHTML:n=>{const e=H(this.options.presets);if(n.parentElement.tagName==="LI")return null;for(const{id:t,node:r,fallbackClass:i}of e){if(i&&n.classList.contains(i))return{id:t};const o=H(this.options.styleRenderer).makePresetCssClass({id:t});if(n.matches(o))return{id:t};if(n.tagName===`H${r?.level}`)return{id:t}}return n.tagName==="P"?{id:H(this.options.defaultId)}:null},renderHTML:n=>n.preset?{class:H(this.options.styleRenderer).makePresetHtmlClass(n.preset)}:null}}}]},addCommands(){function n(t,r){return t.find(i=>r===i.id)}function e(t,r){const i={};for(const o of Object.keys(t)){const a=t[o],u=r[o],f=!u||u.toLowerCase()==="inherit";i[o]=f?a:u}return i}return{getPresetList:B(()=>me(()=>H(this.options.presets).filter(t=>!t.hidden))),getPreset:B(({commands:t})=>{const r=t.getBlockAttributes("preset",{id:H(this.options.defaultId)}),i=t.getPresetList(),o=t.isLink(),a=t.getLinkPreset();return me(()=>{const u=n(H(i),H(r).id);if(!H(o))return u;const f=H(a);return{id:u.id,common:e(u.common,f.common),mobile:e(u.mobile,f.mobile),tablet:e(u.tablet,f.tablet),desktop:e(u.desktop,f.desktop)}})}),applyPreset:B(({commands:t,chain:r},i)=>{const o=H(t.getPresetList()),a=n(o,i),u=a.node?.type??ie.PARAGRAPH,f={preset:{id:i}};a.node&&(f.level=a.node.level);for(const h of de.attributes)f[h]=H(t.getBlockAttributes(h));r().removeList().setNode(u,f).run()}),applyDefaultPreset:B(({commands:t})=>{t.applyPreset(H(this.options.defaultId))}),removePreset:B(({commands:t})=>{t.setNode(ie.PARAGRAPH,{preset:null})}),getPresetCustomization:B(({editor:t,commands:r})=>{const i=xi(t,"state");return me(()=>{const{selection:o,doc:a}=H(i),{from:u,to:f}=o;return r._getSettingCustomization(a,u,f)})}),isSettingCustomized:B(({commands:t},r)=>{const i=t.getPresetCustomization(),o=de.presetAttributes.includes(r)?"attributes":"marks";return me(()=>H(i)[o]?.includes(r)??!1)}),getContentCustomization:B(({editor:t,commands:r})=>{const i=xi(t,"state");return me(()=>{const{doc:o}=H(i);return r._getSettingCustomization(o,0,o.content.size)})}),_getSettingCustomization:B((t,r,i,o)=>{const a=new Set,u=new Set;return r.nodesBetween(i,o,f=>{for(const[h,m]of Object.entries(f.attrs))de.presetAttributes.includes(h)&&m&&u.add(h);for(const{type:h}of f.marks)de.marks.includes(h.name)&&a.add(h.name)}),{attributes:Array.from(u),marks:Array.from(a)}}),removePresetCustomization:B(({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeMarks(de.marks).resetAttributes(ie.PARAGRAPH,de.presetAttributes).resetAttributes(ie.HEADING,de.presetAttributes).restoreSelection().run()}),removeFormat:B(({chain:t})=>{t().storeSelection().expandSelectionToBlock().removeAllMarks().applyDefaultPreset().restoreSelection().run()})}},onCreate(){this.options.styleRenderer.inject(Ki.head,H(this.options.presets))}}),vI=Pt.create({name:de.FONT_WEIGHT,group:dn.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:B(({commands:n},e)=>{n.applyMark(this.name,{value:e}),H(n.getFont()).isItalicSupported(e)||n.removeItalic()}),toggleBold:B(({commands:n})=>{const e=H(n.getFontWeight()),t=H(n.getFont()),i=Number(e)>=600?"400":"700",o=t.findClosestWeight(i);n.applyFontWeight(o)}),getFontWeight:B(({commands:n})=>{const e=n.getCommonSettingMark(this.name,n.getDefaultFontWeight()),t=n.getFont();return me(()=>{const r=H(e),i=H(t);return i.isWeightSupported(r)?r:i.findClosestWeight(r)})}),getDefaultFontWeight:B(({commands:n})=>{const e=n.getPreset();return me(()=>H(e).common.font_weight)})}},addKeyboardShortcuts:()=>({"Mod-b":Zt("toggleBold"),"Mod-B":Zt("toggleBold")}),parseHTML(){const n=e=>e==="bold"?{value:"700"}:Number(e)?{value:e}:!1;return[{style:"--zw-font-weight",getAttrs:n},{style:"font-weight",getAttrs:n},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML({HTMLAttributes:n}){return Qr({font_weight:n.value})}}),wI=Pt.create({name:de.FONT_SIZE,group:dn.SETTINGS,addOptions:()=>({minSize:1,maxSize:100}),addAttributes(){return{mobile:{default:null},tablet:{default:null},desktop:{default:null}}},addCommands(){return{getFontSize:B(({commands:n})=>n.getDeviceSettingMark(this.name,n.getDefaultFontSize())),getDefaultFontSize:B(({commands:n})=>{const e=n.getDevice(),t=n.getPreset();return me(()=>H(t)[H(e)].font_size.replace("px",""))}),applyFontSize:B(({commands:n},e)=>{const t=H(n.getDevice());n.applyMark(this.name,{[t]:e},{isAppliedToParent:(r,i)=>r.type.name!==i.type.name?!1:r.attrs[t]===i.attrs[t],onAppliedToParent:({tr:r,node:i,position:o,mark:a})=>{const u={...a.attrs,[t]:null};if(!Object.values(u).some(m=>!!m))return!1;const h=a.type.create(u);if(i.isText){r.addMark(o,o+i.nodeSize,h);return}r.addNodeMark(o,h)}})}),increaseFontSize:B(({commands:n})=>{const e=Number(H(n.getFontSize())),t=Math.min(e+1,H(this.options.maxSize));n.applyFontSize(String(t))}),decreaseFontSize:B(({commands:n})=>{const e=Number(H(n.getFontSize())),t=Math.max(e-1,H(this.options.minSize));n.applyFontSize(String(t))})}},addKeyboardShortcuts:()=>({"Mod-Shift-=":Zt("increaseFontSize"),"Mod-Shift--":Zt("decreaseFontSize")}),parseHTML(){const n=e=>{if(!e)return null;const t=H(this.options.wrapperRef),r=ry(e,t);return String(r)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:e})=>({mobile:n(e.getPropertyValue("--zw-font-size-mobile")),tablet:n(e.getPropertyValue("--zw-font-size-tablet")),desktop:n(e.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:e=>{const t=n(e);return{desktop:t,tablet:t,mobile:null}}}]},renderHTML({HTMLAttributes:n}){const e=t=>t?`${t}px`:null;return Qr({font_size_mobile:e(n.mobile),font_size_tablet:e(n.tablet),font_size_desktop:e(n.desktop)})}}),SI=Pt.create({name:de.FONT_COLOR,group:dn.SETTINGS,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:B(({commands:n})=>n.getCommonSettingMark(this.name,n.getDefaultFontColor())),getDefaultFontColor:B(({commands:n})=>{const e=n.getPreset();return me(()=>H(e).common.color)}),applyFontColor:B(({commands:n},e)=>{n.applyMark(this.name,{value:e})})}},parseHTML(){const n=e=>({value:ny(e)});return[{style:"--zw-font-color",getAttrs:n},{style:"color",getAttrs:n}]},renderHTML({HTMLAttributes:n}){return Qr({font_color:n.value})}}),xI=Pt.create({name:de.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:B(({commands:n})=>n.getCommonSettingMark(this.name,"rgba(255, 255, 255, 0%)")),applyBackgroundColor:B(({commands:n},e)=>{n.applyMark(this.name,{value:e})})}},parseHTML(){const n=e=>({value:ny(e)});return[{style:"--zw-background-color",getAttrs:n},{style:"background-color",getAttrs:n}]},renderHTML({HTMLAttributes:n}){return Qr({background_color:n.value})}}),EI=De.create({name:"device_manager",addCommands(){return{getDevice:B(()=>xi(this.options,"device"))}}}),CI=Pt.create({name:de.FONT_STYLE,group:dn.SETTINGS,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:B(({commands:n})=>{const e=n.getMark(this.name),t=n.getDefaultFontStyle();return me(()=>H(e)?.italic??H(t).italic)}),isItalicAvailable:B(({commands:n})=>{const e=n.getFont(),t=n.getFontWeight();return me(()=>{const r=H(e),i=H(t);return r.isItalicSupported(i)&&!r.isWeightItalicOnly(i)})}),getDefaultFontStyle:B(({commands:n})=>{const e=n.getPreset();return me(()=>({italic:H(e).common.font_style==="italic"}))}),toggleItalic:B(({commands:n})=>{H(n.isItalicAvailable())&&(H(n.isItalic())?n.removeItalic():n.applyItalic())}),applyItalic:B(({commands:n})=>{n.applyMark(this.name,{italic:!0})}),removeItalic:B(({commands:n})=>{n.applyMark(this.name,{italic:!1})})}},addKeyboardShortcuts:()=>({"Mod-i":Zt("toggleItalic"),"Mod-I":Zt("toggleItalic")}),parseHTML(){const n=e=>({italic:e.includes("italic")});return[{tag:"i",attrs:{italic:!0}},{style:"--zw-font-style",getAttrs:n},{style:"font-style",getAttrs:n}]},renderHTML({HTMLAttributes:n}){const e=n.italic?"italic":"normal";return Qr({font_style:e})}}),kI=Pt.create({name:de.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:B(({commands:n})=>{const e=n.getTextDecoration();return me(()=>H(e).underline)}),isStrikeThrough:B(({commands:n})=>{const e=n.getTextDecoration();return me(()=>H(e).strike_through)}),getTextDecoration:B(({commands:n})=>{const e=n.getMark(this.name),t=n.getDefaultTextDecoration();return me(()=>{const r=H(e)??{},i=H(t);return{underline:r.underline||i.underline,strike_through:r.strike_through||i.strike_through}})}),isUnderlineCustomized:B(({commands:n})=>{const e=n.isUnderline(),t=n.getDefaultTextDecoration();return me(()=>H(e)!==H(t).underline)}),getDefaultTextDecoration:B(({commands:n})=>{const e=n.getPreset();return me(()=>{const{text_decoration:t}=H(e).common;return{underline:t.includes("underline"),strike_through:t.includes("line-through")}})}),toggleUnderline:B(({commands:n})=>{n.toggleTextDecoration("underline")}),toggleStrikeThrough:B(({commands:n})=>{n.toggleTextDecoration("strike_through")}),toggleTextDecoration:B(({commands:n},e,t=null)=>{const r=H(n.getTextDecoration()),i=t??!r[e];n.applyMark(this.name,{[e]:i})}),applyTextDecoration:B(({commands:n},e)=>{n.toggleTextDecoration(e,!0)}),removeTextDecoration:B(({commands:n},e)=>{n.toggleTextDecoration(e,!1)})}},addKeyboardShortcuts:()=>({"Mod-u":Zt("toggleUnderline"),"Mod-U":Zt("toggleUnderline")}),parseHTML(){const n=e=>{const t=e.includes("underline"),r=e.includes("line-through");return!t&&!r?!1:{underline:t,strike_through:r}};return[{style:"--zw-text-decoration",getAttrs:n},{style:"text-decoration-line",getAttrs:n},{style:"text-decoration",getAttrs:n},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:n}){const e=[];return n.underline&&e.push("underline"),n.strike_through&&e.push("line-through"),e.length||e.push("none"),Qr({text_decoration:e.join(" ")})}}),AI=De.create({name:"case_style",addCommands(){return{applyCaseStyle:B(({commands:n},e)=>{switch(e){case Sf.CAPITALIZE:return n.applyCapitalize();case Sf.LOWERCASE:return n.applyLowerCase();case Sf.UPPERCASE:return n.applyUpperCase()}}),applyCapitalize:B(({commands:n})=>{n.transformText(({text:e})=>MT(e))}),applyLowerCase:B(({commands:n})=>{n.transformText(({text:e})=>e.toLowerCase())}),applyUpperCase:B(({commands:n})=>{n.transformText(({text:e})=>e.toUpperCase())})}}}),ly={mobile:null,tablet:null,desktop:null},MI=De.create({name:de.ALIGNMENT,addGlobalAttributes:()=>[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{[de.ALIGNMENT]:{isRequired:!1,parseHTML({style:n}){const e=eI(n.textAlign);if(e)return{desktop:e,tablet:e,mobile:e};const t=n.getPropertyValue("--zw-alignment-mobile")||null,r=n.getPropertyValue("--zw-alignment-tablet")||null,i=n.getPropertyValue("--zw-alignment-desktop")||null;return!t&&!r&&!i?null:{desktop:i,tablet:r,mobile:t}},renderHTML(n){return n.alignment?cl({alignment_mobile:n.alignment.mobile,alignment_tablet:n.alignment.tablet,alignment_desktop:n.alignment.desktop}):null}}}}],addCommands(){return{applyAlignment:B(({commands:n},e)=>{const t=H(n.getDevice());n.setBlockAttributes(this.name,{[t]:e},ly)}),removeAlignment:B(({commands:n})=>n.removeBlockAttributes(this.name)),getAlignment:B(({commands:n})=>{const e=n.getBlockAttributes(this.name,ly),t=n.getDevice(),r=n.getDefaultAlignment();return me(()=>H(e)?.[H(t)]??H(r))}),getDefaultAlignment:B(({commands:n})=>{const e=n.getDevice(),t=n.getPreset();return me(()=>H(t)[H(e)].alignment??wr.LEFT)})}},addKeyboardShortcuts:()=>({"Mod-Shift-l":Zt("applyAlignment",wr.LEFT),"Mod-Shift-e":Zt("applyAlignment",wr.CENTER),"Mod-Shift-r":Zt("applyAlignment",wr.RIGHT),"Mod-Shift-j":Zt("applyAlignment",wr.JUSTIFY)})}),uy={mobile:null,tablet:null,desktop:null},TI=De.create({name:de.LINE_HEIGHT,addGlobalAttributes(){return[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{[de.LINE_HEIGHT]:{isRequired:!1,parseHTML:n=>{if(n.matches('[style*="--zw-line-height"]')){const o=n.style.getPropertyValue("--zw-line-height-tablet")||null,a=n.style.getPropertyValue("--zw-line-height-desktop")||null;return{mobile:null,tablet:o,desktop:a}}const e=n.style.lineHeight;if(!e)return null;const t=H(this.options.wrapperRef),r=ZO(e,n,t);return r?{desktop:r,tablet:r,mobile:null}:null},renderHTML(n){return n.line_height?cl({line_height_mobile:n.line_height.mobile,line_height_tablet:n.line_height.tablet,line_height_desktop:n.line_height.desktop}):null}}}}]},addCommands(){return{getLineHeight:B(({commands:n})=>{const e=n.getBlockAttributes(this.name,uy),t=n.getDevice(),r=n.getDefaultLineHeight();return me(()=>H(e)?.[H(t)]??H(r))}),getDefaultLineHeight:B(({commands:n})=>{const e=n.getDevice(),t=n.getPreset();return me(()=>H(t)[H(e)].line_height)}),applyLineHeight:B(({commands:n},e)=>{const t=H(n.getDevice());n.setBlockAttributes(this.name,{[t]:e},uy)})}}}),OI=Xn.create({name:"listItem",addOptions(){return{HTMLAttributes:{},bulletListTypeName:"bulletList",orderedListTypeName:"orderedList"}},content:"paragraph block*",defining:!0,parseHTML(){return[{tag:"li"}]},renderHTML({HTMLAttributes:n}){return["li",Fi(this.options.HTMLAttributes,n),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),II=OI.extend({name:ie.LIST_ITEM,marks:dn.SETTINGS,addCommands(){const n=({selection:e})=>e.$cursor.before(e.$cursor.depth-1);return{listItemNewline:B(({commands:e,tr:t})=>{const r=t.doc.nodeAt(n(t));if(!t.selection.$cursor.node().textContent)return!1;e.splitListItem(this.name);const o=n(t);for(const a of r.marks)t.addNodeMark(o,ih(a));return!0})}},addOptions:()=>({HTMLAttributes:{class:"zw-style"}}),addKeyboardShortcuts:()=>({Enter:n=>{const{state:e,commands:t}=n.editor;if(e.selection.$cursor?.path.some(i=>i.type?.name===ie.LIST))return t.listItemNewline()}})}),NI=Xn.create({name:ie.LIST,content:`${ie.LIST_ITEM}+`,group:"block list",marks:dn.SETTINGS,addExtensions:()=>[II],addOptions:()=>({baseClass:"",presetClass:""}),addAttributes:()=>({bullet:{default:{type:Yt.DISC}}}),parseHTML(){const n={a:Yt.ROMAN,i:Yt.LATIN,1:Yt.DECIMAL},e=t=>{for(const r of Yt.values){const i=`.${H(this.options.baseClass)}${r}`;if(t.matches(i)||n[t.type.toLowerCase()]===r)return r}};return[{tag:"ol",getAttrs:t=>({bullet:{type:e(t)||Yt.DECIMAL}})},{tag:"ul",getAttrs:t=>({bullet:{type:e(t)||Yt.DISC}})}]},renderHTML({HTMLAttributes:n}){const e=[H(this.options.baseClass)+n.bullet.type,H(this.options.presetClass)];return[Yt.ordered.includes(n.bullet.type)?"ol":"ul",{class:e.join(" ")},0]},addCommands(){return{getListType:B(({commands:n})=>{const e=n.getBlockAttributes("bullet",{type:null});return me(()=>H(e).type??null)}),applyList:B(({commands:n,chain:e},t)=>{if(H(n.getListType())===t){n.removeList();return}return e().applyDefaultPreset().toggleList(ie.LIST,ie.LIST_ITEM).setBlockAttributes("bullet",{type:t}).command(({commands:i,tr:o})=>i._bubbleListItemMarks(o)).run()}),_bubbleListItemMarks:B((n,e)=>{const{doc:t,selection:r}=e,i=r.$from.start(),o=r.$to.end();function a(u,f){if(de.inlineMarks.includes(f.type)||f.type.isInSet(u.marks))return!1;for(const h of u.content.content)if(h.childCount&&(!h.marks||!f.isInSet(h.marks)))return!1;return!0}t.nodesBetween(i,o,(u,f)=>{if(u.type.name===ie.LIST)return;if(u.type.name!==ie.LIST_ITEM)return!1;const h=[];return u.forEach(m=>{for(const p of m.marks){if(p.isInSet(h)){e.removeNodeMark(f+1,p);continue}a(u,p)&&(e.removeNodeMark(f+1,p),e.addNodeMark(f,ih(p)),h.push(p))}}),!1})}),removeList:B(({commands:n,state:e})=>{const{tr:t,doc:r,selection:i}=e,o=i.$from.start(),a=i.$to.end();r.nodesBetween(o,a,(u,f,h)=>{if([ie.LIST,ie.LIST_ITEM].includes(u.type.name))return;if(h.type.name!==ie.LIST_ITEM)return!1;const m=h.marks.filter(function(p){return!p.type.isInSet(u.marks)});for(const p of m)t.addNodeMark(f,ih(p));return!1}),n.liftListItem(ie.LIST_ITEM)})}},addInputRules(){const n=(e,t)=>JM({find:t,type:this.type,getAttributes:{bullet:{type:e}},joinPredicate:(r,{attrs:i})=>i.bullet.type===e});return[n(Yt.DISC,/^\s*([-+*])\s$/),n(Yt.DECIMAL,/^(\d+)\.\s$/),n(Yt.LATIN,/^([ivx]{1,3})\.\s$/i),n(Yt.ROMAN,/^([a-z])\.\s$/i)]}});function RI(n){return new Rt({key:new fn("autolink"),appendTransaction:(e,t,r)=>{const i=e.some(h=>h.docChanged)&&!t.doc.eq(r.doc),o=e.some(h=>h.getMeta("preventAutolink"));if(!i||o)return;const{tr:a}=r,u=gM(t.doc,[...e]);if(CM(u).forEach(({newRange:h})=>{const m=bM(r.doc,h,S=>S.isTextblock);let p,b;if(m.length>1?(p=m[0],b=r.doc.textBetween(p.pos,p.pos+p.node.nodeSize,void 0," ")):m.length&&r.doc.textBetween(h.from,h.to," "," ").endsWith(" ")&&(p=m[0],b=r.doc.textBetween(p.pos,h.to,void 0," ")),p&&b){const S=b.split(" ").filter(_=>_!=="");if(S.length<=0)return!1;const E=S[S.length-1],g=p.pos+b.lastIndexOf(E);if(!E)return!1;Vf(E).filter(_=>_.isLink).map(_=>({..._,from:g+_.start+1,to:g+_.end+1})).filter(_=>r.schema.marks.code?!r.doc.rangeHasMark(_.from,_.to,r.schema.marks.code):!0).filter(_=>n.validate?n.validate(_.value):!0).forEach(_=>{I0(_.from,_.to,r.doc).some(x=>x.mark.type===n.type)||a.addMark(_.from,_.to,n.type.create({href:_.href}))})}}),!!a.steps.length)return a}})}function LI(n){return new Rt({key:new fn("handleClickLink"),props:{handleClick:(e,t,r)=>{var i,o;if(r.button!==0||r.target.nodeName!=="A")return!1;const u=SM(e.state,n.type.name),f=r.target,h=(i=f?.href)!==null&&i!==void 0?i:u.href,m=(o=f?.target)!==null&&o!==void 0?o:u.target;return f&&h?(e.editable&&window.open(h,m),!0):!1}}})}function PI(n){return new Rt({key:new fn("handlePasteLink"),props:{handlePaste:(e,t,r)=>{var i;const{state:o}=e,{selection:a}=o,{empty:u}=a;if(u)return!1;let f="";r.content.forEach(E=>{f+=E.textContent});const h=Vf(f).find(E=>E.isLink&&E.value===f);if(!f||!h)return!1;const m=(i=t.clipboardData)===null||i===void 0?void 0:i.getData("text/html"),p=/href="([^"]*)"/,b=m?.match(p),S=b?b[1]:h.href;return n.editor.commands.setMark(n.type,{href:S}),!0}}})}const DI=Pt.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(n=>{if(typeof n=="string"){t1(n);return}t1(n.scheme,n.optionalSlashes)})},onDestroy(){ET()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}},addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},rel:{default:this.options.HTMLAttributes.rel},class:{default:this.options.HTMLAttributes.class}}},parseHTML(){return[{tag:'a[href]:not([href *= "javascript:" i])'}]},renderHTML({HTMLAttributes:n}){var e;return!((e=n.href)===null||e===void 0)&&e.startsWith("javascript:")?["a",Fi(this.options.HTMLAttributes,{...n,href:""}),0]:["a",Fi(this.options.HTMLAttributes,n),0]},addCommands(){return{setLink:n=>({chain:e})=>e().setMark(this.name,n).setMeta("preventAutolink",!0).run(),toggleLink:n=>({chain:e})=>e().toggleMark(this.name,n,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:n})=>n().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[jM({find:n=>Vf(n).filter(e=>this.options.validate?this.options.validate(e.value):!0).filter(e=>e.isLink).map(e=>({text:e.value,index:e.start,data:e})),type:this.type,getAttributes:(n,e)=>{var t,r;const i=(t=e?.clipboardData)===null||t===void 0?void 0:t.getData("text/html"),o=/href="([^"]*)"/,a=i?.match(o);return a?{href:a[1]}:{href:(r=n.data)===null||r===void 0?void 0:r.href}}})]},addProseMirrorPlugins(){const n=[];return this.options.autolink&&n.push(RI({type:this.type,validate:this.options.validate})),this.options.openOnClick&&n.push(LI({type:this.type})),this.options.linkOnPaste&&n.push(PI({editor:this.editor,type:this.type})),n}}),FI=DI.extend({name:de.LINK,addOptions(){return{...this.parent?.(),openOnClick:!1,linkOnPaste:!1}},addAttributes(){return{href:{default:null,parseHTML:n=>{const e=n.getAttribute("href");return e.startsWith("#")?parseFloat(n.getAttribute("href").replace("#","")):e}},target:{default:H0.SELF,parseHTML:n=>n.getAttribute("target")||H0.SELF},destination:{default:Bs.URL,parseHTML:n=>{const e=n.getAttribute("href");if(!e.startsWith("#"))return Bs.URL;const t=e.replace("#","");return H(this.options.pageBlocks).find(o=>o.id===parseInt(t))?Bs.BLOCK:Bs.URL}}}},addCommands(){const{unsetLink:n}=this.parent();return{removeLink:n,applyLink:B(({commands:e,chain:t},r)=>(e.setMeta("preventAutolink",!0),e.getSelectedText()?t().applyMark(this.name,r).expandSelectionToLink().command(({tr:i})=>(r.text&&i.insertText(r.text,i.selection.from,i.selection.to),!0)).run():e.insertContent(fy.text(r.text,[fy.mark(de.LINK,r)])))),expandSelectionToLink:B(({commands:e})=>{e.expandSelection(({node:t})=>this.type.isInSet(t.marks))}),isLink:B(({commands:e})=>e.hasMark(this.name)),getLinkPreset:B(()=>me(()=>H(this.options.preset)))}},addProseMirrorPlugins(){return[...this.parent(),AT.create(this.editor)]},renderHTML({HTMLAttributes:n}){const e=n.destination===Bs.BLOCK?`#${n.href}`:n.href,t=H(this.options.basePresetClass)+H(this.options.preset).id;return["a",{href:e,target:n.target,class:`${t} zw-style`},0]}}),zI=Pt.create({name:de.SUPERSCRIPT,addCommands(){return{applySuperscript:B(({commands:n})=>{n.setMark(this.name)}),removeSuperscript:B(({commands:n})=>{n.unsetMark(this.name)}),toggleSuperscript:B(({commands:n})=>{H(n.isSuperscript())?n.removeSuperscript():n.applySuperscript()}),isSuperscript:B(({commands:n})=>{const e=n.getMark(this.name);return me(()=>!!H(e))})}},parseHTML(){return[{tag:"sup"},{style:"vertical-align",getAttrs:n=>n!=="super"?!1:null}]},renderHTML(){return["sup",{class:"zw-superscript"},0]}}),BI=De.create({name:de.MARGIN,addGlobalAttributes:()=>[{types:[ie.PARAGRAPH,ie.HEADING],attributes:{[de.MARGIN]:{isRequired:!1,parseHTML(n){const{margin:e,marginTop:t,marginRight:r,marginBottom:i,marginLeft:o}=n.style;return[e,t,r,i,o].some(f=>!!f)?e?{value:e}:{value:[t||0,r||0,i||0,o||0].join(" ")}:null},renderHTML(n){return n.margin?cl({margin:n.margin.value}):null}}}}]});function $I(n){const e=r=>n.presetsRef.value.find(i=>i.id===r),t=hc({default:null,link:null});return PE(n.presetsRef,()=>{t.default=e(n.defaultPresetId),t.link=e(n.linkPresetId)},{immediate:!0,deep:!0}),yI().concat([_I.configure({presets:n.presetsRef,defaultId:n.defaultPresetId,styleRenderer:new WI({baseClass:n.basePresetClass,makeVariable:n.makePresetVariable,linkPresetId:n.linkPresetId})}),NI.configure({baseClass:n.baseListClass,presetClass:n.basePresetClass+n.defaultPresetId}),EI.configure({device:n.deviceRef}),wI.configure({minSize:n.minFontSize,maxSize:n.maxFontSize,wrapperRef:n.wrapperRef}),bI.configure({fonts:n.fonts,defaultPreset:xi(t,"default"),defaultFont:n.defaultFont}),vI,SI,xI,CI,kI,AI,zI,MI,TI.configure({wrapperRef:n.wrapperRef}),FI.configure({preset:xi(t,"link"),basePresetClass:n.basePresetClass,pageBlocks:n.pageBlocksRef}),BI])}class HI{_domParser=new DOMParser;types=window;parse(e){return this._domParser.parseFromString(e,"text/html")}}class cy{content;constructor({content:e}){this.content=e}normalize(){throw new Error("Implement abstract method")}}class kn extends cy{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static ROOT_NODE_NAMES=kn.BLOCK_NODE_NAMES.concat("UL","OL");static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];_parser;constructor({content:e,parser:t}){super({content:e}),this._parser=t,this.dom=null}normalize(){return this.normalizeHTML(),this.normalizedHTML}normalizeHTML(){this.dom=this._parser.parse(this.content.replace(/(\r)?\n/g,"")),this._removeComments(),this._normalizeRootTags(),this._iterateNodes(this._normalizeBreakLines,e=>e.tagName==="BR"),this._iterateNodes(this._removeEmptyNodes,this._isBlockNode),this._iterateNodes(this._normalizeListItems,e=>e.tagName==="LI"),this._normalizeBlockTextDecoration(),this._normalizeBlockBackgroundColor()}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const e=this._createNodeIterator(this._NodeFilter.SHOW_COMMENT);this._runIterator(e,t=>t.remove())}_normalizeRootTags(){const e=Array.from(this.dom.body.childNodes),t=this.dom.createDocumentFragment();let r;for(const i of e){if(this._isRootNode(i)){t.append(i),r=null;continue}r||(r=this.dom.createElement("p"),t.append(r)),r.append(i)}this.dom.body.innerHTML="",this.dom.body.append(t)}_createNodeIterator(e,t){return this.dom.createNodeIterator(this.dom.body,e,t)}_iterateNodes(e,t=()=>!0){const r=o=>o.tagName!=="BODY"&&t.call(this,o),i=this._createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:o=>r(o)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this._runIterator(i,e)}_runIterator(e,t){let r=e.nextNode();for(;r;)t.call(this,r),r=e.nextNode()}_removeEmptyNodes(e){e.innerHTML.trim()||e.remove()}_normalizeListItems(e){const t=this.dom.createDocumentFragment(),r=Array.from(e.childNodes);let i,o;const a=u=>{this._assignElementProperties(u,e,kn.BLOCK_STYLES),t.append(u)};this._assignElementProperties(e,e.parentElement,kn.BLOCK_STYLES);for(const u of r){if(this._isBlockNode(u)){a(u),i=null,o=u;continue}if(u.tagName==="BR"&&o&&o?.tagName!=="BR"){u.remove(),o=u;continue}if(u.tagName==="BR"){const f=this.dom.createElement("p");f.append(u),a(f),i=null,o=u;continue}i||(i=this.dom.createElement("p"),a(i)),i.append(u),o=u}e.append(t),this._removeStyleProperties(e,kn.BLOCK_STYLES),this._removeStyleProperties(e.parentElement,kn.BLOCK_STYLES),this._assignElementProperties(e,e.parentElement),e.parentElement.lastElementChild===e&&this._removeStyleProperties(e.parentElement)}_isBlockNode(e){return kn.BLOCK_NODE_NAMES.includes(e.tagName)}_isRootNode(e){return kn.ROOT_NODE_NAMES.includes(e.tagName)}_assignElementProperties(e,t,r=Array.from(t.style)){for(const i of r){const o=t.style.getPropertyValue(i);o&&!e.style.getPropertyValue(i)&&e.style.setProperty(i,o)}}_removeStyleProperties(e,t=Array.from(e.style)){for(const r of t)e.style.removeProperty(r);e.style.length===0&&e.removeAttribute("style")}_normalizeBreakLines({parentElement:e}){if(!this._isBlockNode(e)||!e.textContent)return;const t=this.dom.createDocumentFragment(),r=Array.from(e.childNodes),i=e.cloneNode(!0);i.innerHTML="";let o=i.cloneNode();const a=u=>{this._assignElementProperties(u,e,kn.BLOCK_STYLES),t.append(u)};for(const u of r){if(u.tagName==="BR"){a(o),o=i.cloneNode();continue}o.append(u)}t.append(o),e.replaceWith(t)}_normalizeBlockTextDecoration(){const e=this.dom.querySelectorAll('[style*="text-decoration"]:where(p, h1, h2, h3, h4, li)');for(const t of e)this._moveTextDecorationToChildren(t)}_moveTextDecorationToChildren(e){const t=this._parseTextDecoration(e);if(e.style.removeProperty("text-decoration-line"),e.style.removeProperty("text-decoration"),e.style.cssText||e.removeAttribute("style"),!t.none)for(const r of e.childNodes){const i=this._wrapTextNode(e,r),o=this._parseTextDecoration(i),a={underline:o.underline||t.underline,line_through:o.line_through||t.line_through};i.style.removeProperty("text-decoration-line"),i.style.removeProperty("text-decoration"),i.style.textDecoration=Object.entries(a).filter(([,u])=>u).map(([u])=>u.replace("_","-")).join(" ")}}_parseTextDecoration(e){const{textDecoration:t,textDecorationLine:r}=e.style,i=t||r||"";return{none:i.includes("none"),underline:i.includes("underline"),line_through:i.includes("line-through")}}_normalizeBlockBackgroundColor(){const e=this.dom.querySelectorAll('[style*="background-color"]:where(p, h1, h2, h3, h4, li)');for(const t of e)this._moveBackgroundColorToChildren(t)}_moveBackgroundColorToChildren(e){const t=e.style.backgroundColor;e.style.removeProperty("background-color"),e.style.cssText||e.removeAttribute("style");for(const r of e.childNodes){const i=this._wrapTextNode(e,r),o=i.style.backgroundColor||t;i.style.backgroundColor=o}}_wrapTextNode(e,t){if(t.nodeType!==this._Node.TEXT_NODE)return t;const r=this.dom.createElement("span");return r.append(t.cloneNode()),e.replaceChild(r,t),r}}class VI extends cy{normalize(){return this._iterateNodes(this._bubbleMarks),this.content}_iterateNodes(e){this._iterateChildNodes(this.content,e)}_iterateChildNodes(e,t){for(const r of e.content)r.content&&this._iterateChildNodes(r,t),t.call(this,r)}_bubbleMarks(e){if(e.content&&e.type!==ie.LIST){for(const t of e.content)if(!this._isLink(t)&&t.marks)for(const r of t.marks.slice()){if(this._includesMark(e,r)){this._removeMark(t,r);continue}this._canBubbleMark(e,r)&&(this._removeMark(t,r),this._addMark(e,r))}}}_canBubbleMark(e,t){if(de.inlineMarks.includes(t.type)||this._includesMarkType(e,t.type))return!1;for(const r of e.content)if(!(!r.content&&e.type===ie.LIST_ITEM)&&(!r.marks||!this._includesMark(r,t)))return!1;return!0}_includesMark(e,t){return e.marks?.some(r=>ay.isEqual(r,t))??!1}_includesMarkType(e,t){return e.marks?.some(r=>r.type===t)??!1}_isLink(e){return e.type===ie.TEXT&&this._includesMarkType(e,de.LINK)}_removeMark(e,t){if(!e.marks)return;const r=this._findMarkIndexByType(e,t.type);r>=0&&e.marks.splice(r,1),e.marks.length||delete e.marks}_addMark(e,t){this._removeMark(e,t),e.marks??=[],e.marks.push(t)}_findMarkIndexByType(e,t){return e.marks?.findIndex(r=>r.type===t)??null}}class El{static build(e,t={}){return typeof e=="string"?this._buildHtml(e,t):this._buildJson(e)}static _buildHtml(e,t){return new kn({content:e,parser:t.parser||new HI})}static _buildJson(e){return new VI({content:e})}static normalize(e,t={}){return El.build(e,t).normalize()}}class Ki{static window=globalThis.window;static use(e){this.window=e}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(e){return this.window.getComputedStyle(e)}}class hh{static build({config:e,nodeDomParser:t}){const r=$I({fonts:e.fonts,minFontSize:0,maxFontSize:0,presetsRef:sa(e.presets),defaultPresetId:e.defaultPresetId,linkPresetId:e.linkPresetId,makePresetVariable:()=>"",basePresetClass:e.basePresetClass,baseListClass:e.baseListClass,deviceRef:sa(wf.DESKTOP),pageBlocksRef:sa([]),wrapperRef:Ki.document.createElement("p")}),i=vM(r);return new hh({schema:i,domParser:Mc.fromSchema(i),nodeDomParser:t})}_schema;_domParser;_nodeDomParser;constructor({schema:e,domParser:t,nodeDomParser:r}){this._schema=e,this._domParser=t,this._nodeDomParser=r}toJSON(e){const t=El.build(e,{parser:this._nodeDomParser});return t.normalizeHTML(),this._domParser.parse(t.dom.body).toJSON()}}class fy{static doc(e){return{type:ie.DOCUMENT,content:e}}static list(e,t){return{type:ie.LIST,attrs:{bullet:{type:e}},content:t.map(r=>r.type===ie.LIST_ITEM?r:this.listItem([].concat(r)))}}static listItem(...e){const{attrs:t,content:r,marks:i}=this._normalizeTextBlockArgs(e);return{type:ie.LIST_ITEM,...t?{attrs:t}:{},...i?{marks:i}:{},content:[].concat(r).map(o=>typeof o=="string"?this.paragraph(o):o)}}static heading(e,...t){const r=this._textBlock(t,this.text);return r.attrs??={},r.attrs.level=e,{type:ie.HEADING,...r}}static paragraph(...e){return{type:ie.PARAGRAPH,...this._textBlock(e,this.text)}}static _textBlock(e){const{attrs:t,content:r,marks:i}=this._normalizeTextBlockArgs(e);return{content:typeof r=="string"?[this.text(r)]:r,...t?{attrs:t}:{},...i?{marks:i}:{}}}static _normalizeTextBlockArgs(e){return e.length===1?{attrs:null,marks:null,content:e[0]}:e.length===2?{attrs:e[0],marks:null,content:e[1]}:{attrs:e[0],marks:e[1],content:e[2]}}static text(e,t){return{type:ie.TEXT,...t?{marks:t}:{},text:e}}static link(e,t,r=[]){return this.text(e,[this.mark(de.LINK,t),...r])}static mark(e,t){return{type:e,attrs:t}}static populateAllDevices(e){return{mobile:e,tablet:e,desktop:e}}}class WI{_baseClass;_makeVariable;_linkPresetId;constructor({baseClass:e,makeVariable:t,linkPresetId:r}){this._baseClass=e,this._makeVariable=t,this._linkPresetId=r}inject(e,t){let r=e.querySelector("[data-zw-styles]");r||(r=Ki.document.createElement("style"),r.dataset.zwStyles="",r.innerHTML=this.render(t),e.append(r))}render(e){let t="";for(const r of e){const i=r.id===this._linkPresetId,o=this.makePresetCssClass(r);t+=` ${o} {`;for(const a of wf.values)for(const u of Object.keys(r[a])){const f=this._makeVariable({device:a,preset:r,property:u}),h=this._makeInternalVariableName(u,a);if(t+=`${h}: var(${f}, inherit);`,i&&!de.attributes.includes(u)){const m=h.replace("preset-","");t+=`${m}: var(${h});`}}t+="}"}return t}_makeInternalVariableName(e,t){const r=e==="color"?"font-color":e.replace(/_/i,"-"),i=t===wf.COMMON?"":`-${t}`;return`--zw-preset-${r}${i}`}makePresetHtmlClass(e){return this._baseClass+e.id}makePresetCssClass(e){return this.makePresetHtmlClass(e).split(" ").map(t=>`.${t}`).join("")}}class dh{static _instance;static get instance(){return this._instance??=new dh,this._instance}static query(e,t){return this.instance.query(e,t)}query(e,t){let r=null;return e.descendants(i=>{if(r)return!1;if(this.matchNode(i,t))return r=i,!1}),r?t.getMark?this.getMark(r,t.getMark):r:null}matchNode(e,t){return!(t.typeName&&t.typeName!==e.type.name||t.mark&&!this.getMark(e,t.mark))}getMark(e,t){return e.marks.find(r=>this.matchMark(r,t))||null}matchMark(e,t){return e.type.name===t.typeName}}class hy{static createWindow(){return new Kp.JSDOM().window}types;parse(e){const{window:t}=new Kp.JSDOM(e);return this.types=t,t.document}}class dy{name;description;argument;options=[];doCommand(){throw new Error('Command "doCommand" is required')}install(e){if(!this.name)throw new Error('Command "name" is required');let t=e.command(this.name);if(this.description&&(t=t.description(this.description)),this.argument&&(t=t.argument(this.argument)),this.options.length)for(const r of this.options)t=t.option(r.flags,r.description,r.default);t.action(this.doCommand.bind(this))}output(e){}}class UI extends dy{name="to-json";description="migrate html to json";argument="<html...>";options=[{flags:"-c, --config <path>",description:"Generator config",default:qp.resolve(__dirname,"../bin/zp.config.json")},{flags:"-f, --format <type>",description:"Set output format",default:"rb"}];doCommand(e,{config:t,format:r}){Ki.use(hy.createWindow());const i=qp.resolve(process.cwd(),t),o=hh.build({config:require(i).editor,nodeDomParser:new hy}),a=e.map(h=>o.toJSON(this._formatInputHtml(h))),u=a.length===1?a[0]:a,f=this._stringifyContent(u);this.output(r==="rb"?this._formatOutputRb(f):f)}_formatInputHtml(e){return e.replace(/\\(["'])/g,"$1").replace(/rgba\(\d{1,3}, ?\d{1,3}, ?\d{1,3}, (\d{1,2}%)\)/g,(t,r)=>t.replace(r,parseFloat(r)/100))}_stringifyContent(e){return JSON.stringify(e,(r,i)=>i===null?void 0:i,2)}_formatOutputRb(e){return e.replace(/\\"/g,'"').replace(/font-family: ?'(.+)'/g,'font-family: "$1"').replace(/'/g,"\\'").replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,t=>t.replace(/"/g,"")).replace(/: "(.+)"([,\n])/g,": '$1'$2")}}var qI="4.9.3";class KI extends dy{name="version";description="display cli version";doCommand(){this.output(qI)}}const py=new h5,GI=[UI,KI];for(const n of GI)new n().install(py);py.parse();
|
package/dist/wysiwyg.mjs
CHANGED
|
@@ -28679,7 +28679,7 @@ const _sfc_main$1 = {
|
|
|
28679
28679
|
},
|
|
28680
28680
|
setup(__props) {
|
|
28681
28681
|
useCssVars((_ctx) => ({
|
|
28682
|
-
"
|
|
28682
|
+
"7b6bf359": __props.offsets[1]
|
|
28683
28683
|
}));
|
|
28684
28684
|
const props = __props;
|
|
28685
28685
|
const layoutComponent = computed(() => {
|
|
@@ -28711,7 +28711,7 @@ const _sfc_main$1 = {
|
|
|
28711
28711
|
};
|
|
28712
28712
|
}
|
|
28713
28713
|
};
|
|
28714
|
-
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
28714
|
+
const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-e9105a30"]]);
|
|
28715
28715
|
function useEditor({ content, onChange, extensions: extensions2, isReadonlyRef }) {
|
|
28716
28716
|
const editor = reactive(new Editor2({
|
|
28717
28717
|
content: ContentNormalizer.normalize(content.value),
|
|
@@ -65,8 +65,8 @@ const layoutComponent = computed(() => {
|
|
|
65
65
|
border: 1px solid rgba(var(--zw-color-white), 0.2);
|
|
66
66
|
border-radius: 2px;
|
|
67
67
|
background-color: rgba(var(--zw-color-n15), 0.9);
|
|
68
|
-
-webkit-backdrop-filter: blur(8px); /* prefixed rule must be before unprefixed one https://github.com/parcel-bundler/lightningcss/issues/695 */
|
|
69
68
|
backdrop-filter: blur(8px);
|
|
69
|
+
-webkit-backdrop-filter: blur(8px);
|
|
70
70
|
color: rgb(var(--zw-color-n70));
|
|
71
71
|
z-index: 999999;
|
|
72
72
|
text-align: left;
|