dsh-mobile 0.6.3 → 0.6.4
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/CHANGELOG.md +22 -0
- package/CONTRIBUTORS.md +10 -2
- package/README.en.md +6 -2
- package/README.md +6 -2
- package/THIRD_PARTY_NOTICES.md +29 -1
- package/apps/mobile/README.md +11 -3
- package/cordis.patch.yml +5 -2
- package/docs/ATTACH_EXISTING_FRPS.en.md +1 -1
- package/docs/ATTACH_EXISTING_FRPS.md +1 -1
- package/docs/MOBILE_COMPOSER_TOOLBAR.en.md +8 -0
- package/docs/MOBILE_COMPOSER_TOOLBAR.md +8 -0
- package/docs/SELF_HOSTED_FRP.en.md +3 -1
- package/docs/SELF_HOSTED_FRP.md +3 -1
- package/docs/SLOW_CONNECTIONS.en.md +6 -0
- package/docs/SLOW_CONNECTIONS.md +6 -0
- package/lib/cli.js +139 -19
- package/lib/cli.js.map +1 -1
- package/lib/client.js +400 -9
- package/lib/client.js.map +1 -1
- package/lib/index.d.mts +10 -5
- package/lib/index.mjs +571 -291
- package/lib/index.mjs.map +1 -1
- package/package.json +3 -1
- package/packages/question-fixes/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -2478,19 +2478,396 @@ window.__ModuleLoader__.load({
|
|
|
2478
2478
|
function createFrpAttachTemplate(settings, options = {}) {
|
|
2479
2479
|
return createFrpAttachTemplateParts(settings, options).text;
|
|
2480
2480
|
}
|
|
2481
|
-
|
|
2482
|
-
|
|
2481
|
+
//#endregion
|
|
2482
|
+
//#region node_modules/@noble/hashes/esm/utils.js
|
|
2483
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2484
|
+
/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
|
|
2485
|
+
function isBytes(a) {
|
|
2486
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
2487
|
+
}
|
|
2488
|
+
/** Asserts something is Uint8Array. */
|
|
2489
|
+
function abytes(b, ...lengths) {
|
|
2490
|
+
if (!isBytes(b)) throw new Error("Uint8Array expected");
|
|
2491
|
+
if (lengths.length > 0 && !lengths.includes(b.length)) throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
|
|
2492
|
+
}
|
|
2493
|
+
/** Asserts a hash instance has not been destroyed / finished */
|
|
2494
|
+
function aexists(instance, checkFinished = true) {
|
|
2495
|
+
if (instance.destroyed) throw new Error("Hash instance has been destroyed");
|
|
2496
|
+
if (checkFinished && instance.finished) throw new Error("Hash#digest() has already been called");
|
|
2497
|
+
}
|
|
2498
|
+
/** Asserts output is properly-sized byte array */
|
|
2499
|
+
function aoutput(out, instance) {
|
|
2500
|
+
abytes(out);
|
|
2501
|
+
const min = instance.outputLen;
|
|
2502
|
+
if (out.length < min) throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
2503
|
+
}
|
|
2504
|
+
/** Zeroize a byte array. Warning: JS provides no guarantees. */
|
|
2505
|
+
function clean(...arrays) {
|
|
2506
|
+
for (let i = 0; i < arrays.length; i++) arrays[i].fill(0);
|
|
2507
|
+
}
|
|
2508
|
+
/** Create DataView of an array for easy byte-level manipulation. */
|
|
2509
|
+
function createView(arr) {
|
|
2510
|
+
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
2511
|
+
}
|
|
2512
|
+
/** The rotate right (circular right shift) operation for uint32 */
|
|
2513
|
+
function rotr(word, shift) {
|
|
2514
|
+
return word << 32 - shift | word >>> shift;
|
|
2515
|
+
}
|
|
2516
|
+
const hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
2517
|
+
const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
2518
|
+
/**
|
|
2519
|
+
* Convert byte array to hex string. Uses built-in function, when available.
|
|
2520
|
+
* @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
|
|
2521
|
+
*/
|
|
2522
|
+
function bytesToHex(bytes) {
|
|
2523
|
+
abytes(bytes);
|
|
2524
|
+
if (hasHexBuiltin) return bytes.toHex();
|
|
2525
|
+
let hex = "";
|
|
2526
|
+
for (let i = 0; i < bytes.length; i++) hex += hexes[bytes[i]];
|
|
2527
|
+
return hex;
|
|
2528
|
+
}
|
|
2529
|
+
/**
|
|
2530
|
+
* Converts string to bytes using UTF8 encoding.
|
|
2531
|
+
* @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])
|
|
2532
|
+
*/
|
|
2533
|
+
function utf8ToBytes(str) {
|
|
2534
|
+
if (typeof str !== "string") throw new Error("string expected");
|
|
2535
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
2536
|
+
}
|
|
2537
|
+
/**
|
|
2538
|
+
* Normalizes (non-hex) string or Uint8Array to Uint8Array.
|
|
2539
|
+
* Warning: when Uint8Array is passed, it would NOT get copied.
|
|
2540
|
+
* Keep in mind for future mutable operations.
|
|
2541
|
+
*/
|
|
2542
|
+
function toBytes(data) {
|
|
2543
|
+
if (typeof data === "string") data = utf8ToBytes(data);
|
|
2544
|
+
abytes(data);
|
|
2545
|
+
return data;
|
|
2546
|
+
}
|
|
2547
|
+
/** For runtime check if class implements interface */
|
|
2548
|
+
var Hash = class {};
|
|
2549
|
+
/** Wraps hash function, creating an interface on top of it */
|
|
2550
|
+
function createHasher(hashCons) {
|
|
2551
|
+
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
2552
|
+
const tmp = hashCons();
|
|
2553
|
+
hashC.outputLen = tmp.outputLen;
|
|
2554
|
+
hashC.blockLen = tmp.blockLen;
|
|
2555
|
+
hashC.create = () => hashCons();
|
|
2556
|
+
return hashC;
|
|
2557
|
+
}
|
|
2558
|
+
//#endregion
|
|
2559
|
+
//#region node_modules/@noble/hashes/esm/_md.js
|
|
2560
|
+
/**
|
|
2561
|
+
* Internal Merkle-Damgard hash utils.
|
|
2562
|
+
* @module
|
|
2563
|
+
*/
|
|
2564
|
+
/** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
|
|
2565
|
+
function setBigUint64(view, byteOffset, value, isLE) {
|
|
2566
|
+
if (typeof view.setBigUint64 === "function") return view.setBigUint64(byteOffset, value, isLE);
|
|
2567
|
+
const _32n = BigInt(32);
|
|
2568
|
+
const _u32_max = BigInt(4294967295);
|
|
2569
|
+
const wh = Number(value >> _32n & _u32_max);
|
|
2570
|
+
const wl = Number(value & _u32_max);
|
|
2571
|
+
const h = isLE ? 4 : 0;
|
|
2572
|
+
const l = isLE ? 0 : 4;
|
|
2573
|
+
view.setUint32(byteOffset + h, wh, isLE);
|
|
2574
|
+
view.setUint32(byteOffset + l, wl, isLE);
|
|
2575
|
+
}
|
|
2576
|
+
/** Choice: a ? b : c */
|
|
2577
|
+
function Chi(a, b, c) {
|
|
2578
|
+
return a & b ^ ~a & c;
|
|
2579
|
+
}
|
|
2580
|
+
/** Majority function, true if any two inputs is true. */
|
|
2581
|
+
function Maj(a, b, c) {
|
|
2582
|
+
return a & b ^ a & c ^ b & c;
|
|
2583
|
+
}
|
|
2584
|
+
/**
|
|
2585
|
+
* Merkle-Damgard hash construction base class.
|
|
2586
|
+
* Could be used to create MD5, RIPEMD, SHA1, SHA2.
|
|
2587
|
+
*/
|
|
2588
|
+
var HashMD = class extends Hash {
|
|
2589
|
+
constructor(blockLen, outputLen, padOffset, isLE) {
|
|
2590
|
+
super();
|
|
2591
|
+
this.finished = false;
|
|
2592
|
+
this.length = 0;
|
|
2593
|
+
this.pos = 0;
|
|
2594
|
+
this.destroyed = false;
|
|
2595
|
+
this.blockLen = blockLen;
|
|
2596
|
+
this.outputLen = outputLen;
|
|
2597
|
+
this.padOffset = padOffset;
|
|
2598
|
+
this.isLE = isLE;
|
|
2599
|
+
this.buffer = new Uint8Array(blockLen);
|
|
2600
|
+
this.view = createView(this.buffer);
|
|
2601
|
+
}
|
|
2602
|
+
update(data) {
|
|
2603
|
+
aexists(this);
|
|
2604
|
+
data = toBytes(data);
|
|
2605
|
+
abytes(data);
|
|
2606
|
+
const { view, buffer, blockLen } = this;
|
|
2607
|
+
const len = data.length;
|
|
2608
|
+
for (let pos = 0; pos < len;) {
|
|
2609
|
+
const take = Math.min(blockLen - this.pos, len - pos);
|
|
2610
|
+
if (take === blockLen) {
|
|
2611
|
+
const dataView = createView(data);
|
|
2612
|
+
for (; blockLen <= len - pos; pos += blockLen) this.process(dataView, pos);
|
|
2613
|
+
continue;
|
|
2614
|
+
}
|
|
2615
|
+
buffer.set(data.subarray(pos, pos + take), this.pos);
|
|
2616
|
+
this.pos += take;
|
|
2617
|
+
pos += take;
|
|
2618
|
+
if (this.pos === blockLen) {
|
|
2619
|
+
this.process(view, 0);
|
|
2620
|
+
this.pos = 0;
|
|
2621
|
+
}
|
|
2622
|
+
}
|
|
2623
|
+
this.length += data.length;
|
|
2624
|
+
this.roundClean();
|
|
2625
|
+
return this;
|
|
2626
|
+
}
|
|
2627
|
+
digestInto(out) {
|
|
2628
|
+
aexists(this);
|
|
2629
|
+
aoutput(out, this);
|
|
2630
|
+
this.finished = true;
|
|
2631
|
+
const { buffer, view, blockLen, isLE } = this;
|
|
2632
|
+
let { pos } = this;
|
|
2633
|
+
buffer[pos++] = 128;
|
|
2634
|
+
clean(this.buffer.subarray(pos));
|
|
2635
|
+
if (this.padOffset > blockLen - pos) {
|
|
2636
|
+
this.process(view, 0);
|
|
2637
|
+
pos = 0;
|
|
2638
|
+
}
|
|
2639
|
+
for (let i = pos; i < blockLen; i++) buffer[i] = 0;
|
|
2640
|
+
setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
|
|
2641
|
+
this.process(view, 0);
|
|
2642
|
+
const oview = createView(out);
|
|
2643
|
+
const len = this.outputLen;
|
|
2644
|
+
if (len % 4) throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
2645
|
+
const outLen = len / 4;
|
|
2646
|
+
const state = this.get();
|
|
2647
|
+
if (outLen > state.length) throw new Error("_sha2: outputLen bigger than state");
|
|
2648
|
+
for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);
|
|
2649
|
+
}
|
|
2650
|
+
digest() {
|
|
2651
|
+
const { buffer, outputLen } = this;
|
|
2652
|
+
this.digestInto(buffer);
|
|
2653
|
+
const res = buffer.slice(0, outputLen);
|
|
2654
|
+
this.destroy();
|
|
2655
|
+
return res;
|
|
2656
|
+
}
|
|
2657
|
+
_cloneInto(to) {
|
|
2658
|
+
to || (to = new this.constructor());
|
|
2659
|
+
to.set(...this.get());
|
|
2660
|
+
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
|
2661
|
+
to.destroyed = destroyed;
|
|
2662
|
+
to.finished = finished;
|
|
2663
|
+
to.length = length;
|
|
2664
|
+
to.pos = pos;
|
|
2665
|
+
if (length % blockLen) to.buffer.set(buffer);
|
|
2666
|
+
return to;
|
|
2667
|
+
}
|
|
2668
|
+
clone() {
|
|
2669
|
+
return this._cloneInto();
|
|
2670
|
+
}
|
|
2671
|
+
};
|
|
2672
|
+
/**
|
|
2673
|
+
* Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
|
|
2674
|
+
* Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
|
|
2675
|
+
*/
|
|
2676
|
+
/** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */
|
|
2677
|
+
const SHA256_IV = /* @__PURE__ */ Uint32Array.from([
|
|
2678
|
+
1779033703,
|
|
2679
|
+
3144134277,
|
|
2680
|
+
1013904242,
|
|
2681
|
+
2773480762,
|
|
2682
|
+
1359893119,
|
|
2683
|
+
2600822924,
|
|
2684
|
+
528734635,
|
|
2685
|
+
1541459225
|
|
2686
|
+
]);
|
|
2687
|
+
//#endregion
|
|
2688
|
+
//#region node_modules/@noble/hashes/esm/sha2.js
|
|
2689
|
+
/**
|
|
2690
|
+
* SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.
|
|
2691
|
+
* SHA256 is the fastest hash implementable in JS, even faster than Blake3.
|
|
2692
|
+
* Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
|
|
2693
|
+
* [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
|
|
2694
|
+
* @module
|
|
2695
|
+
*/
|
|
2696
|
+
/**
|
|
2697
|
+
* Round constants:
|
|
2698
|
+
* First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)
|
|
2699
|
+
*/
|
|
2700
|
+
const SHA256_K = /* @__PURE__ */ Uint32Array.from([
|
|
2701
|
+
1116352408,
|
|
2702
|
+
1899447441,
|
|
2703
|
+
3049323471,
|
|
2704
|
+
3921009573,
|
|
2705
|
+
961987163,
|
|
2706
|
+
1508970993,
|
|
2707
|
+
2453635748,
|
|
2708
|
+
2870763221,
|
|
2709
|
+
3624381080,
|
|
2710
|
+
310598401,
|
|
2711
|
+
607225278,
|
|
2712
|
+
1426881987,
|
|
2713
|
+
1925078388,
|
|
2714
|
+
2162078206,
|
|
2715
|
+
2614888103,
|
|
2716
|
+
3248222580,
|
|
2717
|
+
3835390401,
|
|
2718
|
+
4022224774,
|
|
2719
|
+
264347078,
|
|
2720
|
+
604807628,
|
|
2721
|
+
770255983,
|
|
2722
|
+
1249150122,
|
|
2723
|
+
1555081692,
|
|
2724
|
+
1996064986,
|
|
2725
|
+
2554220882,
|
|
2726
|
+
2821834349,
|
|
2727
|
+
2952996808,
|
|
2728
|
+
3210313671,
|
|
2729
|
+
3336571891,
|
|
2730
|
+
3584528711,
|
|
2731
|
+
113926993,
|
|
2732
|
+
338241895,
|
|
2733
|
+
666307205,
|
|
2734
|
+
773529912,
|
|
2735
|
+
1294757372,
|
|
2736
|
+
1396182291,
|
|
2737
|
+
1695183700,
|
|
2738
|
+
1986661051,
|
|
2739
|
+
2177026350,
|
|
2740
|
+
2456956037,
|
|
2741
|
+
2730485921,
|
|
2742
|
+
2820302411,
|
|
2743
|
+
3259730800,
|
|
2744
|
+
3345764771,
|
|
2745
|
+
3516065817,
|
|
2746
|
+
3600352804,
|
|
2747
|
+
4094571909,
|
|
2748
|
+
275423344,
|
|
2749
|
+
430227734,
|
|
2750
|
+
506948616,
|
|
2751
|
+
659060556,
|
|
2752
|
+
883997877,
|
|
2753
|
+
958139571,
|
|
2754
|
+
1322822218,
|
|
2755
|
+
1537002063,
|
|
2756
|
+
1747873779,
|
|
2757
|
+
1955562222,
|
|
2758
|
+
2024104815,
|
|
2759
|
+
2227730452,
|
|
2760
|
+
2361852424,
|
|
2761
|
+
2428436474,
|
|
2762
|
+
2756734187,
|
|
2763
|
+
3204031479,
|
|
2764
|
+
3329325298
|
|
2765
|
+
]);
|
|
2766
|
+
/** Reusable temporary buffer. "W" comes straight from spec. */
|
|
2767
|
+
const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
|
2768
|
+
var SHA256 = class extends HashMD {
|
|
2769
|
+
constructor(outputLen = 32) {
|
|
2770
|
+
super(64, outputLen, 8, false);
|
|
2771
|
+
this.A = SHA256_IV[0] | 0;
|
|
2772
|
+
this.B = SHA256_IV[1] | 0;
|
|
2773
|
+
this.C = SHA256_IV[2] | 0;
|
|
2774
|
+
this.D = SHA256_IV[3] | 0;
|
|
2775
|
+
this.E = SHA256_IV[4] | 0;
|
|
2776
|
+
this.F = SHA256_IV[5] | 0;
|
|
2777
|
+
this.G = SHA256_IV[6] | 0;
|
|
2778
|
+
this.H = SHA256_IV[7] | 0;
|
|
2779
|
+
}
|
|
2780
|
+
get() {
|
|
2781
|
+
const { A, B, C, D, E, F, G, H } = this;
|
|
2782
|
+
return [
|
|
2783
|
+
A,
|
|
2784
|
+
B,
|
|
2785
|
+
C,
|
|
2786
|
+
D,
|
|
2787
|
+
E,
|
|
2788
|
+
F,
|
|
2789
|
+
G,
|
|
2790
|
+
H
|
|
2791
|
+
];
|
|
2792
|
+
}
|
|
2793
|
+
set(A, B, C, D, E, F, G, H) {
|
|
2794
|
+
this.A = A | 0;
|
|
2795
|
+
this.B = B | 0;
|
|
2796
|
+
this.C = C | 0;
|
|
2797
|
+
this.D = D | 0;
|
|
2798
|
+
this.E = E | 0;
|
|
2799
|
+
this.F = F | 0;
|
|
2800
|
+
this.G = G | 0;
|
|
2801
|
+
this.H = H | 0;
|
|
2802
|
+
}
|
|
2803
|
+
process(view, offset) {
|
|
2804
|
+
for (let i = 0; i < 16; i++, offset += 4) SHA256_W[i] = view.getUint32(offset, false);
|
|
2805
|
+
for (let i = 16; i < 64; i++) {
|
|
2806
|
+
const W15 = SHA256_W[i - 15];
|
|
2807
|
+
const W2 = SHA256_W[i - 2];
|
|
2808
|
+
const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;
|
|
2809
|
+
const s1 = rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10;
|
|
2810
|
+
SHA256_W[i] = s1 + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;
|
|
2811
|
+
}
|
|
2812
|
+
let { A, B, C, D, E, F, G, H } = this;
|
|
2813
|
+
for (let i = 0; i < 64; i++) {
|
|
2814
|
+
const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
|
|
2815
|
+
const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;
|
|
2816
|
+
const T2 = (rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22)) + Maj(A, B, C) | 0;
|
|
2817
|
+
H = G;
|
|
2818
|
+
G = F;
|
|
2819
|
+
F = E;
|
|
2820
|
+
E = D + T1 | 0;
|
|
2821
|
+
D = C;
|
|
2822
|
+
C = B;
|
|
2823
|
+
B = A;
|
|
2824
|
+
A = T1 + T2 | 0;
|
|
2825
|
+
}
|
|
2826
|
+
A = A + this.A | 0;
|
|
2827
|
+
B = B + this.B | 0;
|
|
2828
|
+
C = C + this.C | 0;
|
|
2829
|
+
D = D + this.D | 0;
|
|
2830
|
+
E = E + this.E | 0;
|
|
2831
|
+
F = F + this.F | 0;
|
|
2832
|
+
G = G + this.G | 0;
|
|
2833
|
+
H = H + this.H | 0;
|
|
2834
|
+
this.set(A, B, C, D, E, F, G, H);
|
|
2835
|
+
}
|
|
2836
|
+
roundClean() {
|
|
2837
|
+
clean(SHA256_W);
|
|
2838
|
+
}
|
|
2839
|
+
destroy() {
|
|
2840
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
|
2841
|
+
clean(this.buffer);
|
|
2842
|
+
}
|
|
2843
|
+
};
|
|
2844
|
+
//#endregion
|
|
2845
|
+
//#region node_modules/@noble/hashes/esm/sha256.js
|
|
2846
|
+
/**
|
|
2847
|
+
* SHA2-256 a.k.a. sha256. In JS, it is the fastest hash, even faster than Blake3.
|
|
2848
|
+
*
|
|
2849
|
+
* To break sha256 using birthday attack, attackers need to try 2^128 hashes.
|
|
2850
|
+
* BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
|
|
2851
|
+
*
|
|
2852
|
+
* Check out [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
|
|
2853
|
+
* @module
|
|
2854
|
+
* @deprecated
|
|
2855
|
+
*/
|
|
2856
|
+
/** @deprecated Use import from `noble/hashes/sha2` module */
|
|
2857
|
+
const sha256 = /* @__PURE__ */ createHasher(() => new SHA256());
|
|
2858
|
+
Object.freeze({
|
|
2483
2859
|
title: 80,
|
|
2484
2860
|
body: 200,
|
|
2485
2861
|
tag: 64
|
|
2486
2862
|
});
|
|
2487
2863
|
const MAX_SEEN_QUESTION_KEYS = 20;
|
|
2488
|
-
|
|
2489
|
-
|
|
2864
|
+
/** A bounded native identifier derived from the complete, case-sensitive wire ID. */
|
|
2865
|
+
function notificationIdentity(value) {
|
|
2866
|
+
return bytesToHex(sha256(JSON.stringify(value)).subarray(0, 16));
|
|
2490
2867
|
}
|
|
2491
2868
|
/** Stable per-turn tag so concurrent sessions keep separate notifications. */
|
|
2492
2869
|
function taskCompletionTag(sessionId, turn) {
|
|
2493
|
-
return `dsh-task-done-${
|
|
2870
|
+
return `dsh-task-done-${notificationIdentity(sessionId)}-${String(turn)}`;
|
|
2494
2871
|
}
|
|
2495
2872
|
/** Decide whether the current snapshot deserves a system notification. */
|
|
2496
2873
|
var TaskNotifyTracker = class {
|
|
@@ -2581,7 +2958,7 @@ window.__ModuleLoader__.load({
|
|
|
2581
2958
|
}
|
|
2582
2959
|
event(kind, sessionLabel, questionKey) {
|
|
2583
2960
|
const text = this.format(kind, sessionLabel);
|
|
2584
|
-
const tag = kind === "question" && questionKey !== void 0 ? `dsh-task-question-${
|
|
2961
|
+
const tag = kind === "question" && questionKey !== void 0 ? `dsh-task-question-${notificationIdentity(questionKey)}` : "dsh-task-done";
|
|
2585
2962
|
return Object.freeze({
|
|
2586
2963
|
kind,
|
|
2587
2964
|
title: text.title,
|
|
@@ -2666,7 +3043,7 @@ window.__ModuleLoader__.load({
|
|
|
2666
3043
|
if (typeof record.sessionId !== "string" || record.sessionId.trim() === "") return void 0;
|
|
2667
3044
|
const turn = typeof record.turn === "number" && Number.isSafeInteger(record.turn) && record.turn >= 0 ? record.turn : 0;
|
|
2668
3045
|
return Object.freeze({
|
|
2669
|
-
sessionId: record.sessionId
|
|
3046
|
+
sessionId: record.sessionId,
|
|
2670
3047
|
turn
|
|
2671
3048
|
});
|
|
2672
3049
|
}
|
|
@@ -2796,6 +3173,10 @@ window.__ModuleLoader__.load({
|
|
|
2796
3173
|
[data-dsh-mobile-composer-controls] button:not(:where(dialog *,[popover] *,[role="dialog"] *,[role="menu"] *,[role="listbox"] *,[data-trigger-menu] *)) { white-space:normal !important; overflow-wrap:anywhere !important; }
|
|
2797
3174
|
@media (max-width:720px) {
|
|
2798
3175
|
[data-dsh-mobile-composer-row] button:not([role="switch"]):not(:where(dialog *,[popover] *,[role="dialog"] *,[role="menu"] *,[role="listbox"] *,[data-trigger-menu] *)) { min-width:44px !important; min-height:44px !important; touch-action:manipulation; }
|
|
3176
|
+
/* Public slot icon wrappers must reserve the same space as their enlarged
|
|
3177
|
+
child targets. Keep wrapper and tooltip ownership intact; pure switches,
|
|
3178
|
+
dialogs and wrappers without direct non-switch buttons are not selected. */
|
|
3179
|
+
:is([data-dsh-mobile-composer-tools],[data-dsh-mobile-composer-controls]) > :is([data-slot="conversation.input.left"],[data-slot="conversation.input.right"]) > :where(span,div):not(:where(dialog,[popover],[role="dialog"],[role="menu"],[role="listbox"],[data-trigger-menu])):has(> button:not([role="switch"])) { min-width:44px !important; min-height:44px !important; flex-shrink:0 !important; }
|
|
2799
3180
|
[data-dsh-mobile-composer-trailing] > button[class*="_primary"] { min-width:44px !important; flex-shrink:0 !important; }
|
|
2800
3181
|
[data-dsh-mobile-composer-row] { display:flex !important; flex-wrap:wrap !important; align-items:center !important; gap:4px 8px !important; min-width:0 !important; max-width:100% !important; }
|
|
2801
3182
|
[data-dsh-mobile-composer-tools]:not([hidden]) { display:flex !important; flex:0 1 auto !important; flex-wrap:wrap !important; width:auto !important; min-width:0 !important; max-width:100% !important; gap:6px !important; }
|
|
@@ -10136,6 +10517,7 @@ window.__ModuleLoader__.load({
|
|
|
10136
10517
|
const activations = new PerIdActivationLifecycle();
|
|
10137
10518
|
const styleNodes = /* @__PURE__ */ new Map();
|
|
10138
10519
|
const styleEtags = /* @__PURE__ */ new Map();
|
|
10520
|
+
const scriptEtags = /* @__PURE__ */ new Map();
|
|
10139
10521
|
const scriptDigests = /* @__PURE__ */ new Map();
|
|
10140
10522
|
const activeHostGenerations = /* @__PURE__ */ new Map();
|
|
10141
10523
|
const activationKeys = /* @__PURE__ */ new Map();
|
|
@@ -10516,6 +10898,7 @@ window.__ModuleLoader__.load({
|
|
|
10516
10898
|
styleNodes.get(id)?.remove();
|
|
10517
10899
|
styleNodes.delete(id);
|
|
10518
10900
|
styleEtags.delete(id);
|
|
10901
|
+
scriptEtags.delete(id);
|
|
10519
10902
|
scriptDigests.delete(id);
|
|
10520
10903
|
activeHostGenerations.delete(id);
|
|
10521
10904
|
activationKeys.delete(id);
|
|
@@ -10524,6 +10907,7 @@ window.__ModuleLoader__.load({
|
|
|
10524
10907
|
const managedManifestIdSources = () => [
|
|
10525
10908
|
styleNodes.keys(),
|
|
10526
10909
|
styleEtags.keys(),
|
|
10910
|
+
scriptEtags.keys(),
|
|
10527
10911
|
scriptDigests.keys(),
|
|
10528
10912
|
managedDefinitionIds
|
|
10529
10913
|
];
|
|
@@ -10617,12 +11001,13 @@ window.__ModuleLoader__.load({
|
|
|
10617
11001
|
commitStyle(entry.id, styleChange, pendingCss, pendingStyleEtag);
|
|
10618
11002
|
activations.remove(entry.id);
|
|
10619
11003
|
activeHostGenerations.delete(entry.id);
|
|
11004
|
+
scriptEtags.delete(entry.id);
|
|
10620
11005
|
scriptDigests.delete(entry.id);
|
|
10621
11006
|
if (managedDefinitionIds.delete(entry.id)) definitions.delete(entry.id);
|
|
10622
11007
|
} else {
|
|
10623
11008
|
const scriptHeaders = {};
|
|
10624
|
-
const
|
|
10625
|
-
if (
|
|
11009
|
+
const storedEtag = scriptEtags.get(entry.id);
|
|
11010
|
+
if (storedEtag !== void 0) scriptHeaders["if-none-match"] = storedEtag;
|
|
10626
11011
|
const scriptResponse = await fetch(scriptUrl, {
|
|
10627
11012
|
credentials: "same-origin",
|
|
10628
11013
|
cache: "no-store",
|
|
@@ -10630,8 +11015,10 @@ window.__ModuleLoader__.load({
|
|
|
10630
11015
|
signal
|
|
10631
11016
|
});
|
|
10632
11017
|
let nextDigest;
|
|
11018
|
+
let nextEtag;
|
|
10633
11019
|
if (scriptResponse.status !== 304) {
|
|
10634
11020
|
if (!scriptResponse.ok) throw new Error("mobile extension script failed to load");
|
|
11021
|
+
nextEtag = scriptResponse.headers.get("etag") ?? void 0;
|
|
10635
11022
|
const source = await scriptResponse.text();
|
|
10636
11023
|
if (refreshAborted(signal)) return false;
|
|
10637
11024
|
const digest = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(source));
|
|
@@ -10673,6 +11060,10 @@ window.__ModuleLoader__.load({
|
|
|
10673
11060
|
}
|
|
10674
11061
|
managedDefinitionIds.add(entry.id);
|
|
10675
11062
|
if (nextDigest !== void 0) scriptDigests.set(entry.id, nextDigest);
|
|
11063
|
+
if (scriptResponse.status !== 304) {
|
|
11064
|
+
if (nextEtag === void 0 || nextEtag === "") scriptEtags.delete(entry.id);
|
|
11065
|
+
else scriptEtags.set(entry.id, nextEtag);
|
|
11066
|
+
}
|
|
10676
11067
|
}
|
|
10677
11068
|
} catch {
|
|
10678
11069
|
if (evaluatedDefinition) {
|