mol_compare_deep 0.0.1351 → 0.0.1352
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 +1 -0
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js.map +1 -1
- package/node.test.js +213 -211
- package/node.test.js.map +1 -1
- package/package.json +1 -1
- package/web.d.ts +1 -0
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js.map +1 -1
- package/web.test.js +200 -1
- package/web.test.js.map +1 -1
package/node.d.ts
CHANGED
package/node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../mam.d.ts","../deep.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;
|
|
1
|
+
{"version":3,"sources":["../../../../mam.d.ts","../deep.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACfA;AACA;AACA;AACA;AACA","sourcesContent":[null,null]}
|
package/node.deps.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/compare/deep/deep.ts","mol/compare/deep/README.md"],"mods":{},"deps_in":{"mol/compare":{"mol/compare/deep":-999},"mol":{"mol/compare":-999},"":{"mol":-999}},"deps_out":{"mol/compare/deep":{"mol/compare":-999},"mol/compare":{"mol":-999},"mol":{"":-999}},"sloc":{"ts":
|
|
1
|
+
{"files":["mam.ts","LICENSE","README.md","mam.jam.js","tsfmt.json","package.json","tsconfig.json","lang.lang.tree","meta.lang.tree","sandbox.config.json","mol/CNAME","mol/LICENSE","mol/readme.md","mol/mol.meta.tree","mol/CONTRIBUTING.md","mol/CODE_OF_CONDUCT.md","mol/compare/deep/deep.ts","mol/compare/deep/README.md"],"mods":{},"deps_in":{"mol/compare":{"mol/compare/deep":-999},"mol":{"mol/compare":-999},"":{"mol":-999}},"deps_out":{"mol/compare/deep":{"mol/compare":-999},"mol/compare":{"mol":-999},"mol":{"":-999}},"sloc":{"ts":123,"LICENSE":113,"md":493,"js":9,"json":83,"tree":41,"CNAME":1},"deps":{"mol/compare/deep":{"..":-999,"/mol/compare/deep/cache":-1,"/mol/compare/deep":-1,"/mol/compare/deep/cache/get":-2,"/mol/compare/deep/cache/set":-3},"mol/compare":{"..":-999},"mol":{"..":-999},"":{}}}
|
package/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["-","../../../../mam.ts","../../../../mol/compare/deep/deep.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAMV;AAND,WAAU,CAAC;AAMX,CAAC,EANS,CAAC,KAAD,CAAC,QAMV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADblB;AACA;AACA;;;;;;;;;;;;;;;AEFA,IAAU,CAAC,CA6JV;AA7JD,WAAU,CAAC;IAEC,yBAAuB,GAAG,IAAI,OAAO,EAAoC,CAAA;IAMpF,SAAgB,iBAAiB,CAAW,IAAW,EAAE,KAAY;QAEpE,IAAI,MAAM,CAAC,EAAE,CAAE,IAAI,EAAG,KAAK,CAAE;YAAG,OAAO,IAAI,CAAA;QAE3C,IAAI,IAAI,KAAK,IAAI;YAAG,OAAO,KAAK,CAAA;QAChC,IAAI,KAAK,KAAK,IAAI;YAAG,OAAO,KAAK,CAAA;QAEjC,IAAI,OAAO,IAAI,KAAK,QAAQ;YAAG,OAAO,KAAK,CAAA;QAC3C,IAAI,OAA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IAAI,CAAC,aAAa,CAAE,SAAS,EAAE,UAAU,CAAE;YAAG,OAAO,KAAK,CAAA;QAE1D,KAAK,IAAI,GAAG,IAAI,SAAS,EAAG,CAAC;YAC5B,IAAI,CAAC,iBAAiB,CAAI,IAAa,CAAE,GAAG,CAAE,EAAI,KAAc,CAAE,GAAG,CAAE,CAAE;gBAAG,OAAO,KAAK,CAAA;QACzF,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAE,IAAI,CAAE,CAAA;QACtD,MAAM,UAAU,GAAG,MAAM,CAAC,qBAAqB,CAAE,KAAK,CAAE,CAAA;QAExD,IAAI,CAAC,aAAa,CAAE,SAAS,EAAE,UAAU,CAAE;YAAG,OAAO,KAAK,CAAA;QAE1D,KAAK,IAAI,GAAG,IAAI,SAAS,EAAG,CAAC;YAC5B,IAAI,CAAC,iBAAiB,CAAI,IAAa,CAAE,GAAG,CAAE,EAAI,KAAc,CAAE,GAAG,CAAE,CAAE;gBAAG,OAAO,KAAK,CAAA;QACzF,CAAC;QAED,OAAO,IAAI,CAAA;IACZ,CAAC;IAED,SAAS,iBAAiB,CAAE,IAAQ,EAAE,KAAS;QAC9C,OAAO,MAAM,CAAC,EAAE,CACd,IAAY,CAAE,MAAM,CAAC,WAAW,CAAE,CAAE,SAAS,CAAE,EAC/C,KAAa,CAAE,MAAM,CAAC,WAAW,CAAE,CAAE,SAAS,CAAE,CACjD,CAAA;IACF,CAAC;AAEF,CAAC,EA7JS,CAAC,KAAD,CAAC,QA6JV;;","sourcesContent":[null,"Error.stackTraceLimit = 50;\n\ndeclare let _$_: { new(): {} } & typeof globalThis\ndeclare class $ extends _$_ {}\n\nnamespace $ {\n\texport type $ = typeof $$\n\texport declare class $$ extends $ {}\n\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n","namespace $ {\n\n\texport let $mol_compare_deep_cache = new WeakMap< any , WeakMap< any , boolean > >()\n\t\n\t/**\n\t * Deeply compares two values. Returns true if equal.\n\t * Define `Symbol.toPrimitive` to customize.\n\t */\n\texport function $mol_compare_deep< Value >( left: Value, right: Value ): boolean {\n\n\t\tif( Object.is( left , right ) ) return true\n\n\t\tif( left === null ) return false\n\t\tif( right === null ) return false\n\n\t\tif( typeof left !== 'object' ) return false\n\t\tif( typeof right !== 'object' ) return false\n\n\t\tconst left_proto = Reflect.getPrototypeOf( left as any )\n\t\tconst right_proto = Reflect.getPrototypeOf( right as any )\n\t\t\n\t\tif( left_proto !== right_proto ) return false\n\n\t\tif( left instanceof Boolean ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof Number ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof String ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof Date ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof RegExp ) return left.source === (right as any).source && left.flags === (right as any).flags\n\t\tif( left instanceof Error ) return left.message === (right as any).message && $mol_compare_deep( left.stack, (right as any).stack )\n\n\t\tlet left_cache = $mol_compare_deep_cache.get( left )\n\t\tif( left_cache ) {\n\n\t\t\tconst right_cache = left_cache.get( right )\n\t\t\tif( typeof right_cache === 'boolean' ) return right_cache\n\n\t\t} else {\n\t\t\t\n\t\t\tleft_cache = new WeakMap< any , boolean >()\n\t\t\t$mol_compare_deep_cache.set( left , left_cache )\n\n\t\t}\n\n\t\tleft_cache.set(right, true);\n\n\t\tlet result!: boolean\n\n\t\ttry {\n\t\t\t\n\t\t\tif( !left_proto ) result = compare_pojo( left, right as any )\n\t\t\telse if( !Reflect.getPrototypeOf( left_proto ) ) result = compare_pojo( left, right as any )\n\t\t\telse if( Symbol.toPrimitive in left ) result = compare_primitive( left, right )\n\t\t\telse if( Array.isArray( left ) ) result = compare_array( left, right as any )\n\t\t\telse if( left instanceof Set ) result = compare_set( left, right as any )\n\t\t\telse if( left instanceof Map ) result = compare_map( left, right as any )\n\t\t\telse if( ArrayBuffer.isView( left ) ) result = compare_buffer( left, right as any )\n\t\t\telse if( Symbol.iterator in left ) result = compare_iterator( ( left as any )[ Symbol.iterator ](), ( right as any )[ Symbol.iterator ]() )\n\t\t\telse result = false\n\n\t\t} finally {\n\t\t\tleft_cache.set( right , result )\n\t\t}\n\t\t\n\t\treturn result\n\t}\n\n\tfunction compare_array< Value extends any[] >( left: Value, right: Value ): boolean {\n\t\t\n\t\tconst len = left.length\n\t\tif( len !== right.length ) return false\n\t\t\n\t\tfor( let i = 0; i < len; ++i ) {\n\t\t\tif( !$mol_compare_deep( left[i] , right[i] ) ) return false\n\t\t}\n\t\t\n\t\treturn true\n\t}\n\t\n\tfunction compare_buffer( left: ArrayBufferView, right: ArrayBufferView ): boolean {\n\t\t\n\t\tconst len = left.byteLength\n\t\tif( len !== right.byteLength ) return false\n\t\t\n\t\tif( left instanceof DataView ) return compare_buffer(\n\t\t\tnew Uint8Array( left.buffer, left.byteOffset, left.byteLength ),\n\t\t\tnew Uint8Array( right.buffer, right.byteOffset, right.byteLength ),\n\t\t)\n\t\t\n\t\tfor( let i = 0; i < len; ++i ) {\n\t\t\tif( (left as any)[i] !== (right as any)[i] ) return false\n\t\t}\n\t\t\n\t\treturn true\n\t}\n\t\n\tfunction compare_iterator< Value extends IterableIterator<any> >(\n\t\tleft: Value,\n\t\tright: Value,\n\t): boolean {\n\t\t\n\t\twhile( true ) {\n\n\t\t\tconst left_next = left.next()\n\t\t\tconst right_next = right.next()\n\n\t\t\tif( left_next.done !== right_next.done ) return false\n\t\t\tif( left_next.done ) break\n\n\t\t\tif( !$mol_compare_deep( left_next.value , right_next.value ) ) return false\n\n\t\t}\n\n\t\treturn true\n\n\t}\n\t\n\tfunction compare_set< Value extends Set<any> >( left: Value, right: Value ): boolean {\n\t\tif( left.size !== right.size ) return false\n\t\treturn compare_iterator( left.values(), right.values() )\n\t}\n\t\n\tfunction compare_map< Key, Value >( left: Map< Key, Value > , right: Map< Key, Value > ): boolean {\n\t\tif( left.size !== right.size ) return false\n\t\treturn compare_iterator( left.keys(), right.keys() )\n\t\t\t&& compare_iterator( left.values(), right.values() )\n\t}\n\t\n\tfunction compare_pojo( left: {}, right: {} ): boolean {\n\t\t\n\t\tconst left_keys = Object.getOwnPropertyNames( left )\n\t\tconst right_keys = Object.getOwnPropertyNames( right )\n\t\t\n\t\tif( !compare_array( left_keys, right_keys ) ) return false\n\n\t\tfor( let key of left_keys ) {\n\t\t\tif( !$mol_compare_deep( ( left as any )[ key ], ( right as any )[ key ] ) ) return false\n\t\t}\n\n\t\tconst left_syms = Object.getOwnPropertySymbols( left )\n\t\tconst right_syms = Object.getOwnPropertySymbols( right )\n\t\t\n\t\tif( !compare_array( left_syms, right_syms ) ) return false\n\n\t\tfor( let key of left_syms ) {\n\t\t\tif( !$mol_compare_deep( ( left as any )[ key ], ( right as any )[ key ] ) ) return false\n\t\t}\n\n\t\treturn true\n\t}\n\t\n\tfunction compare_primitive( left: {}, right: {} ): boolean {\n\t\treturn Object.is(\n\t\t\t(left as any)[ Symbol.toPrimitive ]( 'default' ),\n\t\t\t(right as any)[ Symbol.toPrimitive ]( 'default' ),\n\t\t)\n\t}\n\t\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["-","../../../../mam.ts","../../../../mol/compare/deep/deep.ts"],"names":[],"mappings":";;;AAAA;AACA;AACA;AACA;;ACHA,KAAK,CAAC,eAAe,GAAG,EAAE,CAAC;AAK3B,IAAU,CAAC,CAQV;AARD,WAAU,CAAC;AAQX,CAAC,EARS,CAAC,KAAD,CAAC,QAQV;AAED,MAAM,CAAC,OAAO,GAAG,CAAC,CAAA;;;ADflB;AACA;AACA;;;;;;;;;;;;;;;AEFA,IAAU,CAAC,CA6JV;AA7JD,WAAU,CAAC;IAEC,yBAAuB,GAAG,IAAI,OAAO,EAAoC,CAAA;IAMpF,SAAgB,iBAAiB,CAAW,IAAW,EAAE,KAAY;QAEpE,IAAI,MAAM,CAAC,EAAE,CAAE,IAAI,EAAG,KAAK,CAAE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clare class $ extends _$_ {}\n\nnamespace $ {\n\texport type $ = typeof $$\n\texport declare class $$ extends $ {\n\t\tstatic $: $\n\t}\n\tnamespace $$ {\n\t\texport type $$ = $\n\t}\n}\n\nmodule.exports = $\n","namespace $ {\n\n\texport let $mol_compare_deep_cache = new WeakMap< any , WeakMap< any , boolean > >()\n\t\n\t/**\n\t * Deeply compares two values. Returns true if equal.\n\t * Define `Symbol.toPrimitive` to customize.\n\t */\n\texport function $mol_compare_deep< Value >( left: Value, right: Value ): boolean {\n\n\t\tif( Object.is( left , right ) ) return true\n\n\t\tif( left === null ) return false\n\t\tif( right === null ) return false\n\n\t\tif( typeof left !== 'object' ) return false\n\t\tif( typeof right !== 'object' ) return false\n\n\t\tconst left_proto = Reflect.getPrototypeOf( left as any )\n\t\tconst right_proto = Reflect.getPrototypeOf( right as any )\n\t\t\n\t\tif( left_proto !== right_proto ) return false\n\n\t\tif( left instanceof Boolean ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof Number ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof String ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof Date ) return Object.is( left.valueOf(), ( right as any )['valueOf']() )\n\t\tif( left instanceof RegExp ) return left.source === (right as any).source && left.flags === (right as any).flags\n\t\tif( left instanceof Error ) return left.message === (right as any).message && $mol_compare_deep( left.stack, (right as any).stack )\n\n\t\tlet left_cache = $mol_compare_deep_cache.get( left )\n\t\tif( left_cache ) {\n\n\t\t\tconst right_cache = left_cache.get( right )\n\t\t\tif( typeof right_cache === 'boolean' ) return right_cache\n\n\t\t} else {\n\t\t\t\n\t\t\tleft_cache = new WeakMap< any , boolean >()\n\t\t\t$mol_compare_deep_cache.set( left , left_cache )\n\n\t\t}\n\n\t\tleft_cache.set(right, true);\n\n\t\tlet result!: boolean\n\n\t\ttry {\n\t\t\t\n\t\t\tif( !left_proto ) result = compare_pojo( left, right as any )\n\t\t\telse if( !Reflect.getPrototypeOf( left_proto ) ) result = compare_pojo( left, right as any )\n\t\t\telse if( Symbol.toPrimitive in left ) result = compare_primitive( left, right )\n\t\t\telse if( Array.isArray( left ) ) result = compare_array( left, right as any )\n\t\t\telse if( left instanceof Set ) result = compare_set( left, right as any )\n\t\t\telse if( left instanceof Map ) result = compare_map( left, right as any )\n\t\t\telse if( ArrayBuffer.isView( left ) ) result = compare_buffer( left, right as any )\n\t\t\telse if( Symbol.iterator in left ) result = compare_iterator( ( left as any )[ Symbol.iterator ](), ( right as any )[ Symbol.iterator ]() )\n\t\t\telse result = false\n\n\t\t} finally {\n\t\t\tleft_cache.set( right , result )\n\t\t}\n\t\t\n\t\treturn result\n\t}\n\n\tfunction compare_array< Value extends any[] >( left: Value, right: Value ): boolean {\n\t\t\n\t\tconst len = left.length\n\t\tif( len !== right.length ) return false\n\t\t\n\t\tfor( let i = 0; i < len; ++i ) {\n\t\t\tif( !$mol_compare_deep( left[i] , right[i] ) ) return false\n\t\t}\n\t\t\n\t\treturn true\n\t}\n\t\n\tfunction compare_buffer( left: ArrayBufferView, right: ArrayBufferView ): boolean {\n\t\t\n\t\tconst len = left.byteLength\n\t\tif( len !== right.byteLength ) return false\n\t\t\n\t\tif( left instanceof DataView ) return compare_buffer(\n\t\t\tnew Uint8Array( left.buffer, left.byteOffset, left.byteLength ),\n\t\t\tnew Uint8Array( right.buffer, right.byteOffset, right.byteLength ),\n\t\t)\n\t\t\n\t\tfor( let i = 0; i < len; ++i ) {\n\t\t\tif( (left as any)[i] !== (right as any)[i] ) return false\n\t\t}\n\t\t\n\t\treturn true\n\t}\n\t\n\tfunction compare_iterator< Value extends IterableIterator<any> >(\n\t\tleft: Value,\n\t\tright: Value,\n\t): boolean {\n\t\t\n\t\twhile( true ) {\n\n\t\t\tconst left_next = left.next()\n\t\t\tconst right_next = right.next()\n\n\t\t\tif( left_next.done !== right_next.done ) return false\n\t\t\tif( left_next.done ) break\n\n\t\t\tif( !$mol_compare_deep( left_next.value , right_next.value ) ) return false\n\n\t\t}\n\n\t\treturn true\n\n\t}\n\t\n\tfunction compare_set< Value extends Set<any> >( left: Value, right: Value ): boolean {\n\t\tif( left.size !== right.size ) return false\n\t\treturn compare_iterator( left.values(), right.values() )\n\t}\n\t\n\tfunction compare_map< Key, Value >( left: Map< Key, Value > , right: Map< Key, Value > ): boolean {\n\t\tif( left.size !== right.size ) return false\n\t\treturn compare_iterator( left.keys(), right.keys() )\n\t\t\t&& compare_iterator( left.values(), right.values() )\n\t}\n\t\n\tfunction compare_pojo( left: {}, right: {} ): boolean {\n\t\t\n\t\tconst left_keys = Object.getOwnPropertyNames( left )\n\t\tconst right_keys = Object.getOwnPropertyNames( right )\n\t\t\n\t\tif( !compare_array( left_keys, right_keys ) ) return false\n\n\t\tfor( let key of left_keys ) {\n\t\t\tif( !$mol_compare_deep( ( left as any )[ key ], ( right as any )[ key ] ) ) return false\n\t\t}\n\n\t\tconst left_syms = Object.getOwnPropertySymbols( left )\n\t\tconst right_syms = Object.getOwnPropertySymbols( right )\n\t\t\n\t\tif( !compare_array( left_syms, right_syms ) ) return false\n\n\t\tfor( let key of left_syms ) {\n\t\t\tif( !$mol_compare_deep( ( left as any )[ key ], ( right as any )[ key ] ) ) return false\n\t\t}\n\n\t\treturn true\n\t}\n\t\n\tfunction compare_primitive( left: {}, right: {} ): boolean {\n\t\treturn Object.is(\n\t\t\t(left as any)[ Symbol.toPrimitive ]( 'default' ),\n\t\t\t(right as any)[ Symbol.toPrimitive ]( 'default' ),\n\t\t)\n\t}\n\t\n}\n"]}
|
package/node.test.js
CHANGED
|
@@ -318,6 +318,205 @@ var $;
|
|
|
318
318
|
$.$mol_test_complete = $mol_test_complete;
|
|
319
319
|
})($ || ($ = {}));
|
|
320
320
|
|
|
321
|
+
;
|
|
322
|
+
"use strict";
|
|
323
|
+
var $;
|
|
324
|
+
(function ($) {
|
|
325
|
+
$['devtoolsFormatters'] ||= [];
|
|
326
|
+
function $mol_dev_format_register(config) {
|
|
327
|
+
$['devtoolsFormatters'].push(config);
|
|
328
|
+
}
|
|
329
|
+
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
330
|
+
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
331
|
+
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
332
|
+
function $mol_dev_format_button(label, click) {
|
|
333
|
+
return $mol_dev_format_auto({
|
|
334
|
+
[$.$mol_dev_format_head]() {
|
|
335
|
+
return $.$mol_dev_format_span({ color: 'cornflowerblue' }, label);
|
|
336
|
+
},
|
|
337
|
+
[$.$mol_dev_format_body]() {
|
|
338
|
+
Promise.resolve().then(click);
|
|
339
|
+
return $.$mol_dev_format_span({});
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
$mol_dev_format_register({
|
|
344
|
+
header: (val, config = false) => {
|
|
345
|
+
if (config)
|
|
346
|
+
return null;
|
|
347
|
+
if (!val)
|
|
348
|
+
return null;
|
|
349
|
+
if ($.$mol_dev_format_head in val) {
|
|
350
|
+
try {
|
|
351
|
+
return val[$.$mol_dev_format_head]();
|
|
352
|
+
}
|
|
353
|
+
catch (error) {
|
|
354
|
+
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
if (typeof val === 'function') {
|
|
358
|
+
return $mol_dev_format_native(val);
|
|
359
|
+
}
|
|
360
|
+
if (val instanceof Error) {
|
|
361
|
+
return $.$mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
|
|
362
|
+
}
|
|
363
|
+
if (val instanceof Promise) {
|
|
364
|
+
return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
|
|
365
|
+
}
|
|
366
|
+
if (Symbol.toStringTag in val) {
|
|
367
|
+
return $mol_dev_format_native(val);
|
|
368
|
+
}
|
|
369
|
+
return null;
|
|
370
|
+
},
|
|
371
|
+
hasBody: (val, config = false) => {
|
|
372
|
+
if (config)
|
|
373
|
+
return false;
|
|
374
|
+
if (!val)
|
|
375
|
+
return false;
|
|
376
|
+
if (val[$.$mol_dev_format_body])
|
|
377
|
+
return true;
|
|
378
|
+
return false;
|
|
379
|
+
},
|
|
380
|
+
body: (val, config = false) => {
|
|
381
|
+
if (config)
|
|
382
|
+
return null;
|
|
383
|
+
if (!val)
|
|
384
|
+
return null;
|
|
385
|
+
if ($.$mol_dev_format_body in val) {
|
|
386
|
+
try {
|
|
387
|
+
return val[$.$mol_dev_format_body]();
|
|
388
|
+
}
|
|
389
|
+
catch (error) {
|
|
390
|
+
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
return null;
|
|
394
|
+
},
|
|
395
|
+
});
|
|
396
|
+
function $mol_dev_format_native(obj) {
|
|
397
|
+
if (typeof obj === 'undefined')
|
|
398
|
+
return $.$mol_dev_format_shade('undefined');
|
|
399
|
+
return [
|
|
400
|
+
'object',
|
|
401
|
+
{
|
|
402
|
+
object: obj,
|
|
403
|
+
config: true,
|
|
404
|
+
},
|
|
405
|
+
];
|
|
406
|
+
}
|
|
407
|
+
$.$mol_dev_format_native = $mol_dev_format_native;
|
|
408
|
+
function $mol_dev_format_auto(obj) {
|
|
409
|
+
if (obj == null)
|
|
410
|
+
return $.$mol_dev_format_shade(String(obj));
|
|
411
|
+
return [
|
|
412
|
+
'object',
|
|
413
|
+
{
|
|
414
|
+
object: obj,
|
|
415
|
+
config: false,
|
|
416
|
+
},
|
|
417
|
+
];
|
|
418
|
+
}
|
|
419
|
+
$.$mol_dev_format_auto = $mol_dev_format_auto;
|
|
420
|
+
function $mol_dev_format_element(element, style, ...content) {
|
|
421
|
+
const styles = [];
|
|
422
|
+
for (let key in style)
|
|
423
|
+
styles.push(`${key} : ${style[key]}`);
|
|
424
|
+
return [
|
|
425
|
+
element,
|
|
426
|
+
{
|
|
427
|
+
style: styles.join(' ; '),
|
|
428
|
+
},
|
|
429
|
+
...content,
|
|
430
|
+
];
|
|
431
|
+
}
|
|
432
|
+
$.$mol_dev_format_element = $mol_dev_format_element;
|
|
433
|
+
$.$mol_dev_format_span = $mol_dev_format_element.bind(null, 'span');
|
|
434
|
+
$.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
|
|
435
|
+
$.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
|
|
436
|
+
$.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
|
|
437
|
+
$.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
|
|
438
|
+
$.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
|
|
439
|
+
$.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
|
|
440
|
+
$.$mol_dev_format_accent = $.$mol_dev_format_span.bind(null, {
|
|
441
|
+
'color': 'magenta',
|
|
442
|
+
});
|
|
443
|
+
$.$mol_dev_format_strong = $.$mol_dev_format_span.bind(null, {
|
|
444
|
+
'font-weight': 'bold',
|
|
445
|
+
});
|
|
446
|
+
$.$mol_dev_format_string = $.$mol_dev_format_span.bind(null, {
|
|
447
|
+
'color': 'green',
|
|
448
|
+
});
|
|
449
|
+
$.$mol_dev_format_shade = $.$mol_dev_format_span.bind(null, {
|
|
450
|
+
'color': 'gray',
|
|
451
|
+
});
|
|
452
|
+
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
453
|
+
'margin-left': '13px'
|
|
454
|
+
});
|
|
455
|
+
class Stack extends Array {
|
|
456
|
+
toString() {
|
|
457
|
+
return this.join('\n');
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
class Call extends Object {
|
|
461
|
+
type;
|
|
462
|
+
function;
|
|
463
|
+
method;
|
|
464
|
+
eval;
|
|
465
|
+
source;
|
|
466
|
+
offset;
|
|
467
|
+
pos;
|
|
468
|
+
object;
|
|
469
|
+
flags;
|
|
470
|
+
[Symbol.toStringTag];
|
|
471
|
+
constructor(call) {
|
|
472
|
+
super();
|
|
473
|
+
this.type = call.getTypeName() ?? '';
|
|
474
|
+
this.function = call.getFunctionName() ?? '';
|
|
475
|
+
this.method = call.getMethodName() ?? '';
|
|
476
|
+
if (this.method === this.function)
|
|
477
|
+
this.method = '';
|
|
478
|
+
this.pos = [call.getEnclosingLineNumber() ?? 0, call.getEnclosingColumnNumber() ?? 0];
|
|
479
|
+
this.eval = call.getEvalOrigin() ?? '';
|
|
480
|
+
this.source = call.getScriptNameOrSourceURL() ?? '';
|
|
481
|
+
this.object = call.getThis();
|
|
482
|
+
this.offset = call.getPosition();
|
|
483
|
+
const flags = [];
|
|
484
|
+
if (call.isAsync())
|
|
485
|
+
flags.push('async');
|
|
486
|
+
if (call.isConstructor())
|
|
487
|
+
flags.push('constructor');
|
|
488
|
+
if (call.isEval())
|
|
489
|
+
flags.push('eval');
|
|
490
|
+
if (call.isNative())
|
|
491
|
+
flags.push('native');
|
|
492
|
+
if (call.isPromiseAll())
|
|
493
|
+
flags.push('PromiseAll');
|
|
494
|
+
if (call.isToplevel())
|
|
495
|
+
flags.push('top');
|
|
496
|
+
this.flags = flags;
|
|
497
|
+
const type = this.type ? this.type + '.' : '';
|
|
498
|
+
const func = this.function || '<anon>';
|
|
499
|
+
const method = this.method ? ' [' + this.method + '] ' : '';
|
|
500
|
+
this[Symbol.toStringTag] = `${type}${func}${method}`;
|
|
501
|
+
}
|
|
502
|
+
[Symbol.toPrimitive]() {
|
|
503
|
+
return this.toString();
|
|
504
|
+
}
|
|
505
|
+
toString() {
|
|
506
|
+
const object = this.object || '';
|
|
507
|
+
const label = this[Symbol.toStringTag];
|
|
508
|
+
const source = `${this.source}:${this.pos.join(':')} #${this.offset}`;
|
|
509
|
+
return `\tat ${object}${label} (${source})`;
|
|
510
|
+
}
|
|
511
|
+
[$.$mol_dev_format_head]() {
|
|
512
|
+
return $.$mol_dev_format_div({}, $mol_dev_format_native(this), $.$mol_dev_format_shade(' '), ...this.object ? [
|
|
513
|
+
$mol_dev_format_native(this.object),
|
|
514
|
+
] : [], ...this.method ? [$.$mol_dev_format_shade(' ', ' [', this.method, ']')] : [], $.$mol_dev_format_shade(' ', this.flags.join(', ')));
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
Error.prepareStackTrace ??= (error, stack) => new Stack(...stack.map(call => new Call(call)));
|
|
518
|
+
})($ || ($ = {}));
|
|
519
|
+
|
|
321
520
|
;
|
|
322
521
|
"use strict";
|
|
323
522
|
var $;
|
|
@@ -527,7 +726,7 @@ require = (req => Object.assign(function require(name) {
|
|
|
527
726
|
var $;
|
|
528
727
|
(function ($) {
|
|
529
728
|
function $mol_log3_area_lazy(event) {
|
|
530
|
-
const self = this
|
|
729
|
+
const self = this.$;
|
|
531
730
|
const stack = self.$mol_log3_stack;
|
|
532
731
|
const deep = stack.length;
|
|
533
732
|
let logged = false;
|
|
@@ -1844,210 +2043,6 @@ var $;
|
|
|
1844
2043
|
$.$mol_wire_affected = [];
|
|
1845
2044
|
})($ || ($ = {}));
|
|
1846
2045
|
|
|
1847
|
-
;
|
|
1848
|
-
"use strict";
|
|
1849
|
-
var $;
|
|
1850
|
-
(function ($) {
|
|
1851
|
-
$['devtoolsFormatters'] ||= [];
|
|
1852
|
-
function $mol_dev_format_register(config) {
|
|
1853
|
-
$['devtoolsFormatters'].push(config);
|
|
1854
|
-
}
|
|
1855
|
-
$.$mol_dev_format_register = $mol_dev_format_register;
|
|
1856
|
-
$.$mol_dev_format_head = Symbol('$mol_dev_format_head');
|
|
1857
|
-
$.$mol_dev_format_body = Symbol('$mol_dev_format_body');
|
|
1858
|
-
function $mol_dev_format_button(label, click) {
|
|
1859
|
-
return $mol_dev_format_auto({
|
|
1860
|
-
[$.$mol_dev_format_head]() {
|
|
1861
|
-
return $mol_dev_format_span({ color: 'cornflowerblue' }, label);
|
|
1862
|
-
},
|
|
1863
|
-
[$.$mol_dev_format_body]() {
|
|
1864
|
-
Promise.resolve().then(click);
|
|
1865
|
-
return $mol_dev_format_span({});
|
|
1866
|
-
}
|
|
1867
|
-
});
|
|
1868
|
-
}
|
|
1869
|
-
$mol_dev_format_register({
|
|
1870
|
-
header: (val, config = false) => {
|
|
1871
|
-
if (config)
|
|
1872
|
-
return null;
|
|
1873
|
-
if (!val)
|
|
1874
|
-
return null;
|
|
1875
|
-
if ($.$mol_dev_format_head in val) {
|
|
1876
|
-
try {
|
|
1877
|
-
return val[$.$mol_dev_format_head]();
|
|
1878
|
-
}
|
|
1879
|
-
catch (error) {
|
|
1880
|
-
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
if (typeof val === 'function') {
|
|
1884
|
-
return $mol_dev_format_native(val);
|
|
1885
|
-
}
|
|
1886
|
-
if (Error.isError(val)) {
|
|
1887
|
-
return $mol_dev_format_span({}, $mol_dev_format_native(val), ' ', $mol_dev_format_button('throw', () => $mol_fail_hidden(val)));
|
|
1888
|
-
}
|
|
1889
|
-
if (val instanceof Promise) {
|
|
1890
|
-
return $.$mol_dev_format_shade($mol_dev_format_native(val), ' ', val[Symbol.toStringTag] ?? '');
|
|
1891
|
-
}
|
|
1892
|
-
if (Symbol.toStringTag in val) {
|
|
1893
|
-
return $mol_dev_format_native(val);
|
|
1894
|
-
}
|
|
1895
|
-
return null;
|
|
1896
|
-
},
|
|
1897
|
-
hasBody: (val, config = false) => {
|
|
1898
|
-
if (config)
|
|
1899
|
-
return false;
|
|
1900
|
-
if (!val)
|
|
1901
|
-
return false;
|
|
1902
|
-
if (val[$.$mol_dev_format_body])
|
|
1903
|
-
return true;
|
|
1904
|
-
return false;
|
|
1905
|
-
},
|
|
1906
|
-
body: (val, config = false) => {
|
|
1907
|
-
if (config)
|
|
1908
|
-
return null;
|
|
1909
|
-
if (!val)
|
|
1910
|
-
return null;
|
|
1911
|
-
if ($.$mol_dev_format_body in val) {
|
|
1912
|
-
try {
|
|
1913
|
-
return val[$.$mol_dev_format_body]();
|
|
1914
|
-
}
|
|
1915
|
-
catch (error) {
|
|
1916
|
-
return $.$mol_dev_format_accent($mol_dev_format_native(val), '💨', $mol_dev_format_native(error), '');
|
|
1917
|
-
}
|
|
1918
|
-
}
|
|
1919
|
-
return null;
|
|
1920
|
-
},
|
|
1921
|
-
});
|
|
1922
|
-
function $mol_dev_format_native(obj) {
|
|
1923
|
-
if (typeof obj === 'undefined')
|
|
1924
|
-
return $.$mol_dev_format_shade('undefined');
|
|
1925
|
-
return [
|
|
1926
|
-
'object',
|
|
1927
|
-
{
|
|
1928
|
-
object: obj,
|
|
1929
|
-
config: true,
|
|
1930
|
-
},
|
|
1931
|
-
];
|
|
1932
|
-
}
|
|
1933
|
-
$.$mol_dev_format_native = $mol_dev_format_native;
|
|
1934
|
-
function $mol_dev_format_auto(obj) {
|
|
1935
|
-
if (obj == null)
|
|
1936
|
-
return $.$mol_dev_format_shade(String(obj));
|
|
1937
|
-
return [
|
|
1938
|
-
'object',
|
|
1939
|
-
{
|
|
1940
|
-
object: obj,
|
|
1941
|
-
config: false,
|
|
1942
|
-
},
|
|
1943
|
-
];
|
|
1944
|
-
}
|
|
1945
|
-
$.$mol_dev_format_auto = $mol_dev_format_auto;
|
|
1946
|
-
function $mol_dev_format_element(element, style, ...content) {
|
|
1947
|
-
const styles = [];
|
|
1948
|
-
for (let key in style)
|
|
1949
|
-
styles.push(`${key} : ${style[key]}`);
|
|
1950
|
-
return [
|
|
1951
|
-
element,
|
|
1952
|
-
{
|
|
1953
|
-
style: styles.join(' ; '),
|
|
1954
|
-
},
|
|
1955
|
-
...content,
|
|
1956
|
-
];
|
|
1957
|
-
}
|
|
1958
|
-
$.$mol_dev_format_element = $mol_dev_format_element;
|
|
1959
|
-
function $mol_dev_format_span(style, ...content) {
|
|
1960
|
-
return $mol_dev_format_element('span', {
|
|
1961
|
-
...style,
|
|
1962
|
-
}, ...content);
|
|
1963
|
-
}
|
|
1964
|
-
$.$mol_dev_format_span = $mol_dev_format_span;
|
|
1965
|
-
$.$mol_dev_format_div = $mol_dev_format_element.bind(null, 'div');
|
|
1966
|
-
$.$mol_dev_format_ol = $mol_dev_format_element.bind(null, 'ol');
|
|
1967
|
-
$.$mol_dev_format_li = $mol_dev_format_element.bind(null, 'li');
|
|
1968
|
-
$.$mol_dev_format_table = $mol_dev_format_element.bind(null, 'table');
|
|
1969
|
-
$.$mol_dev_format_tr = $mol_dev_format_element.bind(null, 'tr');
|
|
1970
|
-
$.$mol_dev_format_td = $mol_dev_format_element.bind(null, 'td');
|
|
1971
|
-
$.$mol_dev_format_accent = $mol_dev_format_span.bind(null, {
|
|
1972
|
-
'color': 'magenta',
|
|
1973
|
-
});
|
|
1974
|
-
$.$mol_dev_format_strong = $mol_dev_format_span.bind(null, {
|
|
1975
|
-
'font-weight': 'bold',
|
|
1976
|
-
});
|
|
1977
|
-
$.$mol_dev_format_string = $mol_dev_format_span.bind(null, {
|
|
1978
|
-
'color': 'green',
|
|
1979
|
-
});
|
|
1980
|
-
$.$mol_dev_format_shade = $mol_dev_format_span.bind(null, {
|
|
1981
|
-
'color': 'gray',
|
|
1982
|
-
});
|
|
1983
|
-
$.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
|
|
1984
|
-
'margin-left': '13px'
|
|
1985
|
-
});
|
|
1986
|
-
class Stack extends Array {
|
|
1987
|
-
toString() {
|
|
1988
|
-
return this.join('\n');
|
|
1989
|
-
}
|
|
1990
|
-
}
|
|
1991
|
-
class Call extends Object {
|
|
1992
|
-
type;
|
|
1993
|
-
function;
|
|
1994
|
-
method;
|
|
1995
|
-
eval;
|
|
1996
|
-
source;
|
|
1997
|
-
offset;
|
|
1998
|
-
pos;
|
|
1999
|
-
object;
|
|
2000
|
-
flags;
|
|
2001
|
-
[Symbol.toStringTag];
|
|
2002
|
-
constructor(call) {
|
|
2003
|
-
super();
|
|
2004
|
-
this.type = call.getTypeName() ?? '';
|
|
2005
|
-
this.function = call.getFunctionName() ?? '';
|
|
2006
|
-
this.method = call.getMethodName() ?? '';
|
|
2007
|
-
if (this.method === this.function)
|
|
2008
|
-
this.method = '';
|
|
2009
|
-
this.pos = [call.getEnclosingLineNumber() ?? 0, call.getEnclosingColumnNumber() ?? 0];
|
|
2010
|
-
this.eval = call.getEvalOrigin() ?? '';
|
|
2011
|
-
this.source = call.getScriptNameOrSourceURL() ?? '';
|
|
2012
|
-
this.object = call.getThis();
|
|
2013
|
-
this.offset = call.getPosition();
|
|
2014
|
-
const flags = [];
|
|
2015
|
-
if (call.isAsync())
|
|
2016
|
-
flags.push('async');
|
|
2017
|
-
if (call.isConstructor())
|
|
2018
|
-
flags.push('constructor');
|
|
2019
|
-
if (call.isEval())
|
|
2020
|
-
flags.push('eval');
|
|
2021
|
-
if (call.isNative())
|
|
2022
|
-
flags.push('native');
|
|
2023
|
-
if (call.isPromiseAll())
|
|
2024
|
-
flags.push('PromiseAll');
|
|
2025
|
-
if (call.isToplevel())
|
|
2026
|
-
flags.push('top');
|
|
2027
|
-
this.flags = flags;
|
|
2028
|
-
const type = this.type ? this.type + '.' : '';
|
|
2029
|
-
const func = this.function || '<anon>';
|
|
2030
|
-
const method = this.method ? ' [' + this.method + '] ' : '';
|
|
2031
|
-
this[Symbol.toStringTag] = `${type}${func}${method}`;
|
|
2032
|
-
}
|
|
2033
|
-
[Symbol.toPrimitive]() {
|
|
2034
|
-
return this.toString();
|
|
2035
|
-
}
|
|
2036
|
-
toString() {
|
|
2037
|
-
const object = this.object || '';
|
|
2038
|
-
const label = this[Symbol.toStringTag];
|
|
2039
|
-
const source = `${this.source}:${this.pos.join(':')} #${this.offset}`;
|
|
2040
|
-
return `\tat ${object}${label} (${source})`;
|
|
2041
|
-
}
|
|
2042
|
-
[$.$mol_dev_format_head]() {
|
|
2043
|
-
return $.$mol_dev_format_div({}, $mol_dev_format_native(this), $.$mol_dev_format_shade(' '), ...this.object ? [
|
|
2044
|
-
$mol_dev_format_native(this.object),
|
|
2045
|
-
] : [], ...this.method ? [$.$mol_dev_format_shade(' ', ' [', this.method, ']')] : [], $.$mol_dev_format_shade(' ', this.flags.join(', ')));
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
Error.prepareStackTrace ??= (error, stack) => new Stack(...stack.map(call => new Call(call)));
|
|
2049
|
-
})($ || ($ = {}));
|
|
2050
|
-
|
|
2051
2046
|
;
|
|
2052
2047
|
"use strict";
|
|
2053
2048
|
var $;
|
|
@@ -2660,15 +2655,22 @@ var $;
|
|
|
2660
2655
|
return function $mol_wire_task_get(host, args) {
|
|
2661
2656
|
const sub = $mol_wire_auto();
|
|
2662
2657
|
const existen = sub?.track_next();
|
|
2658
|
+
let cause = '';
|
|
2663
2659
|
reuse: if (existen) {
|
|
2664
2660
|
if (!existen.temp)
|
|
2665
2661
|
break reuse;
|
|
2666
|
-
if (existen.
|
|
2662
|
+
if (existen.task !== task) {
|
|
2663
|
+
cause = 'task';
|
|
2667
2664
|
break reuse;
|
|
2668
|
-
|
|
2665
|
+
}
|
|
2666
|
+
if (existen.host !== host) {
|
|
2667
|
+
cause = 'host';
|
|
2669
2668
|
break reuse;
|
|
2670
|
-
|
|
2669
|
+
}
|
|
2670
|
+
if (!$mol_compare_deep(existen.args, args)) {
|
|
2671
|
+
cause = 'args';
|
|
2671
2672
|
break reuse;
|
|
2673
|
+
}
|
|
2672
2674
|
return existen;
|
|
2673
2675
|
}
|
|
2674
2676
|
const key = (host?.[Symbol.toStringTag] ?? host) + ('.' + task.name + '<#>');
|
|
@@ -2676,11 +2678,11 @@ var $;
|
|
|
2676
2678
|
if (existen?.temp) {
|
|
2677
2679
|
$$.$mol_log3_warn({
|
|
2678
2680
|
place: '$mol_wire_task',
|
|
2679
|
-
message: `
|
|
2681
|
+
message: `Different ${cause} on restart`,
|
|
2680
2682
|
sub,
|
|
2681
|
-
|
|
2683
|
+
prev: existen,
|
|
2682
2684
|
next,
|
|
2683
|
-
hint: '
|
|
2685
|
+
hint: 'Maybe required additional memoization',
|
|
2684
2686
|
});
|
|
2685
2687
|
}
|
|
2686
2688
|
return next;
|