mol_plot_all 1.2.192 → 1.2.196
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node.d.ts +0 -1416
- package/node.deps.json +1 -1
- package/node.esm.js +1737 -1967
- package/node.esm.js.map +1 -1
- package/node.js +1737 -1967
- package/node.js.map +1 -1
- package/node.test.js +4077 -3831
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/test.html +2 -2
- package/web.d.ts +0 -1384
- package/web.deps.json +1 -1
- package/web.esm.js +1277 -1509
- package/web.esm.js.map +1 -1
- package/web.js +1277 -1509
- package/web.js.map +1 -1
- package/web.test.js +1375 -896
- package/web.test.js.map +1 -1
package/web.esm.js
CHANGED
|
@@ -24,10 +24,10 @@ var $;
|
|
|
24
24
|
(function ($) {
|
|
25
25
|
})($ || ($ = {}));
|
|
26
26
|
module.exports = $;
|
|
27
|
-
//mam.
|
|
27
|
+
//mam.ts
|
|
28
28
|
;
|
|
29
29
|
|
|
30
|
-
$node[ "../mam" ] = $node[ "../mam.
|
|
30
|
+
$node[ "../mam.ts" ] = $node[ "../mam.ts" ] = module.exports }.call( {} , {} )
|
|
31
31
|
;
|
|
32
32
|
"use strict";
|
|
33
33
|
var $;
|
|
@@ -38,7 +38,7 @@ var $;
|
|
|
38
38
|
}
|
|
39
39
|
$.$mol_ambient = $mol_ambient;
|
|
40
40
|
})($ || ($ = {}));
|
|
41
|
-
//ambient.
|
|
41
|
+
//mol/ambient/ambient.ts
|
|
42
42
|
;
|
|
43
43
|
"use strict";
|
|
44
44
|
var $;
|
|
@@ -75,7 +75,7 @@ var $;
|
|
|
75
75
|
value: (obj) => instances.has(obj),
|
|
76
76
|
});
|
|
77
77
|
})($ || ($ = {}));
|
|
78
|
-
//delegate.
|
|
78
|
+
//mol/delegate/delegate.ts
|
|
79
79
|
;
|
|
80
80
|
"use strict";
|
|
81
81
|
var $;
|
|
@@ -87,7 +87,7 @@ var $;
|
|
|
87
87
|
return false;
|
|
88
88
|
if (typeof having !== 'object')
|
|
89
89
|
return false;
|
|
90
|
-
if (having instanceof
|
|
90
|
+
if (having instanceof $mol_delegate)
|
|
91
91
|
return false;
|
|
92
92
|
if (typeof having['destructor'] !== 'function')
|
|
93
93
|
return false;
|
|
@@ -131,7 +131,7 @@ var $;
|
|
|
131
131
|
}
|
|
132
132
|
$.$mol_owning_catch = $mol_owning_catch;
|
|
133
133
|
})($ || ($ = {}));
|
|
134
|
-
//owning.
|
|
134
|
+
//mol/owning/owning.ts
|
|
135
135
|
;
|
|
136
136
|
"use strict";
|
|
137
137
|
var $;
|
|
@@ -141,7 +141,7 @@ var $;
|
|
|
141
141
|
}
|
|
142
142
|
$.$mol_fail = $mol_fail;
|
|
143
143
|
})($ || ($ = {}));
|
|
144
|
-
//fail.
|
|
144
|
+
//mol/fail/fail.ts
|
|
145
145
|
;
|
|
146
146
|
"use strict";
|
|
147
147
|
var $;
|
|
@@ -151,27 +151,27 @@ var $;
|
|
|
151
151
|
}
|
|
152
152
|
$.$mol_fail_hidden = $mol_fail_hidden;
|
|
153
153
|
})($ || ($ = {}));
|
|
154
|
-
//hidden.
|
|
154
|
+
//mol/fail/hidden/hidden.ts
|
|
155
155
|
;
|
|
156
156
|
"use strict";
|
|
157
|
-
//writable.
|
|
157
|
+
//mol/type/writable/writable.ts
|
|
158
158
|
;
|
|
159
159
|
"use strict";
|
|
160
160
|
var $;
|
|
161
161
|
(function ($) {
|
|
162
162
|
class $mol_object2 {
|
|
163
163
|
static $ = $;
|
|
164
|
-
[
|
|
164
|
+
[$mol_ambient_ref] = null;
|
|
165
165
|
get $() {
|
|
166
|
-
if (this[
|
|
167
|
-
return this[
|
|
168
|
-
const owner =
|
|
169
|
-
return this[
|
|
166
|
+
if (this[$mol_ambient_ref])
|
|
167
|
+
return this[$mol_ambient_ref];
|
|
168
|
+
const owner = $mol_owning_get(this);
|
|
169
|
+
return this[$mol_ambient_ref] = owner?.$ || $mol_object2.$;
|
|
170
170
|
}
|
|
171
171
|
set $(next) {
|
|
172
|
-
if (this[
|
|
173
|
-
|
|
174
|
-
this[
|
|
172
|
+
if (this[$mol_ambient_ref])
|
|
173
|
+
$mol_fail_hidden(new Error('Context already defined'));
|
|
174
|
+
this[$mol_ambient_ref] = next;
|
|
175
175
|
}
|
|
176
176
|
static create(init) {
|
|
177
177
|
const obj = new this;
|
|
@@ -197,12 +197,12 @@ var $;
|
|
|
197
197
|
}
|
|
198
198
|
$.$mol_object2 = $mol_object2;
|
|
199
199
|
})($ || ($ = {}));
|
|
200
|
-
//object2.
|
|
200
|
+
//mol/object2/object2.ts
|
|
201
201
|
;
|
|
202
202
|
"use strict";
|
|
203
203
|
var $;
|
|
204
204
|
(function ($) {
|
|
205
|
-
class $mol_after_tick extends
|
|
205
|
+
class $mol_after_tick extends $mol_object2 {
|
|
206
206
|
task;
|
|
207
207
|
promise;
|
|
208
208
|
cancelled = false;
|
|
@@ -221,20 +221,20 @@ var $;
|
|
|
221
221
|
}
|
|
222
222
|
$.$mol_after_tick = $mol_after_tick;
|
|
223
223
|
})($ || ($ = {}));
|
|
224
|
-
//tick.
|
|
224
|
+
//mol/after/tick/tick.ts
|
|
225
225
|
;
|
|
226
226
|
"use strict";
|
|
227
227
|
var $;
|
|
228
228
|
(function ($) {
|
|
229
229
|
})($ || ($ = {}));
|
|
230
|
-
//context.
|
|
230
|
+
//mol/dom/context/context.ts
|
|
231
231
|
;
|
|
232
232
|
"use strict";
|
|
233
233
|
var $;
|
|
234
234
|
(function ($) {
|
|
235
235
|
$.$mol_dom_context = self;
|
|
236
236
|
})($ || ($ = {}));
|
|
237
|
-
//context.web.
|
|
237
|
+
//mol/dom/context/context.web.ts
|
|
238
238
|
;
|
|
239
239
|
"use strict";
|
|
240
240
|
var $;
|
|
@@ -246,13 +246,13 @@ var $;
|
|
|
246
246
|
all.push(`/* ${id} */\n\n${text}`);
|
|
247
247
|
if (timer)
|
|
248
248
|
return el;
|
|
249
|
-
const doc =
|
|
249
|
+
const doc = $mol_dom_context.document;
|
|
250
250
|
if (!doc)
|
|
251
251
|
return null;
|
|
252
252
|
el = doc.createElement('style');
|
|
253
253
|
el.id = `$mol_style_attach`;
|
|
254
254
|
doc.head.appendChild(el);
|
|
255
|
-
timer = new
|
|
255
|
+
timer = new $mol_after_tick(() => {
|
|
256
256
|
el.innerHTML = '\n' + all.join('\n\n');
|
|
257
257
|
all = [];
|
|
258
258
|
el = null;
|
|
@@ -262,7 +262,7 @@ var $;
|
|
|
262
262
|
}
|
|
263
263
|
$.$mol_style_attach = $mol_style_attach;
|
|
264
264
|
})($ || ($ = {}));
|
|
265
|
-
//attach.
|
|
265
|
+
//mol/style/attach/attach.ts
|
|
266
266
|
;
|
|
267
267
|
"use strict";
|
|
268
268
|
var $;
|
|
@@ -281,12 +281,12 @@ var $;
|
|
|
281
281
|
}
|
|
282
282
|
$.$mol_decor = $mol_decor;
|
|
283
283
|
})($ || ($ = {}));
|
|
284
|
-
//decor.
|
|
284
|
+
//mol/decor/decor.ts
|
|
285
285
|
;
|
|
286
286
|
"use strict";
|
|
287
287
|
var $;
|
|
288
288
|
(function ($) {
|
|
289
|
-
class $mol_style_unit extends
|
|
289
|
+
class $mol_style_unit extends $mol_decor {
|
|
290
290
|
literal;
|
|
291
291
|
constructor(value, literal) {
|
|
292
292
|
super(value);
|
|
@@ -326,13 +326,13 @@ var $;
|
|
|
326
326
|
}
|
|
327
327
|
$.$mol_style_unit = $mol_style_unit;
|
|
328
328
|
})($ || ($ = {}));
|
|
329
|
-
//unit.
|
|
329
|
+
//mol/style/unit/unit.ts
|
|
330
330
|
;
|
|
331
331
|
"use strict";
|
|
332
332
|
var $;
|
|
333
333
|
(function ($) {
|
|
334
|
-
const { per } =
|
|
335
|
-
class $mol_style_func extends
|
|
334
|
+
const { per } = $mol_style_unit;
|
|
335
|
+
class $mol_style_func extends $mol_decor {
|
|
336
336
|
name;
|
|
337
337
|
constructor(name, value) {
|
|
338
338
|
super(value);
|
|
@@ -361,19 +361,19 @@ var $;
|
|
|
361
361
|
}
|
|
362
362
|
$.$mol_style_func = $mol_style_func;
|
|
363
363
|
})($ || ($ = {}));
|
|
364
|
-
//func.
|
|
364
|
+
//mol/style/func/func.ts
|
|
365
365
|
;
|
|
366
366
|
"use strict";
|
|
367
367
|
var $;
|
|
368
368
|
(function ($) {
|
|
369
|
-
|
|
369
|
+
$mol_style_attach("mol/theme/theme.css", "[mol_theme] {\n\tbackground-color: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tfill: var(--mol_theme_text);\n}\n\n[mol_theme=\"$mol_theme_light\"] , :root {\n\t--mol_theme_back: hsl( 210 , 50% , 99% );\n\t--mol_theme_hover: rgba( 0 , 0 , 0 , .05 );\n\t--mol_theme_current: hsl( 210 , 100% , 80% );\n\t--mol_theme_text: hsl( 0 , 0% , 0% );\n\t--mol_theme_control: hsla( 210 , 60% , 35% , 1 );\n\t--mol_theme_shade: rgba( 0 , 0 , 0 , .5 );\n\t--mol_theme_line: rgba( 220 , 220 , 220 , 1 );\n\t--mol_theme_focus: hsl( 290 , 70% , 50% );\n\t--mol_theme_field: white;\n\t--mol_theme_image: none;\n}\n\n[mol_theme=\"$mol_theme_dark\"] {\n\t--mol_theme_back: hsl( 210 , 50% , 10% );\n\t--mol_theme_hover: rgba( 255 , 255 , 255 , .05 );\n\t--mol_theme_current: hsl( 210 , 100% , 30% );\n\t--mol_theme_text: hsl( 0 , 0% , 80% );\n\t--mol_theme_control: hsla( 210 , 60% , 70% , 1 );\n\t--mol_theme_shade: rgba( 255 , 255 , 255 , .5 );\n\t--mol_theme_line: rgba( 70 , 70 , 70 , 1 );\n\t--mol_theme_focus: hsl( 60 , 100% , 70% );\n\t--mol_theme_field: black;\n\t--mol_theme_image: invert(1) hue-rotate(180deg);\n}\n\n[mol_theme=\"$mol_theme_base\"] {\n\t--mol_theme_back: hsla( 210 , 60% , 35% , 1 );\n\t--mol_theme_hover: hsla( 210 , 60% , 20% , 1 );\n\t--mol_theme_current: hsl( 210 , 100% , 20% );\n\t--mol_theme_text: white;\n\t--mol_theme_line: white;\n\t--mol_theme_control: white;\n}\n\n[mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: hsl( 15 , 60% , 50% );\n\t--mol_theme_hover: hsl( 15 , 60% , 40% );\n\t--mol_theme_text: white;\n\t--mol_theme_line: rgba( 50 , 50 , 50 , 1 );\n\t--mol_theme_control: white;\n\t--mol_theme_focus: black;\n}\n\n[mol_theme=\"$mol_theme_accent\"] [mol_theme=\"$mol_theme_accent\"] {\n\t--mol_theme_back: black;\n\t--mol_theme_text: white;\n}\n");
|
|
370
370
|
})($ || ($ = {}));
|
|
371
|
-
//theme.css.
|
|
371
|
+
//mol/theme/-css/theme.css.ts
|
|
372
372
|
;
|
|
373
373
|
"use strict";
|
|
374
374
|
var $;
|
|
375
375
|
(function ($) {
|
|
376
|
-
const { vary } =
|
|
376
|
+
const { vary } = $mol_style_func;
|
|
377
377
|
$.$mol_theme = {
|
|
378
378
|
back: vary('--mol_theme_back'),
|
|
379
379
|
hover: vary('--mol_theme_hover'),
|
|
@@ -387,14 +387,14 @@ var $;
|
|
|
387
387
|
image: vary('--mol_theme_image'),
|
|
388
388
|
};
|
|
389
389
|
})($ || ($ = {}));
|
|
390
|
-
//theme.
|
|
390
|
+
//mol/theme/theme.ts
|
|
391
391
|
;
|
|
392
392
|
"use strict";
|
|
393
393
|
var $;
|
|
394
394
|
(function ($) {
|
|
395
|
-
|
|
395
|
+
$mol_style_attach("mol/skin/skin.css", ":root {\n\t--mol_skin_font: 16px/24px Segoe UI, sans-serif;\n\t/* --mol_skin_font_monospace: Monaco, monospace; */\n\t--mol_skin_font_monospace: monospace;\n}\n\n/* Deprecated, use mol_theme instead */\n:root {\n\n\t--mol_skin_outline: 0 0 0 1px var(--mol_theme_line);\n\t\n\t--mol_skin_base: #3a8ccb;\n\t--mol_skin_base_text: white;\n\t\n\t--mol_skin_current: var(--mol_skin_base);\n\t--mol_skin_current_text: white;\n\t--mol_skin_current_line: #1471b8;\n\t\n\t--mol_skin_button: var(--mol_skin_card);\n\t--mol_skin_hover: rgba( 0 , 0 , 0 , .05 );\n\t\n\t--mol_skin_round: 0px;\n\t\n\t--mol_skin_focus_line: rgba( 0 , 0 , 0 , .2 );\n\t--mol_skin_focus_outline: 0 0 0 1px var(--mol_skin_focus_line);\n\t\n\t--mol_skin_float: var(--mol_skin_focus_outline);\n\n\t--mol_skin_passive: #eee;\n\t--mol_skin_passive_text: rgba( 0 , 0 , 0 , .5 );\n\t\n\t--mol_skin_light: #fcfcfc;\n\t--mol_skin_light_line: rgba( 230 , 230 , 230 , .75 );\n\t--mol_skin_light_text: rgba( 0 , 0 , 0 , .9 );\n\t--mol_skin_light_hover: #f7f7f7;\n\t--mol_skin_light_outline: 0 0 0 1px var(--mol_theme_line);\n\n\t--mol_skin_card: var(--mol_theme_back);\n\t--mol_skin_card_text: var(--mol_theme_text);\n\t\n\t--mol_skin_accent: #dd0e3e;\n\t--mol_skin_accent_text: white;\n\t--mol_skin_accent_hover: #c50d37;\n\n\t--mol_skin_warn: rgba( 255 , 50 , 50 , 0.75 );\n\t--mol_skin_warn_text: white;\n\t--mol_skin_warn_hover: color( var(--mol_skin_warn) lightness(-5%) );\n\n\t--mol_skin_good: #96DAA9;\n\t--mol_skin_good_text: black;\n\n\t--mol_skin_bad: #CC5252;\n\t--mol_skin_bad_text: white;\n}\n");
|
|
396
396
|
})($ || ($ = {}));
|
|
397
|
-
//skin.css.
|
|
397
|
+
//mol/skin/-css/skin.css.ts
|
|
398
398
|
;
|
|
399
399
|
"use strict";
|
|
400
400
|
var $;
|
|
@@ -404,7 +404,7 @@ var $;
|
|
|
404
404
|
let $;
|
|
405
405
|
})($$ = $_1.$$ || ($_1.$$ = {}));
|
|
406
406
|
$_1.$mol_object_field = Symbol('$mol_object_field');
|
|
407
|
-
class $mol_object extends $
|
|
407
|
+
class $mol_object extends $mol_object2 {
|
|
408
408
|
static make(config) {
|
|
409
409
|
return super.create(obj => {
|
|
410
410
|
for (let key in config)
|
|
@@ -414,145 +414,333 @@ var $;
|
|
|
414
414
|
}
|
|
415
415
|
$_1.$mol_object = $mol_object;
|
|
416
416
|
})($ || ($ = {}));
|
|
417
|
-
//object.
|
|
417
|
+
//mol/object/object.ts
|
|
418
418
|
;
|
|
419
419
|
"use strict";
|
|
420
420
|
var $;
|
|
421
421
|
(function ($) {
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
422
|
+
let $mol_wire_cursor;
|
|
423
|
+
(function ($mol_wire_cursor) {
|
|
424
|
+
$mol_wire_cursor[$mol_wire_cursor["stale"] = new (class stale extends Number {
|
|
425
|
+
})(-1)] = "stale";
|
|
426
|
+
$mol_wire_cursor[$mol_wire_cursor["doubt"] = new (class doubt extends Number {
|
|
427
|
+
})(-2)] = "doubt";
|
|
428
|
+
$mol_wire_cursor[$mol_wire_cursor["fresh"] = new (class fresh extends Number {
|
|
429
|
+
})(-3)] = "fresh";
|
|
430
|
+
$mol_wire_cursor[$mol_wire_cursor["final"] = new (class solid extends Number {
|
|
431
|
+
})(-4)] = "final";
|
|
432
|
+
})($mol_wire_cursor = $.$mol_wire_cursor || ($.$mol_wire_cursor = {}));
|
|
433
|
+
})($ || ($ = {}));
|
|
434
|
+
//mol/wire/cursor/cursor.ts
|
|
435
|
+
;
|
|
436
|
+
"use strict";
|
|
437
|
+
var $;
|
|
438
|
+
(function ($) {
|
|
439
|
+
class $mol_wire_pub extends Array {
|
|
440
|
+
static get [Symbol.species]() {
|
|
441
|
+
return Array;
|
|
442
|
+
}
|
|
443
|
+
sub_from = 0;
|
|
444
|
+
get sub_list() {
|
|
445
|
+
const res = [];
|
|
446
|
+
for (let i = this.sub_from; i < this.length; i += 2) {
|
|
447
|
+
res.push(this[i]);
|
|
448
|
+
}
|
|
449
|
+
return res;
|
|
450
|
+
}
|
|
451
|
+
get sub_empty() {
|
|
452
|
+
return this.sub_from === this.length;
|
|
453
|
+
}
|
|
454
|
+
sub_on(sub, pub_pos) {
|
|
455
|
+
const pos = this.length;
|
|
456
|
+
this.push(sub, pub_pos);
|
|
457
|
+
return pos;
|
|
458
|
+
}
|
|
459
|
+
sub_off(sub_pos) {
|
|
460
|
+
if (!(sub_pos < this.length)) {
|
|
461
|
+
$mol_fail(new Error(`Wrong pos ${sub_pos}`));
|
|
462
|
+
}
|
|
463
|
+
const end = this.length - 2;
|
|
464
|
+
if (sub_pos !== end) {
|
|
465
|
+
this.peer_move(end, sub_pos);
|
|
466
|
+
}
|
|
467
|
+
this.pop();
|
|
468
|
+
this.pop();
|
|
469
|
+
if (this.length === this.sub_from)
|
|
470
|
+
this.reap();
|
|
471
|
+
}
|
|
472
|
+
reap() { }
|
|
473
|
+
track_promote() {
|
|
474
|
+
$mol_wire_auto?.track_next(this);
|
|
475
|
+
}
|
|
476
|
+
up() { }
|
|
477
|
+
down() { }
|
|
478
|
+
emit() {
|
|
479
|
+
for (let i = this.sub_from; i < this.length; i += 2) {
|
|
480
|
+
;
|
|
481
|
+
this[i].stale();
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
stale() {
|
|
485
|
+
if (!this.affect($mol_wire_cursor.stale))
|
|
486
|
+
return false;
|
|
487
|
+
while ($mol_wire_affected.length) {
|
|
488
|
+
const next = $mol_wire_affected.pop();
|
|
489
|
+
next.affect($mol_wire_cursor.doubt);
|
|
490
|
+
}
|
|
491
|
+
return true;
|
|
492
|
+
}
|
|
493
|
+
affect(quant) {
|
|
494
|
+
for (let i = this.sub_from; i < this.length; i += 2) {
|
|
495
|
+
const sub = this[i];
|
|
496
|
+
$mol_wire_affected.push(sub);
|
|
497
|
+
}
|
|
498
|
+
return true;
|
|
499
|
+
}
|
|
500
|
+
peer_move(from_pos, to_pos) {
|
|
501
|
+
const peer = this[from_pos];
|
|
502
|
+
const self_pos = this[from_pos + 1];
|
|
503
|
+
this[to_pos] = peer;
|
|
504
|
+
this[to_pos + 1] = self_pos;
|
|
505
|
+
peer.peer_repos(self_pos, to_pos);
|
|
506
|
+
}
|
|
507
|
+
peer_repos(peer_pos, self_pos) {
|
|
508
|
+
this[peer_pos + 1] = self_pos;
|
|
509
|
+
}
|
|
437
510
|
}
|
|
438
|
-
$.$
|
|
439
|
-
$.$mol_log3_stack = [];
|
|
511
|
+
$.$mol_wire_pub = $mol_wire_pub;
|
|
440
512
|
})($ || ($ = {}));
|
|
441
|
-
//
|
|
513
|
+
//mol/wire/pub/pub.ts
|
|
442
514
|
;
|
|
443
515
|
"use strict";
|
|
444
|
-
//
|
|
516
|
+
//mol/wire/sub/sub.ts
|
|
445
517
|
;
|
|
446
518
|
"use strict";
|
|
447
519
|
var $;
|
|
448
520
|
(function ($) {
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
const pending = this.$mol_log3_stack.pop();
|
|
452
|
-
if (pending)
|
|
453
|
-
pending();
|
|
454
|
-
let tpl = '%c';
|
|
455
|
-
const chunks = Object.values(event);
|
|
456
|
-
for (let i = 0; i < chunks.length; ++i) {
|
|
457
|
-
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
458
|
-
}
|
|
459
|
-
const style = `color:${color};font-weight:bolder`;
|
|
460
|
-
this.console[level](tpl, style, ...chunks);
|
|
461
|
-
const self = this;
|
|
462
|
-
return () => self.console.groupEnd();
|
|
463
|
-
};
|
|
464
|
-
}
|
|
465
|
-
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
466
|
-
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
467
|
-
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
468
|
-
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
469
|
-
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
470
|
-
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
471
|
-
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
521
|
+
$.$mol_wire_auto = null;
|
|
522
|
+
$.$mol_wire_affected = [];
|
|
472
523
|
})($ || ($ = {}));
|
|
473
|
-
//
|
|
524
|
+
//mol/wire/wire.ts
|
|
474
525
|
;
|
|
475
526
|
"use strict";
|
|
476
527
|
var $;
|
|
477
528
|
(function ($) {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
return
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
529
|
+
$['devtoolsFormatters'] = $['devtoolsFormatters'] || [];
|
|
530
|
+
function $mol_dev_format_register(config) {
|
|
531
|
+
$['devtoolsFormatters'].push(config);
|
|
532
|
+
}
|
|
533
|
+
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
534
|
+
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
535
|
+
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
536
|
+
$mol_dev_format_register({
|
|
537
|
+
header: (val, config = false) => {
|
|
538
|
+
if (config)
|
|
539
|
+
return null;
|
|
540
|
+
if (!val)
|
|
541
|
+
return null;
|
|
542
|
+
if ($.$mol_dev_format_head in val) {
|
|
543
|
+
return val[$.$mol_dev_format_head]();
|
|
544
|
+
}
|
|
545
|
+
if (typeof val === 'function') {
|
|
546
|
+
return $mol_dev_format_native(val);
|
|
547
|
+
}
|
|
548
|
+
return null;
|
|
549
|
+
},
|
|
550
|
+
hasBody: val => val[$.$mol_dev_format_body],
|
|
551
|
+
body: val => val[$.$mol_dev_format_body](),
|
|
552
|
+
});
|
|
553
|
+
function $mol_dev_format_native(obj) {
|
|
554
|
+
if (typeof obj === 'undefined')
|
|
555
|
+
return $.$mol_dev_format_shade('undefined');
|
|
556
|
+
if (typeof obj !== 'object' && typeof obj !== 'function')
|
|
557
|
+
return obj;
|
|
558
|
+
return [
|
|
559
|
+
'object',
|
|
560
|
+
{
|
|
561
|
+
object: obj,
|
|
562
|
+
config: true,
|
|
563
|
+
},
|
|
564
|
+
];
|
|
565
|
+
}
|
|
566
|
+
$.$mol_dev_format_native = $mol_dev_format_native;
|
|
567
|
+
function $mol_dev_format_auto(obj) {
|
|
568
|
+
if (obj == null)
|
|
569
|
+
return $.$mol_dev_format_shade(String(obj));
|
|
570
|
+
if (typeof obj === 'object' && $.$mol_dev_format_head in obj) {
|
|
571
|
+
return obj[$.$mol_dev_format_head]();
|
|
507
572
|
}
|
|
573
|
+
return [
|
|
574
|
+
'object',
|
|
575
|
+
{
|
|
576
|
+
object: obj,
|
|
577
|
+
config: false,
|
|
578
|
+
},
|
|
579
|
+
];
|
|
508
580
|
}
|
|
509
|
-
$.$
|
|
581
|
+
$.$mol_dev_format_auto = $mol_dev_format_auto;
|
|
582
|
+
function $mol_dev_format_element(element, style, ...content) {
|
|
583
|
+
const styles = [];
|
|
584
|
+
for (let key in style)
|
|
585
|
+
styles.push(`${key} : ${style[key]}`);
|
|
586
|
+
return [
|
|
587
|
+
element,
|
|
588
|
+
{
|
|
589
|
+
style: styles.join(' ; '),
|
|
590
|
+
},
|
|
591
|
+
...content,
|
|
592
|
+
];
|
|
593
|
+
}
|
|
594
|
+
$.$mol_dev_format_element = $mol_dev_format_element;
|
|
595
|
+
function $mol_dev_format_span(style, ...content) {
|
|
596
|
+
return $mol_dev_format_element('span', {
|
|
597
|
+
'vertical-align': '8%',
|
|
598
|
+
...style,
|
|
599
|
+
}, ...content);
|
|
600
|
+
}
|
|
601
|
+
$.$mol_dev_format_span = $mol_dev_format_span;
|
|
602
|
+
$.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
|
|
603
|
+
$.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
|
|
604
|
+
$.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
|
|
605
|
+
$.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
|
|
606
|
+
$.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
|
|
607
|
+
$.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
|
|
608
|
+
$.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
|
|
609
|
+
'color': 'magenta',
|
|
610
|
+
});
|
|
611
|
+
$.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
|
|
612
|
+
'font-weight': 'bold',
|
|
613
|
+
});
|
|
614
|
+
$.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
|
|
615
|
+
'color': 'green',
|
|
616
|
+
});
|
|
617
|
+
$.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
|
|
618
|
+
'color': 'gray',
|
|
619
|
+
});
|
|
620
|
+
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
621
|
+
'margin-left': '13px'
|
|
622
|
+
});
|
|
510
623
|
})($ || ($ = {}));
|
|
511
|
-
//
|
|
624
|
+
//mol/dev/format/format.ts
|
|
512
625
|
;
|
|
513
626
|
"use strict";
|
|
514
627
|
var $;
|
|
515
628
|
(function ($) {
|
|
516
|
-
class $
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
629
|
+
class $mol_wire_pub_sub extends $mol_wire_pub {
|
|
630
|
+
pub_from = 0;
|
|
631
|
+
cursor = $mol_wire_cursor.stale;
|
|
632
|
+
get pub_list() {
|
|
633
|
+
const res = [];
|
|
634
|
+
for (let i = this.pub_from; i < this.sub_from; i += 2) {
|
|
635
|
+
res.push(this[i]);
|
|
636
|
+
}
|
|
637
|
+
return res;
|
|
638
|
+
}
|
|
639
|
+
track_on() {
|
|
640
|
+
this.cursor = this.pub_from;
|
|
641
|
+
const sub = $mol_wire_auto;
|
|
642
|
+
$mol_wire_auto = this;
|
|
643
|
+
return sub;
|
|
644
|
+
}
|
|
645
|
+
track_promote() {
|
|
646
|
+
if (this.cursor >= this.pub_from) {
|
|
647
|
+
$mol_fail(new Error('Circular subscription'));
|
|
648
|
+
}
|
|
649
|
+
super.track_promote();
|
|
650
|
+
}
|
|
651
|
+
track_next(pub) {
|
|
652
|
+
if (this.cursor < 0)
|
|
653
|
+
$mol_fail(new Error('Promo to non begun sub'));
|
|
654
|
+
if (this.cursor < this.sub_from) {
|
|
655
|
+
const next = this[this.cursor];
|
|
656
|
+
if (pub === undefined)
|
|
657
|
+
return next ?? null;
|
|
658
|
+
if (next === pub) {
|
|
659
|
+
this.cursor += 2;
|
|
660
|
+
return next;
|
|
661
|
+
}
|
|
662
|
+
next?.sub_off(this[this.cursor + 1]);
|
|
663
|
+
}
|
|
664
|
+
else {
|
|
665
|
+
if (pub === undefined)
|
|
666
|
+
return null;
|
|
667
|
+
if (this.sub_from < this.length) {
|
|
668
|
+
this.peer_move(this.sub_from, this.length);
|
|
669
|
+
}
|
|
670
|
+
this.sub_from += 2;
|
|
671
|
+
}
|
|
672
|
+
this[this.cursor] = pub;
|
|
673
|
+
this[this.cursor + 1] = pub.sub_on(this, this.cursor);
|
|
674
|
+
this.cursor += 2;
|
|
675
|
+
return pub;
|
|
532
676
|
}
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
this.
|
|
538
|
-
this.
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
677
|
+
track_off(sub) {
|
|
678
|
+
$mol_wire_auto = sub;
|
|
679
|
+
if (this.cursor < 0)
|
|
680
|
+
$mol_fail(new Error('End of non begun sub'));
|
|
681
|
+
this.forget(this.cursor);
|
|
682
|
+
for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
|
|
683
|
+
const pub = this[cursor];
|
|
684
|
+
pub.up();
|
|
685
|
+
}
|
|
686
|
+
this.cursor = $mol_wire_cursor.fresh;
|
|
687
|
+
}
|
|
688
|
+
pub_off(sub_pos) {
|
|
689
|
+
this[sub_pos] = undefined;
|
|
690
|
+
this[sub_pos + 1] = undefined;
|
|
543
691
|
}
|
|
544
692
|
destructor() {
|
|
545
|
-
this.
|
|
693
|
+
for (let cursor = this.length - 2; cursor >= this.sub_from; cursor -= 2) {
|
|
694
|
+
const sub = this[cursor];
|
|
695
|
+
const pos = this[cursor + 1];
|
|
696
|
+
sub.pub_off(pos);
|
|
697
|
+
this.pop();
|
|
698
|
+
this.pop();
|
|
699
|
+
}
|
|
700
|
+
this.forget();
|
|
701
|
+
this.cursor = $mol_wire_cursor.final;
|
|
702
|
+
}
|
|
703
|
+
forget(from = this.pub_from) {
|
|
704
|
+
let tail = 0;
|
|
705
|
+
for (let cursor = from; cursor < this.sub_from; cursor += 2) {
|
|
706
|
+
const pub = this[cursor];
|
|
707
|
+
pub?.sub_off(this[cursor + 1]);
|
|
708
|
+
if (this.sub_from < this.length) {
|
|
709
|
+
this.peer_move(this.length - 2, cursor);
|
|
710
|
+
this.pop();
|
|
711
|
+
this.pop();
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
++tail;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
for (; tail; --tail) {
|
|
718
|
+
this.pop();
|
|
719
|
+
this.pop();
|
|
720
|
+
}
|
|
721
|
+
this.sub_from = from;
|
|
722
|
+
}
|
|
723
|
+
affect(quant) {
|
|
724
|
+
if (this.cursor >= quant)
|
|
725
|
+
return false;
|
|
726
|
+
this.cursor = quant;
|
|
727
|
+
return super.affect(quant);
|
|
728
|
+
}
|
|
729
|
+
[$mol_dev_format_head]() {
|
|
730
|
+
return $mol_dev_format_native(this);
|
|
731
|
+
}
|
|
732
|
+
get derived() {
|
|
733
|
+
return this.sub_from === this.pub_from;
|
|
546
734
|
}
|
|
547
735
|
}
|
|
548
|
-
$.$
|
|
736
|
+
$.$mol_wire_pub_sub = $mol_wire_pub_sub;
|
|
549
737
|
})($ || ($ = {}));
|
|
550
|
-
//
|
|
738
|
+
//mol/wire/pub/sub/sub.ts
|
|
551
739
|
;
|
|
552
740
|
"use strict";
|
|
553
741
|
var $;
|
|
554
742
|
(function ($) {
|
|
555
|
-
|
|
743
|
+
$.$mol_compare_deep_cache = new WeakMap();
|
|
556
744
|
function $mol_compare_deep(left, right) {
|
|
557
745
|
if (Object.is(left, right))
|
|
558
746
|
return true;
|
|
@@ -578,7 +766,7 @@ var $;
|
|
|
578
766
|
return Object.is(left.valueOf(), right['valueOf']());
|
|
579
767
|
if (left instanceof RegExp)
|
|
580
768
|
return left.source === right['source'] && left.flags === right['flags'];
|
|
581
|
-
let left_cache =
|
|
769
|
+
let left_cache = $.$mol_compare_deep_cache.get(left);
|
|
582
770
|
if (left_cache) {
|
|
583
771
|
const right_cache = left_cache.get(right);
|
|
584
772
|
if (typeof right_cache === 'boolean')
|
|
@@ -586,7 +774,7 @@ var $;
|
|
|
586
774
|
}
|
|
587
775
|
else {
|
|
588
776
|
left_cache = new WeakMap([[right, true]]);
|
|
589
|
-
|
|
777
|
+
$.$mol_compare_deep_cache.set(left, left_cache);
|
|
590
778
|
}
|
|
591
779
|
let result;
|
|
592
780
|
try {
|
|
@@ -670,1098 +858,547 @@ var $;
|
|
|
670
858
|
return Object.is(left[Symbol.toPrimitive]('default'), right[Symbol.toPrimitive]('default'));
|
|
671
859
|
}
|
|
672
860
|
})($ || ($ = {}));
|
|
673
|
-
//deep.
|
|
861
|
+
//mol/compare/deep/deep.ts
|
|
674
862
|
;
|
|
675
863
|
"use strict";
|
|
676
864
|
var $;
|
|
677
865
|
(function ($) {
|
|
678
|
-
function $
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
array.pop();
|
|
685
|
-
else
|
|
686
|
-
break;
|
|
866
|
+
function $mol_guid(length = 8, exists = () => false) {
|
|
867
|
+
for (;;) {
|
|
868
|
+
let id = Math.random().toString(36).substring(2, length + 2).toUpperCase();
|
|
869
|
+
if (exists(id))
|
|
870
|
+
continue;
|
|
871
|
+
return id;
|
|
687
872
|
}
|
|
688
|
-
return array;
|
|
689
873
|
}
|
|
690
|
-
$.$
|
|
874
|
+
$.$mol_guid = $mol_guid;
|
|
691
875
|
})($ || ($ = {}));
|
|
692
|
-
//
|
|
876
|
+
//mol/guid/guid.ts
|
|
693
877
|
;
|
|
694
878
|
"use strict";
|
|
695
879
|
var $;
|
|
696
880
|
(function ($) {
|
|
697
|
-
|
|
698
|
-
function $
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
if (
|
|
707
|
-
return
|
|
708
|
-
if (
|
|
709
|
-
return
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
object: obj,
|
|
727
|
-
config: true,
|
|
728
|
-
},
|
|
729
|
-
];
|
|
730
|
-
}
|
|
731
|
-
$.$mol_dev_format_native = $mol_dev_format_native;
|
|
732
|
-
function $mol_dev_format_auto(obj) {
|
|
733
|
-
if (obj == null)
|
|
734
|
-
return $.$mol_dev_format_shade(String(obj));
|
|
735
|
-
if (typeof obj === 'object' && $.$mol_dev_format_head in obj) {
|
|
736
|
-
return obj[$.$mol_dev_format_head]();
|
|
737
|
-
}
|
|
738
|
-
return [
|
|
739
|
-
'object',
|
|
740
|
-
{
|
|
741
|
-
object: obj,
|
|
742
|
-
config: false,
|
|
743
|
-
},
|
|
744
|
-
];
|
|
745
|
-
}
|
|
746
|
-
$.$mol_dev_format_auto = $mol_dev_format_auto;
|
|
747
|
-
function $mol_dev_format_element(element, style, ...content) {
|
|
748
|
-
const styles = [];
|
|
749
|
-
for (let key in style)
|
|
750
|
-
styles.push(`${key} : ${style[key]}`);
|
|
751
|
-
return [
|
|
752
|
-
element,
|
|
753
|
-
{
|
|
754
|
-
style: styles.join(' ; '),
|
|
755
|
-
},
|
|
756
|
-
...content,
|
|
757
|
-
];
|
|
758
|
-
}
|
|
759
|
-
$.$mol_dev_format_element = $mol_dev_format_element;
|
|
760
|
-
function $mol_dev_format_span(style, ...content) {
|
|
761
|
-
return $mol_dev_format_element('span', {
|
|
762
|
-
'vertical-align': '8%',
|
|
763
|
-
...style,
|
|
764
|
-
}, ...content);
|
|
881
|
+
$.$mol_key_store = new WeakMap();
|
|
882
|
+
function $mol_key(value) {
|
|
883
|
+
if (!value)
|
|
884
|
+
return JSON.stringify(value);
|
|
885
|
+
if (typeof value !== 'object' && typeof value !== 'function')
|
|
886
|
+
return JSON.stringify(value);
|
|
887
|
+
return JSON.stringify(value, (field, value) => {
|
|
888
|
+
if (!value)
|
|
889
|
+
return value;
|
|
890
|
+
if (typeof value !== 'object' && typeof value !== 'function')
|
|
891
|
+
return value;
|
|
892
|
+
if (Array.isArray(value))
|
|
893
|
+
return value;
|
|
894
|
+
const proto = Reflect.getPrototypeOf(value);
|
|
895
|
+
if (!proto)
|
|
896
|
+
return value;
|
|
897
|
+
if (Reflect.getPrototypeOf(proto) === null)
|
|
898
|
+
return value;
|
|
899
|
+
if ('toJSON' in value)
|
|
900
|
+
return value;
|
|
901
|
+
if (value instanceof RegExp)
|
|
902
|
+
return value.toString();
|
|
903
|
+
let key = $.$mol_key_store.get(value);
|
|
904
|
+
if (key)
|
|
905
|
+
return key;
|
|
906
|
+
key = $mol_guid();
|
|
907
|
+
$.$mol_key_store.set(value, key);
|
|
908
|
+
return key;
|
|
909
|
+
});
|
|
765
910
|
}
|
|
766
|
-
$.$
|
|
767
|
-
$.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
|
|
768
|
-
$.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
|
|
769
|
-
$.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
|
|
770
|
-
$.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
|
|
771
|
-
$.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
|
|
772
|
-
$.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
|
|
773
|
-
$.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
|
|
774
|
-
'color': 'magenta',
|
|
775
|
-
});
|
|
776
|
-
$.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
|
|
777
|
-
'font-weight': 'bold',
|
|
778
|
-
});
|
|
779
|
-
$.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
|
|
780
|
-
'color': 'green',
|
|
781
|
-
});
|
|
782
|
-
$.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
|
|
783
|
-
'color': 'gray',
|
|
784
|
-
});
|
|
785
|
-
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
786
|
-
'margin-left': '13px'
|
|
787
|
-
});
|
|
911
|
+
$.$mol_key = $mol_key;
|
|
788
912
|
})($ || ($ = {}));
|
|
789
|
-
//
|
|
913
|
+
//mol/key/key.ts
|
|
790
914
|
;
|
|
791
915
|
"use strict";
|
|
792
916
|
var $;
|
|
793
917
|
(function ($) {
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
$.$mol_fiber_func = $mol_fiber_func;
|
|
811
|
-
function $mol_fiber_root(calculate) {
|
|
812
|
-
const wrapper = function (...args) {
|
|
813
|
-
const fiber = new $mol_fiber();
|
|
814
|
-
fiber.calculate = calculate.bind(this, ...args);
|
|
815
|
-
fiber[Symbol.toStringTag] = wrapper[Symbol.toStringTag];
|
|
816
|
-
return fiber.wake();
|
|
817
|
-
};
|
|
818
|
-
wrapper[Symbol.toStringTag] = calculate.name;
|
|
819
|
-
return wrapper;
|
|
820
|
-
}
|
|
821
|
-
$.$mol_fiber_root = $mol_fiber_root;
|
|
822
|
-
function $mol_fiber_method(obj, name, descr) {
|
|
823
|
-
$.$mol_ambient({}).$mol_log3_warn({
|
|
824
|
-
place: '$mol_fiber_method',
|
|
825
|
-
message: 'Deprecated',
|
|
826
|
-
hint: 'Use $mol_fiber.method instead',
|
|
827
|
-
});
|
|
828
|
-
return $mol_fiber.method(obj, name, descr);
|
|
829
|
-
}
|
|
830
|
-
$.$mol_fiber_method = $mol_fiber_method;
|
|
831
|
-
function $mol_fiber_async(task) {
|
|
832
|
-
return (...args) => new Promise($mol_fiber_root((done, fail) => {
|
|
833
|
-
try {
|
|
834
|
-
done(task(...args));
|
|
835
|
-
}
|
|
836
|
-
catch (error) {
|
|
837
|
-
if ('then' in error)
|
|
838
|
-
return $.$mol_fail_hidden(error);
|
|
839
|
-
fail(error);
|
|
840
|
-
}
|
|
841
|
-
}));
|
|
842
|
-
}
|
|
843
|
-
$.$mol_fiber_async = $mol_fiber_async;
|
|
844
|
-
function $mol_fiber_sync(request) {
|
|
845
|
-
return function $mol_fiber_sync_wrapper(...args) {
|
|
846
|
-
const slave = $mol_fiber.current;
|
|
847
|
-
let master = slave && slave.master;
|
|
848
|
-
if (!master || master.constructor !== $mol_fiber) {
|
|
849
|
-
master = new $mol_fiber;
|
|
850
|
-
master.cursor = -3;
|
|
851
|
-
master.error = request.call(this, ...args).then((next) => master.push(next), (error) => master.fail(error));
|
|
852
|
-
const prefix = slave ? `${slave}/${slave.cursor / 2}:` : '/';
|
|
853
|
-
master[Symbol.toStringTag] = prefix + (request.name || $mol_fiber_sync.name);
|
|
854
|
-
}
|
|
855
|
-
return master.get();
|
|
856
|
-
};
|
|
857
|
-
}
|
|
858
|
-
$.$mol_fiber_sync = $mol_fiber_sync;
|
|
859
|
-
async function $mol_fiber_warp() {
|
|
860
|
-
const deadline = $mol_fiber.deadline;
|
|
861
|
-
try {
|
|
862
|
-
$mol_fiber.deadline = Number.POSITIVE_INFINITY;
|
|
863
|
-
while ($mol_fiber.queue.length)
|
|
864
|
-
await $mol_fiber.tick();
|
|
865
|
-
return Promise.resolve();
|
|
866
|
-
}
|
|
867
|
-
finally {
|
|
868
|
-
$mol_fiber.deadline = deadline;
|
|
918
|
+
class $mol_after_frame extends $mol_object2 {
|
|
919
|
+
task;
|
|
920
|
+
static _promise = null;
|
|
921
|
+
static get promise() {
|
|
922
|
+
if (this._promise)
|
|
923
|
+
return this._promise;
|
|
924
|
+
return this._promise = new Promise(done => {
|
|
925
|
+
requestAnimationFrame(() => {
|
|
926
|
+
this._promise = null;
|
|
927
|
+
done();
|
|
928
|
+
});
|
|
929
|
+
setTimeout(() => {
|
|
930
|
+
this._promise = null;
|
|
931
|
+
done();
|
|
932
|
+
}, 100);
|
|
933
|
+
});
|
|
869
934
|
}
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
935
|
+
cancelled = false;
|
|
936
|
+
promise;
|
|
937
|
+
constructor(task) {
|
|
938
|
+
super();
|
|
939
|
+
this.task = task;
|
|
940
|
+
this.promise = $mol_after_frame.promise.then(() => {
|
|
941
|
+
if (this.cancelled)
|
|
942
|
+
return;
|
|
943
|
+
task();
|
|
944
|
+
});
|
|
877
945
|
}
|
|
878
|
-
|
|
879
|
-
|
|
946
|
+
destructor() {
|
|
947
|
+
this.cancelled = true;
|
|
880
948
|
}
|
|
881
949
|
}
|
|
882
|
-
$.$
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
950
|
+
$.$mol_after_frame = $mol_after_frame;
|
|
951
|
+
})($ || ($ = {}));
|
|
952
|
+
//mol/after/frame/frame.web.ts
|
|
953
|
+
;
|
|
954
|
+
"use strict";
|
|
955
|
+
var $;
|
|
956
|
+
(function ($) {
|
|
957
|
+
function $mol_wire_method(host, field, descr) {
|
|
958
|
+
if (!descr)
|
|
959
|
+
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
960
|
+
const orig = descr?.value ?? host[field];
|
|
961
|
+
const sup = Reflect.getPrototypeOf(host);
|
|
962
|
+
if (typeof sup[field] === 'function') {
|
|
963
|
+
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
964
|
+
}
|
|
965
|
+
const value = function (...args) {
|
|
966
|
+
const fiber = $mol_wire_fiber.temp(this ?? null, orig, ...args);
|
|
967
|
+
return fiber.sync();
|
|
968
|
+
};
|
|
969
|
+
Object.defineProperty(value, 'name', { value: orig.name + ' ' });
|
|
970
|
+
Object.assign(value, { orig });
|
|
971
|
+
const descr2 = { ...descr, value };
|
|
972
|
+
Reflect.defineProperty(host, field, descr2);
|
|
973
|
+
return descr2;
|
|
892
974
|
}
|
|
893
|
-
$.$
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
975
|
+
$.$mol_wire_method = $mol_wire_method;
|
|
976
|
+
})($ || ($ = {}));
|
|
977
|
+
//mol/wire/method/method.ts
|
|
978
|
+
;
|
|
979
|
+
"use strict";
|
|
980
|
+
var $;
|
|
981
|
+
(function ($) {
|
|
982
|
+
const handled = new WeakSet();
|
|
983
|
+
class $mol_wire_fiber extends $mol_wire_pub_sub {
|
|
984
|
+
host;
|
|
985
|
+
task;
|
|
986
|
+
static temp(host, task, ...args) {
|
|
987
|
+
const existen = $mol_wire_auto?.track_next();
|
|
988
|
+
reuse: if (existen) {
|
|
989
|
+
if (!(existen instanceof $mol_wire_fiber))
|
|
990
|
+
break reuse;
|
|
991
|
+
if (existen.host !== host)
|
|
992
|
+
break reuse;
|
|
993
|
+
if (existen.task !== task)
|
|
994
|
+
break reuse;
|
|
995
|
+
if (!$mol_compare_deep(existen.args, args))
|
|
996
|
+
break reuse;
|
|
997
|
+
return existen;
|
|
998
|
+
}
|
|
999
|
+
return new this(host, task, host + '.' + task.name + '(#)', ...args);
|
|
1000
|
+
}
|
|
1001
|
+
static persist(host, task, ...args) {
|
|
1002
|
+
const field = task.name + '()';
|
|
1003
|
+
let dict, key, existen, fiber;
|
|
1004
|
+
if (args.length) {
|
|
1005
|
+
key = `${host}.${task.name}(${args.map(v => $mol_key(v)).join(',')})`;
|
|
1006
|
+
dict = Object.getOwnPropertyDescriptor(host, field)?.value;
|
|
1007
|
+
if (dict)
|
|
1008
|
+
existen = dict.get(key);
|
|
1009
|
+
else
|
|
1010
|
+
dict = host[field] = new Map();
|
|
1011
|
+
}
|
|
1012
|
+
else {
|
|
1013
|
+
key = `${host}.${field}`;
|
|
1014
|
+
existen = Object.getOwnPropertyDescriptor(host, field)?.value;
|
|
1015
|
+
}
|
|
1016
|
+
reuse: if (existen) {
|
|
1017
|
+
if (!(existen instanceof $mol_wire_fiber))
|
|
1018
|
+
break reuse;
|
|
1019
|
+
if (existen.host !== host)
|
|
1020
|
+
break reuse;
|
|
1021
|
+
if (existen.task !== task)
|
|
1022
|
+
break reuse;
|
|
1023
|
+
return existen;
|
|
1024
|
+
}
|
|
1025
|
+
fiber = new this(host, task, key, ...args);
|
|
1026
|
+
if (args.length)
|
|
1027
|
+
dict.set(key, fiber);
|
|
1028
|
+
else
|
|
1029
|
+
host[field] = fiber;
|
|
1030
|
+
return fiber;
|
|
1031
|
+
}
|
|
1032
|
+
static warm = true;
|
|
1033
|
+
static planning = [];
|
|
1034
|
+
static reaping = [];
|
|
1035
|
+
static plan_task = null;
|
|
1036
|
+
static plan() {
|
|
1037
|
+
if (this.plan_task)
|
|
1038
|
+
return;
|
|
1039
|
+
this.plan_task = new $mol_after_frame(() => {
|
|
898
1040
|
try {
|
|
899
|
-
|
|
900
|
-
return task.call(this, ...args);
|
|
901
|
-
}
|
|
902
|
-
catch (error) {
|
|
903
|
-
if ('then' in error)
|
|
904
|
-
$.$mol_fail(new Error('Solid fiber can not be suspended.'));
|
|
905
|
-
return $.$mol_fail_hidden(error);
|
|
1041
|
+
this.sync();
|
|
906
1042
|
}
|
|
907
1043
|
finally {
|
|
908
|
-
$
|
|
1044
|
+
$mol_wire_fiber.plan_task = null;
|
|
909
1045
|
}
|
|
910
|
-
}
|
|
911
|
-
return $mol_fiber.func(wrapped);
|
|
912
|
-
}
|
|
913
|
-
}
|
|
914
|
-
$.$mol_fiber_solid = $mol_fiber_solid;
|
|
915
|
-
class $mol_fiber extends $.$mol_wrapper {
|
|
916
|
-
static logs = false;
|
|
917
|
-
static wrap(task) {
|
|
918
|
-
return function $mol_fiber_wrapper(...args) {
|
|
919
|
-
const slave = $mol_fiber.current;
|
|
920
|
-
let master = slave && slave.master;
|
|
921
|
-
if (!master || master.constructor !== $mol_fiber) {
|
|
922
|
-
master = new $mol_fiber;
|
|
923
|
-
master.calculate = task.bind(this, ...args);
|
|
924
|
-
const prefix = slave ? `${slave}/${slave.cursor / 2}:` : '/';
|
|
925
|
-
master[Symbol.toStringTag] = `${prefix}${task.name}`;
|
|
926
|
-
}
|
|
927
|
-
return master.get();
|
|
928
|
-
};
|
|
1046
|
+
});
|
|
929
1047
|
}
|
|
930
|
-
static
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
static queue = [];
|
|
936
|
-
static async tick() {
|
|
937
|
-
while ($mol_fiber.queue.length > 0) {
|
|
938
|
-
const now = Date.now();
|
|
939
|
-
if (now >= $mol_fiber.deadline) {
|
|
940
|
-
$mol_fiber.schedule();
|
|
941
|
-
$mol_fiber.liveline = now;
|
|
942
|
-
return;
|
|
1048
|
+
static sync() {
|
|
1049
|
+
while (this.planning.length) {
|
|
1050
|
+
const fibers = this.planning.splice(0, this.planning.length);
|
|
1051
|
+
for (const fiber of fibers) {
|
|
1052
|
+
fiber.up();
|
|
943
1053
|
}
|
|
944
|
-
const task = $mol_fiber.queue.shift();
|
|
945
|
-
await task();
|
|
946
|
-
}
|
|
947
|
-
}
|
|
948
|
-
static schedule() {
|
|
949
|
-
if (!$mol_fiber.scheduled) {
|
|
950
|
-
$mol_fiber.scheduled = new $.$mol_after_frame(async () => {
|
|
951
|
-
const now = Date.now();
|
|
952
|
-
let quant = $mol_fiber.quant;
|
|
953
|
-
if ($mol_fiber.liveline) {
|
|
954
|
-
quant = Math.max(quant, Math.floor((now - $mol_fiber.liveline) / 2));
|
|
955
|
-
$mol_fiber.liveline = 0;
|
|
956
|
-
}
|
|
957
|
-
$mol_fiber.deadline = now + quant;
|
|
958
|
-
$mol_fiber.scheduled = null;
|
|
959
|
-
await $mol_fiber.tick();
|
|
960
|
-
});
|
|
961
|
-
}
|
|
962
|
-
const promise = new this.$.Promise(done => this.queue.push(() => (done(null), promise)));
|
|
963
|
-
return promise;
|
|
964
|
-
}
|
|
965
|
-
cursor = 0;
|
|
966
|
-
masters = [];
|
|
967
|
-
calculate;
|
|
968
|
-
_value = undefined;
|
|
969
|
-
get value() { return this._value; }
|
|
970
|
-
set value(next) {
|
|
971
|
-
this._value = next;
|
|
972
|
-
}
|
|
973
|
-
_error = null;
|
|
974
|
-
get error() { return this._error; }
|
|
975
|
-
set error(next) {
|
|
976
|
-
this._error = next;
|
|
977
|
-
}
|
|
978
|
-
schedule() {
|
|
979
|
-
$mol_fiber.schedule().then(() => this.wake());
|
|
980
|
-
}
|
|
981
|
-
wake() {
|
|
982
|
-
const unscoupe = this.$.$mol_log3_area_lazy({
|
|
983
|
-
place: this,
|
|
984
|
-
message: 'Wake'
|
|
985
|
-
});
|
|
986
|
-
try {
|
|
987
|
-
if (this.cursor > -2)
|
|
988
|
-
return this.get();
|
|
989
|
-
}
|
|
990
|
-
catch (error) {
|
|
991
|
-
if ('then' in error)
|
|
992
|
-
return;
|
|
993
|
-
$.$mol_fail_hidden(error);
|
|
994
1054
|
}
|
|
995
|
-
|
|
996
|
-
|
|
1055
|
+
while (this.reaping.length) {
|
|
1056
|
+
const fibers = this.reaping.splice(0, this.reaping.length);
|
|
1057
|
+
for (const fiber of fibers) {
|
|
1058
|
+
if (!fiber.sub_empty)
|
|
1059
|
+
continue;
|
|
1060
|
+
fiber.destructor();
|
|
1061
|
+
}
|
|
997
1062
|
}
|
|
998
1063
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
this.$.$mol_log3_done({
|
|
1003
|
-
place: this,
|
|
1004
|
-
message: 'Changed',
|
|
1005
|
-
next: value,
|
|
1006
|
-
value: this.value,
|
|
1007
|
-
error: this.error,
|
|
1008
|
-
});
|
|
1009
|
-
this.obsolete_slaves();
|
|
1010
|
-
this.forget();
|
|
1011
|
-
}
|
|
1012
|
-
else {
|
|
1013
|
-
if ($mol_fiber.logs)
|
|
1014
|
-
this.$.$mol_log3_done({
|
|
1015
|
-
place: this,
|
|
1016
|
-
message: 'Same value',
|
|
1017
|
-
value,
|
|
1018
|
-
});
|
|
1019
|
-
}
|
|
1020
|
-
this.error = null;
|
|
1021
|
-
this.value = value;
|
|
1022
|
-
this.complete();
|
|
1023
|
-
return value;
|
|
1024
|
-
}
|
|
1025
|
-
fail(error) {
|
|
1026
|
-
this.complete();
|
|
1027
|
-
if ($mol_fiber.logs)
|
|
1028
|
-
this.$.$mol_log3_fail({
|
|
1029
|
-
place: this,
|
|
1030
|
-
message: error.message,
|
|
1031
|
-
});
|
|
1032
|
-
this.error = error;
|
|
1033
|
-
this.obsolete_slaves();
|
|
1034
|
-
return error;
|
|
1035
|
-
}
|
|
1036
|
-
wait(promise) {
|
|
1037
|
-
this.error = promise;
|
|
1038
|
-
if ($mol_fiber.logs)
|
|
1039
|
-
this.$.$mol_log3_warn({
|
|
1040
|
-
place: this,
|
|
1041
|
-
message: `Wait`,
|
|
1042
|
-
hint: `Don't panic, it's normal`,
|
|
1043
|
-
promise,
|
|
1044
|
-
});
|
|
1045
|
-
this.cursor = 0;
|
|
1046
|
-
return promise;
|
|
1064
|
+
cache = undefined;
|
|
1065
|
+
get args() {
|
|
1066
|
+
return this.slice(0, this.pub_from);
|
|
1047
1067
|
}
|
|
1048
|
-
|
|
1049
|
-
if (this.
|
|
1068
|
+
get result() {
|
|
1069
|
+
if (this.cache instanceof Promise)
|
|
1050
1070
|
return;
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
this.cursor = -2;
|
|
1071
|
+
if (this.cache instanceof Error)
|
|
1072
|
+
return;
|
|
1073
|
+
return this.cache;
|
|
1055
1074
|
}
|
|
1056
|
-
|
|
1057
|
-
this.
|
|
1075
|
+
get persist() {
|
|
1076
|
+
const id = this[Symbol.toStringTag];
|
|
1077
|
+
return id[id.length - 2] !== '#';
|
|
1058
1078
|
}
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
this.$.$mol_log3_come({
|
|
1062
|
-
place: this,
|
|
1063
|
-
message: 'Pull',
|
|
1064
|
-
});
|
|
1065
|
-
this.push(this.calculate());
|
|
1079
|
+
field() {
|
|
1080
|
+
return this.task.name + '()';
|
|
1066
1081
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1082
|
+
constructor(host, task, id, ...args) {
|
|
1083
|
+
super(...args, undefined);
|
|
1084
|
+
this.host = host;
|
|
1085
|
+
this.task = task;
|
|
1086
|
+
this.pop();
|
|
1087
|
+
this.pub_from = this.sub_from = args.length;
|
|
1088
|
+
this[Symbol.toStringTag] = id;
|
|
1089
|
+
}
|
|
1090
|
+
destructor() {
|
|
1091
|
+
super.destructor();
|
|
1092
|
+
const prev = this.cache;
|
|
1093
|
+
if ($mol_owning_check(this, prev)) {
|
|
1094
|
+
prev.destructor();
|
|
1072
1095
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
if (!slave) {
|
|
1078
|
-
const listener = () => this.wake();
|
|
1079
|
-
error = error.then(listener, listener);
|
|
1080
|
-
}
|
|
1081
|
-
this.wait(error);
|
|
1096
|
+
this.cache = undefined;
|
|
1097
|
+
if (this.persist) {
|
|
1098
|
+
if (this.pub_from === 0) {
|
|
1099
|
+
this.host[this.field()] = null;
|
|
1082
1100
|
}
|
|
1083
1101
|
else {
|
|
1084
|
-
this.
|
|
1102
|
+
this.host[this.field()].delete(this[Symbol.toStringTag]);
|
|
1085
1103
|
}
|
|
1086
1104
|
}
|
|
1087
|
-
finally {
|
|
1088
|
-
$mol_fiber.current = slave;
|
|
1089
|
-
}
|
|
1090
1105
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
}
|
|
1095
|
-
const slave = $mol_fiber.current;
|
|
1096
|
-
if (slave)
|
|
1097
|
-
slave.master = this;
|
|
1098
|
-
if (this.cursor > -2)
|
|
1099
|
-
this.update();
|
|
1100
|
-
if (this.error !== null)
|
|
1101
|
-
return this.$.$mol_fail_hidden(this.error);
|
|
1102
|
-
return this.value;
|
|
1106
|
+
plan() {
|
|
1107
|
+
$mol_wire_fiber.planning.push(this);
|
|
1108
|
+
$mol_wire_fiber.plan();
|
|
1103
1109
|
}
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
if (!$mol_fiber.current)
|
|
1108
|
-
return;
|
|
1109
|
-
if (Date.now() < $mol_fiber.deadline)
|
|
1110
|
-
return;
|
|
1111
|
-
this.$.$mol_fail_hidden($mol_fiber.schedule());
|
|
1110
|
+
reap() {
|
|
1111
|
+
$mol_wire_fiber.reaping.push(this);
|
|
1112
|
+
$mol_wire_fiber.plan();
|
|
1112
1113
|
}
|
|
1113
|
-
|
|
1114
|
-
return
|
|
1114
|
+
toString() {
|
|
1115
|
+
return this[Symbol.toStringTag];
|
|
1115
1116
|
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
if (prev !== next) {
|
|
1122
|
-
if (prev)
|
|
1123
|
-
this.rescue(prev, cursor);
|
|
1124
|
-
this.masters[cursor] = next;
|
|
1125
|
-
this.masters[cursor + 1] = this.obey(next, cursor);
|
|
1126
|
-
}
|
|
1127
|
-
this.cursor = cursor + 2;
|
|
1128
|
-
}
|
|
1129
|
-
rescue(master, master_index) { }
|
|
1130
|
-
obey(master, master_index) { return -1; }
|
|
1131
|
-
lead(slave, master_index) { return -1; }
|
|
1132
|
-
dislead(slave_index) {
|
|
1133
|
-
this.destructor();
|
|
1117
|
+
[$mol_dev_format_head]() {
|
|
1118
|
+
const cursor = this.cursor >= 0
|
|
1119
|
+
? '@' + this.cursor
|
|
1120
|
+
: this.cursor?.constructor?.name;
|
|
1121
|
+
return $mol_dev_format_div({}, $mol_dev_format_native(this), $mol_dev_format_shade(' ' + cursor + ' = '), $mol_dev_format_auto(this.cache));
|
|
1134
1122
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
if (!master)
|
|
1138
|
-
return;
|
|
1139
|
-
master.dislead(this.masters[master_index + 1]);
|
|
1140
|
-
this.masters[master_index] = undefined;
|
|
1141
|
-
this.masters[master_index + 1] = undefined;
|
|
1142
|
-
this.$.$mol_array_trim(this.masters);
|
|
1143
|
-
}
|
|
1144
|
-
obsolete_slaves() { }
|
|
1145
|
-
obsolete(master_index) { }
|
|
1146
|
-
forget() {
|
|
1147
|
-
this.value = undefined;
|
|
1123
|
+
get $() {
|
|
1124
|
+
return this.host['$'];
|
|
1148
1125
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
1126
|
+
affect(quant) {
|
|
1127
|
+
if (!super.affect(quant))
|
|
1128
|
+
return false;
|
|
1129
|
+
if (this.sub_from === this.length) {
|
|
1130
|
+
this.plan();
|
|
1131
|
+
}
|
|
1151
1132
|
return true;
|
|
1152
1133
|
}
|
|
1153
|
-
|
|
1154
|
-
if (
|
|
1134
|
+
down() {
|
|
1135
|
+
if (this.persist)
|
|
1155
1136
|
return;
|
|
1156
|
-
|
|
1157
|
-
this.$.$mol_log3_done({
|
|
1158
|
-
place: this,
|
|
1159
|
-
message: 'Destructed',
|
|
1160
|
-
});
|
|
1161
|
-
this.complete();
|
|
1162
|
-
}
|
|
1163
|
-
[$.$mol_dev_format_head]() {
|
|
1164
|
-
return $.$mol_dev_format_native(this);
|
|
1165
|
-
}
|
|
1166
|
-
}
|
|
1167
|
-
$.$mol_fiber = $mol_fiber;
|
|
1168
|
-
})($ || ($ = {}));
|
|
1169
|
-
//fiber.js.map
|
|
1170
|
-
;
|
|
1171
|
-
"use strict";
|
|
1172
|
-
var $;
|
|
1173
|
-
(function ($) {
|
|
1174
|
-
function $mol_atom2_value(task, next) {
|
|
1175
|
-
const cached = $mol_atom2.cached;
|
|
1176
|
-
try {
|
|
1177
|
-
$mol_atom2.cached = true;
|
|
1178
|
-
$mol_atom2.cached_next = next;
|
|
1179
|
-
return task();
|
|
1180
|
-
}
|
|
1181
|
-
finally {
|
|
1182
|
-
$mol_atom2.cached = cached;
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
$.$mol_atom2_value = $mol_atom2_value;
|
|
1186
|
-
class $mol_atom2 extends $.$mol_fiber {
|
|
1187
|
-
static logs = false;
|
|
1188
|
-
static get current() {
|
|
1189
|
-
const atom = $.$mol_fiber.current;
|
|
1190
|
-
if (atom instanceof $mol_atom2)
|
|
1191
|
-
return atom;
|
|
1192
|
-
return null;
|
|
1137
|
+
this.destructor();
|
|
1193
1138
|
}
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
static reap_task = null;
|
|
1197
|
-
static reap_queue = [];
|
|
1198
|
-
static reap(atom) {
|
|
1199
|
-
this.reap_queue.push(atom);
|
|
1200
|
-
if (this.reap_task)
|
|
1139
|
+
up() {
|
|
1140
|
+
if (this.cursor === $mol_wire_cursor.fresh)
|
|
1201
1141
|
return;
|
|
1202
|
-
this.
|
|
1203
|
-
this.
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
if (
|
|
1207
|
-
break;
|
|
1208
|
-
if (!atom.alone)
|
|
1209
|
-
continue;
|
|
1210
|
-
atom.destructor();
|
|
1142
|
+
check: if (this.cursor === $mol_wire_cursor.doubt) {
|
|
1143
|
+
for (let i = this.pub_from; i < this.sub_from; i += 2) {
|
|
1144
|
+
;
|
|
1145
|
+
this[i]?.up();
|
|
1146
|
+
if (this.cursor !== $mol_wire_cursor.doubt)
|
|
1147
|
+
break check;
|
|
1211
1148
|
}
|
|
1212
|
-
|
|
1213
|
-
}
|
|
1214
|
-
slaves = [];
|
|
1215
|
-
rescue(master, cursor) {
|
|
1216
|
-
if (!(master instanceof $mol_atom2))
|
|
1149
|
+
this.cursor = $mol_wire_cursor.fresh;
|
|
1217
1150
|
return;
|
|
1218
|
-
const master_index = this.masters.length;
|
|
1219
|
-
const slave_index = this.masters[cursor + 1] + 1;
|
|
1220
|
-
master.slaves[slave_index] = master_index;
|
|
1221
|
-
this.masters.push(master, this.masters[cursor + 1]);
|
|
1222
|
-
}
|
|
1223
|
-
subscribe(promise) {
|
|
1224
|
-
const obsolete = () => this.obsolete();
|
|
1225
|
-
return promise.then(obsolete, obsolete);
|
|
1226
|
-
}
|
|
1227
|
-
get() {
|
|
1228
|
-
if ($mol_atom2.cached) {
|
|
1229
|
-
if ($mol_atom2.cached_next !== undefined) {
|
|
1230
|
-
this.push($mol_atom2.cached_next);
|
|
1231
|
-
$mol_atom2.cached_next = undefined;
|
|
1232
|
-
}
|
|
1233
|
-
return this.value;
|
|
1234
|
-
}
|
|
1235
|
-
const value = super.get();
|
|
1236
|
-
if (value === undefined)
|
|
1237
|
-
$.$mol_fail(new Error(`Not defined: ${this}`));
|
|
1238
|
-
return value;
|
|
1239
|
-
}
|
|
1240
|
-
pull() {
|
|
1241
|
-
if (this.cursor === 0)
|
|
1242
|
-
return super.pull();
|
|
1243
|
-
if ($mol_atom2.logs)
|
|
1244
|
-
this.$.$mol_log3_come({
|
|
1245
|
-
place: this,
|
|
1246
|
-
message: 'Check doubt masters',
|
|
1247
|
-
});
|
|
1248
|
-
const masters = this.masters;
|
|
1249
|
-
for (let index = 0; index < masters.length; index += 2) {
|
|
1250
|
-
const master = masters[index];
|
|
1251
|
-
if (!master)
|
|
1252
|
-
continue;
|
|
1253
|
-
try {
|
|
1254
|
-
master.get();
|
|
1255
|
-
}
|
|
1256
|
-
catch (error) {
|
|
1257
|
-
if ('then' in error)
|
|
1258
|
-
$.$mol_fail_hidden(error);
|
|
1259
|
-
this.cursor = 0;
|
|
1260
|
-
}
|
|
1261
|
-
if (this.cursor !== 0)
|
|
1262
|
-
continue;
|
|
1263
|
-
if ($mol_atom2.logs)
|
|
1264
|
-
this.$.$mol_log3_done({
|
|
1265
|
-
place: this,
|
|
1266
|
-
message: 'Obsoleted while checking',
|
|
1267
|
-
});
|
|
1268
|
-
return super.pull();
|
|
1269
1151
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
next[Symbol.toStringTag] = this[Symbol.toStringTag];
|
|
1152
|
+
const bu = this.track_on();
|
|
1153
|
+
let result;
|
|
1154
|
+
try {
|
|
1155
|
+
result = this.task.call(this.host, ...this.args);
|
|
1156
|
+
if (result instanceof Promise) {
|
|
1157
|
+
const put = (res) => {
|
|
1158
|
+
if (this.cache === result)
|
|
1159
|
+
this.put(res);
|
|
1160
|
+
return res;
|
|
1161
|
+
};
|
|
1162
|
+
result = Object.assign(result.then(put, put), {
|
|
1163
|
+
destructor: result['destructor']
|
|
1164
|
+
});
|
|
1165
|
+
handled.add(result);
|
|
1285
1166
|
}
|
|
1286
|
-
catch { }
|
|
1287
|
-
next[$.$mol_object_field] = this[$.$mol_object_field];
|
|
1288
1167
|
}
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1168
|
+
catch (error) {
|
|
1169
|
+
result = error;
|
|
1170
|
+
if (result instanceof Promise && !handled.has(result)) {
|
|
1171
|
+
result = Object.assign(result.finally(() => {
|
|
1172
|
+
if (this.cache === result)
|
|
1173
|
+
this.stale();
|
|
1174
|
+
}), {
|
|
1175
|
+
destructor: result['destructor']
|
|
1176
|
+
});
|
|
1177
|
+
handled.add(result);
|
|
1178
|
+
}
|
|
1299
1179
|
}
|
|
1300
|
-
this.
|
|
1180
|
+
this.track_off(bu);
|
|
1181
|
+
this.put(result);
|
|
1301
1182
|
}
|
|
1302
1183
|
put(next) {
|
|
1303
|
-
|
|
1304
|
-
next
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
}
|
|
1308
|
-
complete_master(master_index) {
|
|
1309
|
-
if (this.masters[master_index] instanceof $mol_atom2) {
|
|
1310
|
-
if (master_index >= this.cursor)
|
|
1311
|
-
this.disobey(master_index);
|
|
1312
|
-
}
|
|
1313
|
-
else {
|
|
1314
|
-
this.disobey(master_index);
|
|
1315
|
-
}
|
|
1316
|
-
}
|
|
1317
|
-
obey(master, master_index) {
|
|
1318
|
-
return master.lead(this, master_index);
|
|
1319
|
-
}
|
|
1320
|
-
lead(slave, master_index) {
|
|
1321
|
-
if ($mol_atom2.logs)
|
|
1322
|
-
this.$.$mol_log3_rise({
|
|
1323
|
-
place: this,
|
|
1324
|
-
message: 'Leads',
|
|
1325
|
-
slave,
|
|
1326
|
-
});
|
|
1327
|
-
const slave_index = this.slaves.length;
|
|
1328
|
-
this.slaves[slave_index] = slave;
|
|
1329
|
-
this.slaves[slave_index + 1] = master_index;
|
|
1330
|
-
return slave_index;
|
|
1331
|
-
}
|
|
1332
|
-
dislead(slave_index) {
|
|
1333
|
-
if (slave_index < 0)
|
|
1334
|
-
return;
|
|
1335
|
-
if ($mol_atom2.logs)
|
|
1336
|
-
this.$.$mol_log3_rise({
|
|
1337
|
-
place: this,
|
|
1338
|
-
message: 'Disleads',
|
|
1339
|
-
slave: this.slaves[slave_index],
|
|
1340
|
-
});
|
|
1341
|
-
this.slaves[slave_index] = undefined;
|
|
1342
|
-
this.slaves[slave_index + 1] = undefined;
|
|
1343
|
-
$.$mol_array_trim(this.slaves);
|
|
1344
|
-
if (this.cursor > -3 && this.alone)
|
|
1345
|
-
$mol_atom2.reap(this);
|
|
1346
|
-
}
|
|
1347
|
-
obsolete(master_index = -1) {
|
|
1348
|
-
if (this.cursor > 0) {
|
|
1349
|
-
if (master_index >= this.cursor - 2)
|
|
1350
|
-
return;
|
|
1351
|
-
const path = [];
|
|
1352
|
-
let current = this;
|
|
1353
|
-
collect: while (current) {
|
|
1354
|
-
path.push(current);
|
|
1355
|
-
current = current.masters[current.cursor - 2];
|
|
1184
|
+
const prev = this.cache;
|
|
1185
|
+
if (next !== prev) {
|
|
1186
|
+
if ($mol_owning_check(this, prev)) {
|
|
1187
|
+
prev.destructor();
|
|
1356
1188
|
}
|
|
1357
|
-
this
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
this.cursor = 0;
|
|
1369
|
-
}
|
|
1370
|
-
doubt(master_index = -1) {
|
|
1371
|
-
if (this.cursor > 0) {
|
|
1372
|
-
if (master_index >= this.cursor - 2)
|
|
1373
|
-
return;
|
|
1374
|
-
const path = [];
|
|
1375
|
-
let current = this;
|
|
1376
|
-
collect: while (current) {
|
|
1377
|
-
path.push(current);
|
|
1378
|
-
current = current.masters[current.cursor - 2];
|
|
1189
|
+
this.cache = next;
|
|
1190
|
+
if (this.persist && $mol_owning_catch(this, next)) {
|
|
1191
|
+
try {
|
|
1192
|
+
next[Symbol.toStringTag] = this[Symbol.toStringTag];
|
|
1193
|
+
}
|
|
1194
|
+
catch { }
|
|
1195
|
+
}
|
|
1196
|
+
if (this.sub_from < this.length) {
|
|
1197
|
+
if (!$mol_compare_deep(prev, next)) {
|
|
1198
|
+
this.emit();
|
|
1199
|
+
}
|
|
1379
1200
|
}
|
|
1380
|
-
this.$.$mol_fail(new Error(`Doubted while calculation \n\n${path.join('\n')}\n`));
|
|
1381
1201
|
}
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
this.doubt_slaves();
|
|
1391
|
-
}
|
|
1392
|
-
obsolete_slaves() {
|
|
1393
|
-
for (let index = 0; index < this.slaves.length; index += 2) {
|
|
1394
|
-
const slave = this.slaves[index];
|
|
1395
|
-
if (slave)
|
|
1396
|
-
slave.obsolete(this.slaves[index + 1]);
|
|
1202
|
+
this.cursor = $mol_wire_cursor.fresh;
|
|
1203
|
+
if (next instanceof Promise)
|
|
1204
|
+
return next;
|
|
1205
|
+
if (this.persist) {
|
|
1206
|
+
for (let cursor = this.pub_from; cursor < this.sub_from; cursor += 2) {
|
|
1207
|
+
const pub = this[cursor];
|
|
1208
|
+
pub?.down();
|
|
1209
|
+
}
|
|
1397
1210
|
}
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
if (slave)
|
|
1403
|
-
slave.doubt(this.slaves[index + 1]);
|
|
1211
|
+
else {
|
|
1212
|
+
this.cursor = this.pub_from;
|
|
1213
|
+
this.forget();
|
|
1214
|
+
this.cursor = $mol_wire_cursor.fresh;
|
|
1404
1215
|
}
|
|
1216
|
+
return next;
|
|
1405
1217
|
}
|
|
1406
|
-
|
|
1407
|
-
return ()
|
|
1408
|
-
if (this.cursor !== -2)
|
|
1409
|
-
return;
|
|
1410
|
-
this.cursor = 0;
|
|
1411
|
-
$.$mol_fiber_solid.run(() => this.update());
|
|
1412
|
-
};
|
|
1413
|
-
}
|
|
1414
|
-
get alone() {
|
|
1415
|
-
return this.slaves.length === 0;
|
|
1218
|
+
recall(...args) {
|
|
1219
|
+
return this.put(this.task.call(this.host, ...args));
|
|
1416
1220
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
return true;
|
|
1221
|
+
sync() {
|
|
1222
|
+
if (!$mol_wire_fiber.warm) {
|
|
1223
|
+
return this.result;
|
|
1421
1224
|
}
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
return;
|
|
1427
|
-
if ($mol_atom2.logs)
|
|
1428
|
-
this.$.$mol_log3_rise({
|
|
1429
|
-
place: this,
|
|
1430
|
-
message: 'Destructed'
|
|
1431
|
-
});
|
|
1432
|
-
this.cursor = -3;
|
|
1433
|
-
for (let index = 0; index < this.masters.length; index += 2) {
|
|
1434
|
-
this.complete_master(index);
|
|
1225
|
+
this.track_promote();
|
|
1226
|
+
this.up();
|
|
1227
|
+
if (this.cache instanceof Error) {
|
|
1228
|
+
return $mol_fail_hidden(this.cache);
|
|
1435
1229
|
}
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
$.$mol_atom2 = $mol_atom2;
|
|
1439
|
-
})($ || ($ = {}));
|
|
1440
|
-
//atom2.js.map
|
|
1441
|
-
;
|
|
1442
|
-
"use strict";
|
|
1443
|
-
//param.js.map
|
|
1444
|
-
;
|
|
1445
|
-
"use strict";
|
|
1446
|
-
//result.js.map
|
|
1447
|
-
;
|
|
1448
|
-
"use strict";
|
|
1449
|
-
var $;
|
|
1450
|
-
(function ($) {
|
|
1451
|
-
class $mol_mem_force extends Object {
|
|
1452
|
-
constructor() { super(); }
|
|
1453
|
-
$mol_mem_force = true;
|
|
1454
|
-
static $mol_mem_force = true;
|
|
1455
|
-
static toString() { return this.name; }
|
|
1456
|
-
}
|
|
1457
|
-
$.$mol_mem_force = $mol_mem_force;
|
|
1458
|
-
class $mol_mem_force_cache extends $mol_mem_force {
|
|
1459
|
-
}
|
|
1460
|
-
$.$mol_mem_force_cache = $mol_mem_force_cache;
|
|
1461
|
-
class $mol_mem_force_update extends $mol_mem_force {
|
|
1462
|
-
}
|
|
1463
|
-
$.$mol_mem_force_update = $mol_mem_force_update;
|
|
1464
|
-
class $mol_mem_force_fail extends $mol_mem_force_cache {
|
|
1465
|
-
}
|
|
1466
|
-
$.$mol_mem_force_fail = $mol_mem_force_fail;
|
|
1467
|
-
})($ || ($ = {}));
|
|
1468
|
-
//force.js.map
|
|
1469
|
-
;
|
|
1470
|
-
"use strict";
|
|
1471
|
-
var $;
|
|
1472
|
-
(function ($) {
|
|
1473
|
-
$.$mol_mem_cached = $.$mol_atom2_value;
|
|
1474
|
-
function $mol_mem_persist() {
|
|
1475
|
-
const atom = $.$mol_atom2.current;
|
|
1476
|
-
if (!atom)
|
|
1477
|
-
return;
|
|
1478
|
-
if (atom.hasOwnProperty('destructor'))
|
|
1479
|
-
return;
|
|
1480
|
-
atom.destructor = () => { };
|
|
1481
|
-
}
|
|
1482
|
-
$.$mol_mem_persist = $mol_mem_persist;
|
|
1483
|
-
function $mol_mem(proto, name, descr) {
|
|
1484
|
-
if (!descr)
|
|
1485
|
-
descr = Reflect.getOwnPropertyDescriptor(proto, name);
|
|
1486
|
-
const orig = descr.value;
|
|
1487
|
-
const store = new WeakMap();
|
|
1488
|
-
Object.defineProperty(proto, name + "()", {
|
|
1489
|
-
get: function () {
|
|
1490
|
-
return store.get(this);
|
|
1230
|
+
if (this.cache instanceof Promise) {
|
|
1231
|
+
return $mol_fail_hidden(this.cache);
|
|
1491
1232
|
}
|
|
1492
|
-
|
|
1493
|
-
const get_cache = (host) => {
|
|
1494
|
-
let cache = store.get(host);
|
|
1495
|
-
if (cache)
|
|
1496
|
-
return cache;
|
|
1497
|
-
let cache2 = new $.$mol_atom2;
|
|
1498
|
-
cache2.calculate = orig.bind(host);
|
|
1499
|
-
cache2[Symbol.toStringTag] = `${host}.${name}()`;
|
|
1500
|
-
cache2.abort = () => {
|
|
1501
|
-
store.delete(host);
|
|
1502
|
-
cache2.forget();
|
|
1503
|
-
return true;
|
|
1504
|
-
};
|
|
1505
|
-
$.$mol_owning_catch(host, cache2);
|
|
1506
|
-
cache2[$.$mol_object_field] = name;
|
|
1507
|
-
store.set(host, cache2);
|
|
1508
|
-
return cache2;
|
|
1509
|
-
};
|
|
1510
|
-
function value(next, force) {
|
|
1511
|
-
if (next === undefined) {
|
|
1512
|
-
const cache = get_cache(this);
|
|
1513
|
-
if (force === $.$mol_mem_force_cache)
|
|
1514
|
-
return cache.obsolete(Number.NaN);
|
|
1515
|
-
if ($.$mol_atom2.current)
|
|
1516
|
-
return cache.get();
|
|
1517
|
-
else
|
|
1518
|
-
return $.$mol_fiber.run(() => cache.get());
|
|
1519
|
-
}
|
|
1520
|
-
return $.$mol_fiber.run(() => {
|
|
1521
|
-
if (force === $.$mol_mem_force_fail)
|
|
1522
|
-
return get_cache(this).fail(next);
|
|
1523
|
-
if (force !== $.$mol_mem_force_cache)
|
|
1524
|
-
next = orig.call(this, next);
|
|
1525
|
-
return get_cache(this).put(next);
|
|
1526
|
-
});
|
|
1233
|
+
return this.cache;
|
|
1527
1234
|
}
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
;
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
static size(next, force) {
|
|
1542
|
-
return next || {
|
|
1543
|
-
width: self.innerWidth,
|
|
1544
|
-
height: self.innerHeight,
|
|
1545
|
-
};
|
|
1235
|
+
async async() {
|
|
1236
|
+
while (true) {
|
|
1237
|
+
this.up();
|
|
1238
|
+
if (this.cache instanceof Error) {
|
|
1239
|
+
$mol_fail_hidden(this.cache);
|
|
1240
|
+
}
|
|
1241
|
+
if (!(this.cache instanceof Promise))
|
|
1242
|
+
return this.cache;
|
|
1243
|
+
await this.cache;
|
|
1244
|
+
if (this.cursor === $mol_wire_cursor.final) {
|
|
1245
|
+
await new Promise(() => { });
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1546
1248
|
}
|
|
1547
1249
|
}
|
|
1548
1250
|
__decorate([
|
|
1549
|
-
|
|
1550
|
-
], $
|
|
1551
|
-
$.$
|
|
1552
|
-
const $mol_window_resize = () => {
|
|
1553
|
-
$mol_window.size(undefined, $.$mol_mem_force_cache);
|
|
1554
|
-
};
|
|
1555
|
-
self.addEventListener('resize', $.$mol_fiber_root($mol_window_resize));
|
|
1251
|
+
$mol_wire_method
|
|
1252
|
+
], $mol_wire_fiber.prototype, "recall", null);
|
|
1253
|
+
$.$mol_wire_fiber = $mol_wire_fiber;
|
|
1556
1254
|
})($ || ($ = {}));
|
|
1557
|
-
//
|
|
1255
|
+
//mol/wire/fiber/fiber.ts
|
|
1558
1256
|
;
|
|
1559
1257
|
"use strict";
|
|
1560
1258
|
var $;
|
|
1561
1259
|
(function ($) {
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
return
|
|
1568
|
-
|
|
1260
|
+
const cacthed = new WeakMap();
|
|
1261
|
+
function $mol_fail_catch(error) {
|
|
1262
|
+
if (typeof error !== 'object')
|
|
1263
|
+
return false;
|
|
1264
|
+
if (cacthed.get(error))
|
|
1265
|
+
return false;
|
|
1266
|
+
cacthed.set(error, true);
|
|
1267
|
+
return true;
|
|
1569
1268
|
}
|
|
1570
|
-
$.$
|
|
1269
|
+
$.$mol_fail_catch = $mol_fail_catch;
|
|
1571
1270
|
})($ || ($ = {}));
|
|
1572
|
-
//
|
|
1271
|
+
//mol/fail/catch/catch.ts
|
|
1573
1272
|
;
|
|
1574
1273
|
"use strict";
|
|
1575
1274
|
var $;
|
|
1576
1275
|
(function ($) {
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
return
|
|
1584
|
-
if (!value)
|
|
1585
|
-
return value;
|
|
1586
|
-
if (typeof value !== 'object' && typeof value !== 'function')
|
|
1587
|
-
return value;
|
|
1588
|
-
if (Array.isArray(value))
|
|
1589
|
-
return value;
|
|
1590
|
-
const proto = Reflect.getPrototypeOf(value);
|
|
1591
|
-
if (!proto)
|
|
1592
|
-
return value;
|
|
1593
|
-
if (Reflect.getPrototypeOf(proto) === null)
|
|
1594
|
-
return value;
|
|
1595
|
-
if ('toJSON' in value)
|
|
1596
|
-
return value;
|
|
1597
|
-
if (value instanceof RegExp)
|
|
1598
|
-
return value.toString();
|
|
1599
|
-
let key = keys.get(value);
|
|
1600
|
-
if (key)
|
|
1601
|
-
return key;
|
|
1602
|
-
key = $.$mol_guid();
|
|
1603
|
-
keys.set(value, key);
|
|
1604
|
-
return key;
|
|
1605
|
-
});
|
|
1276
|
+
function $mol_fail_log(error) {
|
|
1277
|
+
if (error instanceof Promise)
|
|
1278
|
+
return false;
|
|
1279
|
+
if (!$mol_fail_catch(error))
|
|
1280
|
+
return false;
|
|
1281
|
+
console.error(error);
|
|
1282
|
+
return true;
|
|
1606
1283
|
}
|
|
1607
|
-
$.$
|
|
1284
|
+
$.$mol_fail_log = $mol_fail_log;
|
|
1608
1285
|
})($ || ($ = {}));
|
|
1609
|
-
//
|
|
1286
|
+
//mol/fail/log/log.ts
|
|
1610
1287
|
;
|
|
1611
1288
|
"use strict";
|
|
1612
1289
|
var $;
|
|
1613
1290
|
(function ($) {
|
|
1614
|
-
|
|
1291
|
+
$.$mol_wire_mem = (keys) => (host, field, descr) => {
|
|
1615
1292
|
if (!descr)
|
|
1616
|
-
descr = Reflect.getOwnPropertyDescriptor(
|
|
1617
|
-
const
|
|
1618
|
-
const
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1293
|
+
descr = Reflect.getOwnPropertyDescriptor(host, field);
|
|
1294
|
+
const orig = descr?.value ?? host[field];
|
|
1295
|
+
const sup = Reflect.getPrototypeOf(host);
|
|
1296
|
+
if (typeof sup[field] === 'function') {
|
|
1297
|
+
Object.defineProperty(orig, 'name', { value: sup[field].name });
|
|
1298
|
+
}
|
|
1299
|
+
function value(...args) {
|
|
1300
|
+
let atom = $mol_wire_fiber.persist(this, orig, ...args.slice(0, keys));
|
|
1301
|
+
if (args[keys] === undefined)
|
|
1302
|
+
return atom.sync();
|
|
1303
|
+
try {
|
|
1304
|
+
atom.sync();
|
|
1622
1305
|
}
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
let dict = store.get(host);
|
|
1626
|
-
if (!dict)
|
|
1627
|
-
store.set(host, dict = new Map);
|
|
1628
|
-
const key_str = $.$mol_key(key);
|
|
1629
|
-
let cache = dict.get(key_str);
|
|
1630
|
-
if (cache)
|
|
1631
|
-
return cache;
|
|
1632
|
-
let cache2 = new $.$mol_atom2;
|
|
1633
|
-
cache2[Symbol.toStringTag] = `${host}.${name}(${key_str})`;
|
|
1634
|
-
cache2.calculate = value.bind(host, key);
|
|
1635
|
-
cache2.abort = () => {
|
|
1636
|
-
dict.delete(key_str);
|
|
1637
|
-
if (dict.size === 0)
|
|
1638
|
-
store.delete(host);
|
|
1639
|
-
cache2.forget();
|
|
1640
|
-
return true;
|
|
1641
|
-
};
|
|
1642
|
-
$.$mol_owning_catch(host, cache2);
|
|
1643
|
-
cache2[$.$mol_object_field] = name;
|
|
1644
|
-
dict.set(key_str, cache2);
|
|
1645
|
-
return cache2;
|
|
1646
|
-
};
|
|
1647
|
-
return {
|
|
1648
|
-
value(key, next, force) {
|
|
1649
|
-
if (next === undefined) {
|
|
1650
|
-
const cache = get_cache(this, key);
|
|
1651
|
-
if (force === $.$mol_mem_force_cache)
|
|
1652
|
-
return cache.obsolete();
|
|
1653
|
-
if ($.$mol_atom2.current)
|
|
1654
|
-
return cache.get();
|
|
1655
|
-
else
|
|
1656
|
-
return $.$mol_fiber.run(() => cache.get());
|
|
1657
|
-
}
|
|
1658
|
-
return $.$mol_fiber.run(() => {
|
|
1659
|
-
if (force === $.$mol_mem_force_fail)
|
|
1660
|
-
return get_cache(this, key).fail(next);
|
|
1661
|
-
if (force !== $.$mol_mem_force_cache)
|
|
1662
|
-
next = value.call(this, key, next);
|
|
1663
|
-
return get_cache(this, key).put(next);
|
|
1664
|
-
});
|
|
1306
|
+
catch (error) {
|
|
1307
|
+
$mol_fail_log(error);
|
|
1665
1308
|
}
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1309
|
+
return atom.recall(...args);
|
|
1310
|
+
}
|
|
1311
|
+
Object.defineProperty(value, 'name', { value: orig.name + ' ' });
|
|
1312
|
+
Object.assign(value, { orig });
|
|
1313
|
+
const descr2 = { ...descr, value };
|
|
1314
|
+
Reflect.defineProperty(host, field, descr2);
|
|
1315
|
+
return descr2;
|
|
1316
|
+
};
|
|
1669
1317
|
})($ || ($ = {}));
|
|
1670
|
-
//
|
|
1318
|
+
//mol/wire/mem/mem.ts
|
|
1671
1319
|
;
|
|
1672
1320
|
"use strict";
|
|
1673
1321
|
var $;
|
|
1674
1322
|
(function ($) {
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1323
|
+
$.$mol_mem = $mol_wire_mem(0);
|
|
1324
|
+
$.$mol_mem_key = $mol_wire_mem(1);
|
|
1325
|
+
$.$mol_mem_key2 = $mol_wire_mem(2);
|
|
1326
|
+
$.$mol_mem_key3 = $mol_wire_mem(3);
|
|
1327
|
+
})($ || ($ = {}));
|
|
1328
|
+
//mol/mem/mem.ts
|
|
1329
|
+
;
|
|
1330
|
+
"use strict";
|
|
1331
|
+
var $;
|
|
1332
|
+
(function ($) {
|
|
1333
|
+
class $mol_window extends $mol_object {
|
|
1334
|
+
static size() {
|
|
1335
|
+
this.resizes();
|
|
1336
|
+
return {
|
|
1337
|
+
width: self.innerWidth,
|
|
1338
|
+
height: self.innerHeight,
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
static resizes(next) { return next; }
|
|
1688
1342
|
}
|
|
1689
|
-
|
|
1343
|
+
__decorate([
|
|
1344
|
+
$mol_mem
|
|
1345
|
+
], $mol_window, "size", null);
|
|
1346
|
+
__decorate([
|
|
1347
|
+
$mol_mem
|
|
1348
|
+
], $mol_window, "resizes", null);
|
|
1349
|
+
$.$mol_window = $mol_window;
|
|
1350
|
+
self.addEventListener('resize', event => $mol_window.resizes(event));
|
|
1690
1351
|
})($ || ($ = {}));
|
|
1691
|
-
//
|
|
1352
|
+
//mol/window/window.web.ts
|
|
1692
1353
|
;
|
|
1693
1354
|
"use strict";
|
|
1694
1355
|
var $;
|
|
1695
1356
|
(function ($) {
|
|
1696
|
-
class $mol_view_selection extends
|
|
1357
|
+
class $mol_view_selection extends $mol_object {
|
|
1697
1358
|
static focused(next) {
|
|
1698
|
-
if (next === undefined)
|
|
1699
|
-
return [];
|
|
1700
1359
|
const parents = [];
|
|
1701
|
-
let element = next[0];
|
|
1360
|
+
let element = next?.[0] ?? $mol_dom_context.document.activeElement;
|
|
1702
1361
|
while (element) {
|
|
1703
1362
|
parents.push(element);
|
|
1704
1363
|
element = element.parentNode;
|
|
1705
1364
|
}
|
|
1706
|
-
|
|
1707
|
-
const element =
|
|
1365
|
+
new $mol_after_tick(() => {
|
|
1366
|
+
const element = this.focused()[0];
|
|
1708
1367
|
if (element)
|
|
1709
1368
|
element.focus();
|
|
1710
1369
|
else
|
|
1711
|
-
|
|
1370
|
+
$mol_dom_context.blur();
|
|
1712
1371
|
});
|
|
1713
1372
|
return parents;
|
|
1714
1373
|
}
|
|
1715
|
-
static focus(event) {
|
|
1716
|
-
this.focused([event.target]);
|
|
1717
|
-
}
|
|
1718
|
-
static blur(event) {
|
|
1719
|
-
const elements = $.$mol_mem_cached(() => this.focused());
|
|
1720
|
-
if (elements && elements[0] === event.target)
|
|
1721
|
-
this.focused([]);
|
|
1722
|
-
}
|
|
1723
1374
|
}
|
|
1724
1375
|
__decorate([
|
|
1725
|
-
|
|
1376
|
+
$mol_mem
|
|
1726
1377
|
], $mol_view_selection, "focused", null);
|
|
1727
1378
|
$.$mol_view_selection = $mol_view_selection;
|
|
1728
1379
|
})($ || ($ = {}));
|
|
1729
|
-
//selection.
|
|
1380
|
+
//mol/view/selection/selection.ts
|
|
1730
1381
|
;
|
|
1731
1382
|
"use strict";
|
|
1732
1383
|
var $;
|
|
1733
1384
|
(function ($) {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
task;
|
|
1737
|
-
id;
|
|
1738
|
-
constructor(delay, task) {
|
|
1739
|
-
super();
|
|
1740
|
-
this.delay = delay;
|
|
1741
|
-
this.task = task;
|
|
1742
|
-
this.id = setTimeout(task, delay);
|
|
1743
|
-
}
|
|
1744
|
-
destructor() {
|
|
1745
|
-
clearTimeout(this.id);
|
|
1746
|
-
}
|
|
1385
|
+
function $mol_maybe(value) {
|
|
1386
|
+
return (value == null) ? [] : [value];
|
|
1747
1387
|
}
|
|
1748
|
-
$.$
|
|
1388
|
+
$.$mol_maybe = $mol_maybe;
|
|
1749
1389
|
})($ || ($ = {}));
|
|
1750
|
-
//
|
|
1390
|
+
//mol/maybe/maybe.ts
|
|
1751
1391
|
;
|
|
1752
1392
|
"use strict";
|
|
1753
1393
|
var $;
|
|
1754
1394
|
(function ($) {
|
|
1755
|
-
if (
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
}, true);
|
|
1759
|
-
$.$mol_dom_context.document.documentElement.addEventListener('blur', (event) => {
|
|
1760
|
-
new $.$mol_after_timeout(0, $.$mol_fiber_root(() => $.$mol_view_selection.blur(event)));
|
|
1395
|
+
if ($mol_dom_context.document) {
|
|
1396
|
+
$mol_dom_context.document.documentElement.addEventListener('focus', (event) => {
|
|
1397
|
+
$mol_view_selection.focused($mol_maybe($mol_dom_context.document.activeElement));
|
|
1761
1398
|
}, true);
|
|
1762
1399
|
}
|
|
1763
1400
|
})($ || ($ = {}));
|
|
1764
|
-
//selection.web.
|
|
1401
|
+
//mol/view/selection/selection.web.ts
|
|
1765
1402
|
;
|
|
1766
1403
|
"use strict";
|
|
1767
1404
|
var $;
|
|
@@ -1771,21 +1408,7 @@ var $;
|
|
|
1771
1408
|
}
|
|
1772
1409
|
$.$mol_dom_qname = $mol_dom_qname;
|
|
1773
1410
|
})($ || ($ = {}));
|
|
1774
|
-
//qname.
|
|
1775
|
-
;
|
|
1776
|
-
"use strict";
|
|
1777
|
-
var $;
|
|
1778
|
-
(function ($) {
|
|
1779
|
-
const cacthed = new WeakMap();
|
|
1780
|
-
function $mol_fail_catch(error) {
|
|
1781
|
-
if (cacthed.get(error))
|
|
1782
|
-
return false;
|
|
1783
|
-
cacthed.set(error, true);
|
|
1784
|
-
return true;
|
|
1785
|
-
}
|
|
1786
|
-
$.$mol_fail_catch = $mol_fail_catch;
|
|
1787
|
-
})($ || ($ = {}));
|
|
1788
|
-
//catch.js.map
|
|
1411
|
+
//mol/dom/qname/qname.ts
|
|
1789
1412
|
;
|
|
1790
1413
|
"use strict";
|
|
1791
1414
|
var $;
|
|
@@ -1798,7 +1421,7 @@ var $;
|
|
|
1798
1421
|
}
|
|
1799
1422
|
$.$mol_const = $mol_const;
|
|
1800
1423
|
})($ || ($ = {}));
|
|
1801
|
-
//const.
|
|
1424
|
+
//mol/const/const.ts
|
|
1802
1425
|
;
|
|
1803
1426
|
"use strict";
|
|
1804
1427
|
var $;
|
|
@@ -1821,7 +1444,29 @@ var $;
|
|
|
1821
1444
|
}
|
|
1822
1445
|
$.$mol_dom_render_attributes = $mol_dom_render_attributes;
|
|
1823
1446
|
})($ || ($ = {}));
|
|
1824
|
-
//attributes.
|
|
1447
|
+
//mol/dom/render/attributes/attributes.ts
|
|
1448
|
+
;
|
|
1449
|
+
"use strict";
|
|
1450
|
+
var $;
|
|
1451
|
+
(function ($) {
|
|
1452
|
+
function $mol_wire_async(obj) {
|
|
1453
|
+
return new Proxy(obj, {
|
|
1454
|
+
get(obj, field) {
|
|
1455
|
+
const val = obj[field];
|
|
1456
|
+
if (typeof val !== 'function')
|
|
1457
|
+
return val;
|
|
1458
|
+
let fiber;
|
|
1459
|
+
return function $mol_wire_async(...args) {
|
|
1460
|
+
fiber?.destructor();
|
|
1461
|
+
fiber = $mol_wire_fiber.temp(obj, val, ...args);
|
|
1462
|
+
return fiber.async();
|
|
1463
|
+
};
|
|
1464
|
+
}
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
$.$mol_wire_async = $mol_wire_async;
|
|
1468
|
+
})($ || ($ = {}));
|
|
1469
|
+
//mol/wire/async/async.ts
|
|
1825
1470
|
;
|
|
1826
1471
|
"use strict";
|
|
1827
1472
|
var $;
|
|
@@ -1840,7 +1485,7 @@ var $;
|
|
|
1840
1485
|
}
|
|
1841
1486
|
$.$mol_dom_render_styles = $mol_dom_render_styles;
|
|
1842
1487
|
})($ || ($ = {}));
|
|
1843
|
-
//styles.
|
|
1488
|
+
//mol/dom/render/styles/styles.ts
|
|
1844
1489
|
;
|
|
1845
1490
|
"use strict";
|
|
1846
1491
|
var $;
|
|
@@ -1851,7 +1496,7 @@ var $;
|
|
|
1851
1496
|
for (let view of childNodes) {
|
|
1852
1497
|
if (view == null)
|
|
1853
1498
|
continue;
|
|
1854
|
-
if (view instanceof
|
|
1499
|
+
if (view instanceof $mol_dom_context.Node) {
|
|
1855
1500
|
while (true) {
|
|
1856
1501
|
if (!nextNode) {
|
|
1857
1502
|
el.appendChild(view);
|
|
@@ -1882,7 +1527,7 @@ var $;
|
|
|
1882
1527
|
nextNode = nextNode.nextSibling;
|
|
1883
1528
|
}
|
|
1884
1529
|
else {
|
|
1885
|
-
const textNode =
|
|
1530
|
+
const textNode = $mol_dom_context.document.createTextNode(String(view));
|
|
1886
1531
|
el.insertBefore(textNode, nextNode);
|
|
1887
1532
|
}
|
|
1888
1533
|
}
|
|
@@ -1895,7 +1540,7 @@ var $;
|
|
|
1895
1540
|
}
|
|
1896
1541
|
$.$mol_dom_render_children = $mol_dom_render_children;
|
|
1897
1542
|
})($ || ($ = {}));
|
|
1898
|
-
//children.
|
|
1543
|
+
//mol/dom/render/children/children.ts
|
|
1899
1544
|
;
|
|
1900
1545
|
"use strict";
|
|
1901
1546
|
var $;
|
|
@@ -1910,12 +1555,50 @@ var $;
|
|
|
1910
1555
|
}
|
|
1911
1556
|
$.$mol_dom_render_fields = $mol_dom_render_fields;
|
|
1912
1557
|
})($ || ($ = {}));
|
|
1913
|
-
//fields.
|
|
1558
|
+
//mol/dom/render/fields/fields.ts
|
|
1559
|
+
;
|
|
1560
|
+
"use strict";
|
|
1561
|
+
var $;
|
|
1562
|
+
(function ($) {
|
|
1563
|
+
class $mol_wrapper extends $mol_object2 {
|
|
1564
|
+
static wrap;
|
|
1565
|
+
static run(task) {
|
|
1566
|
+
return this.func(task)();
|
|
1567
|
+
}
|
|
1568
|
+
static func(func) {
|
|
1569
|
+
return this.wrap(func);
|
|
1570
|
+
}
|
|
1571
|
+
static get class() {
|
|
1572
|
+
return (Class) => {
|
|
1573
|
+
const construct = (target, args) => new Class(...args);
|
|
1574
|
+
const handler = {
|
|
1575
|
+
construct: this.func(construct)
|
|
1576
|
+
};
|
|
1577
|
+
handler[Symbol.toStringTag] = Class.name + '#';
|
|
1578
|
+
return new Proxy(Class, handler);
|
|
1579
|
+
};
|
|
1580
|
+
}
|
|
1581
|
+
static get method() {
|
|
1582
|
+
return (obj, name, descr) => {
|
|
1583
|
+
descr.value = this.func(descr.value);
|
|
1584
|
+
return descr;
|
|
1585
|
+
};
|
|
1586
|
+
}
|
|
1587
|
+
static get field() {
|
|
1588
|
+
return (obj, name, descr) => {
|
|
1589
|
+
descr.get = descr.set = this.func(descr.get);
|
|
1590
|
+
return descr;
|
|
1591
|
+
};
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
$.$mol_wrapper = $mol_wrapper;
|
|
1595
|
+
})($ || ($ = {}));
|
|
1596
|
+
//mol/wrapper/wrapper.ts
|
|
1914
1597
|
;
|
|
1915
1598
|
"use strict";
|
|
1916
1599
|
var $;
|
|
1917
1600
|
(function ($) {
|
|
1918
|
-
class $mol_memo extends
|
|
1601
|
+
class $mol_memo extends $mol_wrapper {
|
|
1919
1602
|
static wrap(task) {
|
|
1920
1603
|
const store = new WeakMap();
|
|
1921
1604
|
return function (next) {
|
|
@@ -1929,7 +1612,7 @@ var $;
|
|
|
1929
1612
|
}
|
|
1930
1613
|
$.$mol_memo = $mol_memo;
|
|
1931
1614
|
})($ || ($ = {}));
|
|
1932
|
-
//memo.
|
|
1615
|
+
//mol/memo/memo.ts
|
|
1933
1616
|
;
|
|
1934
1617
|
"use strict";
|
|
1935
1618
|
var $;
|
|
@@ -1957,7 +1640,63 @@ var $;
|
|
|
1957
1640
|
}
|
|
1958
1641
|
$.$mol_func_name_from = $mol_func_name_from;
|
|
1959
1642
|
})($ || ($ = {}));
|
|
1960
|
-
//name.
|
|
1643
|
+
//mol/func/name/name.ts
|
|
1644
|
+
;
|
|
1645
|
+
"use strict";
|
|
1646
|
+
var $;
|
|
1647
|
+
(function ($) {
|
|
1648
|
+
function $mol_log3_area_lazy(event) {
|
|
1649
|
+
const self = this;
|
|
1650
|
+
const stack = self.$mol_log3_stack;
|
|
1651
|
+
const deep = stack.length;
|
|
1652
|
+
let logged = false;
|
|
1653
|
+
stack.push(() => {
|
|
1654
|
+
logged = true;
|
|
1655
|
+
self.$mol_log3_area.call(self, event);
|
|
1656
|
+
});
|
|
1657
|
+
return () => {
|
|
1658
|
+
if (logged)
|
|
1659
|
+
self.console.groupEnd();
|
|
1660
|
+
if (stack.length > deep)
|
|
1661
|
+
stack.length = deep;
|
|
1662
|
+
};
|
|
1663
|
+
}
|
|
1664
|
+
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
|
|
1665
|
+
$.$mol_log3_stack = [];
|
|
1666
|
+
})($ || ($ = {}));
|
|
1667
|
+
//mol/log3/log3.ts
|
|
1668
|
+
;
|
|
1669
|
+
"use strict";
|
|
1670
|
+
//mol/type/keys/extract/extract.ts
|
|
1671
|
+
;
|
|
1672
|
+
"use strict";
|
|
1673
|
+
var $;
|
|
1674
|
+
(function ($) {
|
|
1675
|
+
function $mol_log3_web_make(level, color) {
|
|
1676
|
+
return function $mol_log3_logger(event) {
|
|
1677
|
+
const pending = this.$mol_log3_stack.pop();
|
|
1678
|
+
if (pending)
|
|
1679
|
+
pending();
|
|
1680
|
+
let tpl = '%c';
|
|
1681
|
+
const chunks = Object.values(event);
|
|
1682
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
1683
|
+
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
|
|
1684
|
+
}
|
|
1685
|
+
const style = `color:${color};font-weight:bolder`;
|
|
1686
|
+
this.console[level](tpl, style, ...chunks);
|
|
1687
|
+
const self = this;
|
|
1688
|
+
return () => self.console.groupEnd();
|
|
1689
|
+
};
|
|
1690
|
+
}
|
|
1691
|
+
$.$mol_log3_web_make = $mol_log3_web_make;
|
|
1692
|
+
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
|
|
1693
|
+
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
|
|
1694
|
+
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
|
|
1695
|
+
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
|
|
1696
|
+
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
|
|
1697
|
+
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
|
|
1698
|
+
})($ || ($ = {}));
|
|
1699
|
+
//mol/log3/log3.web.ts
|
|
1961
1700
|
;
|
|
1962
1701
|
"use strict";
|
|
1963
1702
|
var $;
|
|
@@ -1968,7 +1707,7 @@ var $;
|
|
|
1968
1707
|
let warned = false;
|
|
1969
1708
|
descr.value = function $mol_deprecated_wrapper(...args) {
|
|
1970
1709
|
if (!warned) {
|
|
1971
|
-
|
|
1710
|
+
$$.$mol_log3_warn({
|
|
1972
1711
|
place: `${host.constructor.name}::${field}`,
|
|
1973
1712
|
message: `Deprecated`,
|
|
1974
1713
|
hint: message,
|
|
@@ -1981,39 +1720,41 @@ var $;
|
|
|
1981
1720
|
}
|
|
1982
1721
|
$.$mol_deprecated = $mol_deprecated;
|
|
1983
1722
|
})($ || ($ = {}));
|
|
1984
|
-
//deprecated.
|
|
1723
|
+
//mol/deprecated/deprecated.ts
|
|
1985
1724
|
;
|
|
1986
1725
|
"use strict";
|
|
1987
|
-
//pick.
|
|
1726
|
+
//mol/type/pick/pick.ts
|
|
1988
1727
|
;
|
|
1989
1728
|
"use strict";
|
|
1990
1729
|
var $;
|
|
1991
1730
|
(function ($) {
|
|
1992
1731
|
function $mol_view_visible_width() {
|
|
1993
|
-
return
|
|
1732
|
+
return $mol_window.size().width;
|
|
1994
1733
|
}
|
|
1995
1734
|
$.$mol_view_visible_width = $mol_view_visible_width;
|
|
1996
1735
|
function $mol_view_visible_height() {
|
|
1997
|
-
return
|
|
1736
|
+
return $mol_window.size().height;
|
|
1998
1737
|
}
|
|
1999
1738
|
$.$mol_view_visible_height = $mol_view_visible_height;
|
|
2000
1739
|
function $mol_view_state_key(suffix) {
|
|
2001
1740
|
return suffix;
|
|
2002
1741
|
}
|
|
2003
1742
|
$.$mol_view_state_key = $mol_view_state_key;
|
|
2004
|
-
class $mol_view extends
|
|
1743
|
+
class $mol_view extends $mol_object {
|
|
2005
1744
|
static Root(id) {
|
|
2006
1745
|
return new this;
|
|
2007
1746
|
}
|
|
2008
1747
|
autorun() {
|
|
2009
|
-
|
|
1748
|
+
try {
|
|
2010
1749
|
this.dom_tree();
|
|
2011
1750
|
document.title = this.title();
|
|
2012
|
-
|
|
2013
|
-
|
|
1751
|
+
}
|
|
1752
|
+
catch (error) {
|
|
1753
|
+
$mol_fail_log(error);
|
|
1754
|
+
}
|
|
2014
1755
|
}
|
|
2015
1756
|
static autobind() {
|
|
2016
|
-
const nodes =
|
|
1757
|
+
const nodes = $mol_dom_context.document.querySelectorAll('[mol_view_root]');
|
|
2017
1758
|
for (let i = nodes.length - 1; i >= 0; --i) {
|
|
2018
1759
|
const name = nodes.item(i).getAttribute('mol_view_root');
|
|
2019
1760
|
const View = $[name];
|
|
@@ -2031,14 +1772,14 @@ var $;
|
|
|
2031
1772
|
}
|
|
2032
1773
|
focused(next) {
|
|
2033
1774
|
let node = this.dom_node();
|
|
2034
|
-
const value =
|
|
1775
|
+
const value = $mol_view_selection.focused(next === undefined ? undefined : (next ? [node] : []));
|
|
2035
1776
|
return value.indexOf(node) !== -1;
|
|
2036
1777
|
}
|
|
2037
1778
|
state_key(suffix = '') {
|
|
2038
1779
|
return this.$.$mol_view_state_key(suffix);
|
|
2039
1780
|
}
|
|
2040
1781
|
dom_name() {
|
|
2041
|
-
return
|
|
1782
|
+
return $mol_dom_qname(this.constructor.toString()) || 'div';
|
|
2042
1783
|
}
|
|
2043
1784
|
dom_name_space() { return 'http://www.w3.org/1999/xhtml'; }
|
|
2044
1785
|
sub() {
|
|
@@ -2060,12 +1801,7 @@ var $;
|
|
|
2060
1801
|
});
|
|
2061
1802
|
}
|
|
2062
1803
|
catch (error) {
|
|
2063
|
-
|
|
2064
|
-
$.$mol_atom2.current.subscribe(error);
|
|
2065
|
-
}
|
|
2066
|
-
else if ($.$mol_fail_catch(error)) {
|
|
2067
|
-
console.error(error);
|
|
2068
|
-
}
|
|
1804
|
+
$mol_fail_log(error);
|
|
2069
1805
|
return 24;
|
|
2070
1806
|
}
|
|
2071
1807
|
return min;
|
|
@@ -2083,20 +1819,14 @@ var $;
|
|
|
2083
1819
|
}
|
|
2084
1820
|
}
|
|
2085
1821
|
catch (error) {
|
|
2086
|
-
|
|
2087
|
-
$.$mol_atom2.current.subscribe(error);
|
|
2088
|
-
}
|
|
2089
|
-
else if ($.$mol_fail_catch(error)) {
|
|
2090
|
-
console.error(error);
|
|
2091
|
-
}
|
|
1822
|
+
$mol_fail_log(error);
|
|
2092
1823
|
return 24;
|
|
2093
1824
|
}
|
|
2094
1825
|
return min;
|
|
2095
1826
|
}
|
|
2096
1827
|
static watchers = new Set();
|
|
2097
1828
|
view_rect() {
|
|
2098
|
-
|
|
2099
|
-
this.view_rect_watcher();
|
|
1829
|
+
this.view_rect_watcher();
|
|
2100
1830
|
return this.view_rect_cache();
|
|
2101
1831
|
}
|
|
2102
1832
|
view_rect_cache(next = null) {
|
|
@@ -2110,44 +1840,39 @@ var $;
|
|
|
2110
1840
|
return this.toString();
|
|
2111
1841
|
}
|
|
2112
1842
|
dom_node(next) {
|
|
2113
|
-
const node = next ||
|
|
1843
|
+
const node = next || $mol_dom_context.document.createElementNS(this.dom_name_space(), this.dom_name());
|
|
2114
1844
|
const id = this.dom_id();
|
|
2115
1845
|
node.setAttribute('id', id);
|
|
2116
|
-
node.toString =
|
|
2117
|
-
|
|
2118
|
-
const events = this.event();
|
|
1846
|
+
node.toString = $mol_const('<#' + id + '>');
|
|
1847
|
+
$mol_dom_render_attributes(node, this.attr_static());
|
|
1848
|
+
const events = $mol_wire_async(this.event());
|
|
2119
1849
|
for (let event_name in events) {
|
|
2120
|
-
node.addEventListener(event_name,
|
|
1850
|
+
node.addEventListener(event_name, events[event_name], { passive: false });
|
|
2121
1851
|
}
|
|
2122
1852
|
return node;
|
|
2123
1853
|
}
|
|
2124
1854
|
dom_tree(next) {
|
|
2125
1855
|
const node = this.dom_node(next);
|
|
2126
1856
|
try {
|
|
2127
|
-
|
|
1857
|
+
$mol_dom_render_attributes(node, { mol_view_error: null });
|
|
2128
1858
|
try {
|
|
2129
1859
|
this.render();
|
|
2130
1860
|
}
|
|
2131
1861
|
finally {
|
|
2132
1862
|
for (let plugin of this.plugins()) {
|
|
2133
|
-
if (plugin instanceof
|
|
1863
|
+
if (plugin instanceof $mol_plugin) {
|
|
2134
1864
|
plugin.dom_tree();
|
|
2135
1865
|
}
|
|
2136
1866
|
}
|
|
2137
1867
|
}
|
|
2138
1868
|
}
|
|
2139
1869
|
catch (error) {
|
|
2140
|
-
|
|
2141
|
-
if (error
|
|
2142
|
-
$.$mol_atom2.current.subscribe(error);
|
|
2143
|
-
return node;
|
|
2144
|
-
}
|
|
2145
|
-
if ($.$mol_fail_catch(error)) {
|
|
1870
|
+
$mol_dom_render_attributes(node, { mol_view_error: error.name || error.constructor.name });
|
|
1871
|
+
if ($mol_fail_log(error)) {
|
|
2146
1872
|
try {
|
|
2147
|
-
|
|
1873
|
+
node.innerText = error.message || error;
|
|
2148
1874
|
}
|
|
2149
|
-
catch
|
|
2150
|
-
console.error(error);
|
|
1875
|
+
catch { }
|
|
2151
1876
|
}
|
|
2152
1877
|
}
|
|
2153
1878
|
this.auto();
|
|
@@ -2155,15 +1880,15 @@ var $;
|
|
|
2155
1880
|
}
|
|
2156
1881
|
dom_node_actual() {
|
|
2157
1882
|
const node = this.dom_node();
|
|
2158
|
-
|
|
1883
|
+
$mol_dom_render_styles(node, {
|
|
2159
1884
|
minHeight: this.minimal_height(),
|
|
2160
1885
|
minWidth: this.minimal_width(),
|
|
2161
1886
|
});
|
|
2162
1887
|
const attr = this.attr();
|
|
2163
1888
|
const style = this.style();
|
|
2164
1889
|
const fields = this.field();
|
|
2165
|
-
|
|
2166
|
-
|
|
1890
|
+
$mol_dom_render_attributes(node, attr);
|
|
1891
|
+
$mol_dom_render_styles(node, style);
|
|
2167
1892
|
return node;
|
|
2168
1893
|
}
|
|
2169
1894
|
auto() { }
|
|
@@ -2177,15 +1902,15 @@ var $;
|
|
|
2177
1902
|
return null;
|
|
2178
1903
|
return (child instanceof $mol_view)
|
|
2179
1904
|
? child.dom_node()
|
|
2180
|
-
: child instanceof
|
|
1905
|
+
: child instanceof $mol_dom_context.Node
|
|
2181
1906
|
? child
|
|
2182
1907
|
: String(child);
|
|
2183
1908
|
});
|
|
2184
|
-
|
|
1909
|
+
$mol_dom_render_children(node, nodes);
|
|
2185
1910
|
for (const el of sub)
|
|
2186
1911
|
if (el && typeof el === 'object' && 'dom_tree' in el)
|
|
2187
1912
|
el['dom_tree']();
|
|
2188
|
-
|
|
1913
|
+
$mol_dom_render_fields(node, this.field());
|
|
2189
1914
|
}
|
|
2190
1915
|
static view_classes() {
|
|
2191
1916
|
const proto = this.prototype;
|
|
@@ -2201,17 +1926,17 @@ var $;
|
|
|
2201
1926
|
}
|
|
2202
1927
|
view_names_owned() {
|
|
2203
1928
|
const names = [];
|
|
2204
|
-
let owner =
|
|
2205
|
-
if (owner instanceof $mol_view) {
|
|
2206
|
-
const suffix =
|
|
1929
|
+
let owner = $mol_owning_get(this);
|
|
1930
|
+
if (owner?.host instanceof $mol_view) {
|
|
1931
|
+
const suffix = owner.task.name.trim();
|
|
2207
1932
|
const suffix2 = '_' + suffix[0].toLowerCase() + suffix.substring(1);
|
|
2208
|
-
for (let Class of owner.constructor.view_classes()) {
|
|
1933
|
+
for (let Class of owner.host.constructor.view_classes()) {
|
|
2209
1934
|
if (suffix in Class.prototype)
|
|
2210
1935
|
names.push(this.$.$mol_func_name(Class) + suffix2);
|
|
2211
1936
|
else
|
|
2212
1937
|
break;
|
|
2213
1938
|
}
|
|
2214
|
-
for (let prefix of owner.view_names_owned()) {
|
|
1939
|
+
for (let prefix of owner.host.view_names_owned()) {
|
|
2215
1940
|
names.push(prefix + suffix2);
|
|
2216
1941
|
}
|
|
2217
1942
|
}
|
|
@@ -2256,8 +1981,8 @@ var $;
|
|
|
2256
1981
|
plugins() {
|
|
2257
1982
|
return [];
|
|
2258
1983
|
}
|
|
2259
|
-
[
|
|
2260
|
-
return
|
|
1984
|
+
[$mol_dev_format_head]() {
|
|
1985
|
+
return $mol_dev_format_span({}, $mol_dev_format_native(this));
|
|
2261
1986
|
}
|
|
2262
1987
|
*view_find(check, path = []) {
|
|
2263
1988
|
if (check(this))
|
|
@@ -2285,96 +2010,88 @@ var $;
|
|
|
2285
2010
|
async ensure_visible(view, align = "start") {
|
|
2286
2011
|
const path = this.view_find(v => v === view).next().value;
|
|
2287
2012
|
this.force_render(new Set(path));
|
|
2288
|
-
|
|
2013
|
+
$mol_wire_fiber.sync();
|
|
2289
2014
|
view.dom_node().scrollIntoView({ block: align });
|
|
2290
2015
|
}
|
|
2291
2016
|
}
|
|
2292
2017
|
__decorate([
|
|
2293
|
-
|
|
2018
|
+
$mol_mem
|
|
2294
2019
|
], $mol_view.prototype, "autorun", null);
|
|
2295
2020
|
__decorate([
|
|
2296
|
-
|
|
2021
|
+
$mol_mem
|
|
2297
2022
|
], $mol_view.prototype, "focused", null);
|
|
2298
2023
|
__decorate([
|
|
2299
|
-
|
|
2024
|
+
$mol_mem
|
|
2300
2025
|
], $mol_view.prototype, "minimal_width", null);
|
|
2301
2026
|
__decorate([
|
|
2302
|
-
|
|
2027
|
+
$mol_mem
|
|
2303
2028
|
], $mol_view.prototype, "minimal_height", null);
|
|
2304
2029
|
__decorate([
|
|
2305
|
-
|
|
2030
|
+
$mol_mem
|
|
2306
2031
|
], $mol_view.prototype, "view_rect", null);
|
|
2307
2032
|
__decorate([
|
|
2308
|
-
|
|
2033
|
+
$mol_mem
|
|
2309
2034
|
], $mol_view.prototype, "view_rect_cache", null);
|
|
2310
2035
|
__decorate([
|
|
2311
|
-
|
|
2036
|
+
$mol_mem
|
|
2312
2037
|
], $mol_view.prototype, "view_rect_watcher", null);
|
|
2313
2038
|
__decorate([
|
|
2314
|
-
|
|
2039
|
+
$mol_mem
|
|
2315
2040
|
], $mol_view.prototype, "dom_node", null);
|
|
2316
2041
|
__decorate([
|
|
2317
|
-
|
|
2042
|
+
$mol_mem
|
|
2318
2043
|
], $mol_view.prototype, "dom_tree", null);
|
|
2319
2044
|
__decorate([
|
|
2320
|
-
|
|
2045
|
+
$mol_mem
|
|
2321
2046
|
], $mol_view.prototype, "dom_node_actual", null);
|
|
2322
2047
|
__decorate([
|
|
2323
|
-
|
|
2048
|
+
$mol_memo.method
|
|
2324
2049
|
], $mol_view.prototype, "view_names", null);
|
|
2325
2050
|
__decorate([
|
|
2326
|
-
|
|
2051
|
+
$mol_deprecated('Use $mol_view::event instead.')
|
|
2327
2052
|
], $mol_view.prototype, "event_async", null);
|
|
2328
2053
|
__decorate([
|
|
2329
|
-
|
|
2054
|
+
$mol_mem_key
|
|
2330
2055
|
], $mol_view, "Root", null);
|
|
2331
2056
|
__decorate([
|
|
2332
|
-
|
|
2057
|
+
$mol_mem
|
|
2058
|
+
], $mol_view, "autobind", null);
|
|
2059
|
+
__decorate([
|
|
2060
|
+
$mol_memo.method
|
|
2333
2061
|
], $mol_view, "view_classes", null);
|
|
2334
2062
|
$.$mol_view = $mol_view;
|
|
2335
2063
|
})($ || ($ = {}));
|
|
2336
|
-
//view.
|
|
2064
|
+
//mol/view/view/view.ts
|
|
2337
2065
|
;
|
|
2338
2066
|
"use strict";
|
|
2339
2067
|
var $;
|
|
2340
2068
|
(function ($) {
|
|
2341
|
-
|
|
2069
|
+
$mol_style_attach("mol/view/view/view.css", "[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tword-break: break-word;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tmax-width: 100%;\n\tcontain: style;\n\ttab-size: 4;\n}\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_current);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont: var(--mol_skin_font);\n\tbackground: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text);\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n}\n\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 10px,\n\t\t#ff3d3d 10px,\n\t\t#ff3d3d 30px\n\t);\n\tcolor: black;\n}\n\n@keyframes mol_view_wait_move {\n\tfrom {\n\t\tbackground-position: 0 0;\n\t}\n\tto {\n\t\tbackground-position: 200vmax 0;\n\t}\n}\n\n@keyframes mol_view_wait_show {\n\tto {\n\t\tbackground-image: repeating-linear-gradient(\n\t\t\t45deg,\n\t\t\thsla( 0 , 0% , 50% , .25 ) 0% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 5% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 45% ,\n\t\t\thsla( 0 , 0% , 50% , .25 ) 50% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 55% ,\n\t\t\thsla( 0 , 0% , 50% , 0 ) 95% ,\n\t\t\thsla( 0 , 0% , 50% , .25 ) 100%\n\t\t);\n\t\tbackground-size: 200vmax 200vmax;\n\t}\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait_show .5s .5s linear forwards , mol_view_wait_move 1s linear infinite;\n\topacity: .75;\n}\n");
|
|
2342
2070
|
})($ || ($ = {}));
|
|
2343
|
-
//view.css.
|
|
2071
|
+
//mol/view/view/-css/view.css.ts
|
|
2344
2072
|
;
|
|
2345
2073
|
"use strict";
|
|
2346
2074
|
var $;
|
|
2347
2075
|
(function ($) {
|
|
2348
|
-
if (
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
$.$mol_fiber_warp();
|
|
2353
|
-
}));
|
|
2076
|
+
if ($mol_dom_context.document) {
|
|
2077
|
+
Promise.resolve().then(() => {
|
|
2078
|
+
$mol_view.autobind();
|
|
2079
|
+
});
|
|
2354
2080
|
function $mol_view_watch() {
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
}
|
|
2360
|
-
});
|
|
2081
|
+
new $mol_after_frame($mol_view_watch);
|
|
2082
|
+
for (const view of $mol_view.watchers) {
|
|
2083
|
+
view.view_rect_cache(view.dom_node().getBoundingClientRect().toJSON());
|
|
2084
|
+
}
|
|
2361
2085
|
}
|
|
2362
|
-
|
|
2363
|
-
const watch = () => {
|
|
2364
|
-
const logs = $.$mol_fiber.logs;
|
|
2365
|
-
$.$mol_fiber.logs = false;
|
|
2366
|
-
watch_task();
|
|
2367
|
-
$.$mol_fiber.logs = logs;
|
|
2368
|
-
};
|
|
2369
|
-
watch();
|
|
2086
|
+
$mol_view_watch();
|
|
2370
2087
|
}
|
|
2371
2088
|
})($ || ($ = {}));
|
|
2372
|
-
//view.web.
|
|
2089
|
+
//mol/view/view/view.web.ts
|
|
2373
2090
|
;
|
|
2374
2091
|
"use strict";
|
|
2375
2092
|
var $;
|
|
2376
2093
|
(function ($) {
|
|
2377
|
-
class $mol_svg extends
|
|
2094
|
+
class $mol_svg extends $mol_view {
|
|
2378
2095
|
dom_name() {
|
|
2379
2096
|
return "svg";
|
|
2380
2097
|
}
|
|
@@ -2390,12 +2107,12 @@ var $;
|
|
|
2390
2107
|
}
|
|
2391
2108
|
$.$mol_svg = $mol_svg;
|
|
2392
2109
|
})($ || ($ = {}));
|
|
2393
|
-
//svg.view.tree.
|
|
2110
|
+
//mol/svg/-view.tree/svg.view.tree.ts
|
|
2394
2111
|
;
|
|
2395
2112
|
"use strict";
|
|
2396
2113
|
var $;
|
|
2397
2114
|
(function ($) {
|
|
2398
|
-
class $mol_after_work extends
|
|
2115
|
+
class $mol_after_work extends $mol_object2 {
|
|
2399
2116
|
delay;
|
|
2400
2117
|
task;
|
|
2401
2118
|
id;
|
|
@@ -2411,28 +2128,49 @@ var $;
|
|
|
2411
2128
|
}
|
|
2412
2129
|
$.$mol_after_work = $mol_after_work;
|
|
2413
2130
|
})($ || ($ = {}));
|
|
2414
|
-
//work.web.
|
|
2131
|
+
//mol/after/work/work.web.ts
|
|
2132
|
+
;
|
|
2133
|
+
"use strict";
|
|
2134
|
+
var $;
|
|
2135
|
+
(function ($) {
|
|
2136
|
+
class $mol_after_timeout extends $mol_object2 {
|
|
2137
|
+
delay;
|
|
2138
|
+
task;
|
|
2139
|
+
id;
|
|
2140
|
+
constructor(delay, task) {
|
|
2141
|
+
super();
|
|
2142
|
+
this.delay = delay;
|
|
2143
|
+
this.task = task;
|
|
2144
|
+
this.id = setTimeout(task, delay);
|
|
2145
|
+
}
|
|
2146
|
+
destructor() {
|
|
2147
|
+
clearTimeout(this.id);
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
$.$mol_after_timeout = $mol_after_timeout;
|
|
2151
|
+
})($ || ($ = {}));
|
|
2152
|
+
//mol/after/timeout/timeout.ts
|
|
2415
2153
|
;
|
|
2416
2154
|
"use strict";
|
|
2417
2155
|
var $;
|
|
2418
2156
|
(function ($) {
|
|
2419
|
-
class $mol_state_time extends
|
|
2420
|
-
static now(precision
|
|
2421
|
-
if (precision
|
|
2422
|
-
new
|
|
2157
|
+
class $mol_state_time extends $mol_object {
|
|
2158
|
+
static now(precision, reset) {
|
|
2159
|
+
if (precision === undefined) {
|
|
2160
|
+
new $mol_after_work(16, () => this.now(precision, null));
|
|
2423
2161
|
}
|
|
2424
2162
|
else {
|
|
2425
|
-
new
|
|
2163
|
+
new $mol_after_timeout(precision, () => this.now(precision, null));
|
|
2426
2164
|
}
|
|
2427
2165
|
return Date.now();
|
|
2428
2166
|
}
|
|
2429
2167
|
}
|
|
2430
2168
|
__decorate([
|
|
2431
|
-
|
|
2169
|
+
$mol_mem_key
|
|
2432
2170
|
], $mol_state_time, "now", null);
|
|
2433
2171
|
$.$mol_state_time = $mol_state_time;
|
|
2434
2172
|
})($ || ($ = {}));
|
|
2435
|
-
//time.
|
|
2173
|
+
//mol/state/time/time.ts
|
|
2436
2174
|
;
|
|
2437
2175
|
"use strict";
|
|
2438
2176
|
var $;
|
|
@@ -2444,7 +2182,7 @@ var $;
|
|
|
2444
2182
|
const win = this.$.$mol_dom_context;
|
|
2445
2183
|
const style = win.getComputedStyle(this.dom_node());
|
|
2446
2184
|
if (!style['font-size'])
|
|
2447
|
-
|
|
2185
|
+
$mol_state_time.now();
|
|
2448
2186
|
return style;
|
|
2449
2187
|
}
|
|
2450
2188
|
font_size() {
|
|
@@ -2455,23 +2193,23 @@ var $;
|
|
|
2455
2193
|
}
|
|
2456
2194
|
}
|
|
2457
2195
|
__decorate([
|
|
2458
|
-
|
|
2196
|
+
$mol_mem
|
|
2459
2197
|
], $mol_svg.prototype, "computed_style", null);
|
|
2460
2198
|
__decorate([
|
|
2461
|
-
|
|
2199
|
+
$mol_mem
|
|
2462
2200
|
], $mol_svg.prototype, "font_size", null);
|
|
2463
2201
|
__decorate([
|
|
2464
|
-
|
|
2202
|
+
$mol_mem
|
|
2465
2203
|
], $mol_svg.prototype, "font_family", null);
|
|
2466
2204
|
$$.$mol_svg = $mol_svg;
|
|
2467
2205
|
})($$ = $.$$ || ($.$$ = {}));
|
|
2468
2206
|
})($ || ($ = {}));
|
|
2469
|
-
//svg.view.
|
|
2207
|
+
//mol/svg/svg.view.ts
|
|
2470
2208
|
;
|
|
2471
2209
|
"use strict";
|
|
2472
2210
|
var $;
|
|
2473
2211
|
(function ($) {
|
|
2474
|
-
class $mol_svg_root extends
|
|
2212
|
+
class $mol_svg_root extends $mol_svg {
|
|
2475
2213
|
dom_name() {
|
|
2476
2214
|
return "svg";
|
|
2477
2215
|
}
|
|
@@ -2491,14 +2229,14 @@ var $;
|
|
|
2491
2229
|
}
|
|
2492
2230
|
$.$mol_svg_root = $mol_svg_root;
|
|
2493
2231
|
})($ || ($ = {}));
|
|
2494
|
-
//root.view.tree.
|
|
2232
|
+
//mol/svg/root/-view.tree/root.view.tree.ts
|
|
2495
2233
|
;
|
|
2496
2234
|
"use strict";
|
|
2497
2235
|
var $;
|
|
2498
2236
|
(function ($) {
|
|
2499
|
-
|
|
2237
|
+
$mol_style_attach("mol/svg/root/root.view.css", "[mol_svg_root] {\n\toverflow: hidden;\n}\n");
|
|
2500
2238
|
})($ || ($ = {}));
|
|
2501
|
-
//root.view.css.
|
|
2239
|
+
//mol/svg/root/-css/root.view.css.ts
|
|
2502
2240
|
;
|
|
2503
2241
|
"use strict";
|
|
2504
2242
|
var $;
|
|
@@ -2604,24 +2342,24 @@ var $;
|
|
|
2604
2342
|
}
|
|
2605
2343
|
$.$mol_vector_matrix = $mol_vector_matrix;
|
|
2606
2344
|
})($ || ($ = {}));
|
|
2607
|
-
//vector.
|
|
2345
|
+
//mol/vector/vector.ts
|
|
2608
2346
|
;
|
|
2609
2347
|
"use strict";
|
|
2610
2348
|
var $;
|
|
2611
2349
|
(function ($) {
|
|
2612
|
-
class $mol_svg_group extends
|
|
2350
|
+
class $mol_svg_group extends $mol_svg {
|
|
2613
2351
|
dom_name() {
|
|
2614
2352
|
return "g";
|
|
2615
2353
|
}
|
|
2616
2354
|
}
|
|
2617
2355
|
$.$mol_svg_group = $mol_svg_group;
|
|
2618
2356
|
})($ || ($ = {}));
|
|
2619
|
-
//group.view.tree.
|
|
2357
|
+
//mol/svg/group/-view.tree/group.view.tree.ts
|
|
2620
2358
|
;
|
|
2621
2359
|
"use strict";
|
|
2622
2360
|
var $;
|
|
2623
2361
|
(function ($) {
|
|
2624
|
-
class $mol_svg_title extends
|
|
2362
|
+
class $mol_svg_title extends $mol_svg {
|
|
2625
2363
|
dom_name() {
|
|
2626
2364
|
return "title";
|
|
2627
2365
|
}
|
|
@@ -2633,12 +2371,12 @@ var $;
|
|
|
2633
2371
|
}
|
|
2634
2372
|
$.$mol_svg_title = $mol_svg_title;
|
|
2635
2373
|
})($ || ($ = {}));
|
|
2636
|
-
//title.view.tree.
|
|
2374
|
+
//mol/svg/title/-view.tree/title.view.tree.ts
|
|
2637
2375
|
;
|
|
2638
2376
|
"use strict";
|
|
2639
2377
|
var $;
|
|
2640
2378
|
(function ($) {
|
|
2641
|
-
class $mol_plot_graph extends
|
|
2379
|
+
class $mol_plot_graph extends $mol_svg_group {
|
|
2642
2380
|
series_x() {
|
|
2643
2381
|
return [];
|
|
2644
2382
|
}
|
|
@@ -2768,52 +2506,52 @@ var $;
|
|
|
2768
2506
|
}
|
|
2769
2507
|
}
|
|
2770
2508
|
__decorate([
|
|
2771
|
-
|
|
2509
|
+
$mol_mem
|
|
2772
2510
|
], $mol_plot_graph.prototype, "viewport", null);
|
|
2773
2511
|
__decorate([
|
|
2774
|
-
|
|
2512
|
+
$mol_mem
|
|
2775
2513
|
], $mol_plot_graph.prototype, "cursor_position", null);
|
|
2776
2514
|
__decorate([
|
|
2777
|
-
|
|
2515
|
+
$mol_mem
|
|
2778
2516
|
], $mol_plot_graph.prototype, "dimensions_pane", null);
|
|
2779
2517
|
__decorate([
|
|
2780
|
-
|
|
2518
|
+
$mol_mem
|
|
2781
2519
|
], $mol_plot_graph.prototype, "dimensions", null);
|
|
2782
2520
|
__decorate([
|
|
2783
|
-
|
|
2521
|
+
$mol_mem
|
|
2784
2522
|
], $mol_plot_graph.prototype, "size_real", null);
|
|
2785
2523
|
__decorate([
|
|
2786
|
-
|
|
2524
|
+
$mol_mem
|
|
2787
2525
|
], $mol_plot_graph.prototype, "gap", null);
|
|
2788
2526
|
__decorate([
|
|
2789
|
-
|
|
2527
|
+
$mol_mem
|
|
2790
2528
|
], $mol_plot_graph.prototype, "Hint", null);
|
|
2791
2529
|
__decorate([
|
|
2792
|
-
|
|
2530
|
+
$mol_mem
|
|
2793
2531
|
], $mol_plot_graph.prototype, "viewport_x", null);
|
|
2794
2532
|
__decorate([
|
|
2795
|
-
|
|
2533
|
+
$mol_mem
|
|
2796
2534
|
], $mol_plot_graph.prototype, "viewport_y", null);
|
|
2797
2535
|
__decorate([
|
|
2798
|
-
|
|
2536
|
+
$mol_mem
|
|
2799
2537
|
], $mol_plot_graph.prototype, "dimensions_pane_x", null);
|
|
2800
2538
|
__decorate([
|
|
2801
|
-
|
|
2539
|
+
$mol_mem
|
|
2802
2540
|
], $mol_plot_graph.prototype, "dimensions_pane_y", null);
|
|
2803
2541
|
__decorate([
|
|
2804
|
-
|
|
2542
|
+
$mol_mem
|
|
2805
2543
|
], $mol_plot_graph.prototype, "dimensions_x", null);
|
|
2806
2544
|
__decorate([
|
|
2807
|
-
|
|
2545
|
+
$mol_mem
|
|
2808
2546
|
], $mol_plot_graph.prototype, "dimensions_y", null);
|
|
2809
2547
|
__decorate([
|
|
2810
|
-
|
|
2548
|
+
$mol_mem
|
|
2811
2549
|
], $mol_plot_graph.prototype, "gap_x", null);
|
|
2812
2550
|
__decorate([
|
|
2813
|
-
|
|
2551
|
+
$mol_mem
|
|
2814
2552
|
], $mol_plot_graph.prototype, "gap_y", null);
|
|
2815
2553
|
$.$mol_plot_graph = $mol_plot_graph;
|
|
2816
|
-
class $mol_plot_graph_sample extends
|
|
2554
|
+
class $mol_plot_graph_sample extends $mol_view {
|
|
2817
2555
|
attr() {
|
|
2818
2556
|
return {
|
|
2819
2557
|
...super.attr(),
|
|
@@ -2835,14 +2573,14 @@ var $;
|
|
|
2835
2573
|
}
|
|
2836
2574
|
$.$mol_plot_graph_sample = $mol_plot_graph_sample;
|
|
2837
2575
|
})($ || ($ = {}));
|
|
2838
|
-
//graph.view.tree.
|
|
2576
|
+
//mol/plot/graph/-view.tree/graph.view.tree.ts
|
|
2839
2577
|
;
|
|
2840
2578
|
"use strict";
|
|
2841
2579
|
var $;
|
|
2842
2580
|
(function ($) {
|
|
2843
|
-
|
|
2581
|
+
$mol_style_attach("mol/plot/graph/graph.view.css", "[mol_plot_graph] {\n\tstroke: currentColor;\n}\n\n[mol_plot_graph_sample] {\n\tborder-width: 0;\n\tborder-style: solid;\n}\n\n[mol_plot_graph_type=\"dashed\"] {\n\tstroke-dasharray: 4 4;\n\tborder-style: dashed;\n}\n");
|
|
2844
2582
|
})($ || ($ = {}));
|
|
2845
|
-
//graph.view.css.
|
|
2583
|
+
//mol/plot/graph/-css/graph.view.css.ts
|
|
2846
2584
|
;
|
|
2847
2585
|
"use strict";
|
|
2848
2586
|
var $;
|
|
@@ -2880,7 +2618,7 @@ var $;
|
|
|
2880
2618
|
return this.series_y().map((val, index) => index);
|
|
2881
2619
|
}
|
|
2882
2620
|
dimensions() {
|
|
2883
|
-
let next = new this.$.$mol_vector_2d(
|
|
2621
|
+
let next = new this.$.$mol_vector_2d($mol_vector_range_full.inversed, $mol_vector_range_full.inversed);
|
|
2884
2622
|
const series_x = this.series_x();
|
|
2885
2623
|
const series_y = this.series_y();
|
|
2886
2624
|
for (let i = 0; i < series_x.length; i++) {
|
|
@@ -2897,29 +2635,29 @@ var $;
|
|
|
2897
2635
|
}
|
|
2898
2636
|
}
|
|
2899
2637
|
__decorate([
|
|
2900
|
-
|
|
2638
|
+
$mol_mem
|
|
2901
2639
|
], $mol_plot_graph.prototype, "indexes", null);
|
|
2902
2640
|
__decorate([
|
|
2903
|
-
|
|
2641
|
+
$mol_mem
|
|
2904
2642
|
], $mol_plot_graph.prototype, "series_x", null);
|
|
2905
2643
|
__decorate([
|
|
2906
|
-
|
|
2644
|
+
$mol_mem
|
|
2907
2645
|
], $mol_plot_graph.prototype, "dimensions", null);
|
|
2908
2646
|
$$.$mol_plot_graph = $mol_plot_graph;
|
|
2909
2647
|
})($$ = $.$$ || ($.$$ = {}));
|
|
2910
2648
|
})($ || ($ = {}));
|
|
2911
|
-
//graph.view.
|
|
2649
|
+
//mol/plot/graph/graph.view.ts
|
|
2912
2650
|
;
|
|
2913
2651
|
"use strict";
|
|
2914
2652
|
var $;
|
|
2915
2653
|
(function ($) {
|
|
2916
|
-
class $mol_plugin extends
|
|
2654
|
+
class $mol_plugin extends $mol_view {
|
|
2917
2655
|
dom_node(next) {
|
|
2918
|
-
const node = next ||
|
|
2919
|
-
|
|
2920
|
-
const events = this.event();
|
|
2656
|
+
const node = next || $mol_owning_get(this).host.dom_node();
|
|
2657
|
+
$mol_dom_render_attributes(node, this.attr_static());
|
|
2658
|
+
const events = $mol_wire_async(this.event());
|
|
2921
2659
|
for (let event_name in events) {
|
|
2922
|
-
node.addEventListener(event_name,
|
|
2660
|
+
node.addEventListener(event_name, events[event_name], { passive: false });
|
|
2923
2661
|
}
|
|
2924
2662
|
return node;
|
|
2925
2663
|
}
|
|
@@ -2934,16 +2672,16 @@ var $;
|
|
|
2934
2672
|
}
|
|
2935
2673
|
}
|
|
2936
2674
|
__decorate([
|
|
2937
|
-
|
|
2675
|
+
$mol_mem
|
|
2938
2676
|
], $mol_plugin.prototype, "dom_node", null);
|
|
2939
2677
|
$.$mol_plugin = $mol_plugin;
|
|
2940
2678
|
})($ || ($ = {}));
|
|
2941
|
-
//plugin.
|
|
2679
|
+
//mol/plugin/plugin.ts
|
|
2942
2680
|
;
|
|
2943
2681
|
"use strict";
|
|
2944
2682
|
var $;
|
|
2945
2683
|
(function ($) {
|
|
2946
|
-
class $mol_touch extends
|
|
2684
|
+
class $mol_touch extends $mol_plugin {
|
|
2947
2685
|
start_zoom(val) {
|
|
2948
2686
|
if (val !== undefined)
|
|
2949
2687
|
return val;
|
|
@@ -3124,95 +2862,95 @@ var $;
|
|
|
3124
2862
|
}
|
|
3125
2863
|
}
|
|
3126
2864
|
__decorate([
|
|
3127
|
-
|
|
2865
|
+
$mol_mem
|
|
3128
2866
|
], $mol_touch.prototype, "start_zoom", null);
|
|
3129
2867
|
__decorate([
|
|
3130
|
-
|
|
2868
|
+
$mol_mem
|
|
3131
2869
|
], $mol_touch.prototype, "start_distance", null);
|
|
3132
2870
|
__decorate([
|
|
3133
|
-
|
|
2871
|
+
$mol_mem
|
|
3134
2872
|
], $mol_touch.prototype, "zoom", null);
|
|
3135
2873
|
__decorate([
|
|
3136
|
-
|
|
2874
|
+
$mol_mem
|
|
3137
2875
|
], $mol_touch.prototype, "action_type", null);
|
|
3138
2876
|
__decorate([
|
|
3139
|
-
|
|
2877
|
+
$mol_mem
|
|
3140
2878
|
], $mol_touch.prototype, "action_point", null);
|
|
3141
2879
|
__decorate([
|
|
3142
|
-
|
|
2880
|
+
$mol_mem
|
|
3143
2881
|
], $mol_touch.prototype, "start_pan", null);
|
|
3144
2882
|
__decorate([
|
|
3145
|
-
|
|
2883
|
+
$mol_mem
|
|
3146
2884
|
], $mol_touch.prototype, "pan", null);
|
|
3147
2885
|
__decorate([
|
|
3148
|
-
|
|
2886
|
+
$mol_mem
|
|
3149
2887
|
], $mol_touch.prototype, "pointer_center", null);
|
|
3150
2888
|
__decorate([
|
|
3151
|
-
|
|
2889
|
+
$mol_mem
|
|
3152
2890
|
], $mol_touch.prototype, "start_pos", null);
|
|
3153
2891
|
__decorate([
|
|
3154
|
-
|
|
2892
|
+
$mol_mem
|
|
3155
2893
|
], $mol_touch.prototype, "swipe_right", null);
|
|
3156
2894
|
__decorate([
|
|
3157
|
-
|
|
2895
|
+
$mol_mem
|
|
3158
2896
|
], $mol_touch.prototype, "swipe_bottom", null);
|
|
3159
2897
|
__decorate([
|
|
3160
|
-
|
|
2898
|
+
$mol_mem
|
|
3161
2899
|
], $mol_touch.prototype, "swipe_left", null);
|
|
3162
2900
|
__decorate([
|
|
3163
|
-
|
|
2901
|
+
$mol_mem
|
|
3164
2902
|
], $mol_touch.prototype, "swipe_top", null);
|
|
3165
2903
|
__decorate([
|
|
3166
|
-
|
|
2904
|
+
$mol_mem
|
|
3167
2905
|
], $mol_touch.prototype, "swipe_from_right", null);
|
|
3168
2906
|
__decorate([
|
|
3169
|
-
|
|
2907
|
+
$mol_mem
|
|
3170
2908
|
], $mol_touch.prototype, "swipe_from_bottom", null);
|
|
3171
2909
|
__decorate([
|
|
3172
|
-
|
|
2910
|
+
$mol_mem
|
|
3173
2911
|
], $mol_touch.prototype, "swipe_from_left", null);
|
|
3174
2912
|
__decorate([
|
|
3175
|
-
|
|
2913
|
+
$mol_mem
|
|
3176
2914
|
], $mol_touch.prototype, "swipe_from_top", null);
|
|
3177
2915
|
__decorate([
|
|
3178
|
-
|
|
2916
|
+
$mol_mem
|
|
3179
2917
|
], $mol_touch.prototype, "swipe_to_right", null);
|
|
3180
2918
|
__decorate([
|
|
3181
|
-
|
|
2919
|
+
$mol_mem
|
|
3182
2920
|
], $mol_touch.prototype, "swipe_to_bottom", null);
|
|
3183
2921
|
__decorate([
|
|
3184
|
-
|
|
2922
|
+
$mol_mem
|
|
3185
2923
|
], $mol_touch.prototype, "swipe_to_left", null);
|
|
3186
2924
|
__decorate([
|
|
3187
|
-
|
|
2925
|
+
$mol_mem
|
|
3188
2926
|
], $mol_touch.prototype, "swipe_to_top", null);
|
|
3189
2927
|
__decorate([
|
|
3190
|
-
|
|
2928
|
+
$mol_mem
|
|
3191
2929
|
], $mol_touch.prototype, "draw_start", null);
|
|
3192
2930
|
__decorate([
|
|
3193
|
-
|
|
2931
|
+
$mol_mem
|
|
3194
2932
|
], $mol_touch.prototype, "draw", null);
|
|
3195
2933
|
__decorate([
|
|
3196
|
-
|
|
2934
|
+
$mol_mem
|
|
3197
2935
|
], $mol_touch.prototype, "draw_end", null);
|
|
3198
2936
|
__decorate([
|
|
3199
|
-
|
|
2937
|
+
$mol_mem
|
|
3200
2938
|
], $mol_touch.prototype, "event_start", null);
|
|
3201
2939
|
__decorate([
|
|
3202
|
-
|
|
2940
|
+
$mol_mem
|
|
3203
2941
|
], $mol_touch.prototype, "event_move", null);
|
|
3204
2942
|
__decorate([
|
|
3205
|
-
|
|
2943
|
+
$mol_mem
|
|
3206
2944
|
], $mol_touch.prototype, "event_end", null);
|
|
3207
2945
|
__decorate([
|
|
3208
|
-
|
|
2946
|
+
$mol_mem
|
|
3209
2947
|
], $mol_touch.prototype, "event_leave", null);
|
|
3210
2948
|
__decorate([
|
|
3211
|
-
|
|
2949
|
+
$mol_mem
|
|
3212
2950
|
], $mol_touch.prototype, "event_wheel", null);
|
|
3213
2951
|
$.$mol_touch = $mol_touch;
|
|
3214
2952
|
})($ || ($ = {}));
|
|
3215
|
-
//touch.view.tree.
|
|
2953
|
+
//mol/touch/-view.tree/touch.view.tree.ts
|
|
3216
2954
|
;
|
|
3217
2955
|
"use strict";
|
|
3218
2956
|
var $;
|
|
@@ -3221,6 +2959,12 @@ var $;
|
|
|
3221
2959
|
(function ($$) {
|
|
3222
2960
|
class $mol_touch extends $.$mol_touch {
|
|
3223
2961
|
auto() {
|
|
2962
|
+
this.pointer_events();
|
|
2963
|
+
this.start_pan();
|
|
2964
|
+
this.start_pos();
|
|
2965
|
+
this.start_distance();
|
|
2966
|
+
this.start_zoom();
|
|
2967
|
+
this.action_type();
|
|
3224
2968
|
this.view_rect();
|
|
3225
2969
|
}
|
|
3226
2970
|
pointer_events(next = []) {
|
|
@@ -3232,15 +2976,15 @@ var $;
|
|
|
3232
2976
|
const pens = events.filter(e => e.pointerType === 'pen');
|
|
3233
2977
|
const mouses = events.filter(e => !e.pointerType || e.pointerType === 'mouse');
|
|
3234
2978
|
const choosen = touches.length ? touches : pens.length ? pens : mouses;
|
|
3235
|
-
return new
|
|
2979
|
+
return new $mol_vector(...choosen.map(event => this.event_coords(event)));
|
|
3236
2980
|
}
|
|
3237
2981
|
pointer_center() {
|
|
3238
2982
|
const coords = this.pointer_coords();
|
|
3239
|
-
return coords.length ? coords.center() : new
|
|
2983
|
+
return coords.length ? coords.center() : new $mol_vector_2d(NaN, NaN);
|
|
3240
2984
|
}
|
|
3241
2985
|
event_coords(event) {
|
|
3242
2986
|
const { left, top } = this.view_rect();
|
|
3243
|
-
return new
|
|
2987
|
+
return new $mol_vector_2d(Math.round(event.pageX - left), Math.round(event.pageY - top));
|
|
3244
2988
|
}
|
|
3245
2989
|
action_point() {
|
|
3246
2990
|
const coord = this.pointer_center();
|
|
@@ -3248,7 +2992,7 @@ var $;
|
|
|
3248
2992
|
return null;
|
|
3249
2993
|
const zoom = this.zoom();
|
|
3250
2994
|
const pan = this.pan();
|
|
3251
|
-
return new
|
|
2995
|
+
return new $mol_vector_2d((coord.x - pan.x) / zoom, (coord.y - pan.y) / zoom);
|
|
3252
2996
|
}
|
|
3253
2997
|
event_eat(event) {
|
|
3254
2998
|
if (event instanceof PointerEvent) {
|
|
@@ -3318,7 +3062,7 @@ var $;
|
|
|
3318
3062
|
if (!action_type)
|
|
3319
3063
|
return;
|
|
3320
3064
|
if (action_type === 'draw') {
|
|
3321
|
-
const distance = new
|
|
3065
|
+
const distance = new $mol_vector(start_pos, pos).distance();
|
|
3322
3066
|
if (distance >= 4) {
|
|
3323
3067
|
this.draw(event);
|
|
3324
3068
|
}
|
|
@@ -3328,7 +3072,7 @@ var $;
|
|
|
3328
3072
|
return;
|
|
3329
3073
|
if (action_type === 'pan') {
|
|
3330
3074
|
this.dom_node().setPointerCapture(event.pointerId);
|
|
3331
|
-
this.pan(new
|
|
3075
|
+
this.pan(new $mol_vector_2d(start_pan[0] + pos[0] - start_pos[0], start_pan[1] + pos[1] - start_pos[1]));
|
|
3332
3076
|
}
|
|
3333
3077
|
const precision = this.swipe_precision();
|
|
3334
3078
|
if ((this.swipe_right !== $mol_touch.prototype.swipe_right
|
|
@@ -3367,7 +3111,7 @@ var $;
|
|
|
3367
3111
|
const start_zoom = this.start_zoom();
|
|
3368
3112
|
let mult = Math.abs(distance - start_distance) < 32 ? 1 : distance / start_distance;
|
|
3369
3113
|
this.zoom(start_zoom * mult);
|
|
3370
|
-
const pan = new
|
|
3114
|
+
const pan = new $mol_vector_2d((start_pan[0] - center[0] + pos[0] - start_pos[0]) * mult + center[0], (start_pan[1] - center[1] + pos[1] - start_pos[1]) * mult + center[1]);
|
|
3371
3115
|
this.pan(pan);
|
|
3372
3116
|
}
|
|
3373
3117
|
}
|
|
@@ -3430,32 +3174,32 @@ var $;
|
|
|
3430
3174
|
}
|
|
3431
3175
|
if (action_type === 'pan') {
|
|
3432
3176
|
const pan_prev = this.pan();
|
|
3433
|
-
const pan_next = new
|
|
3177
|
+
const pan_next = new $mol_vector_2d(pan_prev.x - event.deltaX, pan_prev.y - event.deltaY);
|
|
3434
3178
|
this.pan(pan_next);
|
|
3435
3179
|
}
|
|
3436
3180
|
}
|
|
3437
3181
|
}
|
|
3438
3182
|
__decorate([
|
|
3439
|
-
|
|
3183
|
+
$mol_mem
|
|
3440
3184
|
], $mol_touch.prototype, "pointer_events", null);
|
|
3441
3185
|
__decorate([
|
|
3442
|
-
|
|
3186
|
+
$mol_mem
|
|
3443
3187
|
], $mol_touch.prototype, "pointer_coords", null);
|
|
3444
3188
|
__decorate([
|
|
3445
|
-
|
|
3189
|
+
$mol_mem
|
|
3446
3190
|
], $mol_touch.prototype, "pointer_center", null);
|
|
3447
3191
|
__decorate([
|
|
3448
|
-
|
|
3192
|
+
$mol_mem
|
|
3449
3193
|
], $mol_touch.prototype, "action_point", null);
|
|
3450
3194
|
$$.$mol_touch = $mol_touch;
|
|
3451
3195
|
})($$ = $.$$ || ($.$$ = {}));
|
|
3452
3196
|
})($ || ($ = {}));
|
|
3453
|
-
//touch.view.
|
|
3197
|
+
//mol/touch/touch.view.ts
|
|
3454
3198
|
;
|
|
3455
3199
|
"use strict";
|
|
3456
3200
|
var $;
|
|
3457
3201
|
(function ($) {
|
|
3458
|
-
class $mol_plot_pane extends
|
|
3202
|
+
class $mol_plot_pane extends $mol_svg_root {
|
|
3459
3203
|
aspect() {
|
|
3460
3204
|
return "none";
|
|
3461
3205
|
}
|
|
@@ -3661,105 +3405,129 @@ var $;
|
|
|
3661
3405
|
}
|
|
3662
3406
|
}
|
|
3663
3407
|
__decorate([
|
|
3664
|
-
|
|
3408
|
+
$mol_mem
|
|
3665
3409
|
], $mol_plot_pane.prototype, "hue_base", null);
|
|
3666
3410
|
__decorate([
|
|
3667
|
-
|
|
3411
|
+
$mol_mem
|
|
3668
3412
|
], $mol_plot_pane.prototype, "hue_shift", null);
|
|
3669
3413
|
__decorate([
|
|
3670
|
-
|
|
3414
|
+
$mol_mem
|
|
3671
3415
|
], $mol_plot_pane.prototype, "gap", null);
|
|
3672
3416
|
__decorate([
|
|
3673
|
-
|
|
3417
|
+
$mol_mem
|
|
3674
3418
|
], $mol_plot_pane.prototype, "shift_limit", null);
|
|
3675
3419
|
__decorate([
|
|
3676
|
-
|
|
3420
|
+
$mol_mem
|
|
3677
3421
|
], $mol_plot_pane.prototype, "shift_default", null);
|
|
3678
3422
|
__decorate([
|
|
3679
|
-
|
|
3423
|
+
$mol_mem
|
|
3680
3424
|
], $mol_plot_pane.prototype, "shift", null);
|
|
3681
3425
|
__decorate([
|
|
3682
|
-
|
|
3426
|
+
$mol_mem
|
|
3683
3427
|
], $mol_plot_pane.prototype, "scale_limit", null);
|
|
3684
3428
|
__decorate([
|
|
3685
|
-
|
|
3429
|
+
$mol_mem
|
|
3686
3430
|
], $mol_plot_pane.prototype, "scale_default", null);
|
|
3687
3431
|
__decorate([
|
|
3688
|
-
|
|
3432
|
+
$mol_mem
|
|
3689
3433
|
], $mol_plot_pane.prototype, "scale", null);
|
|
3690
3434
|
__decorate([
|
|
3691
|
-
|
|
3435
|
+
$mol_mem
|
|
3692
3436
|
], $mol_plot_pane.prototype, "scale_x", null);
|
|
3693
3437
|
__decorate([
|
|
3694
|
-
|
|
3438
|
+
$mol_mem
|
|
3695
3439
|
], $mol_plot_pane.prototype, "scale_y", null);
|
|
3696
3440
|
__decorate([
|
|
3697
|
-
|
|
3441
|
+
$mol_mem
|
|
3698
3442
|
], $mol_plot_pane.prototype, "size", null);
|
|
3699
3443
|
__decorate([
|
|
3700
|
-
|
|
3444
|
+
$mol_mem
|
|
3701
3445
|
], $mol_plot_pane.prototype, "size_real", null);
|
|
3702
3446
|
__decorate([
|
|
3703
|
-
|
|
3447
|
+
$mol_mem
|
|
3704
3448
|
], $mol_plot_pane.prototype, "dimensions", null);
|
|
3705
3449
|
__decorate([
|
|
3706
|
-
|
|
3450
|
+
$mol_mem
|
|
3707
3451
|
], $mol_plot_pane.prototype, "dimensions_viewport", null);
|
|
3708
3452
|
__decorate([
|
|
3709
|
-
|
|
3453
|
+
$mol_mem
|
|
3710
3454
|
], $mol_plot_pane.prototype, "gap_x", null);
|
|
3711
3455
|
__decorate([
|
|
3712
|
-
|
|
3456
|
+
$mol_mem
|
|
3713
3457
|
], $mol_plot_pane.prototype, "gap_y", null);
|
|
3714
3458
|
__decorate([
|
|
3715
|
-
|
|
3459
|
+
$mol_mem
|
|
3716
3460
|
], $mol_plot_pane.prototype, "shift_limit_x", null);
|
|
3717
3461
|
__decorate([
|
|
3718
|
-
|
|
3462
|
+
$mol_mem
|
|
3719
3463
|
], $mol_plot_pane.prototype, "shift_limit_y", null);
|
|
3720
3464
|
__decorate([
|
|
3721
|
-
|
|
3465
|
+
$mol_mem
|
|
3722
3466
|
], $mol_plot_pane.prototype, "scale_limit_x", null);
|
|
3723
3467
|
__decorate([
|
|
3724
|
-
|
|
3468
|
+
$mol_mem
|
|
3725
3469
|
], $mol_plot_pane.prototype, "scale_limit_y", null);
|
|
3726
3470
|
__decorate([
|
|
3727
|
-
|
|
3471
|
+
$mol_mem
|
|
3728
3472
|
], $mol_plot_pane.prototype, "dimensions_x", null);
|
|
3729
3473
|
__decorate([
|
|
3730
|
-
|
|
3474
|
+
$mol_mem
|
|
3731
3475
|
], $mol_plot_pane.prototype, "dimensions_y", null);
|
|
3732
3476
|
__decorate([
|
|
3733
|
-
|
|
3477
|
+
$mol_mem
|
|
3734
3478
|
], $mol_plot_pane.prototype, "dimensions_viewport_x", null);
|
|
3735
3479
|
__decorate([
|
|
3736
|
-
|
|
3480
|
+
$mol_mem
|
|
3737
3481
|
], $mol_plot_pane.prototype, "dimensions_viewport_y", null);
|
|
3738
3482
|
__decorate([
|
|
3739
|
-
|
|
3483
|
+
$mol_mem
|
|
3740
3484
|
], $mol_plot_pane.prototype, "zoom", null);
|
|
3741
3485
|
__decorate([
|
|
3742
|
-
|
|
3486
|
+
$mol_mem
|
|
3743
3487
|
], $mol_plot_pane.prototype, "draw_start", null);
|
|
3744
3488
|
__decorate([
|
|
3745
|
-
|
|
3489
|
+
$mol_mem
|
|
3746
3490
|
], $mol_plot_pane.prototype, "draw", null);
|
|
3747
3491
|
__decorate([
|
|
3748
|
-
|
|
3492
|
+
$mol_mem
|
|
3749
3493
|
], $mol_plot_pane.prototype, "draw_end", null);
|
|
3750
3494
|
__decorate([
|
|
3751
|
-
|
|
3495
|
+
$mol_mem
|
|
3752
3496
|
], $mol_plot_pane.prototype, "Touch", null);
|
|
3753
3497
|
$.$mol_plot_pane = $mol_plot_pane;
|
|
3754
3498
|
})($ || ($ = {}));
|
|
3755
|
-
//pane.view.tree.
|
|
3499
|
+
//mol/plot/pane/-view.tree/pane.view.tree.ts
|
|
3500
|
+
;
|
|
3501
|
+
"use strict";
|
|
3502
|
+
var $;
|
|
3503
|
+
(function ($) {
|
|
3504
|
+
function $mol_wire_probe(task, next) {
|
|
3505
|
+
const warm = $mol_wire_fiber.warm;
|
|
3506
|
+
try {
|
|
3507
|
+
$mol_wire_fiber.warm = false;
|
|
3508
|
+
return task();
|
|
3509
|
+
}
|
|
3510
|
+
finally {
|
|
3511
|
+
$mol_wire_fiber.warm = warm;
|
|
3512
|
+
}
|
|
3513
|
+
}
|
|
3514
|
+
$.$mol_wire_probe = $mol_wire_probe;
|
|
3515
|
+
})($ || ($ = {}));
|
|
3516
|
+
//mol/wire/probe/probe.ts
|
|
3517
|
+
;
|
|
3518
|
+
"use strict";
|
|
3519
|
+
var $;
|
|
3520
|
+
(function ($) {
|
|
3521
|
+
$.$mol_mem_cached = $mol_wire_probe;
|
|
3522
|
+
})($ || ($ = {}));
|
|
3523
|
+
//mol/mem/cached/cached.ts
|
|
3756
3524
|
;
|
|
3757
3525
|
"use strict";
|
|
3758
3526
|
var $;
|
|
3759
3527
|
(function ($) {
|
|
3760
|
-
|
|
3528
|
+
$mol_style_attach("mol/plot/pane/pane.view.css", "[mol_plot_pane] {\n\tflex: 1 1 auto;\n\talign-self: stretch;\n\tstroke-width: 2px;\n\tuser-select: none;\n}\n");
|
|
3761
3529
|
})($ || ($ = {}));
|
|
3762
|
-
//pane.view.css.
|
|
3530
|
+
//mol/plot/pane/-css/pane.view.css.ts
|
|
3763
3531
|
;
|
|
3764
3532
|
"use strict";
|
|
3765
3533
|
var $;
|
|
@@ -3769,7 +3537,7 @@ var $;
|
|
|
3769
3537
|
class $mol_plot_pane extends $.$mol_plot_pane {
|
|
3770
3538
|
dimensions() {
|
|
3771
3539
|
const graphs = this.graphs();
|
|
3772
|
-
let next = new this.$.$mol_vector_2d(
|
|
3540
|
+
let next = new this.$.$mol_vector_2d($mol_vector_range_full.inversed, $mol_vector_range_full.inversed);
|
|
3773
3541
|
for (let graph of graphs) {
|
|
3774
3542
|
next = next.expanded2(graph.dimensions());
|
|
3775
3543
|
}
|
|
@@ -3810,13 +3578,13 @@ var $;
|
|
|
3810
3578
|
}
|
|
3811
3579
|
scale_default() {
|
|
3812
3580
|
const limits = this.scale_limit();
|
|
3813
|
-
return new
|
|
3581
|
+
return new $mol_vector_2d(limits.x.min, limits.y.max);
|
|
3814
3582
|
}
|
|
3815
3583
|
scale(next) {
|
|
3816
3584
|
if (next === undefined) {
|
|
3817
3585
|
if (!this.graph_touched)
|
|
3818
3586
|
return this.scale_default();
|
|
3819
|
-
next =
|
|
3587
|
+
next = $mol_mem_cached(() => this.scale()) ?? this.scale_default();
|
|
3820
3588
|
}
|
|
3821
3589
|
this.graph_touched = true;
|
|
3822
3590
|
return next.limited(this.scale_limit());
|
|
@@ -3824,12 +3592,12 @@ var $;
|
|
|
3824
3592
|
scale_x(next) {
|
|
3825
3593
|
return this.scale(next === undefined
|
|
3826
3594
|
? undefined
|
|
3827
|
-
: new
|
|
3595
|
+
: new $mol_vector_2d(next, this.scale().y)).x;
|
|
3828
3596
|
}
|
|
3829
3597
|
scale_y(next) {
|
|
3830
3598
|
return this.scale(next === undefined
|
|
3831
3599
|
? undefined
|
|
3832
|
-
: new
|
|
3600
|
+
: new $mol_vector_2d(this.scale().x, next)).y;
|
|
3833
3601
|
}
|
|
3834
3602
|
shift_limit() {
|
|
3835
3603
|
const dims = this.dimensions();
|
|
@@ -3844,14 +3612,14 @@ var $;
|
|
|
3844
3612
|
}
|
|
3845
3613
|
shift_default() {
|
|
3846
3614
|
const limits = this.shift_limit();
|
|
3847
|
-
return new
|
|
3615
|
+
return new $mol_vector_2d(limits.x.min, limits.y.min);
|
|
3848
3616
|
}
|
|
3849
3617
|
graph_touched = false;
|
|
3850
3618
|
shift(next) {
|
|
3851
3619
|
if (next === undefined) {
|
|
3852
3620
|
if (!this.graph_touched)
|
|
3853
3621
|
return this.shift_default();
|
|
3854
|
-
next =
|
|
3622
|
+
next = $mol_mem_cached(() => this.shift()) ?? this.shift_default();
|
|
3855
3623
|
}
|
|
3856
3624
|
this.graph_touched = true;
|
|
3857
3625
|
return next.limited(this.shift_limit());
|
|
@@ -3918,53 +3686,53 @@ var $;
|
|
|
3918
3686
|
}
|
|
3919
3687
|
}
|
|
3920
3688
|
__decorate([
|
|
3921
|
-
|
|
3689
|
+
$mol_mem
|
|
3922
3690
|
], $mol_plot_pane.prototype, "dimensions", null);
|
|
3923
3691
|
__decorate([
|
|
3924
|
-
|
|
3692
|
+
$mol_mem
|
|
3925
3693
|
], $mol_plot_pane.prototype, "size", null);
|
|
3926
3694
|
__decorate([
|
|
3927
|
-
|
|
3695
|
+
$mol_mem
|
|
3928
3696
|
], $mol_plot_pane.prototype, "graphs_colored", null);
|
|
3929
3697
|
__decorate([
|
|
3930
|
-
|
|
3698
|
+
$mol_mem
|
|
3931
3699
|
], $mol_plot_pane.prototype, "scale_limit", null);
|
|
3932
3700
|
__decorate([
|
|
3933
|
-
|
|
3701
|
+
$mol_mem
|
|
3934
3702
|
], $mol_plot_pane.prototype, "scale", null);
|
|
3935
3703
|
__decorate([
|
|
3936
|
-
|
|
3704
|
+
$mol_mem
|
|
3937
3705
|
], $mol_plot_pane.prototype, "shift_limit", null);
|
|
3938
3706
|
__decorate([
|
|
3939
|
-
|
|
3707
|
+
$mol_mem
|
|
3940
3708
|
], $mol_plot_pane.prototype, "shift_default", null);
|
|
3941
3709
|
__decorate([
|
|
3942
|
-
|
|
3710
|
+
$mol_mem
|
|
3943
3711
|
], $mol_plot_pane.prototype, "shift", null);
|
|
3944
3712
|
__decorate([
|
|
3945
|
-
|
|
3713
|
+
$mol_mem
|
|
3946
3714
|
], $mol_plot_pane.prototype, "graphs_visible", null);
|
|
3947
3715
|
__decorate([
|
|
3948
|
-
|
|
3716
|
+
$mol_mem
|
|
3949
3717
|
], $mol_plot_pane.prototype, "graphs_positioned", null);
|
|
3950
3718
|
__decorate([
|
|
3951
|
-
|
|
3719
|
+
$mol_mem
|
|
3952
3720
|
], $mol_plot_pane.prototype, "dimensions_viewport", null);
|
|
3953
3721
|
__decorate([
|
|
3954
|
-
|
|
3722
|
+
$mol_mem
|
|
3955
3723
|
], $mol_plot_pane.prototype, "viewport", null);
|
|
3956
3724
|
__decorate([
|
|
3957
|
-
|
|
3725
|
+
$mol_mem
|
|
3958
3726
|
], $mol_plot_pane.prototype, "graphs_sorted", null);
|
|
3959
3727
|
$$.$mol_plot_pane = $mol_plot_pane;
|
|
3960
3728
|
})($$ = $.$$ || ($.$$ = {}));
|
|
3961
3729
|
})($ || ($ = {}));
|
|
3962
|
-
//pane.view.
|
|
3730
|
+
//mol/plot/pane/pane.view.ts
|
|
3963
3731
|
;
|
|
3964
3732
|
"use strict";
|
|
3965
3733
|
var $;
|
|
3966
3734
|
(function ($) {
|
|
3967
|
-
class $mol_plot_line extends
|
|
3735
|
+
class $mol_plot_line extends $mol_plot_graph {
|
|
3968
3736
|
threshold() {
|
|
3969
3737
|
return 1;
|
|
3970
3738
|
}
|
|
@@ -3999,18 +3767,18 @@ var $;
|
|
|
3999
3767
|
}
|
|
4000
3768
|
}
|
|
4001
3769
|
__decorate([
|
|
4002
|
-
|
|
3770
|
+
$mol_mem
|
|
4003
3771
|
], $mol_plot_line.prototype, "Sample", null);
|
|
4004
3772
|
$.$mol_plot_line = $mol_plot_line;
|
|
4005
3773
|
})($ || ($ = {}));
|
|
4006
|
-
//line.view.tree.
|
|
3774
|
+
//mol/plot/line/-view.tree/line.view.tree.ts
|
|
4007
3775
|
;
|
|
4008
3776
|
"use strict";
|
|
4009
3777
|
var $;
|
|
4010
3778
|
(function ($) {
|
|
4011
|
-
|
|
3779
|
+
$mol_style_attach("mol/plot/line/line.view.css", "[mol_plot_line] {\n\tcolor: var(--mol_skin_base);\n\tfill: none;\n\tstroke-linejoin: round;\n}\n\n[mol_plot_line_sample] {\n\theight: 0;\n\tleft: 0;\n\tright: 0;\n\tbottom: 0;\n\tborder-width: 2px 0 0;\n\tposition: absolute;\n\ttop: .75em;\n\ttransform: translateY(-50%);\n}\n");
|
|
4012
3780
|
})($ || ($ = {}));
|
|
4013
|
-
//line.view.css.
|
|
3781
|
+
//mol/plot/line/-css/line.view.css.ts
|
|
4014
3782
|
;
|
|
4015
3783
|
"use strict";
|
|
4016
3784
|
var $;
|
|
@@ -4027,17 +3795,17 @@ var $;
|
|
|
4027
3795
|
const [shift_x, shift_y] = this.shift();
|
|
4028
3796
|
const [scale_x, scale_y] = this.scale();
|
|
4029
3797
|
const indexes = [];
|
|
4030
|
-
let last = new
|
|
4031
|
-
let last_zone = new
|
|
3798
|
+
let last = new $mol_vector_2d(Number.NEGATIVE_INFINITY, Number.NEGATIVE_INFINITY);
|
|
3799
|
+
let last_zone = new $mol_vector_2d(0, 0);
|
|
4032
3800
|
const series_x = this.series_x();
|
|
4033
3801
|
const series_y = this.series_y();
|
|
4034
|
-
const zone_of = (point) => new
|
|
3802
|
+
const zone_of = (point) => new $mol_vector_2d(point.x < viewport_left ? -1
|
|
4035
3803
|
: point.x > viewport_right ? 1
|
|
4036
3804
|
: 0, point.y < viewport_bottom ? -1
|
|
4037
3805
|
: point.y > viewport_top ? 1
|
|
4038
3806
|
: 0);
|
|
4039
3807
|
for (let i = 0; i < series_x.length - 1; i++) {
|
|
4040
|
-
const scaled = new
|
|
3808
|
+
const scaled = new $mol_vector_2d(Math.round(shift_x + this.repos_x(series_x[i]) * scale_x), Math.round(shift_y + this.repos_y(series_y[i]) * scale_y));
|
|
4041
3809
|
if (Math.abs(scaled.x - last.x) < threshold
|
|
4042
3810
|
&& Math.abs(scaled.y - last.y) < threshold)
|
|
4043
3811
|
continue;
|
|
@@ -4064,17 +3832,17 @@ var $;
|
|
|
4064
3832
|
}
|
|
4065
3833
|
}
|
|
4066
3834
|
__decorate([
|
|
4067
|
-
|
|
3835
|
+
$mol_mem
|
|
4068
3836
|
], $mol_plot_line.prototype, "indexes", null);
|
|
4069
3837
|
$$.$mol_plot_line = $mol_plot_line;
|
|
4070
3838
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4071
3839
|
})($ || ($ = {}));
|
|
4072
|
-
//line.view.
|
|
3840
|
+
//mol/plot/line/line.view.ts
|
|
4073
3841
|
;
|
|
4074
3842
|
"use strict";
|
|
4075
3843
|
var $;
|
|
4076
3844
|
(function ($) {
|
|
4077
|
-
class $mol_plot_group extends
|
|
3845
|
+
class $mol_plot_group extends $mol_plot_graph {
|
|
4078
3846
|
sub() {
|
|
4079
3847
|
return this.graphs_enriched();
|
|
4080
3848
|
}
|
|
@@ -4094,11 +3862,11 @@ var $;
|
|
|
4094
3862
|
}
|
|
4095
3863
|
}
|
|
4096
3864
|
__decorate([
|
|
4097
|
-
|
|
3865
|
+
$mol_mem
|
|
4098
3866
|
], $mol_plot_group.prototype, "Sample", null);
|
|
4099
3867
|
$.$mol_plot_group = $mol_plot_group;
|
|
4100
3868
|
})($ || ($ = {}));
|
|
4101
|
-
//group.view.tree.
|
|
3869
|
+
//mol/plot/group/-view.tree/group.view.tree.ts
|
|
4102
3870
|
;
|
|
4103
3871
|
"use strict";
|
|
4104
3872
|
var $;
|
|
@@ -4127,7 +3895,7 @@ var $;
|
|
|
4127
3895
|
}
|
|
4128
3896
|
dimensions() {
|
|
4129
3897
|
const graphs = this.graphs_enriched();
|
|
4130
|
-
let next = new this.$.$mol_vector_2d(
|
|
3898
|
+
let next = new this.$.$mol_vector_2d($mol_vector_range_full.inversed, $mol_vector_range_full.inversed);
|
|
4131
3899
|
for (let graph of graphs) {
|
|
4132
3900
|
next = next.expanded2(graph.dimensions());
|
|
4133
3901
|
}
|
|
@@ -4152,23 +3920,23 @@ var $;
|
|
|
4152
3920
|
}
|
|
4153
3921
|
}
|
|
4154
3922
|
__decorate([
|
|
4155
|
-
|
|
3923
|
+
$mol_mem
|
|
4156
3924
|
], $mol_plot_group.prototype, "graphs_enriched", null);
|
|
4157
3925
|
__decorate([
|
|
4158
|
-
|
|
3926
|
+
$mol_mem
|
|
4159
3927
|
], $mol_plot_group.prototype, "dimensions", null);
|
|
4160
3928
|
__decorate([
|
|
4161
|
-
|
|
3929
|
+
$mol_mem
|
|
4162
3930
|
], $mol_plot_group.prototype, "graph_samples", null);
|
|
4163
3931
|
$$.$mol_plot_group = $mol_plot_group;
|
|
4164
3932
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4165
3933
|
})($ || ($ = {}));
|
|
4166
|
-
//group.view.
|
|
3934
|
+
//mol/plot/group/group.view.ts
|
|
4167
3935
|
;
|
|
4168
3936
|
"use strict";
|
|
4169
3937
|
var $;
|
|
4170
3938
|
(function ($) {
|
|
4171
|
-
class $mol_svg_path extends
|
|
3939
|
+
class $mol_svg_path extends $mol_svg {
|
|
4172
3940
|
dom_name() {
|
|
4173
3941
|
return "path";
|
|
4174
3942
|
}
|
|
@@ -4184,12 +3952,12 @@ var $;
|
|
|
4184
3952
|
}
|
|
4185
3953
|
$.$mol_svg_path = $mol_svg_path;
|
|
4186
3954
|
})($ || ($ = {}));
|
|
4187
|
-
//path.view.tree.
|
|
3955
|
+
//mol/svg/path/-view.tree/path.view.tree.ts
|
|
4188
3956
|
;
|
|
4189
3957
|
"use strict";
|
|
4190
3958
|
var $;
|
|
4191
3959
|
(function ($) {
|
|
4192
|
-
class $mol_plot_dot extends
|
|
3960
|
+
class $mol_plot_dot extends $mol_plot_graph {
|
|
4193
3961
|
points_max() {
|
|
4194
3962
|
return Infinity;
|
|
4195
3963
|
}
|
|
@@ -4226,14 +3994,14 @@ var $;
|
|
|
4226
3994
|
}
|
|
4227
3995
|
}
|
|
4228
3996
|
__decorate([
|
|
4229
|
-
|
|
3997
|
+
$mol_mem
|
|
4230
3998
|
], $mol_plot_dot.prototype, "Sample", null);
|
|
4231
3999
|
__decorate([
|
|
4232
|
-
|
|
4000
|
+
$mol_mem
|
|
4233
4001
|
], $mol_plot_dot.prototype, "Curve", null);
|
|
4234
4002
|
$.$mol_plot_dot = $mol_plot_dot;
|
|
4235
4003
|
})($ || ($ = {}));
|
|
4236
|
-
//dot.view.tree.
|
|
4004
|
+
//mol/plot/dot/-view.tree/dot.view.tree.ts
|
|
4237
4005
|
;
|
|
4238
4006
|
"use strict";
|
|
4239
4007
|
var $;
|
|
@@ -4251,14 +4019,14 @@ var $;
|
|
|
4251
4019
|
}
|
|
4252
4020
|
$.$mol_coord_low = $mol_coord_low;
|
|
4253
4021
|
})($ || ($ = {}));
|
|
4254
|
-
//coord.
|
|
4022
|
+
//mol/coord/coord.ts
|
|
4255
4023
|
;
|
|
4256
4024
|
"use strict";
|
|
4257
4025
|
var $;
|
|
4258
4026
|
(function ($) {
|
|
4259
|
-
|
|
4027
|
+
$mol_style_attach("mol/plot/dot/dot.view.css", "[mol_plot_dot] {\n\tcolor: var(--mol_skin_base);\n\tstroke-linecap: round;\n\tfill: none;\n}\n\n[mol_plot_dot_sample] {\n\twidth: .5rem;\n\theight: .5rem;\n\tborder-radius: 1rem;\n\tbackground: currentColor;\n\tposition: absolute;\n\ttop: .75em;\n\tleft: 50%;\n\ttransform: translate(-50%, -50%);\n}\n");
|
|
4260
4028
|
})($ || ($ = {}));
|
|
4261
|
-
//dot.view.css.
|
|
4029
|
+
//mol/plot/dot/-css/dot.view.css.ts
|
|
4262
4030
|
;
|
|
4263
4031
|
"use strict";
|
|
4264
4032
|
var $;
|
|
@@ -4307,7 +4075,7 @@ var $;
|
|
|
4307
4075
|
if (scaled_y > viewport_top)
|
|
4308
4076
|
continue;
|
|
4309
4077
|
if (spacing !== 0) {
|
|
4310
|
-
const key =
|
|
4078
|
+
const key = $mol_coord_pack(Math.round(point_x * scale_x / spacing) * spacing, Math.round(point_y * scale_y / spacing) * spacing);
|
|
4311
4079
|
if (filled.has(key))
|
|
4312
4080
|
continue;
|
|
4313
4081
|
filled.add(key);
|
|
@@ -4335,20 +4103,20 @@ var $;
|
|
|
4335
4103
|
}
|
|
4336
4104
|
}
|
|
4337
4105
|
__decorate([
|
|
4338
|
-
|
|
4106
|
+
$mol_mem
|
|
4339
4107
|
], $mol_plot_dot.prototype, "filled", null);
|
|
4340
4108
|
__decorate([
|
|
4341
|
-
|
|
4109
|
+
$mol_mem
|
|
4342
4110
|
], $mol_plot_dot.prototype, "indexes", null);
|
|
4343
4111
|
$$.$mol_plot_dot = $mol_plot_dot;
|
|
4344
4112
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4345
4113
|
})($ || ($ = {}));
|
|
4346
|
-
//dot.view.
|
|
4114
|
+
//mol/plot/dot/dot.view.ts
|
|
4347
4115
|
;
|
|
4348
4116
|
"use strict";
|
|
4349
4117
|
var $;
|
|
4350
4118
|
(function ($) {
|
|
4351
|
-
class $mol_plot_map_heat extends
|
|
4119
|
+
class $mol_plot_map_heat extends $mol_plot_group {
|
|
4352
4120
|
series_z() {
|
|
4353
4121
|
return [];
|
|
4354
4122
|
}
|
|
@@ -4389,13 +4157,13 @@ var $;
|
|
|
4389
4157
|
}
|
|
4390
4158
|
}
|
|
4391
4159
|
__decorate([
|
|
4392
|
-
|
|
4160
|
+
$mol_mem_key
|
|
4393
4161
|
], $mol_plot_map_heat.prototype, "Level", null);
|
|
4394
4162
|
__decorate([
|
|
4395
|
-
|
|
4163
|
+
$mol_mem
|
|
4396
4164
|
], $mol_plot_map_heat.prototype, "Sample", null);
|
|
4397
4165
|
$.$mol_plot_map_heat = $mol_plot_map_heat;
|
|
4398
|
-
class $mol_plot_map_heat_level extends
|
|
4166
|
+
class $mol_plot_map_heat_level extends $mol_plot_dot {
|
|
4399
4167
|
style() {
|
|
4400
4168
|
return {
|
|
4401
4169
|
...super.style(),
|
|
@@ -4408,14 +4176,14 @@ var $;
|
|
|
4408
4176
|
}
|
|
4409
4177
|
$.$mol_plot_map_heat_level = $mol_plot_map_heat_level;
|
|
4410
4178
|
})($ || ($ = {}));
|
|
4411
|
-
//heat.view.tree.
|
|
4179
|
+
//mol/plot/map/heat/-view.tree/heat.view.tree.ts
|
|
4412
4180
|
;
|
|
4413
4181
|
"use strict";
|
|
4414
4182
|
var $;
|
|
4415
4183
|
(function ($) {
|
|
4416
|
-
|
|
4184
|
+
$mol_style_attach("mol/plot/map/heat/heat.view.css", "[mol_plot_map_heat_level_curve] {\n\tstroke-linecap: square;\n\tfill: none;\n}\n");
|
|
4417
4185
|
})($ || ($ = {}));
|
|
4418
|
-
//heat.view.css.
|
|
4186
|
+
//mol/plot/map/heat/-css/heat.view.css.ts
|
|
4419
4187
|
;
|
|
4420
4188
|
"use strict";
|
|
4421
4189
|
var $;
|
|
@@ -4455,35 +4223,35 @@ var $;
|
|
|
4455
4223
|
}
|
|
4456
4224
|
}
|
|
4457
4225
|
__decorate([
|
|
4458
|
-
|
|
4226
|
+
$mol_mem
|
|
4459
4227
|
], $mol_plot_map_heat.prototype, "levels", null);
|
|
4460
4228
|
__decorate([
|
|
4461
|
-
|
|
4229
|
+
$mol_mem
|
|
4462
4230
|
], $mol_plot_map_heat.prototype, "level_graphs", null);
|
|
4463
4231
|
__decorate([
|
|
4464
|
-
|
|
4232
|
+
$mol_mem_key
|
|
4465
4233
|
], $mol_plot_map_heat.prototype, "level_points", null);
|
|
4466
4234
|
__decorate([
|
|
4467
|
-
|
|
4235
|
+
$mol_mem_key
|
|
4468
4236
|
], $mol_plot_map_heat.prototype, "level_opacity", null);
|
|
4469
4237
|
__decorate([
|
|
4470
|
-
|
|
4238
|
+
$mol_mem
|
|
4471
4239
|
], $mol_plot_map_heat.prototype, "level_diameter", null);
|
|
4472
4240
|
__decorate([
|
|
4473
|
-
|
|
4241
|
+
$mol_mem
|
|
4474
4242
|
], $mol_plot_map_heat.prototype, "level_aspect", null);
|
|
4475
4243
|
__decorate([
|
|
4476
|
-
|
|
4244
|
+
$mol_mem_key
|
|
4477
4245
|
], $mol_plot_map_heat.prototype, "level_hint", null);
|
|
4478
4246
|
$$.$mol_plot_map_heat = $mol_plot_map_heat;
|
|
4479
4247
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4480
4248
|
})($ || ($ = {}));
|
|
4481
|
-
//heat.view.
|
|
4249
|
+
//mol/plot/map/heat/heat.view.ts
|
|
4482
4250
|
;
|
|
4483
4251
|
"use strict";
|
|
4484
4252
|
var $;
|
|
4485
4253
|
(function ($) {
|
|
4486
|
-
class $mol_plot_bar extends
|
|
4254
|
+
class $mol_plot_bar extends $mol_plot_graph {
|
|
4487
4255
|
style() {
|
|
4488
4256
|
return {
|
|
4489
4257
|
...super.style(),
|
|
@@ -4514,21 +4282,21 @@ var $;
|
|
|
4514
4282
|
}
|
|
4515
4283
|
}
|
|
4516
4284
|
__decorate([
|
|
4517
|
-
|
|
4285
|
+
$mol_mem
|
|
4518
4286
|
], $mol_plot_bar.prototype, "Sample", null);
|
|
4519
4287
|
__decorate([
|
|
4520
|
-
|
|
4288
|
+
$mol_mem
|
|
4521
4289
|
], $mol_plot_bar.prototype, "Curve", null);
|
|
4522
4290
|
$.$mol_plot_bar = $mol_plot_bar;
|
|
4523
4291
|
})($ || ($ = {}));
|
|
4524
|
-
//bar.view.tree.
|
|
4292
|
+
//mol/plot/bar/-view.tree/bar.view.tree.ts
|
|
4525
4293
|
;
|
|
4526
4294
|
"use strict";
|
|
4527
4295
|
var $;
|
|
4528
4296
|
(function ($) {
|
|
4529
|
-
|
|
4297
|
+
$mol_style_attach("mol/plot/bar/bar.view.css", "[mol_plot_bar] {\n\tcolor: var(--mol_skin_base);\n\tstroke-linecap: butt;\n\tstroke-width: 1rem;\n}\n\n[mol_plot_bar_sample] {\n\tbackground: currentColor;\n\tposition: absolute;\n\ttop:0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n}\n");
|
|
4530
4298
|
})($ || ($ = {}));
|
|
4531
|
-
//bar.view.css.
|
|
4299
|
+
//mol/plot/bar/-css/bar.view.css.ts
|
|
4532
4300
|
;
|
|
4533
4301
|
"use strict";
|
|
4534
4302
|
var $;
|
|
@@ -4590,7 +4358,7 @@ var $;
|
|
|
4590
4358
|
return `hsl( ${this.hue()} , 70% , 85% )`;
|
|
4591
4359
|
}
|
|
4592
4360
|
dimensions() {
|
|
4593
|
-
let next = new this.$.$mol_vector_2d(
|
|
4361
|
+
let next = new this.$.$mol_vector_2d($mol_vector_range_full.inversed, new this.$.$mol_vector_range(0, 0));
|
|
4594
4362
|
const series_x = this.series_x();
|
|
4595
4363
|
const series_y = this.series_y();
|
|
4596
4364
|
for (let i = 0; i < series_x.length; i++) {
|
|
@@ -4602,34 +4370,34 @@ var $;
|
|
|
4602
4370
|
}
|
|
4603
4371
|
}
|
|
4604
4372
|
__decorate([
|
|
4605
|
-
|
|
4373
|
+
$mol_mem
|
|
4606
4374
|
], $mol_plot_bar.prototype, "indexes", null);
|
|
4607
4375
|
__decorate([
|
|
4608
|
-
|
|
4376
|
+
$mol_mem
|
|
4609
4377
|
], $mol_plot_bar.prototype, "dimensions", null);
|
|
4610
4378
|
$$.$mol_plot_bar = $mol_plot_bar;
|
|
4611
4379
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4612
4380
|
})($ || ($ = {}));
|
|
4613
|
-
//bar.view.
|
|
4381
|
+
//mol/plot/bar/bar.view.ts
|
|
4614
4382
|
;
|
|
4615
4383
|
"use strict";
|
|
4616
4384
|
var $;
|
|
4617
4385
|
(function ($) {
|
|
4618
|
-
class $mol_plot_fill extends
|
|
4386
|
+
class $mol_plot_fill extends $mol_plot_line {
|
|
4619
4387
|
threshold() {
|
|
4620
4388
|
return 4;
|
|
4621
4389
|
}
|
|
4622
4390
|
}
|
|
4623
4391
|
$.$mol_plot_fill = $mol_plot_fill;
|
|
4624
4392
|
})($ || ($ = {}));
|
|
4625
|
-
//fill.view.tree.
|
|
4393
|
+
//mol/plot/fill/-view.tree/fill.view.tree.ts
|
|
4626
4394
|
;
|
|
4627
4395
|
"use strict";
|
|
4628
4396
|
var $;
|
|
4629
4397
|
(function ($) {
|
|
4630
|
-
|
|
4398
|
+
$mol_style_attach("mol/plot/fill/fill.view.css", "[mol_plot_fill] {\n\tstroke: none;\n\tstroke-width: 0;\n\topacity: .1;\n\tfill: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_fill_sample] {\n\topacity: .1;\n\tbackground: currentColor;\n\tposition: absolute;\n\tbottom: 0;\n\ttop: .75em;\n\tleft: 0;\n\tright: 0;\n}\n");
|
|
4631
4399
|
})($ || ($ = {}));
|
|
4632
|
-
//fill.view.css.
|
|
4400
|
+
//mol/plot/fill/-css/fill.view.css.ts
|
|
4633
4401
|
;
|
|
4634
4402
|
"use strict";
|
|
4635
4403
|
var $;
|
|
@@ -4655,12 +4423,12 @@ var $;
|
|
|
4655
4423
|
$$.$mol_plot_fill = $mol_plot_fill;
|
|
4656
4424
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4657
4425
|
})($ || ($ = {}));
|
|
4658
|
-
//fill.view.
|
|
4426
|
+
//mol/plot/fill/fill.view.ts
|
|
4659
4427
|
;
|
|
4660
4428
|
"use strict";
|
|
4661
4429
|
var $;
|
|
4662
4430
|
(function ($) {
|
|
4663
|
-
class $mol_svg_text extends
|
|
4431
|
+
class $mol_svg_text extends $mol_svg {
|
|
4664
4432
|
dom_name() {
|
|
4665
4433
|
return "text";
|
|
4666
4434
|
}
|
|
@@ -4695,14 +4463,14 @@ var $;
|
|
|
4695
4463
|
}
|
|
4696
4464
|
$.$mol_svg_text = $mol_svg_text;
|
|
4697
4465
|
})($ || ($ = {}));
|
|
4698
|
-
//text.view.tree.
|
|
4466
|
+
//mol/svg/text/-view.tree/text.view.tree.ts
|
|
4699
4467
|
;
|
|
4700
4468
|
"use strict";
|
|
4701
4469
|
var $;
|
|
4702
4470
|
(function ($) {
|
|
4703
|
-
|
|
4471
|
+
$mol_style_attach("mol/svg/text/text.view.css", "[mol_svg_text] {\n\tfill: currentColor;\n\tstroke: none;\n}\n");
|
|
4704
4472
|
})($ || ($ = {}));
|
|
4705
|
-
//text.view.css.
|
|
4473
|
+
//mol/svg/text/-css/text.view.css.ts
|
|
4706
4474
|
;
|
|
4707
4475
|
"use strict";
|
|
4708
4476
|
var $;
|
|
@@ -4720,12 +4488,12 @@ var $;
|
|
|
4720
4488
|
$$.$mol_svg_text = $mol_svg_text;
|
|
4721
4489
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4722
4490
|
})($ || ($ = {}));
|
|
4723
|
-
//text.view.
|
|
4491
|
+
//mol/svg/text/text.view.ts
|
|
4724
4492
|
;
|
|
4725
4493
|
"use strict";
|
|
4726
4494
|
var $;
|
|
4727
4495
|
(function ($) {
|
|
4728
|
-
class $mol_svg_rect extends
|
|
4496
|
+
class $mol_svg_rect extends $mol_svg {
|
|
4729
4497
|
dom_name() {
|
|
4730
4498
|
return "rect";
|
|
4731
4499
|
}
|
|
@@ -4756,7 +4524,7 @@ var $;
|
|
|
4756
4524
|
}
|
|
4757
4525
|
$.$mol_svg_rect = $mol_svg_rect;
|
|
4758
4526
|
})($ || ($ = {}));
|
|
4759
|
-
//rect.view.tree.
|
|
4527
|
+
//mol/svg/rect/-view.tree/rect.view.tree.ts
|
|
4760
4528
|
;
|
|
4761
4529
|
"use strict";
|
|
4762
4530
|
var $;
|
|
@@ -4774,12 +4542,12 @@ var $;
|
|
|
4774
4542
|
$$.$mol_svg_rect = $mol_svg_rect;
|
|
4775
4543
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4776
4544
|
})($ || ($ = {}));
|
|
4777
|
-
//rect.view.
|
|
4545
|
+
//mol/svg/rect/rect.view.ts
|
|
4778
4546
|
;
|
|
4779
4547
|
"use strict";
|
|
4780
4548
|
var $;
|
|
4781
4549
|
(function ($) {
|
|
4782
|
-
class $mol_svg_text_box extends
|
|
4550
|
+
class $mol_svg_text_box extends $mol_svg_group {
|
|
4783
4551
|
font_size() {
|
|
4784
4552
|
return 16;
|
|
4785
4553
|
}
|
|
@@ -4840,14 +4608,14 @@ var $;
|
|
|
4840
4608
|
}
|
|
4841
4609
|
}
|
|
4842
4610
|
__decorate([
|
|
4843
|
-
|
|
4611
|
+
$mol_mem
|
|
4844
4612
|
], $mol_svg_text_box.prototype, "Back", null);
|
|
4845
4613
|
__decorate([
|
|
4846
|
-
|
|
4614
|
+
$mol_mem
|
|
4847
4615
|
], $mol_svg_text_box.prototype, "Text", null);
|
|
4848
4616
|
$.$mol_svg_text_box = $mol_svg_text_box;
|
|
4849
4617
|
})($ || ($ = {}));
|
|
4850
|
-
//box.view.tree.
|
|
4618
|
+
//mol/svg/text/box/-view.tree/box.view.tree.ts
|
|
4851
4619
|
;
|
|
4852
4620
|
"use strict";
|
|
4853
4621
|
var $;
|
|
@@ -4855,31 +4623,31 @@ var $;
|
|
|
4855
4623
|
let canvas;
|
|
4856
4624
|
function $mol_font_canvas(next = canvas) {
|
|
4857
4625
|
if (!next)
|
|
4858
|
-
next =
|
|
4626
|
+
next = $mol_dom_context.document.createElement('canvas').getContext('2d');
|
|
4859
4627
|
return canvas = next;
|
|
4860
4628
|
}
|
|
4861
4629
|
$.$mol_font_canvas = $mol_font_canvas;
|
|
4862
4630
|
})($ || ($ = {}));
|
|
4863
|
-
//canvas.
|
|
4631
|
+
//mol/font/canvas/canvas.ts
|
|
4864
4632
|
;
|
|
4865
4633
|
"use strict";
|
|
4866
4634
|
var $;
|
|
4867
4635
|
(function ($) {
|
|
4868
4636
|
function $mol_font_measure(size, face, text) {
|
|
4869
|
-
const canvas =
|
|
4637
|
+
const canvas = $mol_font_canvas();
|
|
4870
4638
|
canvas.font = size + 'px ' + face;
|
|
4871
4639
|
return canvas.measureText(text).width;
|
|
4872
4640
|
}
|
|
4873
4641
|
$.$mol_font_measure = $mol_font_measure;
|
|
4874
4642
|
})($ || ($ = {}));
|
|
4875
|
-
//measure.
|
|
4643
|
+
//mol/font/measure/measure.ts
|
|
4876
4644
|
;
|
|
4877
4645
|
"use strict";
|
|
4878
4646
|
var $;
|
|
4879
4647
|
(function ($) {
|
|
4880
|
-
|
|
4648
|
+
$mol_style_attach("mol/svg/text/box/box.view.css", "[mol_svg_text_box_back] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n}\n");
|
|
4881
4649
|
})($ || ($ = {}));
|
|
4882
|
-
//box.view.css.
|
|
4650
|
+
//mol/svg/text/box/-css/box.view.css.ts
|
|
4883
4651
|
;
|
|
4884
4652
|
"use strict";
|
|
4885
4653
|
var $;
|
|
@@ -4891,7 +4659,7 @@ var $;
|
|
|
4891
4659
|
return `${this.width()}px`;
|
|
4892
4660
|
}
|
|
4893
4661
|
width() {
|
|
4894
|
-
return
|
|
4662
|
+
return $mol_font_measure(this.font_size(), this.font_family(), this.text());
|
|
4895
4663
|
}
|
|
4896
4664
|
box_pos_x() {
|
|
4897
4665
|
const align = this.align();
|
|
@@ -4906,17 +4674,17 @@ var $;
|
|
|
4906
4674
|
}
|
|
4907
4675
|
}
|
|
4908
4676
|
__decorate([
|
|
4909
|
-
|
|
4677
|
+
$mol_mem
|
|
4910
4678
|
], $mol_svg_text_box.prototype, "width", null);
|
|
4911
4679
|
$$.$mol_svg_text_box = $mol_svg_text_box;
|
|
4912
4680
|
})($$ = $.$$ || ($.$$ = {}));
|
|
4913
4681
|
})($ || ($ = {}));
|
|
4914
|
-
//box.view.
|
|
4682
|
+
//mol/svg/text/box/box.view.ts
|
|
4915
4683
|
;
|
|
4916
4684
|
"use strict";
|
|
4917
4685
|
var $;
|
|
4918
4686
|
(function ($) {
|
|
4919
|
-
class $mol_plot_ruler extends
|
|
4687
|
+
class $mol_plot_ruler extends $mol_plot_graph {
|
|
4920
4688
|
step() {
|
|
4921
4689
|
return 0;
|
|
4922
4690
|
}
|
|
@@ -5031,29 +4799,29 @@ var $;
|
|
|
5031
4799
|
}
|
|
5032
4800
|
}
|
|
5033
4801
|
__decorate([
|
|
5034
|
-
|
|
4802
|
+
$mol_mem
|
|
5035
4803
|
], $mol_plot_ruler.prototype, "dimensions_axis", null);
|
|
5036
4804
|
__decorate([
|
|
5037
|
-
|
|
4805
|
+
$mol_mem
|
|
5038
4806
|
], $mol_plot_ruler.prototype, "viewport_axis", null);
|
|
5039
4807
|
__decorate([
|
|
5040
|
-
|
|
4808
|
+
$mol_mem
|
|
5041
4809
|
], $mol_plot_ruler.prototype, "normalize", null);
|
|
5042
4810
|
__decorate([
|
|
5043
|
-
|
|
4811
|
+
$mol_mem_key
|
|
5044
4812
|
], $mol_plot_ruler.prototype, "Label", null);
|
|
5045
4813
|
__decorate([
|
|
5046
|
-
|
|
4814
|
+
$mol_mem
|
|
5047
4815
|
], $mol_plot_ruler.prototype, "Background", null);
|
|
5048
4816
|
__decorate([
|
|
5049
|
-
|
|
4817
|
+
$mol_mem
|
|
5050
4818
|
], $mol_plot_ruler.prototype, "Curve", null);
|
|
5051
4819
|
__decorate([
|
|
5052
|
-
|
|
4820
|
+
$mol_mem
|
|
5053
4821
|
], $mol_plot_ruler.prototype, "Title", null);
|
|
5054
4822
|
$.$mol_plot_ruler = $mol_plot_ruler;
|
|
5055
4823
|
})($ || ($ = {}));
|
|
5056
|
-
//ruler.view.tree.
|
|
4824
|
+
//mol/plot/ruler/-view.tree/ruler.view.tree.ts
|
|
5057
4825
|
;
|
|
5058
4826
|
"use strict";
|
|
5059
4827
|
var $;
|
|
@@ -5070,14 +4838,14 @@ var $;
|
|
|
5070
4838
|
}
|
|
5071
4839
|
$.$mol_math_round_expand = $mol_math_round_expand;
|
|
5072
4840
|
})($ || ($ = {}));
|
|
5073
|
-
//expand.
|
|
4841
|
+
//mol/math/round/expand/expand.ts
|
|
5074
4842
|
;
|
|
5075
4843
|
"use strict";
|
|
5076
4844
|
var $;
|
|
5077
4845
|
(function ($) {
|
|
5078
|
-
|
|
4846
|
+
$mol_style_attach("mol/plot/ruler/ruler.view.css", "[mol_plot_ruler_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n}\n\n[mol_plot_ruler_label] {\n\tcolor: var(--mol_theme_text);\n}\n\n[mol_plot_ruler_title] {\n\tcolor: var(--mol_theme_shade);\n\tbackground-color: var(--mol_theme_back);\n}\n\n[mol_plot_ruler_background] {\n\tstroke: none;\n\tfill: var(--mol_theme_back);\n\topacity: 0.8;\n}\n");
|
|
5079
4847
|
})($ || ($ = {}));
|
|
5080
|
-
//ruler.view.css.
|
|
4848
|
+
//mol/plot/ruler/-css/ruler.view.css.ts
|
|
5081
4849
|
;
|
|
5082
4850
|
"use strict";
|
|
5083
4851
|
var $;
|
|
@@ -5093,7 +4861,7 @@ var $;
|
|
|
5093
4861
|
const dims = this.dimensions_axis();
|
|
5094
4862
|
const range = dims.max - dims.min;
|
|
5095
4863
|
const min_width = (Math.abs(Math.log10(range)) + 2) * 15;
|
|
5096
|
-
const size =
|
|
4864
|
+
const size = $mol_math_round_expand(range, -1);
|
|
5097
4865
|
const count = Math.max(1, Math.pow(10, Math.floor(Math.log(size * scale / min_width) / Math.log(10))));
|
|
5098
4866
|
let step = size / count;
|
|
5099
4867
|
const step_max = min_width * 2 / scale;
|
|
@@ -5150,23 +4918,23 @@ var $;
|
|
|
5150
4918
|
}
|
|
5151
4919
|
}
|
|
5152
4920
|
__decorate([
|
|
5153
|
-
|
|
4921
|
+
$mol_mem
|
|
5154
4922
|
], $mol_plot_ruler.prototype, "step", null);
|
|
5155
4923
|
__decorate([
|
|
5156
|
-
|
|
4924
|
+
$mol_mem
|
|
5157
4925
|
], $mol_plot_ruler.prototype, "axis_points", null);
|
|
5158
4926
|
__decorate([
|
|
5159
|
-
|
|
4927
|
+
$mol_mem
|
|
5160
4928
|
], $mol_plot_ruler.prototype, "precision", null);
|
|
5161
4929
|
$$.$mol_plot_ruler = $mol_plot_ruler;
|
|
5162
4930
|
})($$ = $.$$ || ($.$$ = {}));
|
|
5163
4931
|
})($ || ($ = {}));
|
|
5164
|
-
//ruler.view.
|
|
4932
|
+
//mol/plot/ruler/ruler.view.ts
|
|
5165
4933
|
;
|
|
5166
4934
|
"use strict";
|
|
5167
4935
|
var $;
|
|
5168
4936
|
(function ($) {
|
|
5169
|
-
class $mol_plot_ruler_vert extends
|
|
4937
|
+
class $mol_plot_ruler_vert extends $mol_plot_ruler {
|
|
5170
4938
|
title_align() {
|
|
5171
4939
|
return "end";
|
|
5172
4940
|
}
|
|
@@ -5188,14 +4956,14 @@ var $;
|
|
|
5188
4956
|
}
|
|
5189
4957
|
$.$mol_plot_ruler_vert = $mol_plot_ruler_vert;
|
|
5190
4958
|
})($ || ($ = {}));
|
|
5191
|
-
//vert.view.tree.
|
|
4959
|
+
//mol/plot/ruler/vert/-view.tree/vert.view.tree.ts
|
|
5192
4960
|
;
|
|
5193
4961
|
"use strict";
|
|
5194
4962
|
var $;
|
|
5195
4963
|
(function ($) {
|
|
5196
|
-
|
|
4964
|
+
$mol_style_attach("mol/plot/ruler/vert/vert.view.css", "[mol_plot_ruler_vert_label] {\n\ttransform: translateY( 4px );\n}\n");
|
|
5197
4965
|
})($ || ($ = {}));
|
|
5198
|
-
//vert.view.css.
|
|
4966
|
+
//mol/plot/ruler/vert/-css/vert.view.css.ts
|
|
5199
4967
|
;
|
|
5200
4968
|
"use strict";
|
|
5201
4969
|
var $;
|
|
@@ -5237,12 +5005,12 @@ var $;
|
|
|
5237
5005
|
$$.$mol_plot_ruler_vert = $mol_plot_ruler_vert;
|
|
5238
5006
|
})($$ = $.$$ || ($.$$ = {}));
|
|
5239
5007
|
})($ || ($ = {}));
|
|
5240
|
-
//vert.view.
|
|
5008
|
+
//mol/plot/ruler/vert/vert.view.ts
|
|
5241
5009
|
;
|
|
5242
5010
|
"use strict";
|
|
5243
5011
|
var $;
|
|
5244
5012
|
(function ($) {
|
|
5245
|
-
class $mol_plot_ruler_hor extends
|
|
5013
|
+
class $mol_plot_ruler_hor extends $mol_plot_ruler {
|
|
5246
5014
|
title_align() {
|
|
5247
5015
|
return "start";
|
|
5248
5016
|
}
|
|
@@ -5264,14 +5032,14 @@ var $;
|
|
|
5264
5032
|
}
|
|
5265
5033
|
$.$mol_plot_ruler_hor = $mol_plot_ruler_hor;
|
|
5266
5034
|
})($ || ($ = {}));
|
|
5267
|
-
//hor.view.tree.
|
|
5035
|
+
//mol/plot/ruler/hor/-view.tree/hor.view.tree.ts
|
|
5268
5036
|
;
|
|
5269
5037
|
"use strict";
|
|
5270
5038
|
var $;
|
|
5271
5039
|
(function ($) {
|
|
5272
|
-
|
|
5040
|
+
$mol_style_attach("mol/plot/ruler/hor/hor.view.css", "[mol_plot_ruler_hor_label] {\n\ttransform: translateY( -4px );\n}\n\n[mol_plot_ruler_hor_title] {\n\ttransform: translateY( -4px );\n}\n");
|
|
5273
5041
|
})($ || ($ = {}));
|
|
5274
|
-
//hor.view.css.
|
|
5042
|
+
//mol/plot/ruler/hor/-css/hor.view.css.ts
|
|
5275
5043
|
;
|
|
5276
5044
|
"use strict";
|
|
5277
5045
|
var $;
|
|
@@ -5319,12 +5087,12 @@ var $;
|
|
|
5319
5087
|
$$.$mol_plot_ruler_hor = $mol_plot_ruler_hor;
|
|
5320
5088
|
})($$ = $.$$ || ($.$$ = {}));
|
|
5321
5089
|
})($ || ($ = {}));
|
|
5322
|
-
//hor.view.
|
|
5090
|
+
//mol/plot/ruler/hor/hor.view.ts
|
|
5323
5091
|
;
|
|
5324
5092
|
"use strict";
|
|
5325
5093
|
var $;
|
|
5326
5094
|
(function ($) {
|
|
5327
|
-
class $mol_plot_mark_cross extends
|
|
5095
|
+
class $mol_plot_mark_cross extends $mol_plot_graph {
|
|
5328
5096
|
labels() {
|
|
5329
5097
|
return [];
|
|
5330
5098
|
}
|
|
@@ -5398,33 +5166,33 @@ var $;
|
|
|
5398
5166
|
}
|
|
5399
5167
|
}
|
|
5400
5168
|
__decorate([
|
|
5401
|
-
|
|
5169
|
+
$mol_mem
|
|
5402
5170
|
], $mol_plot_mark_cross.prototype, "dimensions", null);
|
|
5403
5171
|
__decorate([
|
|
5404
|
-
|
|
5172
|
+
$mol_mem
|
|
5405
5173
|
], $mol_plot_mark_cross.prototype, "dimensions_x", null);
|
|
5406
5174
|
__decorate([
|
|
5407
|
-
|
|
5175
|
+
$mol_mem
|
|
5408
5176
|
], $mol_plot_mark_cross.prototype, "dimensions_y", null);
|
|
5409
5177
|
__decorate([
|
|
5410
|
-
|
|
5178
|
+
$mol_mem
|
|
5411
5179
|
], $mol_plot_mark_cross.prototype, "Curve", null);
|
|
5412
5180
|
__decorate([
|
|
5413
|
-
|
|
5181
|
+
$mol_mem
|
|
5414
5182
|
], $mol_plot_mark_cross.prototype, "Label_x", null);
|
|
5415
5183
|
__decorate([
|
|
5416
|
-
|
|
5184
|
+
$mol_mem
|
|
5417
5185
|
], $mol_plot_mark_cross.prototype, "Label_y", null);
|
|
5418
5186
|
$.$mol_plot_mark_cross = $mol_plot_mark_cross;
|
|
5419
5187
|
})($ || ($ = {}));
|
|
5420
|
-
//cross.view.tree.
|
|
5188
|
+
//mol/plot/mark/cross/-view.tree/cross.view.tree.ts
|
|
5421
5189
|
;
|
|
5422
5190
|
"use strict";
|
|
5423
5191
|
var $;
|
|
5424
5192
|
(function ($) {
|
|
5425
|
-
|
|
5193
|
+
$mol_style_attach("mol/plot/mark/cross/cross.view.css", "[mol_plot_mark_cross_curve] {\n\tcolor: var(--mol_theme_focus);\n\tstroke-width: 1px;\n\tstroke: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_cross_label_x], [mol_plot_mark_cross_label_y] {\n\tcolor: var(--mol_theme_focus);\n\tfont-weight: bold;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_cross_label_y] {\n\ttransform: translateY( 4px );\n}\n");
|
|
5426
5194
|
})($ || ($ = {}));
|
|
5427
|
-
//cross.view.css.
|
|
5195
|
+
//mol/plot/mark/cross/-css/cross.view.css.ts
|
|
5428
5196
|
;
|
|
5429
5197
|
"use strict";
|
|
5430
5198
|
var $;
|
|
@@ -5459,8 +5227,8 @@ var $;
|
|
|
5459
5227
|
}
|
|
5460
5228
|
if (!graph)
|
|
5461
5229
|
return null;
|
|
5462
|
-
const value = new
|
|
5463
|
-
const scaled = new
|
|
5230
|
+
const value = new $mol_vector_2d(graph.series_x()[index], graph.series_y()[index]);
|
|
5231
|
+
const scaled = new $mol_vector_2d(shift_x + value.x * scale_x, shift_y + value.y * scale_y);
|
|
5464
5232
|
return { value, scaled, index };
|
|
5465
5233
|
}
|
|
5466
5234
|
curve() {
|
|
@@ -5506,31 +5274,31 @@ var $;
|
|
|
5506
5274
|
}
|
|
5507
5275
|
}
|
|
5508
5276
|
__decorate([
|
|
5509
|
-
|
|
5277
|
+
$mol_mem
|
|
5510
5278
|
], $mol_plot_mark_cross.prototype, "nearest", null);
|
|
5511
5279
|
$$.$mol_plot_mark_cross = $mol_plot_mark_cross;
|
|
5512
5280
|
})($$ = $.$$ || ($.$$ = {}));
|
|
5513
5281
|
})($ || ($ = {}));
|
|
5514
|
-
//cross.view.
|
|
5282
|
+
//mol/plot/mark/cross/cross.view.ts
|
|
5515
5283
|
;
|
|
5516
5284
|
"use strict";
|
|
5517
5285
|
var $;
|
|
5518
5286
|
(function ($) {
|
|
5519
|
-
class $mol_plot_mark_hor extends
|
|
5287
|
+
class $mol_plot_mark_hor extends $mol_plot_ruler_hor {
|
|
5520
5288
|
labels() {
|
|
5521
5289
|
return [];
|
|
5522
5290
|
}
|
|
5523
5291
|
}
|
|
5524
5292
|
$.$mol_plot_mark_hor = $mol_plot_mark_hor;
|
|
5525
5293
|
})($ || ($ = {}));
|
|
5526
|
-
//hor.view.tree.
|
|
5294
|
+
//mol/plot/mark/hor/-view.tree/hor.view.tree.ts
|
|
5527
5295
|
;
|
|
5528
5296
|
"use strict";
|
|
5529
5297
|
var $;
|
|
5530
5298
|
(function ($) {
|
|
5531
|
-
|
|
5299
|
+
$mol_style_attach("mol/plot/mark/hor/hor.view.css", "[mol_plot_mark_hor_curve] {\n\tcolor: var(--mol_theme_line);\n\tstroke-width: .1%;\n\tstroke: currentColor;\n\tpointer-events: none;\n}\n\n[mol_plot_mark_hor_label] {\n\tcolor: var(--mol_theme_text);\n\ttransform: translateY( -4px );\n}\n\n[mol_plot_mark_hor_title] {\n\tcolor: var(--mol_theme_shade);\n\ttransform: translateY( -4px );\n}\n");
|
|
5532
5300
|
})($ || ($ = {}));
|
|
5533
|
-
//hor.view.css.
|
|
5301
|
+
//mol/plot/mark/hor/-css/hor.view.css.ts
|
|
5534
5302
|
;
|
|
5535
5303
|
"use strict";
|
|
5536
5304
|
var $;
|
|
@@ -5611,18 +5379,18 @@ var $;
|
|
|
5611
5379
|
}
|
|
5612
5380
|
}
|
|
5613
5381
|
__decorate([
|
|
5614
|
-
|
|
5382
|
+
$mol_mem
|
|
5615
5383
|
], $mol_plot_mark_hor.prototype, "series_x", null);
|
|
5616
5384
|
__decorate([
|
|
5617
|
-
|
|
5385
|
+
$mol_mem
|
|
5618
5386
|
], $mol_plot_mark_hor.prototype, "labels", null);
|
|
5619
5387
|
__decorate([
|
|
5620
|
-
|
|
5388
|
+
$mol_mem
|
|
5621
5389
|
], $mol_plot_mark_hor.prototype, "visible_indexes", null);
|
|
5622
5390
|
$$.$mol_plot_mark_hor = $mol_plot_mark_hor;
|
|
5623
5391
|
})($$ = $.$$ || ($.$$ = {}));
|
|
5624
5392
|
})($ || ($ = {}));
|
|
5625
|
-
//hor.view.
|
|
5393
|
+
//mol/plot/mark/hor/hor.view.ts
|
|
5626
5394
|
;
|
|
5627
5395
|
export default $
|
|
5628
5396
|
//# sourceMappingURL=web.esm.js.map
|