Walrus blob · mainnet
On-chain registration not yet visible.
The aggregator served this blob, but we couldn't locate a matching BlobRegistered event in our scan window. It may not be certified yet, or live further back than we paged.
Lifecycle data is unavailable until the blob registration is visible on-chain.
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["browser-CH832Fuv.js","index-CeMnqBop.js","index-6HPkoFQc.css"])))=>i.map(i=>d[i]);
import { b as Q, d as W, r as t, j as e, L as C, F as $, U as X, e as G, X as H, f as E, a as K, C as q, E as V, _ as Z, __tla as __tla_0 } from "./index-CeMnqBop.js";
import { s as J } from "./syncErrorMessage-vBD1-tmI.js";
import { r as Y } from "./analytics-DBAq2caw.js";
import { g as ee, e as se, a as re } from "./shareCrypto-_9-e0tA6.js";
import { E as z, f as x, M as m, a as te, F as ae, P as le, b as ne } from "./logic-CKPxob_3.js";
import { C as oe } from "./chevron-left-BEdjO5Qe.js";
import { C as ie } from "./clock-CqqCLLtU.js";
import { G as L } from "./globe-BV44Ke1C.js";
import { C as de } from "./check-DBfhNWom.js";
let fe;
let __tla = Promise.all([
(() => {
try {
return __tla_0;
} catch {
}
})()
]).then(async () => {
fe = function() {
const { currentUserAddress: a } = Q(), { syncToWalrus: _ } = W(), [r, o] = t.useState(null), [i, p] = t.useState(false), [d, D] = t.useState(false), [g, P] = t.useState(z[0]), [l, h] = t.useState(null), [F, u] = t.useState(false), [b, y] = t.useState(null), [f, n] = t.useState(null), j = t.useRef(null), c = (s) => {
if (h(null), y(null), n(null), !s) {
o(null);
return;
}
if (s.size > m) {
n(`\u30D5\u30A1\u30A4\u30EB\u304C\u5927\u304D\u3059\u304E\u307E\u3059\uFF08\u73FE\u5728\u306E\u4E0A\u9650 ${x(m)}\uFF09\u3002`), o(null);
return;
}
o(s);
}, R = (s) => {
var _a;
c(((_a = s.target.files) == null ? void 0 : _a[0]) ?? null), s.target.value = "";
}, A = async () => {
var _a;
if (!(!r || !a)) {
p(true), n(null);
try {
const s = await te(r), O = r.type || "application/pdf", k = await ee(), T = await se(s, k), I = await re(k), N = d && !!a, v = await _({
payload: null,
rawBytes: T,
appNamespace: le,
forceMode: N ? "self_pay" : "auto",
epochs: N ? g.epochs : ae
}), w = ne(v.blobId, {
name: r.name,
mime: O,
size: r.size
}, I);
h(w), Y({
shareId: v.blobId,
kind: "pdf",
title: r.name
});
try {
const S = await Z(() => import("./browser-CH832Fuv.js").then((B) => B.b), __vite__mapDeps([0,1,2])), M = S.toDataURL ?? ((_a = S.default) == null ? void 0 : _a.toDataURL);
y(await M(w, {
margin: 1,
width: 320,
errorCorrectionLevel: "M"
}));
} catch {
}
} catch (s) {
console.error("[pdf-share] publish failed", s), n(`\u5171\u6709\u30EA\u30F3\u30AF\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002
${J(s)}`);
} finally {
p(false);
}
}
}, U = async () => {
if (l) try {
await navigator.clipboard.writeText(l), u(true), setTimeout(() => u(false), 1500);
} catch {
}
};
return e.jsxs("div", {
className: "min-h-screen bg-gray-50 dark:bg-[#0b0b0d] text-gray-900 dark:text-gray-100 font-sans",
children: [
e.jsxs("header", {
className: "sticky top-0 z-10 bg-white/80 dark:bg-gray-900/80 backdrop-blur-md border-b border-gray-200 dark:border-gray-800 px-4 sm:px-8 py-4 flex items-center justify-between",
children: [
e.jsxs(C, {
to: "/",
className: "flex items-center gap-1.5 text-gray-500 hover:text-gray-900 dark:hover:text-gray-100 text-sm font-medium transition-colors",
children: [
e.jsx(oe, {
size: 18
}),
" \u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9"
]
}),
e.jsxs("h1", {
className: "text-lg sm:text-xl font-bold tracking-tight flex items-center gap-2",
children: [
e.jsx($, {
size: 20,
className: "text-rose-500"
}),
" PDF\u5171\u6709\u30EA\u30F3\u30AF"
]
}),
e.jsx("span", {
className: "w-24"
})
]
}),
e.jsxs("main", {
className: "max-w-2xl mx-auto px-4 sm:px-8 py-6",
children: [
e.jsxs("p", {
className: "text-sm text-gray-500 dark:text-gray-400 mb-5",
children: [
"PDF\u3092",
e.jsx("strong", {
className: "text-gray-700 dark:text-gray-200",
children: "\u7AEF\u672B\u3067\u6697\u53F7\u5316"
}),
"\u3057\u3066\u304B\u3089\u4FDD\u5B58\u3057\u3001",
e.jsx("strong", {
className: "text-gray-700 dark:text-gray-200",
children: "\u5171\u6709\u30EA\u30F3\u30AF\uFF0BQR"
}),
"\u3092\u767A\u884C\u3002",
e.jsx("strong", {
children: "\u30EA\u30F3\u30AF\uFF08\uFF0B\u9375\uFF09\u3092\u77E5\u3063\u3066\u3044\u308B\u4EBA\u3060\u3051"
}),
"\u304C\u95B2\u89A7\u30FB\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u3067\u304D\u3001\u4FDD\u7BA1\u7DB2\u30FB\u904B\u55B6\u8005\u306F\u4E2D\u8EAB\u3092\u8AAD\u3081\u307E\u305B\u3093\u3002",
e.jsx("strong", {
children: "\u4FDD\u5B58\u671F\u9593\uFF08\u671F\u9650\uFF09"
}),
"\u3082\u9078\u3079\u307E\u3059\u3002"
]
}),
e.jsxs("div", {
onDragOver: (s) => s.preventDefault(),
onDrop: (s) => {
var _a;
s.preventDefault(), c(((_a = s.dataTransfer.files) == null ? void 0 : _a[0]) ?? null);
},
onClick: () => {
var _a;
return (_a = j.current) == null ? void 0 : _a.click();
},
className: "cursor-pointer border-2 border-dashed border-gray-300 dark:border-gray-700 rounded-2xl p-8 text-center hover:border-rose-400 hover:bg-rose-50/40 dark:hover:bg-rose-900/10 transition-colors",
children: [
e.jsx("input", {
ref: j,
type: "file",
accept: "application/pdf",
className: "hidden",
onChange: R
}),
e.jsx(X, {
className: "mx-auto mb-2 text-gray-400",
size: 28
}),
e.jsx("p", {
className: "text-sm font-medium text-gray-700 dark:text-gray-200",
children: "PDF\u3092\u30C9\u30E9\u30C3\u30B0\uFF06\u30C9\u30ED\u30C3\u30D7"
}),
e.jsxs("p", {
className: "text-xs text-gray-400 mt-1",
children: [
"\u307E\u305F\u306F\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u9078\u629E\uFF08\u73FE\u5728\u306E\u4E0A\u9650 ",
x(m),
"\uFF09"
]
})
]
}),
f && e.jsx("div", {
className: "mt-4 text-sm text-red-600 dark:text-red-400 whitespace-pre-line",
children: f
}),
r && e.jsxs(e.Fragment, {
children: [
e.jsxs("div", {
className: "mt-5 flex items-center gap-3 rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900/40 p-3.5",
children: [
e.jsx(G, {
size: 28,
className: "text-rose-500 shrink-0"
}),
e.jsxs("div", {
className: "min-w-0 flex-1",
children: [
e.jsx("div", {
className: "font-medium truncate",
children: r.name
}),
e.jsx("div", {
className: "text-xs text-gray-400",
children: x(r.size)
})
]
}),
e.jsx("button", {
onClick: () => c(null),
className: "p-1.5 text-gray-400 hover:text-red-500",
title: "\u53D6\u308A\u6D88\u3057",
children: e.jsx(H, {
size: 18
})
})
]
}),
e.jsxs("div", {
className: "mt-5",
children: [
e.jsxs("div", {
className: "text-sm font-medium mb-2 flex items-center gap-1.5",
children: [
e.jsx(ie, {
size: 15
}),
" \u4FDD\u5B58\u671F\u9593\uFF08\u671F\u9650\u3092\u904E\u304E\u308B\u3068\u30EA\u30F3\u30AF\u306F\u95B2\u89A7\u4E0D\u53EF\u306B\u306A\u308A\u307E\u3059\uFF09"
]
}),
e.jsxs("div", {
className: "rounded-xl border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-900/40 p-3.5 space-y-3",
children: [
e.jsxs("p", {
className: "text-sm",
children: [
"\u57FA\u672C: ",
e.jsx("span", {
className: "font-bold",
children: "14\u65E5\u9593\uFF08\u7121\u6599\uFF09"
}),
e.jsx("span", {
className: "text-xs text-gray-400 ml-2",
children: "\u30B9\u30DD\u30F3\u30B5\u30FC\u4FDD\u5B58"
})
]
}),
e.jsxs("label", {
className: `flex items-center gap-2 text-sm select-none ${a ? "cursor-pointer" : "opacity-60"}`,
children: [
e.jsx("input", {
type: "checkbox",
checked: d && !!a,
disabled: !a,
onChange: (s) => D(s.target.checked),
className: "accent-rose-500"
}),
"\u81EA\u5DF1\u8CA0\u62C5\uFF08WAL\uFF09\u3067\u4FDD\u5B58\u671F\u9593\u3092\u5EF6\u9577\u3059\u308B",
!a && e.jsxs("span", {
className: "inline-flex items-center gap-1 text-xs text-amber-600",
children: [
e.jsx(E, {
size: 12
}),
" \u8981\u30ED\u30B0\u30A4\u30F3"
]
})
]
}),
d && a && e.jsxs("div", {
className: "flex flex-wrap gap-2 pl-6",
children: [
z.map((s) => e.jsx("button", {
onClick: () => P(s),
className: `px-3.5 py-2 rounded-lg text-sm font-medium border transition-colors ${g.id === s.id ? "bg-rose-500 text-white border-transparent" : "border-gray-200 dark:border-gray-700 text-gray-600 dark:text-gray-300 hover:bg-black/5 dark:hover:bg-white/5"}`,
children: s.label
}, s.id)),
e.jsx("span", {
className: "w-full text-xs text-gray-400",
children: "\u5EF6\u9577\u5206\u306F\u63A5\u7D9A\u4E2D\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306EWAL\u30C8\u30FC\u30AF\u30F3\u3067\u652F\u6255\u308F\u308C\u307E\u3059\u3002"
})
]
})
]
})
]
}),
e.jsx("div", {
className: "mt-5",
children: a ? e.jsxs("button", {
onClick: A,
disabled: i,
className: "w-full flex items-center justify-center gap-2 px-5 py-3 bg-rose-500 text-white rounded-xl font-semibold text-sm active:bg-rose-600 disabled:opacity-50 transition-colors shadow-sm",
children: [
i ? e.jsx(K, {
size: 16,
className: "animate-spin"
}) : e.jsx(L, {
size: 16
}),
i ? "\u4F5C\u6210\u4E2D\u2026" : "\u5171\u6709\u30EA\u30F3\u30AF\u3092\u4F5C\u6210"
]
}) : e.jsxs(C, {
to: "/",
className: "w-full flex items-center justify-center gap-1.5 px-4 py-3 rounded-xl border border-gray-300 dark:border-gray-700 text-sm text-gray-600 dark:text-gray-300",
children: [
e.jsx(E, {
size: 14
}),
" \u5171\u6709\u30EA\u30F3\u30AF\u4F5C\u6210\u306B\u306F\u30ED\u30B0\u30A4\u30F3"
]
})
})
]
}),
l && e.jsxs("div", {
className: "mt-6 p-4 rounded-xl bg-rose-50 dark:bg-rose-900/20 border border-rose-200 dark:border-rose-800",
children: [
e.jsxs("p", {
className: "text-sm font-semibold text-rose-800 dark:text-rose-200 mb-3 flex items-center gap-1.5",
children: [
e.jsx(L, {
size: 15
}),
" \u5171\u6709\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3057\u307E\u3057\u305F"
]
}),
e.jsxs("div", {
className: "flex items-center gap-2",
children: [
e.jsx("input", {
readOnly: true,
value: l,
className: "flex-1 text-xs bg-white dark:bg-gray-800 border border-rose-200 dark:border-rose-700 rounded-lg px-3 py-2 font-mono text-gray-700 dark:text-gray-200"
}),
e.jsx("button", {
onClick: U,
className: "p-2 rounded-lg bg-rose-500 text-white hover:bg-rose-600",
title: "\u30B3\u30D4\u30FC",
children: F ? e.jsx(de, {
size: 16
}) : e.jsx(q, {
size: 16
})
}),
e.jsx("a", {
href: l,
target: "_blank",
rel: "noopener noreferrer",
className: "p-2 rounded-lg border border-rose-300 dark:border-rose-700 text-rose-600 dark:text-rose-300",
title: "\u958B\u304F",
children: e.jsx(V, {
size: 16
})
})
]
}),
b && e.jsxs("div", {
className: "mt-4 flex flex-col items-center gap-2",
children: [
e.jsx("img", {
src: b,
alt: "\u5171\u6709\u30EA\u30F3\u30AF\u306EQR\u30B3\u30FC\u30C9",
className: "w-40 h-40 rounded-lg bg-white p-2"
}),
e.jsx("span", {
className: "text-xs text-gray-400",
children: "\u30B9\u30DE\u30DB\u3067\u8AAD\u307F\u53D6\u3063\u3066\u5171\u6709"
})
]
})
]
})
]
})
]
});
};
});
export {
__tla,
fe as default
};