@pixelmatters/markup 1.22.0 → 1.23.0
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/README.md +7 -7
- package/dist/widget.js +487 -452
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/skills/install-markup-widget/SKILL.md +5 -5
package/dist/widget.js
CHANGED
|
@@ -3302,9 +3302,9 @@ function Ui() {
|
|
|
3302
3302
|
r.apply(this, e), Vi(t);
|
|
3303
3303
|
}
|
|
3304
3304
|
let o = () => Vi(t), s = () => {
|
|
3305
|
-
history.pushState === i && (history.pushState = n), history.replaceState === a && (history.replaceState = r), window.removeEventListener("popstate", o), t.clear();
|
|
3305
|
+
history.pushState === i && (history.pushState = n), history.replaceState === a && (history.replaceState = r), window.removeEventListener("popstate", o), window.removeEventListener("hashchange", o), t.clear();
|
|
3306
3306
|
};
|
|
3307
|
-
return Object.defineProperty(i, zi, { value: 1 }), Object.defineProperty(i, Bi, { value: t }), Object.defineProperty(i, Hi, { value: s }), Object.defineProperty(a, zi, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", o), {
|
|
3307
|
+
return Object.defineProperty(i, zi, { value: 1 }), Object.defineProperty(i, Bi, { value: t }), Object.defineProperty(i, Hi, { value: s }), Object.defineProperty(a, zi, { value: 1 }), history.pushState = i, history.replaceState = a, window.addEventListener("popstate", o), window.addEventListener("hashchange", o), {
|
|
3308
3308
|
listeners: t,
|
|
3309
3309
|
restore: s
|
|
3310
3310
|
};
|
|
@@ -3576,46 +3576,88 @@ async function sa(e) {
|
|
|
3576
3576
|
return d;
|
|
3577
3577
|
}
|
|
3578
3578
|
//#endregion
|
|
3579
|
+
//#region src/runtime/route.ts
|
|
3580
|
+
var ca = "markup-thread", la = /^#markup-thread=(.+)$/, ua = /^#!?\//;
|
|
3581
|
+
function da(e) {
|
|
3582
|
+
if (!ua.test(e)) return "";
|
|
3583
|
+
let t = e.slice(1).split("?")[0]?.split("#")[0] ?? "";
|
|
3584
|
+
return t === "/" || t === "!/" ? "" : `#${t}`;
|
|
3585
|
+
}
|
|
3586
|
+
function fa() {
|
|
3587
|
+
let { host: e, pathname: t, hash: n } = window.location;
|
|
3588
|
+
return e + t + da(n);
|
|
3589
|
+
}
|
|
3590
|
+
function pa() {
|
|
3591
|
+
let e = new URLSearchParams(window.location.search).get(ca);
|
|
3592
|
+
if (e) return e;
|
|
3593
|
+
let t = la.exec(window.location.hash)?.[1];
|
|
3594
|
+
if (t === void 0) return null;
|
|
3595
|
+
try {
|
|
3596
|
+
return decodeURIComponent(t);
|
|
3597
|
+
} catch {
|
|
3598
|
+
return t;
|
|
3599
|
+
}
|
|
3600
|
+
}
|
|
3601
|
+
function ma(e) {
|
|
3602
|
+
if (e === "") return "";
|
|
3603
|
+
let t = e.slice(1).split("&").filter((e) => e !== "markup-thread" && !e.startsWith("markup-thread="));
|
|
3604
|
+
return t.length > 0 ? `?${t.join("&")}` : "";
|
|
3605
|
+
}
|
|
3606
|
+
function ha() {
|
|
3607
|
+
let { pathname: e, search: t, hash: n } = window.location, r = la.test(n) ? "" : n;
|
|
3608
|
+
history.replaceState(history.state, "", e + ma(t) + r);
|
|
3609
|
+
}
|
|
3610
|
+
function ga(e) {
|
|
3611
|
+
let t = e.hash === "" ? e.href.replace(/#$/, "") : e.href.slice(0, e.href.length - e.hash.length);
|
|
3612
|
+
return e.search === "" ? t.replace(/\?$/, "") : t.slice(0, t.length - e.search.length);
|
|
3613
|
+
}
|
|
3614
|
+
function _a(e, t) {
|
|
3615
|
+
let n = qi(e, window.location.href);
|
|
3616
|
+
if (!n) return null;
|
|
3617
|
+
let r = ma(n.search), i = r === "" ? "?" : "&", a = `${ca}=${encodeURIComponent(t)}`;
|
|
3618
|
+
return `${ga(n)}${r}${i}${a}${n.hash}`;
|
|
3619
|
+
}
|
|
3620
|
+
//#endregion
|
|
3579
3621
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/util.js
|
|
3580
|
-
function
|
|
3622
|
+
function va(e, t) {
|
|
3581
3623
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
3582
3624
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
3583
3625
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
3584
3626
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
3585
3627
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
3586
3628
|
}
|
|
3587
|
-
var
|
|
3629
|
+
var ya = (() => {
|
|
3588
3630
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
3589
3631
|
return () => (e += 1, `u${t()}${e}`);
|
|
3590
3632
|
})();
|
|
3591
|
-
function
|
|
3633
|
+
function ba(e) {
|
|
3592
3634
|
let t = [];
|
|
3593
3635
|
for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
|
|
3594
3636
|
return t;
|
|
3595
3637
|
}
|
|
3596
|
-
var
|
|
3597
|
-
function
|
|
3598
|
-
return
|
|
3638
|
+
var xa = null;
|
|
3639
|
+
function Sa(e = {}) {
|
|
3640
|
+
return xa || (e.includeStyleProperties ? (xa = e.includeStyleProperties, xa) : (xa = ba(window.getComputedStyle(document.documentElement)), xa));
|
|
3599
3641
|
}
|
|
3600
|
-
function
|
|
3642
|
+
function Ca(e, t) {
|
|
3601
3643
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
3602
3644
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
3603
3645
|
}
|
|
3604
|
-
function
|
|
3605
|
-
let t =
|
|
3646
|
+
function wa(e) {
|
|
3647
|
+
let t = Ca(e, "border-left-width"), n = Ca(e, "border-right-width");
|
|
3606
3648
|
return e.clientWidth + t + n;
|
|
3607
3649
|
}
|
|
3608
|
-
function
|
|
3609
|
-
let t =
|
|
3650
|
+
function Ta(e) {
|
|
3651
|
+
let t = Ca(e, "border-top-width"), n = Ca(e, "border-bottom-width");
|
|
3610
3652
|
return e.clientHeight + t + n;
|
|
3611
3653
|
}
|
|
3612
|
-
function
|
|
3654
|
+
function Ea(e, t = {}) {
|
|
3613
3655
|
return {
|
|
3614
|
-
width: t.width ||
|
|
3615
|
-
height: t.height ||
|
|
3656
|
+
width: t.width || wa(e),
|
|
3657
|
+
height: t.height || Ta(e)
|
|
3616
3658
|
};
|
|
3617
3659
|
}
|
|
3618
|
-
function
|
|
3660
|
+
function Da() {
|
|
3619
3661
|
let e, t;
|
|
3620
3662
|
try {
|
|
3621
3663
|
t = process;
|
|
@@ -3624,10 +3666,10 @@ function _a() {
|
|
|
3624
3666
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
3625
3667
|
}
|
|
3626
3668
|
var Y = 16384;
|
|
3627
|
-
function
|
|
3669
|
+
function Oa(e) {
|
|
3628
3670
|
(e.width > Y || e.height > Y) && (e.width > Y && e.height > Y ? e.width > e.height ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y) : e.width > Y ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y));
|
|
3629
3671
|
}
|
|
3630
|
-
function
|
|
3672
|
+
function ka(e) {
|
|
3631
3673
|
return new Promise((t, n) => {
|
|
3632
3674
|
let r = new Image();
|
|
3633
3675
|
r.onload = () => {
|
|
@@ -3637,12 +3679,12 @@ function ya(e) {
|
|
|
3637
3679
|
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
3638
3680
|
});
|
|
3639
3681
|
}
|
|
3640
|
-
async function
|
|
3682
|
+
async function Aa(e) {
|
|
3641
3683
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
3642
3684
|
}
|
|
3643
|
-
async function
|
|
3685
|
+
async function ja(e, t, n) {
|
|
3644
3686
|
let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
|
|
3645
|
-
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e),
|
|
3687
|
+
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), Aa(i);
|
|
3646
3688
|
}
|
|
3647
3689
|
var X = (e, t) => {
|
|
3648
3690
|
if (e instanceof t) return !0;
|
|
@@ -3651,66 +3693,66 @@ var X = (e, t) => {
|
|
|
3651
3693
|
};
|
|
3652
3694
|
//#endregion
|
|
3653
3695
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-pseudos.js
|
|
3654
|
-
function
|
|
3696
|
+
function Ma(e) {
|
|
3655
3697
|
let t = e.getPropertyValue("content");
|
|
3656
3698
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
3657
3699
|
}
|
|
3658
|
-
function
|
|
3659
|
-
return
|
|
3700
|
+
function Na(e, t) {
|
|
3701
|
+
return Sa(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
|
|
3660
3702
|
}
|
|
3661
|
-
function
|
|
3662
|
-
let i = `.${e}:${t}`, a = n.cssText ?
|
|
3703
|
+
function Pa(e, t, n, r) {
|
|
3704
|
+
let i = `.${e}:${t}`, a = n.cssText ? Ma(n) : Na(n, r);
|
|
3663
3705
|
return document.createTextNode(`${i}{${a}}`);
|
|
3664
3706
|
}
|
|
3665
|
-
function
|
|
3707
|
+
function Fa(e, t, n, r) {
|
|
3666
3708
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
3667
3709
|
if (a === "" || a === "none") return;
|
|
3668
|
-
let o =
|
|
3710
|
+
let o = ya();
|
|
3669
3711
|
try {
|
|
3670
3712
|
t.className = `${t.className} ${o}`;
|
|
3671
3713
|
} catch {
|
|
3672
3714
|
return;
|
|
3673
3715
|
}
|
|
3674
3716
|
let s = document.createElement("style");
|
|
3675
|
-
s.appendChild(
|
|
3717
|
+
s.appendChild(Pa(o, n, i, r)), t.appendChild(s);
|
|
3676
3718
|
}
|
|
3677
|
-
function
|
|
3678
|
-
|
|
3719
|
+
function Ia(e, t, n) {
|
|
3720
|
+
Fa(e, t, ":before", n), Fa(e, t, ":after", n);
|
|
3679
3721
|
}
|
|
3680
3722
|
//#endregion
|
|
3681
3723
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/mimes.js
|
|
3682
|
-
var
|
|
3683
|
-
woff:
|
|
3684
|
-
woff2:
|
|
3724
|
+
var La = "application/font-woff", Ra = "image/jpeg", za = {
|
|
3725
|
+
woff: La,
|
|
3726
|
+
woff2: La,
|
|
3685
3727
|
ttf: "application/font-truetype",
|
|
3686
3728
|
eot: "application/vnd.ms-fontobject",
|
|
3687
3729
|
png: "image/png",
|
|
3688
|
-
jpg:
|
|
3689
|
-
jpeg:
|
|
3730
|
+
jpg: Ra,
|
|
3731
|
+
jpeg: Ra,
|
|
3690
3732
|
gif: "image/gif",
|
|
3691
3733
|
tiff: "image/tiff",
|
|
3692
3734
|
svg: "image/svg+xml",
|
|
3693
3735
|
webp: "image/webp"
|
|
3694
3736
|
};
|
|
3695
|
-
function
|
|
3737
|
+
function Ba(e) {
|
|
3696
3738
|
let t = /\.([^./]*?)$/g.exec(e);
|
|
3697
3739
|
return t ? t[1] : "";
|
|
3698
3740
|
}
|
|
3699
|
-
function
|
|
3700
|
-
return
|
|
3741
|
+
function Va(e) {
|
|
3742
|
+
return za[Ba(e).toLowerCase()] || "";
|
|
3701
3743
|
}
|
|
3702
3744
|
//#endregion
|
|
3703
3745
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/dataurl.js
|
|
3704
|
-
function
|
|
3746
|
+
function Ha(e) {
|
|
3705
3747
|
return e.split(/,/)[1];
|
|
3706
3748
|
}
|
|
3707
|
-
function
|
|
3749
|
+
function Ua(e) {
|
|
3708
3750
|
return e.search(/^(data:)/) !== -1;
|
|
3709
3751
|
}
|
|
3710
|
-
function
|
|
3752
|
+
function Wa(e, t) {
|
|
3711
3753
|
return `data:${t};base64,${e}`;
|
|
3712
3754
|
}
|
|
3713
|
-
async function
|
|
3755
|
+
async function Ga(e, t, n) {
|
|
3714
3756
|
let r = await fetch(e, t);
|
|
3715
3757
|
if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
|
|
3716
3758
|
let i = await r.blob();
|
|
@@ -3728,78 +3770,78 @@ async function Fa(e, t, n) {
|
|
|
3728
3770
|
}, a.readAsDataURL(i);
|
|
3729
3771
|
});
|
|
3730
3772
|
}
|
|
3731
|
-
var
|
|
3732
|
-
function
|
|
3773
|
+
var Ka = {};
|
|
3774
|
+
function qa(e, t, n) {
|
|
3733
3775
|
let r = e.replace(/\?.*/, "");
|
|
3734
3776
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
3735
3777
|
}
|
|
3736
|
-
async function
|
|
3737
|
-
let r =
|
|
3738
|
-
if (
|
|
3778
|
+
async function Ja(e, t, n) {
|
|
3779
|
+
let r = qa(e, t, n.includeQueryParams);
|
|
3780
|
+
if (Ka[r] != null) return Ka[r];
|
|
3739
3781
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
3740
3782
|
let i;
|
|
3741
3783
|
try {
|
|
3742
|
-
i =
|
|
3784
|
+
i = Wa(await Ga(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", Ha(n))), t);
|
|
3743
3785
|
} catch (t) {
|
|
3744
3786
|
i = n.imagePlaceholder || "";
|
|
3745
3787
|
let r = `Failed to fetch resource: ${e}`;
|
|
3746
3788
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
3747
3789
|
}
|
|
3748
|
-
return
|
|
3790
|
+
return Ka[r] = i, i;
|
|
3749
3791
|
}
|
|
3750
3792
|
//#endregion
|
|
3751
3793
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/clone-node.js
|
|
3752
|
-
async function
|
|
3794
|
+
async function Ya(e) {
|
|
3753
3795
|
let t = e.toDataURL();
|
|
3754
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
3796
|
+
return t === "data:," ? e.cloneNode(!1) : ka(t);
|
|
3755
3797
|
}
|
|
3756
|
-
async function
|
|
3798
|
+
async function Xa(e, t) {
|
|
3757
3799
|
if (e.currentSrc) {
|
|
3758
3800
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
3759
|
-
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height),
|
|
3801
|
+
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), ka(t.toDataURL());
|
|
3760
3802
|
}
|
|
3761
3803
|
let n = e.poster;
|
|
3762
|
-
return
|
|
3804
|
+
return ka(await Ja(n, Va(n), t));
|
|
3763
3805
|
}
|
|
3764
|
-
async function
|
|
3806
|
+
async function Za(e, t) {
|
|
3765
3807
|
try {
|
|
3766
|
-
if (e?.contentDocument?.body) return await
|
|
3808
|
+
if (e?.contentDocument?.body) return await so(e.contentDocument.body, t, !0);
|
|
3767
3809
|
} catch {}
|
|
3768
3810
|
return e.cloneNode(!1);
|
|
3769
3811
|
}
|
|
3770
|
-
async function
|
|
3771
|
-
return X(e, HTMLCanvasElement) ?
|
|
3812
|
+
async function Qa(e, t) {
|
|
3813
|
+
return X(e, HTMLCanvasElement) ? Ya(e) : X(e, HTMLVideoElement) ? Xa(e, t) : X(e, HTMLIFrameElement) ? Za(e, t) : e.cloneNode(eo(e));
|
|
3772
3814
|
}
|
|
3773
|
-
var
|
|
3774
|
-
async function
|
|
3775
|
-
if (
|
|
3815
|
+
var $a = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", eo = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
3816
|
+
async function to(e, t, n) {
|
|
3817
|
+
if (eo(t)) return t;
|
|
3776
3818
|
let r = [];
|
|
3777
|
-
return r =
|
|
3819
|
+
return r = $a(e) && e.assignedNodes ? ba(e.assignedNodes()) : X(e, HTMLIFrameElement) && e.contentDocument?.body ? ba(e.contentDocument.body.childNodes) : ba((e.shadowRoot ?? e).childNodes), r.length === 0 || X(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => so(r, n)).then((e) => {
|
|
3778
3820
|
e && t.appendChild(e);
|
|
3779
3821
|
}), Promise.resolve()), t;
|
|
3780
3822
|
}
|
|
3781
|
-
function
|
|
3823
|
+
function no(e, t, n) {
|
|
3782
3824
|
let r = t.style;
|
|
3783
3825
|
if (!r) return;
|
|
3784
3826
|
let i = window.getComputedStyle(e);
|
|
3785
|
-
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) :
|
|
3827
|
+
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : Sa(n).forEach((n) => {
|
|
3786
3828
|
let a = i.getPropertyValue(n);
|
|
3787
3829
|
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), X(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
|
|
3788
3830
|
});
|
|
3789
3831
|
}
|
|
3790
|
-
function
|
|
3832
|
+
function ro(e, t) {
|
|
3791
3833
|
X(e, HTMLTextAreaElement) && (t.innerHTML = e.value), X(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
3792
3834
|
}
|
|
3793
|
-
function
|
|
3835
|
+
function io(e, t) {
|
|
3794
3836
|
if (X(e, HTMLSelectElement)) {
|
|
3795
3837
|
let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
|
|
3796
3838
|
r && r.setAttribute("selected", "");
|
|
3797
3839
|
}
|
|
3798
3840
|
}
|
|
3799
|
-
function
|
|
3800
|
-
return X(t, Element) && (
|
|
3841
|
+
function ao(e, t, n) {
|
|
3842
|
+
return X(t, Element) && (no(e, t, n), Ia(e, t, n), ro(e, t), io(e, t)), t;
|
|
3801
3843
|
}
|
|
3802
|
-
async function
|
|
3844
|
+
async function oo(e, t) {
|
|
3803
3845
|
let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
3804
3846
|
if (n.length === 0) return e;
|
|
3805
3847
|
let r = {};
|
|
@@ -3807,7 +3849,7 @@ async function Xa(e, t) {
|
|
|
3807
3849
|
let a = n[i].getAttribute("xlink:href");
|
|
3808
3850
|
if (a) {
|
|
3809
3851
|
let n = e.querySelector(a), i = document.querySelector(a);
|
|
3810
|
-
!n && i && !r[a] && (r[a] = await
|
|
3852
|
+
!n && i && !r[a] && (r[a] = await so(i, t, !0));
|
|
3811
3853
|
}
|
|
3812
3854
|
}
|
|
3813
3855
|
let i = Object.values(r);
|
|
@@ -3821,61 +3863,61 @@ async function Xa(e, t) {
|
|
|
3821
3863
|
}
|
|
3822
3864
|
return e;
|
|
3823
3865
|
}
|
|
3824
|
-
async function
|
|
3825
|
-
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) =>
|
|
3866
|
+
async function so(e, t, n) {
|
|
3867
|
+
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => Qa(e, t)).then((n) => to(e, n, t)).then((n) => ao(e, n, t)).then((e) => oo(e, t));
|
|
3826
3868
|
}
|
|
3827
3869
|
//#endregion
|
|
3828
3870
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-resources.js
|
|
3829
|
-
var
|
|
3830
|
-
function
|
|
3871
|
+
var co = /url\((['"]?)([^'"]+?)\1\)/g, lo = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, uo = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
3872
|
+
function fo(e) {
|
|
3831
3873
|
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
3832
3874
|
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
3833
3875
|
}
|
|
3834
|
-
function
|
|
3876
|
+
function po(e) {
|
|
3835
3877
|
let t = [];
|
|
3836
|
-
return e.replace(
|
|
3878
|
+
return e.replace(co, (e, n, r) => (t.push(r), e)), t.filter((e) => !Ua(e));
|
|
3837
3879
|
}
|
|
3838
|
-
async function
|
|
3880
|
+
async function mo(e, t, n, r, i) {
|
|
3839
3881
|
try {
|
|
3840
|
-
let a = n ?
|
|
3841
|
-
return s = i ?
|
|
3882
|
+
let a = n ? va(t, n) : t, o = Va(t), s;
|
|
3883
|
+
return s = i ? Wa(await i(a), o) : await Ja(a, o, r), e.replace(fo(t), `$1${s}$3`);
|
|
3842
3884
|
} catch {}
|
|
3843
3885
|
return e;
|
|
3844
3886
|
}
|
|
3845
|
-
function
|
|
3846
|
-
return t ? e.replace(
|
|
3887
|
+
function ho(e, { preferredFontFormat: t }) {
|
|
3888
|
+
return t ? e.replace(uo, (e) => {
|
|
3847
3889
|
for (;;) {
|
|
3848
|
-
let [n, , r] =
|
|
3890
|
+
let [n, , r] = lo.exec(e) || [];
|
|
3849
3891
|
if (!r) return "";
|
|
3850
3892
|
if (r === t) return `src: ${n};`;
|
|
3851
3893
|
}
|
|
3852
3894
|
}) : e;
|
|
3853
3895
|
}
|
|
3854
|
-
function
|
|
3855
|
-
return e.search(
|
|
3896
|
+
function go(e) {
|
|
3897
|
+
return e.search(co) !== -1;
|
|
3856
3898
|
}
|
|
3857
|
-
async function
|
|
3858
|
-
if (!
|
|
3859
|
-
let r =
|
|
3860
|
-
return
|
|
3899
|
+
async function _o(e, t, n) {
|
|
3900
|
+
if (!go(e)) return e;
|
|
3901
|
+
let r = ho(e, n);
|
|
3902
|
+
return po(r).reduce((e, r) => e.then((e) => mo(e, r, t, n)), Promise.resolve(r));
|
|
3861
3903
|
}
|
|
3862
3904
|
//#endregion
|
|
3863
3905
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-images.js
|
|
3864
|
-
async function
|
|
3906
|
+
async function vo(e, t, n) {
|
|
3865
3907
|
let r = t.style?.getPropertyValue(e);
|
|
3866
3908
|
if (r) {
|
|
3867
|
-
let i = await
|
|
3909
|
+
let i = await _o(r, null, n);
|
|
3868
3910
|
return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
|
|
3869
3911
|
}
|
|
3870
3912
|
return !1;
|
|
3871
3913
|
}
|
|
3872
|
-
async function
|
|
3873
|
-
await
|
|
3914
|
+
async function yo(e, t) {
|
|
3915
|
+
await vo("background", e, t) || await vo("background-image", e, t), await vo("mask", e, t) || await vo("-webkit-mask", e, t) || await vo("mask-image", e, t) || await vo("-webkit-mask-image", e, t);
|
|
3874
3916
|
}
|
|
3875
|
-
async function
|
|
3917
|
+
async function bo(e, t) {
|
|
3876
3918
|
let n = X(e, HTMLImageElement);
|
|
3877
|
-
if (!(n && !
|
|
3878
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3919
|
+
if (!(n && !Ua(e.src)) && !(X(e, SVGImageElement) && !Ua(e.href.baseVal))) return;
|
|
3920
|
+
let r = n ? e.src : e.href.baseVal, i = await Ja(r, Va(r), t);
|
|
3879
3921
|
await new Promise((r, a) => {
|
|
3880
3922
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3881
3923
|
try {
|
|
@@ -3888,16 +3930,16 @@ async function lo(e, t) {
|
|
|
3888
3930
|
o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
|
|
3889
3931
|
});
|
|
3890
3932
|
}
|
|
3891
|
-
async function
|
|
3892
|
-
let n =
|
|
3933
|
+
async function xo(e, t) {
|
|
3934
|
+
let n = ba(e.childNodes).map((e) => So(e, t));
|
|
3893
3935
|
await Promise.all(n).then(() => e);
|
|
3894
3936
|
}
|
|
3895
|
-
async function
|
|
3896
|
-
X(e, Element) && (await
|
|
3937
|
+
async function So(e, t) {
|
|
3938
|
+
X(e, Element) && (await yo(e, t), await bo(e, t), await xo(e, t));
|
|
3897
3939
|
}
|
|
3898
3940
|
//#endregion
|
|
3899
3941
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/apply-style.js
|
|
3900
|
-
function
|
|
3942
|
+
function Co(e, t) {
|
|
3901
3943
|
let { style: n } = e;
|
|
3902
3944
|
t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
|
|
3903
3945
|
let r = t.style;
|
|
@@ -3907,22 +3949,22 @@ function po(e, t) {
|
|
|
3907
3949
|
}
|
|
3908
3950
|
//#endregion
|
|
3909
3951
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/embed-webfonts.js
|
|
3910
|
-
var
|
|
3911
|
-
async function
|
|
3912
|
-
let t =
|
|
3952
|
+
var wo = {};
|
|
3953
|
+
async function To(e) {
|
|
3954
|
+
let t = wo[e];
|
|
3913
3955
|
return t ?? (t = {
|
|
3914
3956
|
url: e,
|
|
3915
3957
|
cssText: await (await fetch(e)).text()
|
|
3916
|
-
},
|
|
3958
|
+
}, wo[e] = t, t);
|
|
3917
3959
|
}
|
|
3918
|
-
async function
|
|
3960
|
+
async function Eo(e, t) {
|
|
3919
3961
|
let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
3920
3962
|
let a = i.replace(r, "$1");
|
|
3921
|
-
return a.startsWith("https://") || (a = new URL(a, e.url).href),
|
|
3963
|
+
return a.startsWith("https://") || (a = new URL(a, e.url).href), Ga(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
|
|
3922
3964
|
});
|
|
3923
3965
|
return Promise.all(i).then(() => n);
|
|
3924
3966
|
}
|
|
3925
|
-
function
|
|
3967
|
+
function Do(e) {
|
|
3926
3968
|
if (e == null) return [];
|
|
3927
3969
|
let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
3928
3970
|
for (;;) {
|
|
@@ -3942,13 +3984,13 @@ function _o(e) {
|
|
|
3942
3984
|
}
|
|
3943
3985
|
return t;
|
|
3944
3986
|
}
|
|
3945
|
-
async function
|
|
3987
|
+
async function Oo(e, t) {
|
|
3946
3988
|
let n = [], r = [];
|
|
3947
3989
|
return e.forEach((n) => {
|
|
3948
3990
|
if ("cssRules" in n) try {
|
|
3949
|
-
|
|
3991
|
+
ba(n.cssRules || []).forEach((e, i) => {
|
|
3950
3992
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3951
|
-
let a = i + 1, o = e.href, s =
|
|
3993
|
+
let a = i + 1, o = e.href, s = To(o).then((e) => Eo(e, t)).then((e) => Do(e).forEach((e) => {
|
|
3952
3994
|
try {
|
|
3953
3995
|
n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
|
|
3954
3996
|
} catch (t) {
|
|
@@ -3965,7 +4007,7 @@ async function vo(e, t) {
|
|
|
3965
4007
|
});
|
|
3966
4008
|
} catch (i) {
|
|
3967
4009
|
let a = e.find((e) => e.href == null) || document.styleSheets[0];
|
|
3968
|
-
n.href != null && r.push(
|
|
4010
|
+
n.href != null && r.push(To(n.href).then((e) => Eo(e, t)).then((e) => Do(e).forEach((e) => {
|
|
3969
4011
|
a.insertRule(e, a.cssRules.length);
|
|
3970
4012
|
})).catch((e) => {
|
|
3971
4013
|
console.error("Error loading remote stylesheet", e);
|
|
@@ -3973,7 +4015,7 @@ async function vo(e, t) {
|
|
|
3973
4015
|
}
|
|
3974
4016
|
}), Promise.all(r).then(() => (e.forEach((e) => {
|
|
3975
4017
|
if ("cssRules" in e) try {
|
|
3976
|
-
|
|
4018
|
+
ba(e.cssRules || []).forEach((e) => {
|
|
3977
4019
|
n.push(e);
|
|
3978
4020
|
});
|
|
3979
4021
|
} catch (t) {
|
|
@@ -3981,36 +4023,36 @@ async function vo(e, t) {
|
|
|
3981
4023
|
}
|
|
3982
4024
|
}), n));
|
|
3983
4025
|
}
|
|
3984
|
-
function
|
|
3985
|
-
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
4026
|
+
function ko(e) {
|
|
4027
|
+
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => go(e.style.getPropertyValue("src")));
|
|
3986
4028
|
}
|
|
3987
|
-
async function
|
|
4029
|
+
async function Ao(e, t) {
|
|
3988
4030
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3989
|
-
return
|
|
4031
|
+
return ko(await Oo(ba(e.ownerDocument.styleSheets), t));
|
|
3990
4032
|
}
|
|
3991
|
-
function
|
|
4033
|
+
function jo(e) {
|
|
3992
4034
|
return e.trim().replace(/["']/g, "");
|
|
3993
4035
|
}
|
|
3994
|
-
function
|
|
4036
|
+
function Mo(e) {
|
|
3995
4037
|
let t = /* @__PURE__ */ new Set();
|
|
3996
4038
|
function n(e) {
|
|
3997
4039
|
(e.style.fontFamily || getComputedStyle(e).fontFamily).split(",").forEach((e) => {
|
|
3998
|
-
t.add(
|
|
4040
|
+
t.add(jo(e));
|
|
3999
4041
|
}), Array.from(e.children).forEach((e) => {
|
|
4000
4042
|
e instanceof HTMLElement && n(e);
|
|
4001
4043
|
});
|
|
4002
4044
|
}
|
|
4003
4045
|
return n(e), t;
|
|
4004
4046
|
}
|
|
4005
|
-
async function
|
|
4006
|
-
let n = await
|
|
4007
|
-
return (await Promise.all(n.filter((e) => r.has(
|
|
4047
|
+
async function No(e, t) {
|
|
4048
|
+
let n = await Ao(e, t), r = Mo(e);
|
|
4049
|
+
return (await Promise.all(n.filter((e) => r.has(jo(e.style.fontFamily))).map((e) => {
|
|
4008
4050
|
let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
|
|
4009
|
-
return
|
|
4051
|
+
return _o(e.cssText, n, t);
|
|
4010
4052
|
}))).join("\n");
|
|
4011
4053
|
}
|
|
4012
|
-
async function
|
|
4013
|
-
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await
|
|
4054
|
+
async function Po(e, t) {
|
|
4055
|
+
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await No(e, t) : t.fontEmbedCSS;
|
|
4014
4056
|
if (n) {
|
|
4015
4057
|
let t = document.createElement("style"), r = document.createTextNode(n);
|
|
4016
4058
|
t.appendChild(r), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
|
|
@@ -4018,17 +4060,17 @@ async function wo(e, t) {
|
|
|
4018
4060
|
}
|
|
4019
4061
|
//#endregion
|
|
4020
4062
|
//#region ../../node_modules/.pnpm/html-to-image@1.11.13/node_modules/html-to-image/es/index.js
|
|
4021
|
-
async function
|
|
4022
|
-
let { width: n, height: r } =
|
|
4023
|
-
return await
|
|
4063
|
+
async function Fo(e, t = {}) {
|
|
4064
|
+
let { width: n, height: r } = Ea(e, t), i = await so(e, t, !0);
|
|
4065
|
+
return await Po(i, t), await So(i, t), Co(i, t), await ja(i, n, r);
|
|
4024
4066
|
}
|
|
4025
|
-
async function
|
|
4026
|
-
let { width: n, height: r } =
|
|
4027
|
-
return a.width = c * s, a.height = l * s, t.skipAutoScale ||
|
|
4067
|
+
async function Io(e, t = {}) {
|
|
4068
|
+
let { width: n, height: r } = Ea(e, t), i = await ka(await Fo(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Da(), c = t.canvasWidth || n, l = t.canvasHeight || r;
|
|
4069
|
+
return a.width = c * s, a.height = l * s, t.skipAutoScale || Oa(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
|
|
4028
4070
|
}
|
|
4029
4071
|
//#endregion
|
|
4030
4072
|
//#region src/runtime/screenshot.ts
|
|
4031
|
-
var
|
|
4073
|
+
var Lo = 2097152, Ro = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", zo = [
|
|
4032
4074
|
{
|
|
4033
4075
|
quality: .85,
|
|
4034
4076
|
scale: 1
|
|
@@ -4045,8 +4087,8 @@ var Do = 2097152, Oo = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAA
|
|
|
4045
4087
|
quality: .6,
|
|
4046
4088
|
scale: .5
|
|
4047
4089
|
}
|
|
4048
|
-
],
|
|
4049
|
-
function
|
|
4090
|
+
], Bo = "background:currentColor!important;color:transparent!important;text-shadow:none!important;-webkit-text-fill-color:transparent!important", Vo = "input[type=\"password\"],input[autocomplete~=\"cc-number\"],input[autocomplete~=\"cc-csc\"],input[autocomplete~=\"cc-exp\"],input[autocomplete~=\"cc-name\"],input[autocomplete~=\"cc-type\"],input[autocomplete~=\"current-password\"],input[autocomplete~=\"new-password\"],input[autocomplete~=\"one-time-code\"]";
|
|
4091
|
+
function Ho(e) {
|
|
4050
4092
|
let t = e.parentElement;
|
|
4051
4093
|
for (; t;) {
|
|
4052
4094
|
if (t.hasAttribute("data-markup-safe")) return !0;
|
|
@@ -4054,37 +4096,37 @@ function Mo(e) {
|
|
|
4054
4096
|
}
|
|
4055
4097
|
return !1;
|
|
4056
4098
|
}
|
|
4057
|
-
function
|
|
4099
|
+
function Uo(e) {
|
|
4058
4100
|
let t = /* @__PURE__ */ new Set(), n = [];
|
|
4059
4101
|
function r(e) {
|
|
4060
4102
|
t.has(e) || (t.add(e), n.push(e));
|
|
4061
4103
|
}
|
|
4062
4104
|
for (let e of document.querySelectorAll("[data-markup-private],[data-markup-redact]")) r(e);
|
|
4063
|
-
for (let e of document.querySelectorAll(
|
|
4105
|
+
for (let e of document.querySelectorAll(Vo)) Ho(e) || r(e);
|
|
4064
4106
|
if (e.redactSelector) try {
|
|
4065
|
-
for (let t of document.querySelectorAll(e.redactSelector))
|
|
4107
|
+
for (let t of document.querySelectorAll(e.redactSelector)) Ho(t) || r(t);
|
|
4066
4108
|
} catch (e) {
|
|
4067
4109
|
F(e, { context: "screenshot-redact-selector" });
|
|
4068
4110
|
}
|
|
4069
|
-
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea"))
|
|
4111
|
+
if (e.strictScrub) for (let e of document.querySelectorAll("input,select,textarea")) Ho(e) || r(e);
|
|
4070
4112
|
return n;
|
|
4071
4113
|
}
|
|
4072
|
-
function
|
|
4114
|
+
function Wo(e) {
|
|
4073
4115
|
let t = e.getAttribute("style");
|
|
4074
|
-
return e.setAttribute("style", t ? `${t};${
|
|
4116
|
+
return e.setAttribute("style", t ? `${t};${Bo}` : Bo), () => {
|
|
4075
4117
|
t === null ? e.removeAttribute("style") : e.setAttribute("style", t);
|
|
4076
4118
|
};
|
|
4077
4119
|
}
|
|
4078
|
-
function
|
|
4120
|
+
function Go(e) {
|
|
4079
4121
|
if (e.id) return `#${CSS.escape(e.id)}`;
|
|
4080
4122
|
let t = e.tagName.toLowerCase(), n = e.getAttribute("type"), r = e.getAttribute("name");
|
|
4081
4123
|
return n && r ? `${t}[type="${n}"][name="${r}"]` : n ? `${t}[type="${n}"]` : r ? `${t}[name="${r}"]` : t;
|
|
4082
4124
|
}
|
|
4083
|
-
async function
|
|
4125
|
+
async function Ko(e, t, n) {
|
|
4084
4126
|
try {
|
|
4085
|
-
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ?
|
|
4127
|
+
let r = window.innerWidth, i = window.innerHeight, a = Math.min(window.devicePixelRatio, 2), o = n ? Uo(n) : [], s = o.map(Go), c = o.map(Wo), l;
|
|
4086
4128
|
try {
|
|
4087
|
-
l = await
|
|
4129
|
+
l = await Io(document.documentElement, {
|
|
4088
4130
|
width: r,
|
|
4089
4131
|
height: i,
|
|
4090
4132
|
cacheBust: !0,
|
|
@@ -4093,7 +4135,7 @@ async function Io(e, t, n) {
|
|
|
4093
4135
|
filter(t) {
|
|
4094
4136
|
return !(e && (t === e || e.contains(t)) || t instanceof Element && t.hasAttribute("data-markup-skip"));
|
|
4095
4137
|
},
|
|
4096
|
-
imagePlaceholder:
|
|
4138
|
+
imagePlaceholder: Ro,
|
|
4097
4139
|
onImageErrorHandler: () => {},
|
|
4098
4140
|
style: {
|
|
4099
4141
|
transform: `translateY(-${window.scrollY}px)`,
|
|
@@ -4105,9 +4147,9 @@ async function Io(e, t, n) {
|
|
|
4105
4147
|
}
|
|
4106
4148
|
if (t) {
|
|
4107
4149
|
let e = l.getContext("2d");
|
|
4108
|
-
e &&
|
|
4150
|
+
e && Xo(e, t.x, t.y, a);
|
|
4109
4151
|
}
|
|
4110
|
-
let u = await
|
|
4152
|
+
let u = await Yo(l);
|
|
4111
4153
|
return u ? {
|
|
4112
4154
|
blob: u,
|
|
4113
4155
|
redactedCount: s.length,
|
|
@@ -4117,29 +4159,29 @@ async function Io(e, t, n) {
|
|
|
4117
4159
|
return F(e, { context: "screenshot-capture" }), null;
|
|
4118
4160
|
}
|
|
4119
4161
|
}
|
|
4120
|
-
function
|
|
4162
|
+
function qo(e, t) {
|
|
4121
4163
|
return new Promise((n) => e.toBlob(n, "image/jpeg", t));
|
|
4122
4164
|
}
|
|
4123
|
-
function
|
|
4165
|
+
function Jo(e, t) {
|
|
4124
4166
|
let n = document.createElement("canvas");
|
|
4125
4167
|
n.width = Math.max(1, Math.round(e.width * t)), n.height = Math.max(1, Math.round(e.height * t));
|
|
4126
4168
|
let r = n.getContext("2d");
|
|
4127
4169
|
return r ? (r.imageSmoothingQuality = "high", r.drawImage(e, 0, 0, n.width, n.height), n) : null;
|
|
4128
4170
|
}
|
|
4129
|
-
async function
|
|
4171
|
+
async function Yo(e) {
|
|
4130
4172
|
let t = null;
|
|
4131
|
-
for (let { quality: n, scale: r } of
|
|
4132
|
-
let i = r === 1 ? e :
|
|
4173
|
+
for (let { quality: n, scale: r } of zo) {
|
|
4174
|
+
let i = r === 1 ? e : Jo(e, r);
|
|
4133
4175
|
if (!i) continue;
|
|
4134
|
-
let a = await
|
|
4176
|
+
let a = await qo(i, n);
|
|
4135
4177
|
if (a) {
|
|
4136
|
-
if (a.size <=
|
|
4178
|
+
if (a.size <= Lo) return a;
|
|
4137
4179
|
t = t == null ? a.size : Math.min(t, a.size);
|
|
4138
4180
|
}
|
|
4139
4181
|
}
|
|
4140
|
-
return F(/* @__PURE__ */ Error(t == null ? "Screenshot encode produced no blob at any quality/scale" : `Screenshot still ${t} bytes at the end of the encode ladder (cap ${
|
|
4182
|
+
return F(/* @__PURE__ */ Error(t == null ? "Screenshot encode produced no blob at any quality/scale" : `Screenshot still ${t} bytes at the end of the encode ladder (cap ${Lo})`), { context: "screenshot-encode" }), null;
|
|
4141
4183
|
}
|
|
4142
|
-
function
|
|
4184
|
+
function Xo(e, t, n, r) {
|
|
4143
4185
|
let i = r, a = 28 * i, o = a / 2, s = t * i, c = n * i;
|
|
4144
4186
|
e.save();
|
|
4145
4187
|
let l = 2 * i;
|
|
@@ -4157,7 +4199,7 @@ function Bo(e, t, n, r) {
|
|
|
4157
4199
|
}
|
|
4158
4200
|
//#endregion
|
|
4159
4201
|
//#region src/runtime/use-subscription-token.ts
|
|
4160
|
-
var
|
|
4202
|
+
var Zo = Ur({
|
|
4161
4203
|
idle: { issued: (e, t) => ({
|
|
4162
4204
|
kind: "active",
|
|
4163
4205
|
token: t.token,
|
|
@@ -4168,9 +4210,9 @@ var Vo = Ur({
|
|
|
4168
4210
|
token: t.token,
|
|
4169
4211
|
expiresAt: t.expiresAt
|
|
4170
4212
|
}) }
|
|
4171
|
-
}),
|
|
4172
|
-
function
|
|
4173
|
-
let [t, n] = Wr(
|
|
4213
|
+
}), Qo = 18e5, $o = 6e4, es = 6e4;
|
|
4214
|
+
function ts(e) {
|
|
4215
|
+
let [t, n] = Wr(Zo, { kind: "idle" });
|
|
4174
4216
|
return B(() => {
|
|
4175
4217
|
let t = !1, r = null;
|
|
4176
4218
|
async function i() {
|
|
@@ -4182,11 +4224,11 @@ function Go(e) {
|
|
|
4182
4224
|
token: a.token,
|
|
4183
4225
|
expiresAt: a.expiresAt
|
|
4184
4226
|
});
|
|
4185
|
-
let o = Math.max(
|
|
4227
|
+
let o = Math.max($o, a.expiresAt - Date.now() - Qo);
|
|
4186
4228
|
r = setTimeout(i, o);
|
|
4187
4229
|
} catch (e) {
|
|
4188
4230
|
if (t) return;
|
|
4189
|
-
e?.name !== "TypeError" && F(e, { context: "subscription-token-refresh" }), r = setTimeout(i,
|
|
4231
|
+
e?.name !== "TypeError" && F(e, { context: "subscription-token-refresh" }), r = setTimeout(i, es);
|
|
4190
4232
|
}
|
|
4191
4233
|
}
|
|
4192
4234
|
return i(), () => {
|
|
@@ -4196,7 +4238,7 @@ function Go(e) {
|
|
|
4196
4238
|
}
|
|
4197
4239
|
//#endregion
|
|
4198
4240
|
//#region src/runtime/refresh-token.ts
|
|
4199
|
-
async function
|
|
4241
|
+
async function ns(e) {
|
|
4200
4242
|
try {
|
|
4201
4243
|
let t = {
|
|
4202
4244
|
method: "POST",
|
|
@@ -4232,8 +4274,8 @@ async function Ko(e) {
|
|
|
4232
4274
|
}
|
|
4233
4275
|
//#endregion
|
|
4234
4276
|
//#region src/runtime/use-token-refresh.ts
|
|
4235
|
-
var
|
|
4236
|
-
function
|
|
4277
|
+
var rs = 6e4, is = 500;
|
|
4278
|
+
function as(e, t, n, r, i) {
|
|
4237
4279
|
let a = e.kind === "verified", o = a ? e.identity.storage : void 0, s = a ? e.identity.refreshToken : void 0, c = a ? e.identity.refreshTokenExpiresAt : void 0, l = a ? e.identity.tokenExpiresAt : void 0;
|
|
4238
4280
|
B(() => {
|
|
4239
4281
|
if (!a || c == null || l == null || o === "localStorage" && s == null || o !== "cookies" && o !== "localStorage") return;
|
|
@@ -4242,8 +4284,8 @@ function Yo(e, t, n, r, i) {
|
|
|
4242
4284
|
i();
|
|
4243
4285
|
return;
|
|
4244
4286
|
}
|
|
4245
|
-
let d = Math.max(
|
|
4246
|
-
let a = await
|
|
4287
|
+
let d = Math.max(is, l - rs - u), f = new AbortController(), p = window.setTimeout(async () => {
|
|
4288
|
+
let a = await ns({
|
|
4247
4289
|
apiUrl: t,
|
|
4248
4290
|
apiKey: n,
|
|
4249
4291
|
mode: o,
|
|
@@ -4286,7 +4328,7 @@ function Yo(e, t, n, r, i) {
|
|
|
4286
4328
|
function Z(...e) {
|
|
4287
4329
|
return e.filter(Boolean).join(" ");
|
|
4288
4330
|
}
|
|
4289
|
-
function
|
|
4331
|
+
function os() {
|
|
4290
4332
|
return typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent) ? {
|
|
4291
4333
|
mod: "⌘",
|
|
4292
4334
|
enter: "↵"
|
|
@@ -4297,7 +4339,7 @@ function Xo() {
|
|
|
4297
4339
|
}
|
|
4298
4340
|
//#endregion
|
|
4299
4341
|
//#region ../../node_modules/.pnpm/preact@10.29.7/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js
|
|
4300
|
-
var
|
|
4342
|
+
var ss = 0;
|
|
4301
4343
|
Array.isArray;
|
|
4302
4344
|
function Q(e, n, r, i, a, o) {
|
|
4303
4345
|
n ||= {};
|
|
@@ -4314,7 +4356,7 @@ function Q(e, n, r, i, a, o) {
|
|
|
4314
4356
|
__e: null,
|
|
4315
4357
|
__c: null,
|
|
4316
4358
|
constructor: void 0,
|
|
4317
|
-
__v: --
|
|
4359
|
+
__v: --ss,
|
|
4318
4360
|
__i: -1,
|
|
4319
4361
|
__u: 0,
|
|
4320
4362
|
__source: a,
|
|
@@ -4325,7 +4367,7 @@ function Q(e, n, r, i, a, o) {
|
|
|
4325
4367
|
}
|
|
4326
4368
|
//#endregion
|
|
4327
4369
|
//#region src/runtime/ui/icons.tsx
|
|
4328
|
-
function
|
|
4370
|
+
function cs({ size: e = 16 }) {
|
|
4329
4371
|
return /* @__PURE__ */ Q("svg", {
|
|
4330
4372
|
width: e,
|
|
4331
4373
|
height: e,
|
|
@@ -4335,7 +4377,7 @@ function Qo({ size: e = 16 }) {
|
|
|
4335
4377
|
children: /* @__PURE__ */ Q("path", { d: "M63.4561 0.00557731C70.6277 -0.0175584 76.9025 1.04088 83.5898 3.71066C97.7952 9.43043 109.186 20.5001 115.311 34.5359C119.708 44.8002 120.746 54.7869 119.156 65.8171C116.857 82.7956 105.129 98.8382 90.0566 106.846C83.4394 110.362 74.7336 113.029 67.2051 113.271C62.4204 113.425 61.1274 113.32 56.6807 115.204C50.2035 117.858 43.6874 120.417 37.1348 122.879C34.8442 123.763 32.3203 124.902 29.9404 125.51C29.4023 125.648 28.1978 125.009 27.7598 124.646C26.9046 123.951 27.0582 122.505 27.0264 121.484C26.8123 114.646 27.3302 107.458 26.8604 100.656C25.1578 98.6714 22.4026 96.603 20.3086 94.1989C12.1853 84.8731 7.05334 73.9949 6.18164 61.6101C4.95583 46.292 9.97176 31.1285 20.0908 19.5632C29.989 8.13202 44.0369 1.11921 59.1221 0.0788195C60.2694 -0.0356049 62.2637 0.00944821 63.4561 0.00557731ZM92.2676 55.7497C91.5754 39.5314 77.8207 26.9725 61.6064 27.7536C45.5175 28.5287 33.0758 42.1537 33.7627 58.2468C34.4496 74.3398 48.007 86.8553 64.1035 86.2566C80.3254 85.6533 92.9599 71.968 92.2676 55.7497Z" })
|
|
4336
4378
|
});
|
|
4337
4379
|
}
|
|
4338
|
-
function
|
|
4380
|
+
function ls({ size: e = 16 }) {
|
|
4339
4381
|
return /* @__PURE__ */ Q("svg", {
|
|
4340
4382
|
width: e,
|
|
4341
4383
|
height: e,
|
|
@@ -4344,7 +4386,7 @@ function $o({ size: e = 16 }) {
|
|
|
4344
4386
|
children: /* @__PURE__ */ Q("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" })
|
|
4345
4387
|
});
|
|
4346
4388
|
}
|
|
4347
|
-
function
|
|
4389
|
+
function us({ size: e = 16 }) {
|
|
4348
4390
|
return /* @__PURE__ */ Q("svg", {
|
|
4349
4391
|
width: e,
|
|
4350
4392
|
height: e,
|
|
@@ -4354,7 +4396,7 @@ function es({ size: e = 16 }) {
|
|
|
4354
4396
|
children: /* @__PURE__ */ Q("path", { d: "M12.78 5.22a.75.75 0 0 1 0 1.06L9.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06l-4.25-4.25a.75.75 0 0 1 0-1.06l4.25-4.25a.75.75 0 0 1 1.06 0Z" })
|
|
4355
4397
|
});
|
|
4356
4398
|
}
|
|
4357
|
-
function
|
|
4399
|
+
function ds({ size: e = 16 }) {
|
|
4358
4400
|
return /* @__PURE__ */ Q("svg", {
|
|
4359
4401
|
width: e,
|
|
4360
4402
|
height: e,
|
|
@@ -4363,7 +4405,7 @@ function ts({ size: e = 16 }) {
|
|
|
4363
4405
|
children: /* @__PURE__ */ Q("path", { d: "M3 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM8.5 10a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0ZM15.5 8.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z" })
|
|
4364
4406
|
});
|
|
4365
4407
|
}
|
|
4366
|
-
function
|
|
4408
|
+
function fs({ size: e = 16 }) {
|
|
4367
4409
|
return /* @__PURE__ */ Q("svg", {
|
|
4368
4410
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4369
4411
|
width: e,
|
|
@@ -4373,7 +4415,7 @@ function ns({ size: e = 16 }) {
|
|
|
4373
4415
|
children: /* @__PURE__ */ Q("path", { d: "M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z" })
|
|
4374
4416
|
});
|
|
4375
4417
|
}
|
|
4376
|
-
function
|
|
4418
|
+
function ps({ size: e = 16 }) {
|
|
4377
4419
|
return /* @__PURE__ */ Q("svg", {
|
|
4378
4420
|
width: e,
|
|
4379
4421
|
height: e,
|
|
@@ -4387,7 +4429,7 @@ function rs({ size: e = 16 }) {
|
|
|
4387
4429
|
})
|
|
4388
4430
|
});
|
|
4389
4431
|
}
|
|
4390
|
-
function
|
|
4432
|
+
function ms({ size: e = 16 }) {
|
|
4391
4433
|
return /* @__PURE__ */ Q("svg", {
|
|
4392
4434
|
width: e,
|
|
4393
4435
|
height: e,
|
|
@@ -4396,7 +4438,7 @@ function is({ size: e = 16 }) {
|
|
|
4396
4438
|
children: /* @__PURE__ */ Q("path", { d: "M2.87 2.298a.75.75 0 0 0-.812 1.021L3.39 6.624a1 1 0 0 0 .928.626H8.25a.75.75 0 0 1 0 1.5H4.318a1 1 0 0 0-.927.626l-1.333 3.305a.75.75 0 0 0 .811 1.022 24.89 24.89 0 0 0 11.668-5.115.75.75 0 0 0 0-1.175A24.89 24.89 0 0 0 2.869 2.298Z" })
|
|
4397
4439
|
});
|
|
4398
4440
|
}
|
|
4399
|
-
function
|
|
4441
|
+
function hs({ size: e = 16 }) {
|
|
4400
4442
|
return /* @__PURE__ */ Q("svg", {
|
|
4401
4443
|
width: e,
|
|
4402
4444
|
height: e,
|
|
@@ -4420,19 +4462,19 @@ function $({ size: e = 16, children: t }) {
|
|
|
4420
4462
|
children: t
|
|
4421
4463
|
});
|
|
4422
4464
|
}
|
|
4423
|
-
function
|
|
4465
|
+
function gs({ size: e = 16 }) {
|
|
4424
4466
|
return /* @__PURE__ */ Q($, {
|
|
4425
4467
|
size: e,
|
|
4426
4468
|
children: /* @__PURE__ */ Q("path", { d: "M21 11.5a8.4 8.4 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.4 8.4 0 0 1-3.8-.9L3 21l1.9-5.7a8.4 8.4 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.4 8.4 0 0 1 3.8-.9h.5a8.5 8.5 0 0 1 8 8v.5z" })
|
|
4427
4469
|
});
|
|
4428
4470
|
}
|
|
4429
|
-
function
|
|
4471
|
+
function _s({ size: e = 16 }) {
|
|
4430
4472
|
return /* @__PURE__ */ Q($, {
|
|
4431
4473
|
size: e,
|
|
4432
4474
|
children: [/* @__PURE__ */ Q("path", { d: "M22 12h-6l-2 3h-4l-2-3H2" }), /* @__PURE__ */ Q("path", { d: "M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z" })]
|
|
4433
4475
|
});
|
|
4434
4476
|
}
|
|
4435
|
-
function
|
|
4477
|
+
function vs({ size: e = 16 }) {
|
|
4436
4478
|
return /* @__PURE__ */ Q($, {
|
|
4437
4479
|
size: e,
|
|
4438
4480
|
children: [/* @__PURE__ */ Q("path", { d: "M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12z" }), /* @__PURE__ */ Q("circle", {
|
|
@@ -4442,7 +4484,7 @@ function cs({ size: e = 16 }) {
|
|
|
4442
4484
|
})]
|
|
4443
4485
|
});
|
|
4444
4486
|
}
|
|
4445
|
-
function
|
|
4487
|
+
function ys({ size: e = 16 }) {
|
|
4446
4488
|
return /* @__PURE__ */ Q($, {
|
|
4447
4489
|
size: e,
|
|
4448
4490
|
children: [
|
|
@@ -4453,13 +4495,13 @@ function ls({ size: e = 16 }) {
|
|
|
4453
4495
|
]
|
|
4454
4496
|
});
|
|
4455
4497
|
}
|
|
4456
|
-
function
|
|
4498
|
+
function bs({ size: e = 16 }) {
|
|
4457
4499
|
return /* @__PURE__ */ Q($, {
|
|
4458
4500
|
size: e,
|
|
4459
4501
|
children: /* @__PURE__ */ Q("path", { d: "M3 6h18M3 12h18M3 18h18" })
|
|
4460
4502
|
});
|
|
4461
4503
|
}
|
|
4462
|
-
function
|
|
4504
|
+
function xs({ size: e = 16 }) {
|
|
4463
4505
|
return /* @__PURE__ */ Q($, {
|
|
4464
4506
|
size: e,
|
|
4465
4507
|
children: [/* @__PURE__ */ Q("circle", {
|
|
@@ -4469,13 +4511,13 @@ function ds({ size: e = 16 }) {
|
|
|
4469
4511
|
}), /* @__PURE__ */ Q("path", { d: "M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41" })]
|
|
4470
4512
|
});
|
|
4471
4513
|
}
|
|
4472
|
-
function
|
|
4514
|
+
function Ss({ size: e = 16 }) {
|
|
4473
4515
|
return /* @__PURE__ */ Q($, {
|
|
4474
4516
|
size: e,
|
|
4475
4517
|
children: /* @__PURE__ */ Q("path", { d: "M21 12.79A9 9 0 1 1 11.21 3a7 7 0 0 0 9.79 9.79z" })
|
|
4476
4518
|
});
|
|
4477
4519
|
}
|
|
4478
|
-
function
|
|
4520
|
+
function Cs({ size: e = 16 }) {
|
|
4479
4521
|
return /* @__PURE__ */ Q($, {
|
|
4480
4522
|
size: e,
|
|
4481
4523
|
children: [/* @__PURE__ */ Q("rect", {
|
|
@@ -4487,13 +4529,13 @@ function ps({ size: e = 16 }) {
|
|
|
4487
4529
|
}), /* @__PURE__ */ Q("path", { d: "M8 21h8M12 17v4" })]
|
|
4488
4530
|
});
|
|
4489
4531
|
}
|
|
4490
|
-
function
|
|
4532
|
+
function ws({ size: e = 16 }) {
|
|
4491
4533
|
return /* @__PURE__ */ Q($, {
|
|
4492
4534
|
size: e,
|
|
4493
4535
|
children: /* @__PURE__ */ Q("path", { d: "M12 22s8-3.5 8-10V5l-8-3-8 3v7c0 6.5 8 10 8 10z" })
|
|
4494
4536
|
});
|
|
4495
4537
|
}
|
|
4496
|
-
function
|
|
4538
|
+
function Ts({ size: e = 16 }) {
|
|
4497
4539
|
return /* @__PURE__ */ Q($, {
|
|
4498
4540
|
size: e,
|
|
4499
4541
|
children: [/* @__PURE__ */ Q("rect", {
|
|
@@ -4505,19 +4547,19 @@ function hs({ size: e = 16 }) {
|
|
|
4505
4547
|
}), /* @__PURE__ */ Q("path", { d: "M6 10h.01M10 10h.01M14 10h.01M18 10h.01M6 14h.01M18 14h.01M10 14h4" })]
|
|
4506
4548
|
});
|
|
4507
4549
|
}
|
|
4508
|
-
function
|
|
4550
|
+
function Es({ size: e = 16 }) {
|
|
4509
4551
|
return /* @__PURE__ */ Q($, {
|
|
4510
4552
|
size: e,
|
|
4511
4553
|
children: [/* @__PURE__ */ Q("path", { d: "M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" }), /* @__PURE__ */ Q("path", { d: "M10 17l5-5-5-5M15 12H3" })]
|
|
4512
4554
|
});
|
|
4513
4555
|
}
|
|
4514
|
-
function
|
|
4556
|
+
function Ds({ size: e = 16 }) {
|
|
4515
4557
|
return /* @__PURE__ */ Q($, {
|
|
4516
4558
|
size: e,
|
|
4517
4559
|
children: [/* @__PURE__ */ Q("path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4" }), /* @__PURE__ */ Q("path", { d: "M16 17l5-5-5-5M21 12H9" })]
|
|
4518
4560
|
});
|
|
4519
4561
|
}
|
|
4520
|
-
function
|
|
4562
|
+
function Os({ size: e = 16 }) {
|
|
4521
4563
|
return /* @__PURE__ */ Q($, {
|
|
4522
4564
|
size: e,
|
|
4523
4565
|
children: [/* @__PURE__ */ Q("circle", {
|
|
@@ -4527,7 +4569,7 @@ function vs({ size: e = 16 }) {
|
|
|
4527
4569
|
}), /* @__PURE__ */ Q("path", { d: "M4 21a8 8 0 0 1 16 0" })]
|
|
4528
4570
|
});
|
|
4529
4571
|
}
|
|
4530
|
-
function
|
|
4572
|
+
function ks({ size: e = 16 }) {
|
|
4531
4573
|
return /* @__PURE__ */ Q($, {
|
|
4532
4574
|
size: e,
|
|
4533
4575
|
children: [
|
|
@@ -4546,7 +4588,7 @@ function ys({ size: e = 16 }) {
|
|
|
4546
4588
|
]
|
|
4547
4589
|
});
|
|
4548
4590
|
}
|
|
4549
|
-
function
|
|
4591
|
+
function As({ size: e = 16 }) {
|
|
4550
4592
|
return /* @__PURE__ */ Q($, {
|
|
4551
4593
|
size: e,
|
|
4552
4594
|
children: [
|
|
@@ -4558,7 +4600,7 @@ function bs({ size: e = 16 }) {
|
|
|
4558
4600
|
}
|
|
4559
4601
|
//#endregion
|
|
4560
4602
|
//#region src/runtime/ui/identity-menu.tsx
|
|
4561
|
-
function
|
|
4603
|
+
function js({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboardUrl: i, commentAccess: a = "anyone", onSignIn: o, onSignOut: s, onForgetMe: c }) {
|
|
4562
4604
|
let [l, u] = z(!1), [d, f] = z(!1), [p, m] = z(!1), h = V(null);
|
|
4563
4605
|
B(() => {
|
|
4564
4606
|
if (!l) return;
|
|
@@ -4575,7 +4617,7 @@ function xs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4575
4617
|
}, [l]), B(() => {
|
|
4576
4618
|
l || (f(!1), m(!1));
|
|
4577
4619
|
}, [l]);
|
|
4578
|
-
let g = ta(e), _ =
|
|
4620
|
+
let g = ta(e), _ = Ms(g), v = e.kind === "verified", y = e.kind === "verified" ? e.identity.image : void 0, [b, x] = z(null), C = v && y != null && b !== y, w = v ? e.identity.email : null, T = t === "bottom-left" ? "is-anchor-left" : t === "bottom-center" ? "is-anchor-center" : "is-anchor-right";
|
|
4579
4621
|
return /* @__PURE__ */ Q("div", {
|
|
4580
4622
|
ref: h,
|
|
4581
4623
|
style: {
|
|
@@ -4608,7 +4650,7 @@ function xs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4608
4650
|
}) : v && _ ? /* @__PURE__ */ Q("span", {
|
|
4609
4651
|
class: "markup-avatar-initials",
|
|
4610
4652
|
children: _
|
|
4611
|
-
}) : /* @__PURE__ */ Q(
|
|
4653
|
+
}) : /* @__PURE__ */ Q(Os, { size: 14 })
|
|
4612
4654
|
}), v && g ? /* @__PURE__ */ Q("span", {
|
|
4613
4655
|
class: "markup-sr-only",
|
|
4614
4656
|
children: g
|
|
@@ -4637,7 +4679,7 @@ function xs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4637
4679
|
onClick: () => u(!1),
|
|
4638
4680
|
children: [/* @__PURE__ */ Q("span", {
|
|
4639
4681
|
class: "ic",
|
|
4640
|
-
children: /* @__PURE__ */ Q(
|
|
4682
|
+
children: /* @__PURE__ */ Q(As, { size: 16 })
|
|
4641
4683
|
}), /* @__PURE__ */ Q("span", {
|
|
4642
4684
|
class: "lbl",
|
|
4643
4685
|
children: "Account"
|
|
@@ -4653,7 +4695,7 @@ function xs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4653
4695
|
},
|
|
4654
4696
|
children: [/* @__PURE__ */ Q("span", {
|
|
4655
4697
|
class: "ic",
|
|
4656
|
-
children: /* @__PURE__ */ Q(
|
|
4698
|
+
children: /* @__PURE__ */ Q(Ds, { size: 16 })
|
|
4657
4699
|
}), /* @__PURE__ */ Q("span", {
|
|
4658
4700
|
class: "lbl",
|
|
4659
4701
|
children: r ? "Signing out…" : p ? "Confirm: sign out of this site" : "Sign out"
|
|
@@ -4676,7 +4718,7 @@ function xs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4676
4718
|
onClick: () => {
|
|
4677
4719
|
u(!1), o();
|
|
4678
4720
|
},
|
|
4679
|
-
children: [/* @__PURE__ */ Q(
|
|
4721
|
+
children: [/* @__PURE__ */ Q(Es, { size: 14 }), /* @__PURE__ */ Q("span", { children: n ? "Signing in…" : "Sign in" })]
|
|
4680
4722
|
}),
|
|
4681
4723
|
/* @__PURE__ */ Q("button", {
|
|
4682
4724
|
type: "button",
|
|
@@ -4695,12 +4737,12 @@ function xs({ identity: e, position: t, isSigningIn: n, isSigningOut: r, dashboa
|
|
|
4695
4737
|
}) : null]
|
|
4696
4738
|
});
|
|
4697
4739
|
}
|
|
4698
|
-
function
|
|
4740
|
+
function Ms(e) {
|
|
4699
4741
|
return e && e.trim().split(/\s+/).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || null;
|
|
4700
4742
|
}
|
|
4701
4743
|
//#endregion
|
|
4702
4744
|
//#region src/runtime/use-drag.ts
|
|
4703
|
-
function
|
|
4745
|
+
function Ns(e) {
|
|
4704
4746
|
let t = V(e);
|
|
4705
4747
|
t.current = e;
|
|
4706
4748
|
let [n, r] = z(!1);
|
|
@@ -4728,8 +4770,8 @@ function Cs(e) {
|
|
|
4728
4770
|
h = !0, r(!0), t.current.onStart?.();
|
|
4729
4771
|
}
|
|
4730
4772
|
let a = Math.max(p, window.innerWidth - u - p), _ = Math.max(p, window.innerHeight - d - p), v = {
|
|
4731
|
-
left:
|
|
4732
|
-
top:
|
|
4773
|
+
left: Ps(c + n, p, a),
|
|
4774
|
+
top: Ps(l + i, p, _)
|
|
4733
4775
|
};
|
|
4734
4776
|
g = v, t.current.onMove(v);
|
|
4735
4777
|
}
|
|
@@ -4744,12 +4786,12 @@ function Cs(e) {
|
|
|
4744
4786
|
isDragging: n
|
|
4745
4787
|
};
|
|
4746
4788
|
}
|
|
4747
|
-
function
|
|
4789
|
+
function Ps(e, t, n) {
|
|
4748
4790
|
return Math.max(t, Math.min(n, e));
|
|
4749
4791
|
}
|
|
4750
4792
|
//#endregion
|
|
4751
4793
|
//#region src/runtime/use-focus-trap.ts
|
|
4752
|
-
var
|
|
4794
|
+
var Fs = [
|
|
4753
4795
|
"a[href]",
|
|
4754
4796
|
"button:not([disabled])",
|
|
4755
4797
|
"input:not([disabled])",
|
|
@@ -4757,14 +4799,14 @@ var Ts = [
|
|
|
4757
4799
|
"textarea:not([disabled])",
|
|
4758
4800
|
"[tabindex]:not([tabindex=\"-1\"])"
|
|
4759
4801
|
].join(",");
|
|
4760
|
-
function
|
|
4802
|
+
function Is(e, t) {
|
|
4761
4803
|
B(() => {
|
|
4762
4804
|
if (!t) return;
|
|
4763
4805
|
let n = e.current;
|
|
4764
4806
|
if (!n) return;
|
|
4765
4807
|
function r(e) {
|
|
4766
4808
|
if (e.key !== "Tab") return;
|
|
4767
|
-
let t = Array.from(n.querySelectorAll(
|
|
4809
|
+
let t = Array.from(n.querySelectorAll(Fs)), r = t[0], i = t[t.length - 1];
|
|
4768
4810
|
if (!r || !i) return;
|
|
4769
4811
|
let a = n.getRootNode(), o = a instanceof ShadowRoot ? a.activeElement : document.activeElement;
|
|
4770
4812
|
(e.shiftKey ? o === r : o === i) && (e.preventDefault(), (e.shiftKey ? i : r).focus());
|
|
@@ -4774,7 +4816,7 @@ function Es(e, t) {
|
|
|
4774
4816
|
}
|
|
4775
4817
|
//#endregion
|
|
4776
4818
|
//#region src/runtime/use-object-url.ts
|
|
4777
|
-
function
|
|
4819
|
+
function Ls(e) {
|
|
4778
4820
|
let [t, n] = z(null);
|
|
4779
4821
|
return B(() => {
|
|
4780
4822
|
if (!e) {
|
|
@@ -4787,7 +4829,7 @@ function Ds(e) {
|
|
|
4787
4829
|
}
|
|
4788
4830
|
//#endregion
|
|
4789
4831
|
//#region src/runtime/ui/author-prompt.tsx
|
|
4790
|
-
function
|
|
4832
|
+
function Rs({ mode: e = "guest-or-sign-in", isPending: t, isConnecting: n = !1, isSigningIn: r = !1, onSubmit: i, onCancel: a, onSignIn: o, onSignOut: s }) {
|
|
4791
4833
|
let [c, l] = z(""), [u, d] = z(""), f = V(null);
|
|
4792
4834
|
B(() => {
|
|
4793
4835
|
f.current?.focus();
|
|
@@ -4921,27 +4963,27 @@ function Os({ mode: e = "guest-or-sign-in", isPending: t, isConnecting: n = !1,
|
|
|
4921
4963
|
}
|
|
4922
4964
|
//#endregion
|
|
4923
4965
|
//#region src/runtime/mention-input.ts
|
|
4924
|
-
var
|
|
4966
|
+
var zs = "data-markup-mention", Bs = "data-markup-mention-name", Vs = /* @__PURE__ */ new Set([
|
|
4925
4967
|
"DIV",
|
|
4926
4968
|
"P",
|
|
4927
4969
|
"LI",
|
|
4928
4970
|
"BLOCKQUOTE",
|
|
4929
4971
|
"PRE"
|
|
4930
|
-
]),
|
|
4931
|
-
function
|
|
4972
|
+
]), Hs = 3, Us = 1;
|
|
4973
|
+
function Ws(e) {
|
|
4932
4974
|
let t = "", n = (r) => {
|
|
4933
4975
|
let i = r.childNodes;
|
|
4934
4976
|
for (let a = 0; a < i.length; a++) {
|
|
4935
4977
|
let o = i[a];
|
|
4936
4978
|
if (!o) continue;
|
|
4937
|
-
if (o.nodeType ===
|
|
4979
|
+
if (o.nodeType === Hs) {
|
|
4938
4980
|
t += o.data;
|
|
4939
4981
|
continue;
|
|
4940
4982
|
}
|
|
4941
|
-
if (o.nodeType !==
|
|
4942
|
-
let s = o, c = s.getAttribute(
|
|
4983
|
+
if (o.nodeType !== Us) continue;
|
|
4984
|
+
let s = o, c = s.getAttribute(zs);
|
|
4943
4985
|
if (c) {
|
|
4944
|
-
let e =
|
|
4986
|
+
let e = Gs(s);
|
|
4945
4987
|
t += Yr({
|
|
4946
4988
|
userId: c,
|
|
4947
4989
|
name: e
|
|
@@ -4952,77 +4994,77 @@ function Ps(e) {
|
|
|
4952
4994
|
(r !== e || a !== i.length - 1) && (t += "\n");
|
|
4953
4995
|
continue;
|
|
4954
4996
|
}
|
|
4955
|
-
|
|
4997
|
+
Vs.has(s.tagName) && t !== "" && !t.endsWith("\n") && (t += "\n"), n(s);
|
|
4956
4998
|
}
|
|
4957
4999
|
};
|
|
4958
5000
|
return n(e), t;
|
|
4959
5001
|
}
|
|
4960
|
-
function
|
|
4961
|
-
return e.getAttribute(
|
|
5002
|
+
function Gs(e) {
|
|
5003
|
+
return e.getAttribute(Bs) || (e.textContent ?? "").replace(/^@/, "");
|
|
4962
5004
|
}
|
|
4963
|
-
function
|
|
5005
|
+
function Ks(e, t, n) {
|
|
4964
5006
|
let r = e.createElement("span");
|
|
4965
|
-
return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(
|
|
5007
|
+
return r.className = n, r.setAttribute("contenteditable", "false"), r.setAttribute(zs, t.userId), r.setAttribute(Bs, t.name), r.textContent = `@${t.name}`, r;
|
|
4966
5008
|
}
|
|
4967
|
-
function
|
|
5009
|
+
function qs(e, t, n) {
|
|
4968
5010
|
let r = e.createDocumentFragment();
|
|
4969
5011
|
for (let i of Kr(t)) {
|
|
4970
5012
|
if (i.type === "text") {
|
|
4971
5013
|
i.value && r.appendChild(e.createTextNode(i.value));
|
|
4972
5014
|
continue;
|
|
4973
5015
|
}
|
|
4974
|
-
r.appendChild(
|
|
5016
|
+
r.appendChild(Ks(e, {
|
|
4975
5017
|
userId: i.userId,
|
|
4976
5018
|
name: i.name
|
|
4977
5019
|
}, n));
|
|
4978
5020
|
}
|
|
4979
5021
|
return r;
|
|
4980
5022
|
}
|
|
4981
|
-
function
|
|
5023
|
+
function Js(e) {
|
|
4982
5024
|
let t = e.getRootNode();
|
|
4983
5025
|
return typeof t.getSelection == "function" ? t.getSelection() : e.ownerDocument.getSelection();
|
|
4984
5026
|
}
|
|
4985
|
-
function
|
|
4986
|
-
let t =
|
|
5027
|
+
function Ys(e) {
|
|
5028
|
+
let t = Js(e);
|
|
4987
5029
|
if (!t || t.rangeCount === 0 || !t.isCollapsed) return null;
|
|
4988
5030
|
let n = t.focusNode;
|
|
4989
|
-
return !n || n.nodeType !==
|
|
5031
|
+
return !n || n.nodeType !== Hs || !e.contains(n) || Xs(n, e) ? null : {
|
|
4990
5032
|
node: n,
|
|
4991
5033
|
offset: t.focusOffset
|
|
4992
5034
|
};
|
|
4993
5035
|
}
|
|
4994
|
-
function
|
|
5036
|
+
function Xs(e, t) {
|
|
4995
5037
|
let n = e;
|
|
4996
5038
|
for (; n && n !== t;) {
|
|
4997
|
-
if (n.nodeType ===
|
|
5039
|
+
if (n.nodeType === Us && n.hasAttribute("data-markup-mention")) return n;
|
|
4998
5040
|
n = n.parentNode;
|
|
4999
5041
|
}
|
|
5000
5042
|
return null;
|
|
5001
5043
|
}
|
|
5002
|
-
function
|
|
5003
|
-
let t =
|
|
5044
|
+
function Zs(e) {
|
|
5045
|
+
let t = Js(e);
|
|
5004
5046
|
if (!t || t.rangeCount === 0 || !t.isCollapsed) return;
|
|
5005
5047
|
let n = t.focusNode;
|
|
5006
5048
|
if (!n || !e.contains(n)) return;
|
|
5007
|
-
let r =
|
|
5049
|
+
let r = Xs(n, e);
|
|
5008
5050
|
if (!r) return;
|
|
5009
5051
|
let i = r.nextSibling;
|
|
5010
|
-
(!i || i.nodeType !==
|
|
5052
|
+
(!i || i.nodeType !== Hs) && (i = e.ownerDocument.createTextNode(""), r.parentNode?.insertBefore(i, r.nextSibling)), Qs(e, i, 0);
|
|
5011
5053
|
}
|
|
5012
|
-
function
|
|
5013
|
-
let r =
|
|
5054
|
+
function Qs(e, t, n) {
|
|
5055
|
+
let r = Js(e);
|
|
5014
5056
|
if (!r) return;
|
|
5015
5057
|
let i = e.ownerDocument.createRange();
|
|
5016
5058
|
i.setStart(t, n), i.collapse(!0), r.removeAllRanges(), r.addRange(i);
|
|
5017
5059
|
}
|
|
5018
|
-
function
|
|
5060
|
+
function $s(e) {
|
|
5019
5061
|
let t = Jr(e.node.data, e.offset);
|
|
5020
5062
|
return t ? {
|
|
5021
5063
|
...t,
|
|
5022
5064
|
textNode: e.node
|
|
5023
5065
|
} : null;
|
|
5024
5066
|
}
|
|
5025
|
-
function
|
|
5067
|
+
function ec(e, t, n, r) {
|
|
5026
5068
|
if (Yr(n) == null) return !1;
|
|
5027
5069
|
let i = t.textNode;
|
|
5028
5070
|
if (!e.contains(i)) return !1;
|
|
@@ -5030,31 +5072,31 @@ function Ws(e, t, n, r) {
|
|
|
5030
5072
|
if (!a || t.caret > i.data.length) return !1;
|
|
5031
5073
|
i.deleteData(t.at, t.caret - t.at);
|
|
5032
5074
|
let o = i.splitText(t.at);
|
|
5033
|
-
return a.insertBefore(
|
|
5075
|
+
return a.insertBefore(Ks(e.ownerDocument, n, r), o), o.data.startsWith(" ") || o.insertData(0, " "), Qs(e, o, 1), !0;
|
|
5034
5076
|
}
|
|
5035
|
-
function
|
|
5036
|
-
let n =
|
|
5077
|
+
function tc(e, t) {
|
|
5078
|
+
let n = Js(e);
|
|
5037
5079
|
if (!n || n.rangeCount === 0) return;
|
|
5038
5080
|
let r = n.getRangeAt(0);
|
|
5039
5081
|
if (!e.contains(r.commonAncestorContainer)) return;
|
|
5040
5082
|
r.deleteContents();
|
|
5041
5083
|
let { startContainer: i, startOffset: a } = r;
|
|
5042
|
-
if (i.nodeType ===
|
|
5084
|
+
if (i.nodeType === Hs) {
|
|
5043
5085
|
let n = i;
|
|
5044
|
-
n.insertData(a, t),
|
|
5086
|
+
n.insertData(a, t), Qs(e, n, a + t.length);
|
|
5045
5087
|
return;
|
|
5046
5088
|
}
|
|
5047
5089
|
let o = e.ownerDocument.createTextNode(t);
|
|
5048
|
-
r.insertNode(o),
|
|
5090
|
+
r.insertNode(o), Qs(e, o, o.data.length);
|
|
5049
5091
|
}
|
|
5050
|
-
function
|
|
5092
|
+
function nc(e, t) {
|
|
5051
5093
|
let n = e.ownerDocument, r = null, i = null, a = !0;
|
|
5052
5094
|
function o(t) {
|
|
5053
5095
|
let n = t.length === 0;
|
|
5054
5096
|
(n !== a || e.hasAttribute("data-empty") !== n) && (a = n, e.toggleAttribute("data-empty", n));
|
|
5055
5097
|
}
|
|
5056
5098
|
function s() {
|
|
5057
|
-
let n =
|
|
5099
|
+
let n = Ws(e);
|
|
5058
5100
|
o(n), t.onChange(n);
|
|
5059
5101
|
}
|
|
5060
5102
|
function c(e) {
|
|
@@ -5070,7 +5112,7 @@ function Ks(e, t) {
|
|
|
5070
5112
|
c(null);
|
|
5071
5113
|
return;
|
|
5072
5114
|
}
|
|
5073
|
-
let n =
|
|
5115
|
+
let n = Ys(e), r = n ? $s(n) : null;
|
|
5074
5116
|
if (r && i && r.textNode === i.node && r.at === i.at) {
|
|
5075
5117
|
c(null);
|
|
5076
5118
|
return;
|
|
@@ -5078,29 +5120,29 @@ function Ks(e, t) {
|
|
|
5078
5120
|
i = null, c(r);
|
|
5079
5121
|
}
|
|
5080
5122
|
function u(r) {
|
|
5081
|
-
e.replaceChildren(
|
|
5123
|
+
e.replaceChildren(qs(n, r, t.chipClass)), o(Ws(e)), i = null, c(null);
|
|
5082
5124
|
}
|
|
5083
5125
|
let d = () => {
|
|
5084
5126
|
s(), l();
|
|
5085
5127
|
}, f = () => l(), p = () => {
|
|
5086
|
-
|
|
5128
|
+
Zs(e), l();
|
|
5087
5129
|
}, m = (t) => {
|
|
5088
5130
|
let n = t.clipboardData?.getData("text/plain");
|
|
5089
|
-
t.preventDefault(), n && (
|
|
5131
|
+
t.preventDefault(), n && (tc(e, n.replace(/\r\n?/g, "\n")), s(), l());
|
|
5090
5132
|
}, h = (e) => {
|
|
5091
5133
|
e.preventDefault();
|
|
5092
5134
|
};
|
|
5093
5135
|
return e.addEventListener("input", d), e.addEventListener("keyup", f), e.addEventListener("mouseup", p), e.addEventListener("focus", p), e.addEventListener("paste", m), e.addEventListener("drop", h), u(t.initialValue ?? ""), {
|
|
5094
|
-
getValue: () =>
|
|
5136
|
+
getValue: () => Ws(e),
|
|
5095
5137
|
setValue: u,
|
|
5096
5138
|
focus() {
|
|
5097
5139
|
e.focus();
|
|
5098
5140
|
let t = e.lastChild;
|
|
5099
|
-
t && (t.nodeType ===
|
|
5141
|
+
t && (t.nodeType === Hs ? Qs(e, t, t.data.length) : Qs(e, e, e.childNodes.length));
|
|
5100
5142
|
},
|
|
5101
5143
|
insertMention(n) {
|
|
5102
|
-
let a =
|
|
5103
|
-
o &&
|
|
5144
|
+
let a = Ys(e), o = (a ? $s(a) : null) ?? r;
|
|
5145
|
+
o && ec(e, o, n, t.chipClass) && (s(), i = null, c(null));
|
|
5104
5146
|
},
|
|
5105
5147
|
syncTrigger: l,
|
|
5106
5148
|
clearTrigger: () => c(null),
|
|
@@ -5115,21 +5157,21 @@ function Ks(e, t) {
|
|
|
5115
5157
|
}
|
|
5116
5158
|
};
|
|
5117
5159
|
}
|
|
5118
|
-
var
|
|
5119
|
-
function
|
|
5120
|
-
if (
|
|
5160
|
+
var rc = null;
|
|
5161
|
+
function ic() {
|
|
5162
|
+
if (rc) return rc;
|
|
5121
5163
|
if (typeof document > "u") return "true";
|
|
5122
5164
|
let e = document.createElement("div");
|
|
5123
5165
|
try {
|
|
5124
|
-
e.contentEditable = "plaintext-only",
|
|
5166
|
+
e.contentEditable = "plaintext-only", rc = e.contentEditable === "plaintext-only" ? "plaintext-only" : "true";
|
|
5125
5167
|
} catch {
|
|
5126
|
-
|
|
5168
|
+
rc = "true";
|
|
5127
5169
|
}
|
|
5128
|
-
return
|
|
5170
|
+
return rc;
|
|
5129
5171
|
}
|
|
5130
5172
|
//#endregion
|
|
5131
5173
|
//#region src/runtime/ui/mentions.tsx
|
|
5132
|
-
function
|
|
5174
|
+
function ac({ body: e, mentions: t, trailing: n }) {
|
|
5133
5175
|
let r = at(() => new Set(t), [t]);
|
|
5134
5176
|
return /* @__PURE__ */ Q("p", {
|
|
5135
5177
|
class: "markup-comment-body",
|
|
@@ -5139,7 +5181,7 @@ function Ys({ body: e, mentions: t, trailing: n }) {
|
|
|
5139
5181
|
}, t) : /* @__PURE__ */ Q("span", { children: e.type === "mention" ? `@${e.name}` : e.value }, t)), n]
|
|
5140
5182
|
});
|
|
5141
5183
|
}
|
|
5142
|
-
function
|
|
5184
|
+
function oc(e) {
|
|
5143
5185
|
let { members: t, trigger: n, onSelect: r, onClose: i } = e, [a, o] = z(0), s = at(() => {
|
|
5144
5186
|
if (!n) return [];
|
|
5145
5187
|
let e = n.query.toLowerCase();
|
|
@@ -5167,12 +5209,12 @@ function Xs(e) {
|
|
|
5167
5209
|
handleKeyDown: c
|
|
5168
5210
|
};
|
|
5169
5211
|
}
|
|
5170
|
-
function
|
|
5212
|
+
function sc({ items: e, highlight: t, setHighlight: n, onSelect: r, anchor: i }) {
|
|
5171
5213
|
let a = V(null);
|
|
5172
5214
|
return it(() => {
|
|
5173
5215
|
let e = null;
|
|
5174
5216
|
function t() {
|
|
5175
|
-
i.current && a.current &&
|
|
5217
|
+
i.current && a.current && uc(i.current, a.current);
|
|
5176
5218
|
}
|
|
5177
5219
|
function n() {
|
|
5178
5220
|
e ??= requestAnimationFrame(() => {
|
|
@@ -5214,16 +5256,16 @@ function Zs({ items: e, highlight: t, setHighlight: n, onSelect: r, anchor: i })
|
|
|
5214
5256
|
}, e.userId))
|
|
5215
5257
|
});
|
|
5216
5258
|
}
|
|
5217
|
-
var
|
|
5218
|
-
function
|
|
5259
|
+
var cc = 4, lc = 8;
|
|
5260
|
+
function uc(e, t) {
|
|
5219
5261
|
let n = e.getBoundingClientRect(), r = n.bottom > 0 && n.top < window.innerHeight && n.right > 0 && n.left < window.innerWidth;
|
|
5220
5262
|
if (t.style.visibility = r ? "" : "hidden", !r) return;
|
|
5221
|
-
let i = t.offsetHeight, a = n.top -
|
|
5222
|
-
t.style.top = `${Math.max(
|
|
5263
|
+
let i = t.offsetHeight, a = n.top - lc, o = window.innerHeight - n.bottom - lc, s = a >= i + cc || a >= o ? n.top - cc - i : n.bottom + cc, c = window.innerHeight - i - lc;
|
|
5264
|
+
t.style.top = `${Math.max(lc, Math.min(s, c))}px`, t.style.left = `${n.left}px`, t.style.width = `${n.width}px`;
|
|
5223
5265
|
}
|
|
5224
5266
|
//#endregion
|
|
5225
5267
|
//#region src/runtime/ui/mention-input.tsx
|
|
5226
|
-
function
|
|
5268
|
+
function dc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeholder: a, disabled: o = !1, autoFocus: s = !1, class: c, handle: l }) {
|
|
5227
5269
|
let u = V(null), d = V(null), [f, p] = z(null), m = V(t);
|
|
5228
5270
|
m.current = t;
|
|
5229
5271
|
let h = V(r);
|
|
@@ -5232,7 +5274,7 @@ function tc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5232
5274
|
it(() => {
|
|
5233
5275
|
let e = u.current;
|
|
5234
5276
|
if (!e) return;
|
|
5235
|
-
let t =
|
|
5277
|
+
let t = nc(e, {
|
|
5236
5278
|
chipClass: "markup-mention-chip",
|
|
5237
5279
|
initialValue: g.current,
|
|
5238
5280
|
onChange: (e) => m.current(e),
|
|
@@ -5252,7 +5294,7 @@ function tc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5252
5294
|
let t = d.current;
|
|
5253
5295
|
t && t.getValue() !== e && t.setValue(e);
|
|
5254
5296
|
}, [e]);
|
|
5255
|
-
let _ =
|
|
5297
|
+
let _ = oc({
|
|
5256
5298
|
members: r ?? [],
|
|
5257
5299
|
trigger: f,
|
|
5258
5300
|
onSelect: (e) => d.current?.insertMention(e),
|
|
@@ -5265,7 +5307,7 @@ function tc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5265
5307
|
"aria-label": i,
|
|
5266
5308
|
"aria-disabled": o || void 0,
|
|
5267
5309
|
class: Z("markup-mention-input", c),
|
|
5268
|
-
contentEditable: o ? "false" :
|
|
5310
|
+
contentEditable: o ? "false" : ic(),
|
|
5269
5311
|
"data-placeholder": a,
|
|
5270
5312
|
tabIndex: o ? -1 : 0,
|
|
5271
5313
|
onKeyDown: (e) => {
|
|
@@ -5274,7 +5316,7 @@ function tc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5274
5316
|
onBlur: () => {
|
|
5275
5317
|
setTimeout(() => d.current?.clearTrigger(), 120);
|
|
5276
5318
|
}
|
|
5277
|
-
}), _.isOpen ? /* @__PURE__ */ Q(
|
|
5319
|
+
}), _.isOpen ? /* @__PURE__ */ Q(sc, {
|
|
5278
5320
|
items: _.items,
|
|
5279
5321
|
highlight: _.highlight,
|
|
5280
5322
|
setHighlight: _.setHighlight,
|
|
@@ -5284,8 +5326,8 @@ function tc({ value: e, onChange: t, onKeyDown: n, members: r, label: i, placeho
|
|
|
5284
5326
|
}
|
|
5285
5327
|
//#endregion
|
|
5286
5328
|
//#region src/runtime/ui/composer.tsx
|
|
5287
|
-
var
|
|
5288
|
-
function
|
|
5329
|
+
var fc = 4e3;
|
|
5330
|
+
function pc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "Post", initialFocus: r = !0, isPending: i, error: a, onSubmit: o, onDirtyChange: s, members: c }) {
|
|
5289
5331
|
let [l, u] = z(""), d = V(null), f = V(!1);
|
|
5290
5332
|
B(() => {
|
|
5291
5333
|
f.current && !i && !a && (u(""), s?.(!1), d.current?.focus()), f.current = i;
|
|
@@ -5294,7 +5336,7 @@ function rc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5294
5336
|
a,
|
|
5295
5337
|
s
|
|
5296
5338
|
]);
|
|
5297
|
-
let p =
|
|
5339
|
+
let p = fc - l.length, m = p < 0;
|
|
5298
5340
|
function h(e) {
|
|
5299
5341
|
e?.preventDefault();
|
|
5300
5342
|
let t = l.trim();
|
|
@@ -5303,7 +5345,7 @@ function rc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5303
5345
|
function g(e) {
|
|
5304
5346
|
(e.metaKey || e.ctrlKey) && e.key === "Enter" && h(e);
|
|
5305
5347
|
}
|
|
5306
|
-
let _ = l.length > 0, v =
|
|
5348
|
+
let _ = l.length > 0, v = os();
|
|
5307
5349
|
function y(e) {
|
|
5308
5350
|
return /* @__PURE__ */ Q("button", {
|
|
5309
5351
|
type: "submit",
|
|
@@ -5312,14 +5354,14 @@ function rc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5312
5354
|
"aria-label": i ? "Sending…" : n,
|
|
5313
5355
|
title: i ? "Sending…" : n,
|
|
5314
5356
|
tabIndex: e,
|
|
5315
|
-
children: /* @__PURE__ */ Q(
|
|
5357
|
+
children: /* @__PURE__ */ Q(ms, { size: 14 })
|
|
5316
5358
|
});
|
|
5317
5359
|
}
|
|
5318
5360
|
return /* @__PURE__ */ Q("form", {
|
|
5319
5361
|
class: Z("markup-composer", _ && "is-filled"),
|
|
5320
5362
|
onSubmit: h,
|
|
5321
5363
|
children: [
|
|
5322
|
-
/* @__PURE__ */ Q(
|
|
5364
|
+
/* @__PURE__ */ Q(dc, {
|
|
5323
5365
|
class: "markup-composer-input",
|
|
5324
5366
|
label: e,
|
|
5325
5367
|
placeholder: t,
|
|
@@ -5375,17 +5417,17 @@ function rc({ label: e, placeholder: t = "Leave feedback…", submitLabel: n = "
|
|
|
5375
5417
|
}
|
|
5376
5418
|
//#endregion
|
|
5377
5419
|
//#region src/runtime/ui/new-thread-popover.tsx
|
|
5378
|
-
var
|
|
5379
|
-
function
|
|
5420
|
+
var mc = "https://markup.pixelmatters.dev/docs/install#9-screenshots-privacy";
|
|
5421
|
+
function hc({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified: i, isIdentityResolving: a, isSigningIn: o, isPending: s, error: c, screenshot: l, isScreenshotCapturing: u, screenshotFailed: d, screenshotRedactedCount: f, screenshotRedactedSelectors: p, members: m = [], onAuthor: h, onSignIn: g, onSignOut: _, onSubmit: v, onClose: y }) {
|
|
5380
5422
|
let b = V(null);
|
|
5381
|
-
|
|
5423
|
+
Is(b, !0);
|
|
5382
5424
|
let x = V(!1), C = V(!1), [w, T] = z(!1), E = H((e) => {
|
|
5383
5425
|
C.current = e, T(e);
|
|
5384
5426
|
}, []), D = H(() => {
|
|
5385
5427
|
C.current || (x.current ? E(!0) : y());
|
|
5386
5428
|
}, [y, E]), O = H(() => {
|
|
5387
5429
|
E(!1), b.current?.querySelector(".markup-mention-input")?.focus();
|
|
5388
|
-
}, [E]), [k, A] = z(!1), [ee, te] = z(!1), j =
|
|
5430
|
+
}, [E]), [k, A] = z(!1), [ee, te] = z(!1), j = Ls(l), M = V(null), [ne, re] = z(null), { onPointerDown: ie, isDragging: ae } = Ns({
|
|
5389
5431
|
targetRef: b,
|
|
5390
5432
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
5391
5433
|
onMove: re
|
|
@@ -5416,7 +5458,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5416
5458
|
}, [D, O]), B(() => {
|
|
5417
5459
|
w && b.current?.querySelector(".markup-discard-confirm-keep")?.focus();
|
|
5418
5460
|
}, [w]);
|
|
5419
|
-
let oe =
|
|
5461
|
+
let oe = gc(e - window.scrollX + 16, 12, window.innerWidth - 320 - 12), se = gc(t - window.scrollY - 16, 12, window.innerHeight - 220), ce = typeof window < "u" ? window.location.href : "", le = l != null, ue = u || le || d, de = k && le;
|
|
5420
5462
|
return /* @__PURE__ */ Q("div", {
|
|
5421
5463
|
ref: b,
|
|
5422
5464
|
class: Z("markup-popover", ne && "is-floating", ae && "is-dragging"),
|
|
@@ -5440,7 +5482,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5440
5482
|
class: "markup-icon-btn",
|
|
5441
5483
|
"aria-label": "Discard pin",
|
|
5442
5484
|
onClick: D,
|
|
5443
|
-
children: /* @__PURE__ */ Q(
|
|
5485
|
+
children: /* @__PURE__ */ Q(ls, { size: 16 })
|
|
5444
5486
|
})]
|
|
5445
5487
|
}),
|
|
5446
5488
|
r == null ? /* @__PURE__ */ Q("div", {
|
|
@@ -5460,7 +5502,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5460
5502
|
}) : null
|
|
5461
5503
|
]
|
|
5462
5504
|
}),
|
|
5463
|
-
/* @__PURE__ */ Q(
|
|
5505
|
+
/* @__PURE__ */ Q(pc, {
|
|
5464
5506
|
label: "Feedback",
|
|
5465
5507
|
placeholder: "What's wrong, missing, or worth noting?",
|
|
5466
5508
|
submitLabel: "Post markup",
|
|
@@ -5485,13 +5527,13 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5485
5527
|
class: "markup-screenshot-checkbox",
|
|
5486
5528
|
disabled: !0
|
|
5487
5529
|
}),
|
|
5488
|
-
/* @__PURE__ */ Q(
|
|
5530
|
+
/* @__PURE__ */ Q(ps, { size: 12 }),
|
|
5489
5531
|
/* @__PURE__ */ Q("span", { children: "Capturing…" })
|
|
5490
5532
|
]
|
|
5491
5533
|
}) : d ? /* @__PURE__ */ Q("span", {
|
|
5492
5534
|
class: "markup-screenshot-status",
|
|
5493
5535
|
title: "This page has something the capture can't read, often a third-party image. Your comment will post without a screenshot.",
|
|
5494
|
-
children: [/* @__PURE__ */ Q(
|
|
5536
|
+
children: [/* @__PURE__ */ Q(ps, { size: 12 }), /* @__PURE__ */ Q("span", { children: "Screenshot unavailable" })]
|
|
5495
5537
|
}) : /* @__PURE__ */ Q("label", {
|
|
5496
5538
|
class: "markup-screenshot-toggle",
|
|
5497
5539
|
children: [
|
|
@@ -5501,7 +5543,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5501
5543
|
checked: k,
|
|
5502
5544
|
onChange: (e) => A(e.currentTarget.checked)
|
|
5503
5545
|
}),
|
|
5504
|
-
/* @__PURE__ */ Q(
|
|
5546
|
+
/* @__PURE__ */ Q(ps, { size: 12 }),
|
|
5505
5547
|
/* @__PURE__ */ Q("span", { children: "Attach screenshot" })
|
|
5506
5548
|
]
|
|
5507
5549
|
}),
|
|
@@ -5552,7 +5594,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5552
5594
|
" ",
|
|
5553
5595
|
/* @__PURE__ */ Q("a", {
|
|
5554
5596
|
class: "markup-screenshot-help-link",
|
|
5555
|
-
href:
|
|
5597
|
+
href: mc,
|
|
5556
5598
|
target: "_blank",
|
|
5557
5599
|
rel: "noopener noreferrer",
|
|
5558
5600
|
children: "More info here."
|
|
@@ -5561,7 +5603,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5561
5603
|
})] }) : null]
|
|
5562
5604
|
}) : null
|
|
5563
5605
|
]
|
|
5564
|
-
}) : /* @__PURE__ */ Q(
|
|
5606
|
+
}) : /* @__PURE__ */ Q(Rs, {
|
|
5565
5607
|
mode: r,
|
|
5566
5608
|
isPending: s,
|
|
5567
5609
|
isConnecting: a,
|
|
@@ -5582,7 +5624,7 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5582
5624
|
onClick: (e) => {
|
|
5583
5625
|
e.stopPropagation(), M.current?.close();
|
|
5584
5626
|
},
|
|
5585
|
-
children: /* @__PURE__ */ Q(
|
|
5627
|
+
children: /* @__PURE__ */ Q(ls, { size: 16 })
|
|
5586
5628
|
}), /* @__PURE__ */ Q("img", {
|
|
5587
5629
|
class: "markup-lightbox-img",
|
|
5588
5630
|
src: j,
|
|
@@ -5625,12 +5667,12 @@ function ac({ pageX: e, pageY: t, authorName: n, authorPromptMode: r, isVerified
|
|
|
5625
5667
|
]
|
|
5626
5668
|
});
|
|
5627
5669
|
}
|
|
5628
|
-
function
|
|
5670
|
+
function gc(e, t, n) {
|
|
5629
5671
|
return Math.max(t, Math.min(n, e));
|
|
5630
5672
|
}
|
|
5631
5673
|
//#endregion
|
|
5632
5674
|
//#region src/runtime/ui/notifications-panel.tsx
|
|
5633
|
-
function
|
|
5675
|
+
function _c({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMarkAllRead: a, isMarkingAll: o }) {
|
|
5634
5676
|
let s = e.some((e) => e.readAt == null);
|
|
5635
5677
|
return /* @__PURE__ */ Q("div", {
|
|
5636
5678
|
class: "markup-notifications-panel",
|
|
@@ -5645,7 +5687,7 @@ function sc({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
5645
5687
|
title: "Back to menu",
|
|
5646
5688
|
"aria-label": "Back to menu",
|
|
5647
5689
|
onClick: r,
|
|
5648
|
-
children: /* @__PURE__ */ Q(
|
|
5690
|
+
children: /* @__PURE__ */ Q(us, { size: 16 })
|
|
5649
5691
|
}),
|
|
5650
5692
|
/* @__PURE__ */ Q("span", {
|
|
5651
5693
|
class: "markup-eyebrow",
|
|
@@ -5702,7 +5744,7 @@ function sc({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
5702
5744
|
role: "img",
|
|
5703
5745
|
"aria-label": "Written by an AI agent",
|
|
5704
5746
|
title: "Written by an AI agent on this person's behalf",
|
|
5705
|
-
children: /* @__PURE__ */ Q(
|
|
5747
|
+
children: /* @__PURE__ */ Q(ks, { size: 11 })
|
|
5706
5748
|
}) : null,
|
|
5707
5749
|
/* @__PURE__ */ Q("span", {
|
|
5708
5750
|
class: "markup-notifications-panel-sep",
|
|
@@ -5710,7 +5752,7 @@ function sc({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
5710
5752
|
}),
|
|
5711
5753
|
/* @__PURE__ */ Q("span", {
|
|
5712
5754
|
class: "markup-notifications-panel-time",
|
|
5713
|
-
children:
|
|
5755
|
+
children: vc(e.createdAt)
|
|
5714
5756
|
})
|
|
5715
5757
|
]
|
|
5716
5758
|
}),
|
|
@@ -5739,7 +5781,7 @@ function sc({ items: e, isLoading: t, error: n, onBack: r, onItemClick: i, onMar
|
|
|
5739
5781
|
})]
|
|
5740
5782
|
});
|
|
5741
5783
|
}
|
|
5742
|
-
function
|
|
5784
|
+
function vc(e) {
|
|
5743
5785
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
5744
5786
|
if (n < 60) return "just now";
|
|
5745
5787
|
let r = Math.floor(n / 60);
|
|
@@ -5751,7 +5793,7 @@ function cc(e) {
|
|
|
5751
5793
|
}
|
|
5752
5794
|
//#endregion
|
|
5753
5795
|
//#region src/runtime/use-theme.ts
|
|
5754
|
-
function
|
|
5796
|
+
function yc() {
|
|
5755
5797
|
let [, e] = z(0);
|
|
5756
5798
|
return B(() => Ue(() => e((e) => e + 1)), []), {
|
|
5757
5799
|
mode: Be(),
|
|
@@ -5761,8 +5803,8 @@ function lc() {
|
|
|
5761
5803
|
}
|
|
5762
5804
|
//#endregion
|
|
5763
5805
|
//#region src/runtime/ui/overflow-menu.tsx
|
|
5764
|
-
function
|
|
5765
|
-
let [f, p] = z(!1), m = V(null), h =
|
|
5806
|
+
function bc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked: r = !1, onToggleAutoCapture: i, showResolved: a, onToggleShowResolved: o, onOpenPrivacy: s, onOpenShortcuts: c, onHideForSession: l, version: u, dashboardUrl: d }) {
|
|
5807
|
+
let [f, p] = z(!1), m = V(null), h = yc();
|
|
5766
5808
|
B(() => {
|
|
5767
5809
|
if (!f) return;
|
|
5768
5810
|
function e(e) {
|
|
@@ -5776,7 +5818,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5776
5818
|
document.removeEventListener("click", e, !0), document.removeEventListener("keydown", t);
|
|
5777
5819
|
};
|
|
5778
5820
|
}, [f]);
|
|
5779
|
-
let g = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: _ } =
|
|
5821
|
+
let g = e === "bottom-left" ? "is-anchor-left" : e === "bottom-center" ? "is-anchor-center" : "is-anchor-right", { mod: _ } = os();
|
|
5780
5822
|
return /* @__PURE__ */ Q("div", {
|
|
5781
5823
|
ref: m,
|
|
5782
5824
|
style: {
|
|
@@ -5795,7 +5837,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5795
5837
|
onClick: (e) => {
|
|
5796
5838
|
e.preventDefault(), e.stopPropagation(), p((e) => !e);
|
|
5797
5839
|
},
|
|
5798
|
-
children: /* @__PURE__ */ Q(
|
|
5840
|
+
children: /* @__PURE__ */ Q(bs, { size: 16 })
|
|
5799
5841
|
}), f ? /* @__PURE__ */ Q("div", {
|
|
5800
5842
|
class: Z("markup-pop", g),
|
|
5801
5843
|
"data-pop": "overflow",
|
|
@@ -5819,7 +5861,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5819
5861
|
title: "Light",
|
|
5820
5862
|
class: Z(h.mode === "light" && "is-on"),
|
|
5821
5863
|
onClick: () => h.set("light"),
|
|
5822
|
-
children: /* @__PURE__ */ Q(
|
|
5864
|
+
children: /* @__PURE__ */ Q(xs, { size: 14 })
|
|
5823
5865
|
}),
|
|
5824
5866
|
/* @__PURE__ */ Q("button", {
|
|
5825
5867
|
type: "button",
|
|
@@ -5829,7 +5871,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5829
5871
|
title: "Dark",
|
|
5830
5872
|
class: Z(h.mode === "dark" && "is-on"),
|
|
5831
5873
|
onClick: () => h.set("dark"),
|
|
5832
|
-
children: /* @__PURE__ */ Q(
|
|
5874
|
+
children: /* @__PURE__ */ Q(Ss, { size: 14 })
|
|
5833
5875
|
}),
|
|
5834
5876
|
/* @__PURE__ */ Q("button", {
|
|
5835
5877
|
type: "button",
|
|
@@ -5839,7 +5881,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5839
5881
|
title: `Auto, currently ${h.resolved}`,
|
|
5840
5882
|
class: Z(h.mode === "auto" && "is-on"),
|
|
5841
5883
|
onClick: () => h.set("auto"),
|
|
5842
|
-
children: /* @__PURE__ */ Q(
|
|
5884
|
+
children: /* @__PURE__ */ Q(Cs, { size: 14 })
|
|
5843
5885
|
})
|
|
5844
5886
|
]
|
|
5845
5887
|
})]
|
|
@@ -5862,7 +5904,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5862
5904
|
title: "Bottom left",
|
|
5863
5905
|
class: Z(e === "bottom-left" && "is-on"),
|
|
5864
5906
|
onClick: () => t("bottom-left"),
|
|
5865
|
-
children: /* @__PURE__ */ Q(
|
|
5907
|
+
children: /* @__PURE__ */ Q(xc, { side: "left" })
|
|
5866
5908
|
}),
|
|
5867
5909
|
/* @__PURE__ */ Q("button", {
|
|
5868
5910
|
type: "button",
|
|
@@ -5872,7 +5914,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5872
5914
|
title: "Bottom center",
|
|
5873
5915
|
class: Z(e === "bottom-center" && "is-on"),
|
|
5874
5916
|
onClick: () => t("bottom-center"),
|
|
5875
|
-
children: /* @__PURE__ */ Q(
|
|
5917
|
+
children: /* @__PURE__ */ Q(xc, { side: "center" })
|
|
5876
5918
|
}),
|
|
5877
5919
|
/* @__PURE__ */ Q("button", {
|
|
5878
5920
|
type: "button",
|
|
@@ -5882,7 +5924,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5882
5924
|
title: "Bottom right",
|
|
5883
5925
|
class: Z(e === "bottom-right" && "is-on"),
|
|
5884
5926
|
onClick: () => t("bottom-right"),
|
|
5885
|
-
children: /* @__PURE__ */ Q(
|
|
5927
|
+
children: /* @__PURE__ */ Q(xc, { side: "right" })
|
|
5886
5928
|
})
|
|
5887
5929
|
]
|
|
5888
5930
|
})]
|
|
@@ -5904,7 +5946,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5904
5946
|
children: [
|
|
5905
5947
|
/* @__PURE__ */ Q("span", {
|
|
5906
5948
|
class: "ic",
|
|
5907
|
-
children: /* @__PURE__ */ Q(
|
|
5949
|
+
children: /* @__PURE__ */ Q(Sc, {})
|
|
5908
5950
|
}),
|
|
5909
5951
|
/* @__PURE__ */ Q("span", {
|
|
5910
5952
|
class: "lbl",
|
|
@@ -5931,7 +5973,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5931
5973
|
children: [
|
|
5932
5974
|
/* @__PURE__ */ Q("span", {
|
|
5933
5975
|
class: "ic",
|
|
5934
|
-
children: /* @__PURE__ */ Q(
|
|
5976
|
+
children: /* @__PURE__ */ Q(fs, { size: 16 })
|
|
5935
5977
|
}),
|
|
5936
5978
|
/* @__PURE__ */ Q("span", {
|
|
5937
5979
|
class: "lbl",
|
|
@@ -5955,7 +5997,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5955
5997
|
},
|
|
5956
5998
|
children: [/* @__PURE__ */ Q("span", {
|
|
5957
5999
|
class: "ic",
|
|
5958
|
-
children: /* @__PURE__ */ Q(
|
|
6000
|
+
children: /* @__PURE__ */ Q(ws, { size: 16 })
|
|
5959
6001
|
}), /* @__PURE__ */ Q("span", {
|
|
5960
6002
|
class: "lbl",
|
|
5961
6003
|
children: "Privacy & data"
|
|
@@ -5970,7 +6012,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5970
6012
|
},
|
|
5971
6013
|
children: [/* @__PURE__ */ Q("span", {
|
|
5972
6014
|
class: "ic",
|
|
5973
|
-
children: /* @__PURE__ */ Q(
|
|
6015
|
+
children: /* @__PURE__ */ Q(Ts, { size: 16 })
|
|
5974
6016
|
}), /* @__PURE__ */ Q("span", {
|
|
5975
6017
|
class: "lbl",
|
|
5976
6018
|
children: "Keyboard shortcuts"
|
|
@@ -5987,7 +6029,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
5987
6029
|
children: [
|
|
5988
6030
|
/* @__PURE__ */ Q("span", {
|
|
5989
6031
|
class: "ic",
|
|
5990
|
-
children: /* @__PURE__ */ Q(
|
|
6032
|
+
children: /* @__PURE__ */ Q(Cc, {})
|
|
5991
6033
|
}),
|
|
5992
6034
|
/* @__PURE__ */ Q("span", {
|
|
5993
6035
|
class: "lbl",
|
|
@@ -6005,7 +6047,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
6005
6047
|
target: "_blank",
|
|
6006
6048
|
rel: "noopener noreferrer",
|
|
6007
6049
|
children: [
|
|
6008
|
-
/* @__PURE__ */ Q(
|
|
6050
|
+
/* @__PURE__ */ Q(cs, { size: 12 }),
|
|
6009
6051
|
/* @__PURE__ */ Q("span", { children: "Powered by Markup" }),
|
|
6010
6052
|
/* @__PURE__ */ Q("span", {
|
|
6011
6053
|
class: "ver",
|
|
@@ -6017,7 +6059,7 @@ function uc({ position: e, onSetPosition: t, autoCapture: n, autoCaptureLocked:
|
|
|
6017
6059
|
}) : null]
|
|
6018
6060
|
});
|
|
6019
6061
|
}
|
|
6020
|
-
function
|
|
6062
|
+
function xc({ side: e }) {
|
|
6021
6063
|
return /* @__PURE__ */ Q("svg", {
|
|
6022
6064
|
width: 14,
|
|
6023
6065
|
height: 14,
|
|
@@ -6043,7 +6085,7 @@ function dc({ side: e }) {
|
|
|
6043
6085
|
})]
|
|
6044
6086
|
});
|
|
6045
6087
|
}
|
|
6046
|
-
function
|
|
6088
|
+
function Sc() {
|
|
6047
6089
|
return /* @__PURE__ */ Q("svg", {
|
|
6048
6090
|
width: 16,
|
|
6049
6091
|
height: 16,
|
|
@@ -6061,7 +6103,7 @@ function fc() {
|
|
|
6061
6103
|
})]
|
|
6062
6104
|
});
|
|
6063
6105
|
}
|
|
6064
|
-
function
|
|
6106
|
+
function Cc() {
|
|
6065
6107
|
return /* @__PURE__ */ Q("svg", {
|
|
6066
6108
|
width: 16,
|
|
6067
6109
|
height: 16,
|
|
@@ -6082,7 +6124,7 @@ function pc() {
|
|
|
6082
6124
|
}
|
|
6083
6125
|
//#endregion
|
|
6084
6126
|
//#region src/runtime/ui/panel-popover.tsx
|
|
6085
|
-
function
|
|
6127
|
+
function wc({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i, children: a }) {
|
|
6086
6128
|
let o = V(null);
|
|
6087
6129
|
return B(() => {
|
|
6088
6130
|
function e(e) {
|
|
@@ -6112,7 +6154,7 @@ function mc({ kind: e, label: t, position: n, ignoreToolbarKind: r, onClose: i,
|
|
|
6112
6154
|
}
|
|
6113
6155
|
//#endregion
|
|
6114
6156
|
//#region src/runtime/ui/pin.tsx
|
|
6115
|
-
function
|
|
6157
|
+
function Tc({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClosed: a = !1, onClick: o }) {
|
|
6116
6158
|
let s = t - window.scrollY, c = e - window.scrollX;
|
|
6117
6159
|
return /* @__PURE__ */ Q("button", {
|
|
6118
6160
|
type: "button",
|
|
@@ -6128,11 +6170,11 @@ function hc({ pageX: e, pageY: t, count: n, isActive: r, isUnresolved: i, isClos
|
|
|
6128
6170
|
title: `Open ${a ? "resolved " : ""}feedback thread (${n} comment${n === 1 ? "" : "s"})`,
|
|
6129
6171
|
children: /* @__PURE__ */ Q("span", {
|
|
6130
6172
|
class: "markup-pin-num",
|
|
6131
|
-
children: a ? /* @__PURE__ */ Q(
|
|
6173
|
+
children: a ? /* @__PURE__ */ Q(fs, { size: 14 }) : n
|
|
6132
6174
|
})
|
|
6133
6175
|
});
|
|
6134
6176
|
}
|
|
6135
|
-
function
|
|
6177
|
+
function Ec({ pageX: e, pageY: t }) {
|
|
6136
6178
|
let n = t - window.scrollY, r = e - window.scrollX;
|
|
6137
6179
|
return /* @__PURE__ */ Q("div", {
|
|
6138
6180
|
class: "markup-pin markup-pin-ghost is-anchor",
|
|
@@ -6149,7 +6191,7 @@ function gc({ pageX: e, pageY: t }) {
|
|
|
6149
6191
|
}
|
|
6150
6192
|
//#endregion
|
|
6151
6193
|
//#region src/runtime/ui/placement-overlay.tsx
|
|
6152
|
-
function
|
|
6194
|
+
function Dc({ onPlace: e, onCancel: t }) {
|
|
6153
6195
|
let n = V(null);
|
|
6154
6196
|
return it(() => {
|
|
6155
6197
|
let r = n.current?.getRootNode() ?? null, i = (e) => r !== null && e.composedPath().includes(r);
|
|
@@ -6174,7 +6216,7 @@ function _c({ onPlace: e, onCancel: t }) {
|
|
|
6174
6216
|
window.addEventListener("keydown", a);
|
|
6175
6217
|
for (let e of l) window.addEventListener(e, o, c);
|
|
6176
6218
|
window.addEventListener("click", s, c);
|
|
6177
|
-
let u =
|
|
6219
|
+
let u = Oc();
|
|
6178
6220
|
return () => {
|
|
6179
6221
|
window.removeEventListener("keydown", a);
|
|
6180
6222
|
for (let e of l) window.removeEventListener(e, o, c);
|
|
@@ -6190,7 +6232,7 @@ function _c({ onPlace: e, onCancel: t }) {
|
|
|
6190
6232
|
})
|
|
6191
6233
|
});
|
|
6192
6234
|
}
|
|
6193
|
-
function
|
|
6235
|
+
function Oc() {
|
|
6194
6236
|
let e = "html, html * { cursor: crosshair !important; }";
|
|
6195
6237
|
if ("adoptedStyleSheets" in document && "replaceSync" in CSSStyleSheet.prototype) {
|
|
6196
6238
|
let t = new CSSStyleSheet();
|
|
@@ -6203,7 +6245,7 @@ function vc() {
|
|
|
6203
6245
|
}
|
|
6204
6246
|
//#endregion
|
|
6205
6247
|
//#region src/runtime/ui/privacy-panel.tsx
|
|
6206
|
-
function
|
|
6248
|
+
function kc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture: r, autoCaptureLocked: i, isForgettingMe: a, forgetMeError: o, onForgetMe: s, onClose: c }) {
|
|
6207
6249
|
let [l, u] = z(!1), d = ta(e), f = e.kind === "verified", p = f ? e.identity.email : void 0, m = e.kind === "anon";
|
|
6208
6250
|
return /* @__PURE__ */ Q("div", {
|
|
6209
6251
|
class: "markup-panel",
|
|
@@ -6218,7 +6260,7 @@ function yc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture:
|
|
|
6218
6260
|
title: "Close",
|
|
6219
6261
|
"aria-label": "Close privacy and data",
|
|
6220
6262
|
onClick: c,
|
|
6221
|
-
children: /* @__PURE__ */ Q(
|
|
6263
|
+
children: /* @__PURE__ */ Q(ls, { size: 14 })
|
|
6222
6264
|
})]
|
|
6223
6265
|
}), /* @__PURE__ */ Q("div", {
|
|
6224
6266
|
class: "markup-panel-body",
|
|
@@ -6303,7 +6345,7 @@ function yc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture:
|
|
|
6303
6345
|
"Only ",
|
|
6304
6346
|
/* @__PURE__ */ Q("span", {
|
|
6305
6347
|
class: "markup-panel-mono",
|
|
6306
|
-
children:
|
|
6348
|
+
children: Ac(t)
|
|
6307
6349
|
}),
|
|
6308
6350
|
". No analytics, no ad tech, no third-party requests from the widget. If the widget itself crashes it posts the error, this page's URL and your user-agent to that same host, never your identity or what you were writing."
|
|
6309
6351
|
]
|
|
@@ -6339,7 +6381,7 @@ function yc({ identity: e, apiUrl: t, commentAccess: n = "anyone", autoCapture:
|
|
|
6339
6381
|
})]
|
|
6340
6382
|
});
|
|
6341
6383
|
}
|
|
6342
|
-
function
|
|
6384
|
+
function Ac(e) {
|
|
6343
6385
|
try {
|
|
6344
6386
|
return new URL(e).host;
|
|
6345
6387
|
} catch {
|
|
@@ -6348,8 +6390,8 @@ function bc(e) {
|
|
|
6348
6390
|
}
|
|
6349
6391
|
//#endregion
|
|
6350
6392
|
//#region src/runtime/ui/shortcuts-panel.tsx
|
|
6351
|
-
function
|
|
6352
|
-
let { mod: t, enter: n } =
|
|
6393
|
+
function jc({ onClose: e }) {
|
|
6394
|
+
let { mod: t, enter: n } = os();
|
|
6353
6395
|
return /* @__PURE__ */ Q("div", {
|
|
6354
6396
|
class: "markup-panel",
|
|
6355
6397
|
children: [/* @__PURE__ */ Q("header", {
|
|
@@ -6363,7 +6405,7 @@ function xc({ onClose: e }) {
|
|
|
6363
6405
|
title: "Close",
|
|
6364
6406
|
"aria-label": "Close keyboard shortcuts",
|
|
6365
6407
|
onClick: e,
|
|
6366
|
-
children: /* @__PURE__ */ Q(
|
|
6408
|
+
children: /* @__PURE__ */ Q(ls, { size: 14 })
|
|
6367
6409
|
})]
|
|
6368
6410
|
}), /* @__PURE__ */ Q("div", {
|
|
6369
6411
|
class: "markup-panel-body",
|
|
@@ -6443,14 +6485,14 @@ function xc({ onClose: e }) {
|
|
|
6443
6485
|
}
|
|
6444
6486
|
//#endregion
|
|
6445
6487
|
//#region src/runtime/ui/thread-popover.tsx
|
|
6446
|
-
var
|
|
6488
|
+
var Mc = [
|
|
6447
6489
|
"👍",
|
|
6448
6490
|
"❤️",
|
|
6449
6491
|
"🎉",
|
|
6450
6492
|
"😮",
|
|
6451
6493
|
"😄",
|
|
6452
6494
|
"❓"
|
|
6453
|
-
],
|
|
6495
|
+
], Nc = Ur({
|
|
6454
6496
|
none: {
|
|
6455
6497
|
"toggle-thread-menu": () => ({
|
|
6456
6498
|
kind: "thread-menu",
|
|
@@ -6506,13 +6548,13 @@ var Sc = [
|
|
|
6506
6548
|
dismiss: () => ({ kind: "none" })
|
|
6507
6549
|
}
|
|
6508
6550
|
});
|
|
6509
|
-
function
|
|
6510
|
-
let S = V(null), C = V(null), w = V(null), T = V(null), [E, D] = Wr(
|
|
6551
|
+
function Pc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r, isVerified: i, isIdentityResolving: a, isSigningIn: o, canDelete: s, isPending: c, error: l, isHidden: u = !1, members: d = [], onAuthor: f, onSignIn: p, onSignOut: m, onClose: h, onReply: g, onEditComment: _, onDeleteComment: v, onToggleReaction: y, onResolve: b, onDelete: x }) {
|
|
6552
|
+
let S = V(null), C = V(null), w = V(null), T = V(null), [E, D] = Wr(Nc, { kind: "none" }), [O, k] = z(null), { onPointerDown: A, isDragging: ee } = Ns({
|
|
6511
6553
|
targetRef: S,
|
|
6512
6554
|
shouldStart: (e) => !e.target?.closest("button, a, input, textarea, select"),
|
|
6513
6555
|
onMove: k
|
|
6514
6556
|
});
|
|
6515
|
-
|
|
6557
|
+
Is(S, !0);
|
|
6516
6558
|
let te = e.resolvedAt != null, j = at(() => e.comments.filter((e) => !e.deleted), [e.comments]);
|
|
6517
6559
|
B(() => {
|
|
6518
6560
|
if (E.kind === "none" || E.kind === "editing") return;
|
|
@@ -6563,8 +6605,8 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6563
6605
|
anchorText: e.anchorText
|
|
6564
6606
|
});
|
|
6565
6607
|
return {
|
|
6566
|
-
left:
|
|
6567
|
-
top:
|
|
6608
|
+
left: Rc(t.pageX - window.scrollX + 16, 12, window.innerWidth - 320 - 12),
|
|
6609
|
+
top: Rc(t.pageY - window.scrollY - 16, 12, window.innerHeight - 200)
|
|
6568
6610
|
};
|
|
6569
6611
|
}, [
|
|
6570
6612
|
e.anchorX,
|
|
@@ -6605,15 +6647,15 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6605
6647
|
class: Z("markup-icon-btn", E.kind === "thread-menu" && "is-open"),
|
|
6606
6648
|
title: "More options",
|
|
6607
6649
|
onClick: () => D({ type: "toggle-thread-menu" }),
|
|
6608
|
-
children: /* @__PURE__ */ Q(
|
|
6650
|
+
children: /* @__PURE__ */ Q(ds, { size: 16 })
|
|
6609
6651
|
}), E.kind === "thread-menu" ? /* @__PURE__ */ Q("div", {
|
|
6610
6652
|
class: "markup-thread-menu-list",
|
|
6611
6653
|
children: [/* @__PURE__ */ Q("button", {
|
|
6612
6654
|
type: "button",
|
|
6613
6655
|
class: "markup-thread-menu-item",
|
|
6614
6656
|
onClick: () => {
|
|
6615
|
-
let t =
|
|
6616
|
-
t
|
|
6657
|
+
let t = _a(e.url, e._id);
|
|
6658
|
+
t && navigator.clipboard.writeText(t).catch(() => {}), D({ type: "dismiss" });
|
|
6617
6659
|
},
|
|
6618
6660
|
children: "Copy link"
|
|
6619
6661
|
}), s ? /* @__PURE__ */ Q("button", {
|
|
@@ -6633,14 +6675,14 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6633
6675
|
title: "Mark as resolved",
|
|
6634
6676
|
disabled: c,
|
|
6635
6677
|
onClick: b,
|
|
6636
|
-
children: /* @__PURE__ */ Q(
|
|
6678
|
+
children: /* @__PURE__ */ Q(fs, { size: 16 })
|
|
6637
6679
|
}) : null,
|
|
6638
6680
|
/* @__PURE__ */ Q("button", {
|
|
6639
6681
|
type: "button",
|
|
6640
6682
|
class: "markup-icon-btn",
|
|
6641
6683
|
title: "Close thread",
|
|
6642
6684
|
onClick: h,
|
|
6643
|
-
children: /* @__PURE__ */ Q(
|
|
6685
|
+
children: /* @__PURE__ */ Q(ls, { size: 16 })
|
|
6644
6686
|
})
|
|
6645
6687
|
]
|
|
6646
6688
|
})]
|
|
@@ -6653,10 +6695,10 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6653
6695
|
return /* @__PURE__ */ Q("li", {
|
|
6654
6696
|
class: Z("markup-comment", M.current != null && t.createdAt > M.current && "is-new"),
|
|
6655
6697
|
children: [
|
|
6656
|
-
/* @__PURE__ */ Q(
|
|
6698
|
+
/* @__PURE__ */ Q(zc, {
|
|
6657
6699
|
name: t.authorName,
|
|
6658
6700
|
image: t.authorImage,
|
|
6659
|
-
tone:
|
|
6701
|
+
tone: Vc(t.authorClientId ?? t.authorName)
|
|
6660
6702
|
}),
|
|
6661
6703
|
/* @__PURE__ */ Q("div", {
|
|
6662
6704
|
class: "markup-comment-meta",
|
|
@@ -6670,23 +6712,23 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6670
6712
|
role: "img",
|
|
6671
6713
|
"aria-label": "Written by an AI agent",
|
|
6672
6714
|
title: "Written by an AI agent",
|
|
6673
|
-
children: /* @__PURE__ */ Q(
|
|
6715
|
+
children: /* @__PURE__ */ Q(ks, { size: 11 })
|
|
6674
6716
|
}) : null,
|
|
6675
6717
|
/* @__PURE__ */ Q("time", {
|
|
6676
6718
|
class: "markup-comment-time",
|
|
6677
6719
|
datetime: new Date(t.createdAt).toISOString(),
|
|
6678
|
-
title:
|
|
6679
|
-
children:
|
|
6720
|
+
title: Uc(t.createdAt),
|
|
6721
|
+
children: Hc(t.createdAt)
|
|
6680
6722
|
}),
|
|
6681
6723
|
t.editedAt == null ? null : /* @__PURE__ */ Q("time", {
|
|
6682
6724
|
class: "markup-comment-edited",
|
|
6683
6725
|
datetime: new Date(t.editedAt).toISOString(),
|
|
6684
|
-
title:
|
|
6726
|
+
title: Uc(t.editedAt),
|
|
6685
6727
|
children: "edited"
|
|
6686
6728
|
}),
|
|
6687
6729
|
/* @__PURE__ */ Q("div", {
|
|
6688
6730
|
class: "markup-thread-actions",
|
|
6689
|
-
children: [!te && !l ? /* @__PURE__ */ Q(
|
|
6731
|
+
children: [!te && !l ? /* @__PURE__ */ Q(Fc, {
|
|
6690
6732
|
comment: t,
|
|
6691
6733
|
pickerOpen: m,
|
|
6692
6734
|
pickerDirection: h,
|
|
@@ -6754,7 +6796,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6754
6796
|
direction: a < i ? "up" : "down"
|
|
6755
6797
|
});
|
|
6756
6798
|
},
|
|
6757
|
-
children: /* @__PURE__ */ Q(
|
|
6799
|
+
children: /* @__PURE__ */ Q(ds, { size: 16 })
|
|
6758
6800
|
}), f ? /* @__PURE__ */ Q("div", {
|
|
6759
6801
|
class: "markup-thread-menu-list",
|
|
6760
6802
|
children: [o ? /* @__PURE__ */ Q("button", {
|
|
@@ -6794,7 +6836,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6794
6836
|
await _(t._id, n), D({ type: "dismiss" });
|
|
6795
6837
|
} catch {}
|
|
6796
6838
|
},
|
|
6797
|
-
children: [/* @__PURE__ */ Q(
|
|
6839
|
+
children: [/* @__PURE__ */ Q(dc, {
|
|
6798
6840
|
class: "markup-comment-edit-input",
|
|
6799
6841
|
label: "Edit comment",
|
|
6800
6842
|
value: E.draft,
|
|
@@ -6820,7 +6862,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6820
6862
|
children: "Save"
|
|
6821
6863
|
})]
|
|
6822
6864
|
})]
|
|
6823
|
-
}) : /* @__PURE__ */ Q(
|
|
6865
|
+
}) : /* @__PURE__ */ Q(ac, {
|
|
6824
6866
|
body: t.body,
|
|
6825
6867
|
mentions: t.mentions
|
|
6826
6868
|
}),
|
|
@@ -6833,7 +6875,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6833
6875
|
alt: "Screenshot"
|
|
6834
6876
|
})
|
|
6835
6877
|
}) : null,
|
|
6836
|
-
!l && t.reactions.length > 0 ? /* @__PURE__ */ Q(
|
|
6878
|
+
!l && t.reactions.length > 0 ? /* @__PURE__ */ Q(Ic, {
|
|
6837
6879
|
comment: t,
|
|
6838
6880
|
isResolved: te,
|
|
6839
6881
|
onToggle: (e) => y(t._id, e)
|
|
@@ -6853,7 +6895,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6853
6895
|
onClick: (e) => {
|
|
6854
6896
|
e.stopPropagation(), w.current?.close();
|
|
6855
6897
|
},
|
|
6856
|
-
children: /* @__PURE__ */ Q(
|
|
6898
|
+
children: /* @__PURE__ */ Q(ls, { size: 16 })
|
|
6857
6899
|
}), /* @__PURE__ */ Q("img", {
|
|
6858
6900
|
class: "markup-lightbox-img",
|
|
6859
6901
|
src: e.screenshotUrl,
|
|
@@ -6876,7 +6918,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6876
6918
|
children: "team"
|
|
6877
6919
|
}) : null
|
|
6878
6920
|
]
|
|
6879
|
-
}), /* @__PURE__ */ Q(
|
|
6921
|
+
}), /* @__PURE__ */ Q(pc, {
|
|
6880
6922
|
label: "Reply",
|
|
6881
6923
|
placeholder: "Write a reply…",
|
|
6882
6924
|
submitLabel: "Reply",
|
|
@@ -6886,7 +6928,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6886
6928
|
onSubmit: g,
|
|
6887
6929
|
members: d
|
|
6888
6930
|
})]
|
|
6889
|
-
}) : /* @__PURE__ */ Q(
|
|
6931
|
+
}) : /* @__PURE__ */ Q(Rs, {
|
|
6890
6932
|
mode: n,
|
|
6891
6933
|
isPending: c,
|
|
6892
6934
|
isConnecting: a,
|
|
@@ -6899,7 +6941,7 @@ function wc({ thread: e, authorName: t, authorPromptMode: n, currentClientId: r,
|
|
|
6899
6941
|
]
|
|
6900
6942
|
});
|
|
6901
6943
|
}
|
|
6902
|
-
function
|
|
6944
|
+
function Fc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pickerRef: i, onPickerClick: a, onPickerSelect: o }) {
|
|
6903
6945
|
return /* @__PURE__ */ Q("div", {
|
|
6904
6946
|
class: Z("markup-reaction-picker-wrap", t && "is-open", t && n === "up" && "is-up", r && "is-side"),
|
|
6905
6947
|
ref: i,
|
|
@@ -6909,11 +6951,11 @@ function Tc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
|
|
|
6909
6951
|
title: "Add reaction",
|
|
6910
6952
|
"aria-label": "Add reaction",
|
|
6911
6953
|
onClick: a,
|
|
6912
|
-
children: /* @__PURE__ */ Q(
|
|
6954
|
+
children: /* @__PURE__ */ Q(hs, { size: 16 })
|
|
6913
6955
|
}), t ? /* @__PURE__ */ Q("div", {
|
|
6914
6956
|
class: "markup-reaction-picker",
|
|
6915
6957
|
role: "menu",
|
|
6916
|
-
children:
|
|
6958
|
+
children: Mc.map((t) => /* @__PURE__ */ Q("button", {
|
|
6917
6959
|
type: "button",
|
|
6918
6960
|
role: "menuitem",
|
|
6919
6961
|
class: Z("markup-reaction-picker-item", (e.reactions.find((e) => e.emoji === t)?.mine ?? !1) && "is-mine"),
|
|
@@ -6923,11 +6965,11 @@ function Tc({ comment: e, pickerOpen: t, pickerDirection: n, pickerSide: r, pick
|
|
|
6923
6965
|
}) : null]
|
|
6924
6966
|
});
|
|
6925
6967
|
}
|
|
6926
|
-
function
|
|
6968
|
+
function Ic({ comment: e, isResolved: t, onToggle: n }) {
|
|
6927
6969
|
return /* @__PURE__ */ Q("div", {
|
|
6928
6970
|
class: "markup-reactions",
|
|
6929
6971
|
children: e.reactions.map((e) => {
|
|
6930
|
-
let r =
|
|
6972
|
+
let r = Lc(e.reactors, e.mine, e.count, e.emoji);
|
|
6931
6973
|
return /* @__PURE__ */ Q("button", {
|
|
6932
6974
|
type: "button",
|
|
6933
6975
|
class: Z("markup-reaction-chip", e.mine && "is-mine"),
|
|
@@ -6948,14 +6990,14 @@ function Ec({ comment: e, isResolved: t, onToggle: n }) {
|
|
|
6948
6990
|
})
|
|
6949
6991
|
});
|
|
6950
6992
|
}
|
|
6951
|
-
function
|
|
6993
|
+
function Lc(e, t, n, r) {
|
|
6952
6994
|
let i = e.slice(), a = i.length + +!!t, o = Math.max(0, n - a);
|
|
6953
6995
|
return o > 0 && i.push(`${o} other${o === 1 ? "" : "s"}`), t && i.push("you"), i.length === 0 ? `${n} reacted with ${r}` : `${i.length === 1 ? i[0] : `${i.slice(0, -1).join(", ")} and ${i[i.length - 1]}`} reacted with ${r}`;
|
|
6954
6996
|
}
|
|
6955
|
-
function
|
|
6997
|
+
function Rc(e, t, n) {
|
|
6956
6998
|
return Math.max(t, Math.min(n, e));
|
|
6957
6999
|
}
|
|
6958
|
-
function
|
|
7000
|
+
function zc({ name: e, image: t, tone: n }) {
|
|
6959
7001
|
let [r, i] = z(null);
|
|
6960
7002
|
return /* @__PURE__ */ Q("span", {
|
|
6961
7003
|
class: "markup-comment-avatar",
|
|
@@ -6971,11 +7013,11 @@ function kc({ name: e, image: t, tone: n }) {
|
|
|
6971
7013
|
onError: () => i(t)
|
|
6972
7014
|
}) : /* @__PURE__ */ Q("span", {
|
|
6973
7015
|
class: "markup-avatar-initials",
|
|
6974
|
-
children:
|
|
7016
|
+
children: Bc(e)
|
|
6975
7017
|
})
|
|
6976
7018
|
});
|
|
6977
7019
|
}
|
|
6978
|
-
function
|
|
7020
|
+
function Bc(e) {
|
|
6979
7021
|
let t = e.trim();
|
|
6980
7022
|
if (!t) return "??";
|
|
6981
7023
|
let n = t.split(/\s+/).filter(Boolean), r = n[0] ?? "";
|
|
@@ -6983,12 +7025,12 @@ function Ac(e) {
|
|
|
6983
7025
|
let i = n[n.length - 1] ?? "";
|
|
6984
7026
|
return ((r[0] ?? "") + (i[0] ?? "")).toUpperCase();
|
|
6985
7027
|
}
|
|
6986
|
-
function
|
|
7028
|
+
function Vc(e) {
|
|
6987
7029
|
let t = 0;
|
|
6988
7030
|
for (let n = 0; n < e.length; n++) t = t * 31 + e.charCodeAt(n) | 0;
|
|
6989
7031
|
return Math.abs(t) % 5 + 1;
|
|
6990
7032
|
}
|
|
6991
|
-
function
|
|
7033
|
+
function Hc(e) {
|
|
6992
7034
|
let t = Date.now() - e, n = Math.floor(t / 1e3);
|
|
6993
7035
|
if (n < 60) return "just now";
|
|
6994
7036
|
let r = Math.floor(n / 60);
|
|
@@ -7005,7 +7047,7 @@ function Mc(e) {
|
|
|
7005
7047
|
year: "numeric"
|
|
7006
7048
|
});
|
|
7007
7049
|
}
|
|
7008
|
-
function
|
|
7050
|
+
function Uc(e) {
|
|
7009
7051
|
return new Date(e).toLocaleDateString([], {
|
|
7010
7052
|
month: "long",
|
|
7011
7053
|
day: "numeric",
|
|
@@ -7016,7 +7058,7 @@ function Nc(e) {
|
|
|
7016
7058
|
}
|
|
7017
7059
|
//#endregion
|
|
7018
7060
|
//#region src/runtime/ui/toolbar.tsx
|
|
7019
|
-
function
|
|
7061
|
+
function Wc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right", unreadCount: i = 0, showInbox: a = !1, onOpenInbox: o, inboxOpen: s = !1, pinsVisible: c = !0, onTogglePins: l, identityButton: u, overflowButton: d }) {
|
|
7020
7062
|
let f = V(0);
|
|
7021
7063
|
i > 0 && (f.current = i);
|
|
7022
7064
|
let p = r === "bottom-left" ? "markup-toolbar-left" : r === "bottom-center" ? "markup-toolbar-center" : "markup-toolbar-right";
|
|
@@ -7040,7 +7082,7 @@ function Pc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
7040
7082
|
title: e ? "Cancel placing markup" : "Leave a markup",
|
|
7041
7083
|
"aria-pressed": e,
|
|
7042
7084
|
onClick: m,
|
|
7043
|
-
children: Q(e ?
|
|
7085
|
+
children: Q(e ? ls : gs, { size: 16 })
|
|
7044
7086
|
}),
|
|
7045
7087
|
a ? /* @__PURE__ */ Q("button", {
|
|
7046
7088
|
type: "button",
|
|
@@ -7052,7 +7094,7 @@ function Pc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
7052
7094
|
onClick: (e) => {
|
|
7053
7095
|
e.preventDefault(), e.stopPropagation(), o?.();
|
|
7054
7096
|
},
|
|
7055
|
-
children: [/* @__PURE__ */ Q(
|
|
7097
|
+
children: [/* @__PURE__ */ Q(_s, { size: 16 }), /* @__PURE__ */ Q("span", {
|
|
7056
7098
|
class: "markup-tb-badge",
|
|
7057
7099
|
"data-unread": i > 0 ? "true" : "false",
|
|
7058
7100
|
"aria-hidden": "true",
|
|
@@ -7072,7 +7114,7 @@ function Pc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
7072
7114
|
onClick: (e) => {
|
|
7073
7115
|
e.preventDefault(), e.stopPropagation(), l();
|
|
7074
7116
|
},
|
|
7075
|
-
children: Q(c ?
|
|
7117
|
+
children: Q(c ? vs : ys, { size: 16 })
|
|
7076
7118
|
})] }) : null,
|
|
7077
7119
|
u || d ? /* @__PURE__ */ Q("div", {
|
|
7078
7120
|
class: "markup-tb-sep",
|
|
@@ -7086,14 +7128,14 @@ function Pc({ isActive: e, onToggle: t, onHide: n, position: r = "bottom-right",
|
|
|
7086
7128
|
"data-kind": "overflow",
|
|
7087
7129
|
"aria-label": "More options",
|
|
7088
7130
|
disabled: !0,
|
|
7089
|
-
children: /* @__PURE__ */ Q(
|
|
7131
|
+
children: /* @__PURE__ */ Q(bs, { size: 16 })
|
|
7090
7132
|
})
|
|
7091
7133
|
]
|
|
7092
7134
|
});
|
|
7093
7135
|
}
|
|
7094
7136
|
//#endregion
|
|
7095
7137
|
//#region src/runtime/ui/app.tsx
|
|
7096
|
-
function
|
|
7138
|
+
function Gc(e) {
|
|
7097
7139
|
let t = {
|
|
7098
7140
|
clientId: `markup_user_${e.identity.id}`,
|
|
7099
7141
|
name: e.identity.name,
|
|
@@ -7119,17 +7161,14 @@ function Fc(e) {
|
|
|
7119
7161
|
} : {}
|
|
7120
7162
|
};
|
|
7121
7163
|
}
|
|
7122
|
-
function
|
|
7164
|
+
function Kc() {
|
|
7123
7165
|
let e = document.activeElement;
|
|
7124
7166
|
for (; e && e.shadowRoot && e.shadowRoot.activeElement;) e = e.shadowRoot.activeElement;
|
|
7125
7167
|
if (!e) return !1;
|
|
7126
7168
|
let t = e.tagName;
|
|
7127
7169
|
return t === "INPUT" || t === "TEXTAREA" || t === "SELECT" || e.isContentEditable;
|
|
7128
7170
|
}
|
|
7129
|
-
|
|
7130
|
-
return window.location.host + window.location.pathname;
|
|
7131
|
-
}
|
|
7132
|
-
var Rc = Ur({
|
|
7171
|
+
var qc = Ur({
|
|
7133
7172
|
visible: {
|
|
7134
7173
|
"hide-with-toast": () => ({ kind: "hidden-with-toast" }),
|
|
7135
7174
|
toggle: () => ({ kind: "hidden" })
|
|
@@ -7140,26 +7179,26 @@ var Rc = Ur({
|
|
|
7140
7179
|
},
|
|
7141
7180
|
hidden: { toggle: () => ({ kind: "visible" }) }
|
|
7142
7181
|
});
|
|
7143
|
-
function
|
|
7182
|
+
function Jc(e) {
|
|
7144
7183
|
return $i(e), e;
|
|
7145
7184
|
}
|
|
7146
|
-
var
|
|
7185
|
+
var Yc = Ur({
|
|
7147
7186
|
unresolved: {
|
|
7148
|
-
"mint-success": (e, t) =>
|
|
7187
|
+
"mint-success": (e, t) => Jc({
|
|
7149
7188
|
kind: "anon",
|
|
7150
7189
|
identity: t.identity
|
|
7151
7190
|
}),
|
|
7152
|
-
"signed-in": (e, t) =>
|
|
7191
|
+
"signed-in": (e, t) => Jc({
|
|
7153
7192
|
kind: "verified",
|
|
7154
7193
|
identity: t.identity
|
|
7155
7194
|
})
|
|
7156
7195
|
},
|
|
7157
7196
|
anon: {
|
|
7158
|
-
"signed-in": (e, t) =>
|
|
7197
|
+
"signed-in": (e, t) => Jc({
|
|
7159
7198
|
kind: "verified",
|
|
7160
7199
|
identity: t.identity
|
|
7161
7200
|
}),
|
|
7162
|
-
"author-set": (e, t) =>
|
|
7201
|
+
"author-set": (e, t) => Jc({
|
|
7163
7202
|
kind: "anon",
|
|
7164
7203
|
identity: {
|
|
7165
7204
|
...e.identity,
|
|
@@ -7167,35 +7206,35 @@ var Bc = Ur({
|
|
|
7167
7206
|
email: t.email
|
|
7168
7207
|
}
|
|
7169
7208
|
}),
|
|
7170
|
-
"forget-me": () =>
|
|
7209
|
+
"forget-me": () => Jc({ kind: "unresolved" })
|
|
7171
7210
|
},
|
|
7172
7211
|
verified: {
|
|
7173
|
-
"signed-in": (e, t) =>
|
|
7212
|
+
"signed-in": (e, t) => Jc({
|
|
7174
7213
|
kind: "verified",
|
|
7175
7214
|
identity: t.identity
|
|
7176
7215
|
}),
|
|
7177
|
-
unauthorized: (e) =>
|
|
7216
|
+
unauthorized: (e) => Jc({
|
|
7178
7217
|
kind: "recovering",
|
|
7179
7218
|
preserved: {
|
|
7180
7219
|
name: e.identity.name,
|
|
7181
7220
|
email: e.identity.email
|
|
7182
7221
|
}
|
|
7183
7222
|
}),
|
|
7184
|
-
"signed-out": () =>
|
|
7223
|
+
"signed-out": () => Jc({ kind: "unresolved" })
|
|
7185
7224
|
},
|
|
7186
7225
|
recovering: {
|
|
7187
|
-
"mint-success": (e, t) =>
|
|
7226
|
+
"mint-success": (e, t) => Jc({
|
|
7188
7227
|
kind: "anon",
|
|
7189
7228
|
identity: t.identity
|
|
7190
7229
|
}),
|
|
7191
|
-
"signed-in": (e, t) =>
|
|
7230
|
+
"signed-in": (e, t) => Jc({
|
|
7192
7231
|
kind: "verified",
|
|
7193
7232
|
identity: t.identity
|
|
7194
7233
|
})
|
|
7195
7234
|
}
|
|
7196
7235
|
});
|
|
7197
|
-
function
|
|
7198
|
-
let [a, o] = z(
|
|
7236
|
+
function Xc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r, dashboardUrl: i }) {
|
|
7237
|
+
let [a, o] = z(fa), [s, c] = z([]), [l, u] = z(!1), d = at(() => Qi(), []), [f, p] = Wr(Yc, d.state), [m, h] = z(null);
|
|
7199
7238
|
B(() => {
|
|
7200
7239
|
let n = !1;
|
|
7201
7240
|
return Ri(e, t).then((e) => {
|
|
@@ -7205,7 +7244,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7205
7244
|
};
|
|
7206
7245
|
}, [e, t]);
|
|
7207
7246
|
let [g, _] = z(n), [v, y] = z(!0), [b, x] = z(!0), [S, C] = z(!1), [w, T] = z(null), E = H(() => T(null), []), D = V(f);
|
|
7208
|
-
D.current = f,
|
|
7247
|
+
D.current = f, as(f, e, t, (e) => p({
|
|
7209
7248
|
type: "signed-in",
|
|
7210
7249
|
identity: e
|
|
7211
7250
|
}), () => p({ type: "unauthorized" }));
|
|
@@ -7251,7 +7290,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7251
7290
|
}).finally(() => {
|
|
7252
7291
|
ae(!1);
|
|
7253
7292
|
});
|
|
7254
|
-
}, [O]), de = Zr(), fe = Zr(), pe = Zr(), me = Zr(), he = Zr(), { run: N, reset: P } = de, { run: ge } = fe, { run: _e, reset: ve } = pe, { run: ye } = me, { run: be } = he, Se = he.isPending, Ce = de.isPending, we = de.error ?? fe.error ?? pe.error, [Te, Ee] = Wr(
|
|
7293
|
+
}, [O]), de = Zr(), fe = Zr(), pe = Zr(), me = Zr(), he = Zr(), { run: N, reset: P } = de, { run: ge } = fe, { run: _e, reset: ve } = pe, { run: ye } = me, { run: be } = he, Se = he.isPending, Ce = de.isPending, we = de.error ?? fe.error ?? pe.error, [Te, Ee] = Wr(qc, { kind: "visible" }), De = Te.kind !== "visible", [Oe, ke] = z(0), Ae = V(null), je = ta(f), Me = f.kind === "verified", F = f.kind === "unresolved" || f.kind === "recovering", Ne = ea(f), [Pe, I] = z(Ni), [Fe, Ie] = z(null);
|
|
7255
7294
|
B(() => {
|
|
7256
7295
|
Ie(null);
|
|
7257
7296
|
}, [f.kind, Ne]);
|
|
@@ -7293,7 +7332,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7293
7332
|
p,
|
|
7294
7333
|
d
|
|
7295
7334
|
]);
|
|
7296
|
-
let Be =
|
|
7335
|
+
let Be = ts(O), [Ve, He] = z(null);
|
|
7297
7336
|
B(() => {
|
|
7298
7337
|
let t = new Hr(e.replace(/\.convex\.site(\/.*)?$/, ".convex.cloud"));
|
|
7299
7338
|
return He(t), () => {
|
|
@@ -7337,16 +7376,12 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7337
7376
|
f.kind
|
|
7338
7377
|
]), B(() => {
|
|
7339
7378
|
if (Ue.current || !l) return;
|
|
7340
|
-
let e =
|
|
7341
|
-
|
|
7342
|
-
|
|
7343
|
-
|
|
7344
|
-
|
|
7345
|
-
|
|
7346
|
-
}), history.replaceState(null, "", window.location.pathname + window.location.search);
|
|
7347
|
-
}
|
|
7348
|
-
Ue.current = !0;
|
|
7349
|
-
}, [s, l]), B(() => Gi(() => o(Lc())), []), B(() => {
|
|
7379
|
+
let e = pa();
|
|
7380
|
+
e !== null && (s.find((t) => t._id === e) && A({
|
|
7381
|
+
kind: "thread",
|
|
7382
|
+
threadId: e
|
|
7383
|
+
}), ha()), Ue.current = !0;
|
|
7384
|
+
}, [s, l]), B(() => Gi(() => o(fa())), []), B(() => {
|
|
7350
7385
|
function e(e) {
|
|
7351
7386
|
e.key === "." && (e.metaKey || e.ctrlKey) && (e.altKey || e.shiftKey || (e.preventDefault(), Ee({ type: "toggle" })));
|
|
7352
7387
|
}
|
|
@@ -7378,7 +7413,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7378
7413
|
}, [P, ve]);
|
|
7379
7414
|
B(() => {
|
|
7380
7415
|
function e(e) {
|
|
7381
|
-
e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || k.kind === "idle" && (De ||
|
|
7416
|
+
e.key === "c" && (e.metaKey || e.ctrlKey || e.altKey || e.shiftKey || k.kind === "idle" && (De || Kc() || (e.preventDefault(), We())));
|
|
7382
7417
|
}
|
|
7383
7418
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
7384
7419
|
}, [
|
|
@@ -7421,7 +7456,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7421
7456
|
strictScrub: r?.strictScrub,
|
|
7422
7457
|
redactSelector: r?.redactSelector
|
|
7423
7458
|
};
|
|
7424
|
-
|
|
7459
|
+
Ko(s, {
|
|
7425
7460
|
x: t,
|
|
7426
7461
|
y: n
|
|
7427
7462
|
}, c).then((e) => {
|
|
@@ -7442,7 +7477,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7442
7477
|
});
|
|
7443
7478
|
}, [p]), Je = fe.isPending, Ye = H(async () => {
|
|
7444
7479
|
xe("sign_in_started"), await ge(async () => {
|
|
7445
|
-
let n =
|
|
7480
|
+
let n = Gc(await sa({
|
|
7446
7481
|
apiUrl: e,
|
|
7447
7482
|
apiKey: t,
|
|
7448
7483
|
useCookies: m === !0
|
|
@@ -7543,8 +7578,8 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7543
7578
|
threadId: e.threadId
|
|
7544
7579
|
});
|
|
7545
7580
|
else {
|
|
7546
|
-
let t =
|
|
7547
|
-
t && (
|
|
7581
|
+
let t = _a(e.threadUrl, e.threadId);
|
|
7582
|
+
t && (window.location.href = t);
|
|
7548
7583
|
}
|
|
7549
7584
|
}, [O, s]), $e = H(() => {
|
|
7550
7585
|
le(!0), M(0), re((e) => e.map((e) => e.readAt == null ? {
|
|
@@ -7710,7 +7745,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7710
7745
|
class: "markup-pins-layer",
|
|
7711
7746
|
children: [!De && v ? U.map(({ thread: e, point: t }) => {
|
|
7712
7747
|
let n = k.kind === "thread" && k.threadId === e._id, r = e.comments.reduce((e, t) => e + +!t.deleted, 0);
|
|
7713
|
-
return /* @__PURE__ */ Q(
|
|
7748
|
+
return /* @__PURE__ */ Q(Tc, {
|
|
7714
7749
|
pageX: t.pageX,
|
|
7715
7750
|
pageY: t.pageY,
|
|
7716
7751
|
count: r,
|
|
@@ -7724,16 +7759,16 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7724
7759
|
});
|
|
7725
7760
|
}
|
|
7726
7761
|
}, e._id);
|
|
7727
|
-
}) : null, k.kind === "composing-new" ? /* @__PURE__ */ Q(
|
|
7762
|
+
}) : null, k.kind === "composing-new" ? /* @__PURE__ */ Q(Ec, {
|
|
7728
7763
|
pageX: k.pageX,
|
|
7729
7764
|
pageY: k.pageY
|
|
7730
7765
|
}) : null]
|
|
7731
7766
|
}),
|
|
7732
|
-
k.kind === "placing" ? /* @__PURE__ */ Q(
|
|
7767
|
+
k.kind === "placing" ? /* @__PURE__ */ Q(Dc, {
|
|
7733
7768
|
onPlace: Ke,
|
|
7734
7769
|
onCancel: Ge
|
|
7735
7770
|
}) : null,
|
|
7736
|
-
k.kind === "thread" && dt ? /* @__PURE__ */ Q(
|
|
7771
|
+
k.kind === "thread" && dt ? /* @__PURE__ */ Q(Pc, {
|
|
7737
7772
|
thread: dt,
|
|
7738
7773
|
authorName: je,
|
|
7739
7774
|
authorPromptMode: Re,
|
|
@@ -7757,7 +7792,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7757
7792
|
onDelete: Xe,
|
|
7758
7793
|
onResolve: Ze
|
|
7759
7794
|
}, dt._id) : null,
|
|
7760
|
-
k.kind === "composing-new" ? /* @__PURE__ */ Q(
|
|
7795
|
+
k.kind === "composing-new" ? /* @__PURE__ */ Q(hc, {
|
|
7761
7796
|
pageX: k.pageX,
|
|
7762
7797
|
pageY: k.pageY,
|
|
7763
7798
|
authorName: je,
|
|
@@ -7779,7 +7814,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7779
7814
|
onSubmit: R,
|
|
7780
7815
|
onClose: Ge
|
|
7781
7816
|
}) : null,
|
|
7782
|
-
!De || k.kind === "placing" || k.kind === "composing-new" ? /* @__PURE__ */ Q(
|
|
7817
|
+
!De || k.kind === "placing" || k.kind === "composing-new" ? /* @__PURE__ */ Q(Wc, {
|
|
7783
7818
|
isActive: k.kind === "placing",
|
|
7784
7819
|
onToggle: () => k.kind === "placing" ? Ge() : We(),
|
|
7785
7820
|
onHide: () => Ee({ type: "hide-with-toast" }),
|
|
@@ -7793,7 +7828,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7793
7828
|
},
|
|
7794
7829
|
pinsVisible: v,
|
|
7795
7830
|
onTogglePins: () => y((e) => !e),
|
|
7796
|
-
identityButton: /* @__PURE__ */ Q(
|
|
7831
|
+
identityButton: /* @__PURE__ */ Q(js, {
|
|
7797
7832
|
identity: f,
|
|
7798
7833
|
position: g,
|
|
7799
7834
|
isSigningIn: Je,
|
|
@@ -7804,7 +7839,7 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7804
7839
|
onSignOut: ut,
|
|
7805
7840
|
onForgetMe: st
|
|
7806
7841
|
}),
|
|
7807
|
-
overflowButton: /* @__PURE__ */ Q(
|
|
7842
|
+
overflowButton: /* @__PURE__ */ Q(bc, {
|
|
7808
7843
|
position: g,
|
|
7809
7844
|
onSetPosition: _,
|
|
7810
7845
|
autoCapture: b && r?.enabled !== !1,
|
|
@@ -7815,17 +7850,17 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7815
7850
|
onOpenPrivacy: () => T("privacy"),
|
|
7816
7851
|
onOpenShortcuts: () => T("shortcuts"),
|
|
7817
7852
|
onHideForSession: () => Ee({ type: "hide-with-toast" }),
|
|
7818
|
-
version: "1.
|
|
7853
|
+
version: "1.23.0",
|
|
7819
7854
|
dashboardUrl: i
|
|
7820
7855
|
})
|
|
7821
7856
|
}) : null,
|
|
7822
|
-
w === "inbox" && Me ? /* @__PURE__ */ Q(
|
|
7857
|
+
w === "inbox" && Me ? /* @__PURE__ */ Q(wc, {
|
|
7823
7858
|
kind: "inbox",
|
|
7824
7859
|
label: "Inbox",
|
|
7825
7860
|
position: g,
|
|
7826
7861
|
ignoreToolbarKind: "inbox",
|
|
7827
7862
|
onClose: E,
|
|
7828
|
-
children: /* @__PURE__ */ Q(
|
|
7863
|
+
children: /* @__PURE__ */ Q(_c, {
|
|
7829
7864
|
items: ne,
|
|
7830
7865
|
isLoading: ie,
|
|
7831
7866
|
error: oe,
|
|
@@ -7837,12 +7872,12 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7837
7872
|
onMarkAllRead: $e
|
|
7838
7873
|
})
|
|
7839
7874
|
}) : null,
|
|
7840
|
-
w === "privacy" ? /* @__PURE__ */ Q(
|
|
7875
|
+
w === "privacy" ? /* @__PURE__ */ Q(wc, {
|
|
7841
7876
|
kind: "privacy",
|
|
7842
7877
|
label: "Privacy and data",
|
|
7843
7878
|
position: g,
|
|
7844
7879
|
onClose: E,
|
|
7845
|
-
children: /* @__PURE__ */ Q(
|
|
7880
|
+
children: /* @__PURE__ */ Q(kc, {
|
|
7846
7881
|
identity: f,
|
|
7847
7882
|
apiUrl: e,
|
|
7848
7883
|
commentAccess: Pe,
|
|
@@ -7854,21 +7889,21 @@ function Vc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7854
7889
|
onClose: E
|
|
7855
7890
|
})
|
|
7856
7891
|
}) : null,
|
|
7857
|
-
w === "shortcuts" ? /* @__PURE__ */ Q(
|
|
7892
|
+
w === "shortcuts" ? /* @__PURE__ */ Q(wc, {
|
|
7858
7893
|
kind: "shortcuts",
|
|
7859
7894
|
label: "Keyboard shortcuts",
|
|
7860
7895
|
position: g,
|
|
7861
7896
|
onClose: E,
|
|
7862
|
-
children: /* @__PURE__ */ Q(
|
|
7897
|
+
children: /* @__PURE__ */ Q(jc, { onClose: E })
|
|
7863
7898
|
}) : null,
|
|
7864
|
-
Te.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(
|
|
7865
|
-
it ? /* @__PURE__ */ Q(
|
|
7866
|
-
ct ? /* @__PURE__ */ Q(
|
|
7899
|
+
Te.kind === "hidden-with-toast" ? /* @__PURE__ */ Q(Zc, { position: g }) : null,
|
|
7900
|
+
it ? /* @__PURE__ */ Q(Qc, { position: g }) : null,
|
|
7901
|
+
ct ? /* @__PURE__ */ Q($c, { position: g }) : null
|
|
7867
7902
|
]
|
|
7868
7903
|
});
|
|
7869
7904
|
}
|
|
7870
|
-
function
|
|
7871
|
-
let { mod: t } =
|
|
7905
|
+
function Zc({ position: e }) {
|
|
7906
|
+
let { mod: t } = os();
|
|
7872
7907
|
return /* @__PURE__ */ Q("div", {
|
|
7873
7908
|
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
7874
7909
|
role: "status",
|
|
@@ -7887,7 +7922,7 @@ function Hc({ position: e }) {
|
|
|
7887
7922
|
]
|
|
7888
7923
|
});
|
|
7889
7924
|
}
|
|
7890
|
-
function
|
|
7925
|
+
function Qc({ position: e }) {
|
|
7891
7926
|
return /* @__PURE__ */ Q("div", {
|
|
7892
7927
|
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
7893
7928
|
role: "status",
|
|
@@ -7895,7 +7930,7 @@ function Uc({ position: e }) {
|
|
|
7895
7930
|
children: "Forgotten on this site — your name and email were cleared."
|
|
7896
7931
|
});
|
|
7897
7932
|
}
|
|
7898
|
-
function
|
|
7933
|
+
function $c({ position: e }) {
|
|
7899
7934
|
return /* @__PURE__ */ Q("div", {
|
|
7900
7935
|
class: Z("markup-hud-hidden-toast", e === "bottom-left" ? "markup-hud-hidden-toast-left" : e === "bottom-center" ? "markup-hud-hidden-toast-center" : "markup-hud-hidden-toast-right"),
|
|
7901
7936
|
role: "status",
|
|
@@ -7905,7 +7940,7 @@ function Wc({ position: e }) {
|
|
|
7905
7940
|
}
|
|
7906
7941
|
//#endregion
|
|
7907
7942
|
//#region src/runtime/mount.tsx
|
|
7908
|
-
function
|
|
7943
|
+
function el(e, t) {
|
|
7909
7944
|
e.style.position = "fixed", e.style.inset = "0", e.style.zIndex = "2147483647", e.style.pointerEvents = "none", ze(e, t.theme ?? "auto");
|
|
7910
7945
|
let n = We(), r = e.attachShadow({ mode: "open" }), i = document.createElement("style");
|
|
7911
7946
|
i.textContent = fe, r.appendChild(i);
|
|
@@ -7913,44 +7948,44 @@ function Gc(e, t) {
|
|
|
7913
7948
|
a.className = "markup-shadow-root", r.appendChild(a), Me({
|
|
7914
7949
|
apiUrl: t.apiUrl,
|
|
7915
7950
|
apiKey: t.apiKey,
|
|
7916
|
-
widgetVersion: "1.
|
|
7951
|
+
widgetVersion: "1.23.0"
|
|
7917
7952
|
}), be(t.analytics === !1 ? null : {
|
|
7918
7953
|
apiUrl: t.apiUrl,
|
|
7919
7954
|
apiKey: t.apiKey,
|
|
7920
|
-
widgetVersion: "1.
|
|
7955
|
+
widgetVersion: "1.23.0"
|
|
7921
7956
|
}), xe("widget_loaded");
|
|
7922
7957
|
let { theme: o, analytics: s, ...c } = t;
|
|
7923
7958
|
return de(/* @__PURE__ */ Q(we, {
|
|
7924
7959
|
onError: (e) => F(e, { context: "render" }),
|
|
7925
|
-
children: /* @__PURE__ */ Q(
|
|
7960
|
+
children: /* @__PURE__ */ Q(Xc, { ...c })
|
|
7926
7961
|
}), a), () => {
|
|
7927
7962
|
n(), Me(null), be(null), de(null, a);
|
|
7928
7963
|
};
|
|
7929
7964
|
}
|
|
7930
7965
|
//#endregion
|
|
7931
7966
|
//#region src/widget.ts
|
|
7932
|
-
var
|
|
7933
|
-
function
|
|
7967
|
+
var tl = null, nl = null, rl = null, il = !1;
|
|
7968
|
+
function al(e) {
|
|
7934
7969
|
if (!e.apiUrl || !e.apiKey) return console.warn("[markup] init() requires both apiUrl and apiKey, so the widget was not mounted"), () => {};
|
|
7935
|
-
e.fab != null && !
|
|
7970
|
+
e.fab != null && !il && (il = !0, console.warn("[markup] the `fab` option is ignored and will be removed in the next major. The toolbar replaced the floating action button. Remove it from your config.")), ol();
|
|
7936
7971
|
let t = () => {
|
|
7937
|
-
if (
|
|
7972
|
+
if (rl = null, !document.body) return;
|
|
7938
7973
|
let t = document.createElement("div");
|
|
7939
|
-
t.id = "markup-widget", document.body.appendChild(t),
|
|
7974
|
+
t.id = "markup-widget", document.body.appendChild(t), nl = t, tl = el(t, e);
|
|
7940
7975
|
};
|
|
7941
7976
|
if (document.readyState === "loading" || !document.body) {
|
|
7942
7977
|
let e = () => t();
|
|
7943
|
-
|
|
7978
|
+
rl = () => document.removeEventListener("DOMContentLoaded", e), document.addEventListener("DOMContentLoaded", e, { once: !0 });
|
|
7944
7979
|
} else t();
|
|
7945
|
-
return
|
|
7980
|
+
return ol;
|
|
7946
7981
|
}
|
|
7947
|
-
function
|
|
7948
|
-
|
|
7982
|
+
function ol() {
|
|
7983
|
+
rl &&= (rl(), null), tl &&= (tl(), null), nl?.parentNode && nl.parentNode.removeChild(nl), nl = null;
|
|
7949
7984
|
}
|
|
7950
7985
|
if (typeof document < "u") {
|
|
7951
7986
|
let e = document.currentScript ?? document.querySelector("script[data-markup-widget=\"true\"]"), t = e?.dataset.apiUrl, n = e?.dataset.apiKey;
|
|
7952
7987
|
if (t && n) {
|
|
7953
|
-
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = e?.dataset.analytics !== "false", c = () =>
|
|
7988
|
+
let r = e?.dataset.position, i = e?.dataset.theme, a = e?.dataset.fab, o = e?.dataset.dashboardUrl, s = e?.dataset.analytics !== "false", c = () => al({
|
|
7954
7989
|
apiUrl: t,
|
|
7955
7990
|
apiKey: n,
|
|
7956
7991
|
position: r,
|
|
@@ -7963,6 +7998,6 @@ if (typeof document < "u") {
|
|
|
7963
7998
|
}
|
|
7964
7999
|
}
|
|
7965
8000
|
//#endregion
|
|
7966
|
-
export {
|
|
8001
|
+
export { ol as destroy, al as init };
|
|
7967
8002
|
|
|
7968
8003
|
//# sourceMappingURL=widget.js.map
|