@bluepic/embed 0.6.10 → 0.6.12
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/dist/bluepic-embed.iife.js +99 -77
- package/dist/bluepic-embed.umd.js +99 -77
- package/dist/embed/embed.d.ts +10 -0
- package/dist/embed/popup.d.ts +40 -0
- package/dist/main.cjs +35 -13
- package/dist/main.d.ts +1 -0
- package/dist/main.mjs +270 -204
- package/package.json +1 -1
package/dist/main.mjs
CHANGED
|
@@ -41466,7 +41466,7 @@ var AT = ["data-bx-popover-id"], jT = ["data-origin", "data-placement"], MT = {
|
|
|
41466
41466
|
}
|
|
41467
41467
|
}), [["__scopeId", "data-v-9cf50f47"]]);
|
|
41468
41468
|
window.addEventListener("load", () => {
|
|
41469
|
-
let e = document.querySelector(
|
|
41469
|
+
let e = document.querySelector(CZ);
|
|
41470
41470
|
e && (e.classList.add("bluepic-popup-app-wrapper"), e.parentElement?.classList.add("bluepic-popup-body"));
|
|
41471
41471
|
});
|
|
41472
41472
|
function LT(e) {
|
|
@@ -41917,7 +41917,7 @@ var QT = /* @__PURE__ */ y({
|
|
|
41917
41917
|
});
|
|
41918
41918
|
let g = window.bluepicPopupProvider;
|
|
41919
41919
|
return F(() => {
|
|
41920
|
-
let e = document.querySelector(
|
|
41920
|
+
let e = document.querySelector(CZ);
|
|
41921
41921
|
e && (e.classList.add("bluepic-popup-app-wrapper"), e.parentElement?.classList.add("bluepic-popup-body"));
|
|
41922
41922
|
}), (e, t) => (L(!0), p(a, null, re(U(u), (e, t) => (L(), d(ie(e), {
|
|
41923
41923
|
ref_for: !0,
|
|
@@ -49654,7 +49654,7 @@ var TD = wD.exports, ED = ["contenteditable", "data-ghost"], DD = ["data-paragra
|
|
|
49654
49654
|
});
|
|
49655
49655
|
let ee = window.bluepicPopupProvider;
|
|
49656
49656
|
F(() => {
|
|
49657
|
-
let e = document.querySelector(
|
|
49657
|
+
let e = document.querySelector(CZ);
|
|
49658
49658
|
e && (e.classList.add("bluepic-popup-app-wrapper"), e.parentElement?.classList.add("bluepic-popup-body"));
|
|
49659
49659
|
}), I(() => {
|
|
49660
49660
|
for (let e of u.value) e.removeEventListener("click", x);
|
|
@@ -57635,7 +57635,7 @@ var II = ["data-overlay-id"], LI = ["data-overlay-id"], RI = /*#__PURE__*/ q(/*
|
|
|
57635
57635
|
return t;
|
|
57636
57636
|
}
|
|
57637
57637
|
W(m, () => {
|
|
57638
|
-
let e = document.querySelector(
|
|
57638
|
+
let e = document.querySelector(CZ);
|
|
57639
57639
|
e && (m.value.length > 0 ? e.classList.add("bluepic-popup-app-wrapper-in-background") : e.classList.remove("bluepic-popup-app-wrapper-in-background"));
|
|
57640
57640
|
});
|
|
57641
57641
|
function g(e) {
|
|
@@ -73349,7 +73349,7 @@ function MJ(e, t, n) {
|
|
|
73349
73349
|
[data-bx-style-target='${e.uid}'], .bluepic-popup-provider__wrapper { ${i} ${r} }`;
|
|
73350
73350
|
}
|
|
73351
73351
|
function NJ(e, t = {}) {
|
|
73352
|
-
let n = jJ(t.wrapperSelector ??
|
|
73352
|
+
let n = jJ(t.wrapperSelector ?? CZ), r = l(() => {
|
|
73353
73353
|
let n = ue(e), r = ue(t.legacyCustomStyle);
|
|
73354
73354
|
return yJ(n ?? (r ? EJ(r) : void 0));
|
|
73355
73355
|
});
|
|
@@ -73363,14 +73363,14 @@ function NJ(e, t = {}) {
|
|
|
73363
73363
|
};
|
|
73364
73364
|
}
|
|
73365
73365
|
function PJ(e, t = {}) {
|
|
73366
|
-
let n = jJ(t.wrapperSelector ??
|
|
73366
|
+
let n = jJ(t.wrapperSelector ?? CZ);
|
|
73367
73367
|
return MJ(n, CJ(e), {
|
|
73368
73368
|
colorScheme: e.mode,
|
|
73369
73369
|
fontUrl: t.fontUrl,
|
|
73370
73370
|
extraFontUrls: e.fontUrls
|
|
73371
73371
|
}), n.uid;
|
|
73372
73372
|
}
|
|
73373
|
-
function FJ(e =
|
|
73373
|
+
function FJ(e = CZ, t = "auto", n, r) {
|
|
73374
73374
|
if (TJ(n)) {
|
|
73375
73375
|
let { theme: i } = NJ({
|
|
73376
73376
|
preset: t === "light" ? "light" : "dark",
|
|
@@ -73474,6 +73474,9 @@ var UJ = "https://bx-studio-api-production.bluepic.workers.dev", WJ = "https://r
|
|
|
73474
73474
|
stripeEnv = B("prod");
|
|
73475
73475
|
bxThemeStyleVars;
|
|
73476
73476
|
id = `bluepic-app-${xe()}`;
|
|
73477
|
+
app;
|
|
73478
|
+
destroyed = !1;
|
|
73479
|
+
onClose;
|
|
73477
73480
|
constructor(e, t, n) {
|
|
73478
73481
|
if (super(), typeof e == "string") {
|
|
73479
73482
|
let t = document.querySelector(e);
|
|
@@ -73483,7 +73486,7 @@ var UJ = "https://bx-studio-api-production.bluepic.workers.dev", WJ = "https://r
|
|
|
73483
73486
|
else throw Error("Invalid element or selector provided");
|
|
73484
73487
|
let r = typeof t == "string" ? Number(t) : t;
|
|
73485
73488
|
if (!Number.isFinite(r)) throw Error(`Invalid campaign id "${t}"`);
|
|
73486
|
-
this.campaignId = B(r), this.templateId.value = n?.templateId, this.apiBaseUrl.value = n?.apiBaseUrl ?? this.apiBaseUrl.value, this.remoteVideoRenderBaseUrl.value = n?.remoteVideoRenderBaseUrl ?? this.remoteVideoRenderBaseUrl.value, this.bxCoreVersion.value = n?.bxCoreVersion, this.stripeEnv.value = n?.stripeEnv ?? this.stripeEnv.value, this.data.value = n?.initData, this.mount(), this.bxThemeStyleVars = FJ(`#${this.id}`, n?.theme ?? "auto", n?.customThemeVars), this.loadCampaign(n?.bearerToken, n?.password), W(this.data, () => {
|
|
73489
|
+
this.campaignId = B(r), this.templateId.value = n?.templateId, this.apiBaseUrl.value = n?.apiBaseUrl ?? this.apiBaseUrl.value, this.remoteVideoRenderBaseUrl.value = n?.remoteVideoRenderBaseUrl ?? this.remoteVideoRenderBaseUrl.value, this.bxCoreVersion.value = n?.bxCoreVersion, this.stripeEnv.value = n?.stripeEnv ?? this.stripeEnv.value, this.data.value = n?.initData, this.onClose = n?.onClose, this.mount(), this.bxThemeStyleVars = FJ(`#${this.id}`, n?.theme ?? "auto", n?.customThemeVars), this.loadCampaign(n?.bearerToken, n?.password), W(this.data, () => {
|
|
73487
73490
|
this.dispatchEvent(new CustomEvent("data", { detail: U(this.data.value) }));
|
|
73488
73491
|
}, { deep: !0 });
|
|
73489
73492
|
}
|
|
@@ -73520,6 +73523,9 @@ var UJ = "https://bx-studio-api-production.bluepic.workers.dev", WJ = "https://r
|
|
|
73520
73523
|
}
|
|
73521
73524
|
this.dispatchEvent(new CustomEvent("ready"));
|
|
73522
73525
|
}
|
|
73526
|
+
destroy() {
|
|
73527
|
+
this.destroyed = !0, this.app?.unmount(), this.app = void 0, this.element.innerHTML = "";
|
|
73528
|
+
}
|
|
73523
73529
|
mount() {
|
|
73524
73530
|
getComputedStyle(this.element).boxSizing === "content-box" && (this.element.style.boxSizing = "border-box");
|
|
73525
73531
|
let e = document.createElement("style");
|
|
@@ -73590,17 +73596,28 @@ var UJ = "https://bx-studio-api-production.bluepic.workers.dev", WJ = "https://r
|
|
|
73590
73596
|
:env="VITE_STRIPE_ENV"
|
|
73591
73597
|
:enforce-server-side-rendering="enforceServerSideRendering"
|
|
73592
73598
|
:enforce-video-server-side-rendering="enforceVideoServerSideRendering"
|
|
73593
|
-
|
|
73599
|
+
>
|
|
73600
|
+
<template v-if="onClose" #navbar-right>
|
|
73601
|
+
<bx-button secondary aria-label="Close" @click="onClose()">
|
|
73602
|
+
<template #icon>
|
|
73603
|
+
<bx-icon><close-outline /></bx-icon>
|
|
73604
|
+
</template>
|
|
73605
|
+
</bx-button>
|
|
73606
|
+
</template>
|
|
73607
|
+
</bx-template-editor>
|
|
73594
73608
|
</div>
|
|
73595
73609
|
|
|
73596
73610
|
</div>
|
|
73597
73611
|
`;
|
|
73598
73612
|
let t = this;
|
|
73599
73613
|
k(() => {
|
|
73600
|
-
u({
|
|
73614
|
+
t.destroyed || (t.app = u({
|
|
73601
73615
|
components: {
|
|
73602
73616
|
BxTemplateEditor: tG,
|
|
73603
|
-
BxSpin: Kb
|
|
73617
|
+
BxSpin: Kb,
|
|
73618
|
+
BxButton: Yb,
|
|
73619
|
+
BxIcon: XS,
|
|
73620
|
+
CloseOutline: Nx
|
|
73604
73621
|
},
|
|
73605
73622
|
setup() {
|
|
73606
73623
|
let { createPopup: e } = WT();
|
|
@@ -73666,10 +73683,11 @@ var UJ = "https://bx-studio-api-production.bluepic.workers.dev", WJ = "https://r
|
|
|
73666
73683
|
VITE_STUDIO_API_URL: t.apiBaseUrl.value,
|
|
73667
73684
|
VITE_STRIPE_ENV: t.stripeEnv.value,
|
|
73668
73685
|
enforceServerSideRendering: !1,
|
|
73669
|
-
enforceVideoServerSideRendering: !1
|
|
73686
|
+
enforceVideoServerSideRendering: !1,
|
|
73687
|
+
onClose: t.onClose
|
|
73670
73688
|
};
|
|
73671
73689
|
}
|
|
73672
|
-
}).mount(`#${this.id}`);
|
|
73690
|
+
}), t.app.mount(`#${this.id}`));
|
|
73673
73691
|
});
|
|
73674
73692
|
}
|
|
73675
73693
|
setVariable(e, t) {
|
|
@@ -73747,17 +73765,65 @@ var qJ = async () => {
|
|
|
73747
73765
|
};
|
|
73748
73766
|
window.addEventListener("load", qJ), window.BluepicEmbed = GJ;
|
|
73749
73767
|
//#endregion
|
|
73768
|
+
//#region src/embed/popup.ts
|
|
73769
|
+
var JJ = "bluepic-campaign-popup-style", YJ = "\n.bluepic-campaign-popup-stage {\n width: min(1200px, calc(100vw - 48px));\n height: min(820px, calc(100vh - 64px));\n display: flex;\n}\n.bluepic-campaign-popup-stage > div { flex: 1; min-width: 0; min-height: 0; }\n@media (max-width: 640px) {\n .bluepic-campaign-popup-stage { width: calc(100vw - 16px); height: calc(100vh - 32px); }\n}\n/* Lean: no popup header (the editor's own toolbar carries the close button), no toolbar fill. */\n.bluepic-campaign-popup .popup-content > header { display: none !important; }\n.bluepic-campaign-popup .bx-template-editor > header { background-color: transparent !important; }\n.bluepic-campaign-popup .bluepic-app-wrapper { background: transparent !important; }\n";
|
|
73770
|
+
function XJ(e) {
|
|
73771
|
+
if (!document.getElementById(JJ)) {
|
|
73772
|
+
let e = document.createElement("style");
|
|
73773
|
+
e.id = JJ, e.textContent = YJ, document.head.appendChild(e);
|
|
73774
|
+
}
|
|
73775
|
+
let t, n = y({
|
|
73776
|
+
name: "BluepicCampaignPopupStage",
|
|
73777
|
+
setup() {
|
|
73778
|
+
let n = B();
|
|
73779
|
+
return F(() => {
|
|
73780
|
+
n.value && (t = new GJ(n.value, e.campaignId, {
|
|
73781
|
+
onClose: () => r.close(),
|
|
73782
|
+
templateId: e.templateId,
|
|
73783
|
+
initData: e.data,
|
|
73784
|
+
theme: e.theme,
|
|
73785
|
+
apiBaseUrl: e.apiBaseUrl ?? "https://api.bluepic.io",
|
|
73786
|
+
stripeEnv: e.stripeEnv
|
|
73787
|
+
}));
|
|
73788
|
+
}), N(() => t?.destroy()), () => C("div", { class: "bluepic-campaign-popup-stage" }, [C("div", { ref: n })]);
|
|
73789
|
+
}
|
|
73790
|
+
}), r = RT({
|
|
73791
|
+
type: e.type ?? "frame",
|
|
73792
|
+
title: e.title,
|
|
73793
|
+
draggable: !1,
|
|
73794
|
+
transculent: !0,
|
|
73795
|
+
closeable: !1,
|
|
73796
|
+
customClasses: ["bluepic-campaign-popup"],
|
|
73797
|
+
content: () => C(n),
|
|
73798
|
+
onClose: e.onClose
|
|
73799
|
+
});
|
|
73800
|
+
return {
|
|
73801
|
+
close: () => r.close(),
|
|
73802
|
+
get embed() {
|
|
73803
|
+
return t;
|
|
73804
|
+
}
|
|
73805
|
+
};
|
|
73806
|
+
}
|
|
73807
|
+
if (typeof window < "u") {
|
|
73808
|
+
let e = window;
|
|
73809
|
+
e.Bluepic = {
|
|
73810
|
+
...e.Bluepic ?? {},
|
|
73811
|
+
openPopup: XJ,
|
|
73812
|
+
Embed: GJ
|
|
73813
|
+
};
|
|
73814
|
+
}
|
|
73815
|
+
//#endregion
|
|
73750
73816
|
//#region src/components/User/UserInfo.vue?vue&type=script&setup=true&lang.ts
|
|
73751
|
-
var
|
|
73817
|
+
var ZJ = { class: "user-info" }, QJ = { class: "user-content" }, $J = {
|
|
73752
73818
|
key: 0,
|
|
73753
73819
|
class: "user-name"
|
|
73754
|
-
},
|
|
73820
|
+
}, eY = {
|
|
73755
73821
|
key: 1,
|
|
73756
73822
|
class: "user-email"
|
|
73757
|
-
},
|
|
73823
|
+
}, tY = {
|
|
73758
73824
|
key: 0,
|
|
73759
73825
|
class: "user-extra"
|
|
73760
|
-
},
|
|
73826
|
+
}, nY = { class: "actions" }, rY = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
73761
73827
|
__name: "UserInfo",
|
|
73762
73828
|
props: {
|
|
73763
73829
|
user: {},
|
|
@@ -73769,14 +73835,14 @@ var JJ = { class: "user-info" }, YJ = { class: "user-content" }, XJ = {
|
|
|
73769
73835
|
emits: ["logout", "settings"],
|
|
73770
73836
|
setup(e, { emit: t }) {
|
|
73771
73837
|
let n = t, r = fe();
|
|
73772
|
-
return (t, i) => (L(), p("div",
|
|
73838
|
+
return (t, i) => (L(), p("div", ZJ, [
|
|
73773
73839
|
m("main", null, [v(aq, {
|
|
73774
73840
|
user: e.user,
|
|
73775
73841
|
width: 40,
|
|
73776
73842
|
height: 40
|
|
73777
|
-
}, null, 8, ["user"]), m("div",
|
|
73778
|
-
r.default ? (L(), p("div",
|
|
73779
|
-
m("footer", null, [m("div",
|
|
73843
|
+
}, null, 8, ["user"]), m("div", QJ, [e.user.name ? (L(), p("div", $J, H(e.user.name), 1)) : f("", !0), e.user.email ? (L(), p("div", eY, H(e.user.email), 1)) : f("", !0)])]),
|
|
73844
|
+
r.default ? (L(), p("div", tY, [V(t.$slots, "default", {}, void 0, !0)])) : f("", !0),
|
|
73845
|
+
m("footer", null, [m("div", nY, [e.showSettings ? (L(), d(Yb, {
|
|
73780
73846
|
key: 0,
|
|
73781
73847
|
size: "medium",
|
|
73782
73848
|
onClick: i[0] ||= (e) => n("settings")
|
|
@@ -73800,7 +73866,7 @@ var JJ = { class: "user-info" }, YJ = { class: "user-content" }, XJ = {
|
|
|
73800
73866
|
})])])
|
|
73801
73867
|
]));
|
|
73802
73868
|
}
|
|
73803
|
-
}), [["__scopeId", "data-v-8e175b2d"]]),
|
|
73869
|
+
}), [["__scopeId", "data-v-8e175b2d"]]), iY = { class: "category-tabs" }, aY = { class: "tabs-wrapper" }, oY = ["onClick"], sY = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
73804
73870
|
__name: "Tabs",
|
|
73805
73871
|
props: /*@__PURE__*/ D({ tabs: {} }, {
|
|
73806
73872
|
activeTab: { required: !0 },
|
|
@@ -73812,13 +73878,13 @@ var JJ = { class: "user-info" }, YJ = { class: "user-content" }, XJ = {
|
|
|
73812
73878
|
function i(e) {
|
|
73813
73879
|
r.value = e, n("click:category", e);
|
|
73814
73880
|
}
|
|
73815
|
-
return (t, n) => (L(), p("div",
|
|
73881
|
+
return (t, n) => (L(), p("div", iY, [m("div", aY, [(L(!0), p(a, null, re(e.tabs, (e) => (L(), p("button", {
|
|
73816
73882
|
key: e,
|
|
73817
73883
|
class: A({ active: e === r.value }),
|
|
73818
73884
|
onClick: (t) => i(e)
|
|
73819
|
-
}, [m("span", null, H(e), 1)], 10,
|
|
73885
|
+
}, [m("span", null, H(e), 1)], 10, oY))), 128))])]));
|
|
73820
73886
|
}
|
|
73821
|
-
}), [["__scopeId", "data-v-a1d3c812"]]),
|
|
73887
|
+
}), [["__scopeId", "data-v-a1d3c812"]]), cY = [
|
|
73822
73888
|
"A0",
|
|
73823
73889
|
"A1",
|
|
73824
73890
|
"A2",
|
|
@@ -73830,14 +73896,14 @@ var JJ = { class: "user-info" }, YJ = { class: "user-content" }, XJ = {
|
|
|
73830
73896
|
"A8",
|
|
73831
73897
|
"A9",
|
|
73832
73898
|
"A10"
|
|
73833
|
-
],
|
|
73899
|
+
], lY = {
|
|
73834
73900
|
w: 841,
|
|
73835
73901
|
h: 1189
|
|
73836
73902
|
};
|
|
73837
|
-
function
|
|
73903
|
+
function uY() {
|
|
73838
73904
|
let e = [{
|
|
73839
|
-
w:
|
|
73840
|
-
h:
|
|
73905
|
+
w: lY.w,
|
|
73906
|
+
h: lY.h
|
|
73841
73907
|
}];
|
|
73842
73908
|
for (let t = 1; t <= 10; t++) {
|
|
73843
73909
|
let n = e[t - 1], r = Math.round(n.h / 2), i = n.w, a = r <= i ? {
|
|
@@ -73850,20 +73916,20 @@ function sY() {
|
|
|
73850
73916
|
e.push(a);
|
|
73851
73917
|
}
|
|
73852
73918
|
let t = {};
|
|
73853
|
-
return
|
|
73919
|
+
return cY.forEach((n, r) => t[n] = e[r]), t;
|
|
73854
73920
|
}
|
|
73855
|
-
var
|
|
73856
|
-
function
|
|
73857
|
-
return e /
|
|
73921
|
+
var dY = uY(), fY = 25.4;
|
|
73922
|
+
function pY(e) {
|
|
73923
|
+
return e / fY;
|
|
73858
73924
|
}
|
|
73859
|
-
function
|
|
73925
|
+
function mY(e, t) {
|
|
73860
73926
|
return e * t;
|
|
73861
73927
|
}
|
|
73862
|
-
function
|
|
73863
|
-
return e / t *
|
|
73928
|
+
function hY(e, t) {
|
|
73929
|
+
return e / t * fY;
|
|
73864
73930
|
}
|
|
73865
|
-
function
|
|
73866
|
-
let n =
|
|
73931
|
+
function gY(e, t) {
|
|
73932
|
+
let n = dY[e], r = pY(n.w), i = pY(n.h), a = mY(r, t), o = mY(i, t);
|
|
73867
73933
|
return {
|
|
73868
73934
|
widthPx: Math.round(a),
|
|
73869
73935
|
heightPx: Math.round(o),
|
|
@@ -73876,10 +73942,10 @@ function pY(e, t) {
|
|
|
73876
73942
|
}
|
|
73877
73943
|
};
|
|
73878
73944
|
}
|
|
73879
|
-
function
|
|
73880
|
-
let i = e > t, [a, o] = e <= t ? [e, t] : [t, e], s =
|
|
73881
|
-
for (let e of
|
|
73882
|
-
let t =
|
|
73945
|
+
function _Y(e, t, n, r = 2) {
|
|
73946
|
+
let i = e > t, [a, o] = e <= t ? [e, t] : [t, e], s = hY(a, n), c = hY(o, n), l = null;
|
|
73947
|
+
for (let e of cY) {
|
|
73948
|
+
let t = dY[e], n = s - t.w, i = c - t.h;
|
|
73883
73949
|
if (Math.abs(n) <= r && Math.abs(i) <= r) {
|
|
73884
73950
|
let r = Math.abs(n) + Math.abs(i);
|
|
73885
73951
|
(!l || r < l.score) && (l = {
|
|
@@ -73912,27 +73978,27 @@ function mY(e, t, n, r = 2) {
|
|
|
73912
73978
|
}
|
|
73913
73979
|
//#endregion
|
|
73914
73980
|
//#region src/util/contentEditable.ts
|
|
73915
|
-
function
|
|
73981
|
+
function vY(e) {
|
|
73916
73982
|
let t = window.getSelection();
|
|
73917
73983
|
if (!t) throw Error("No selection descriptor");
|
|
73918
73984
|
if (!t.anchorNode) throw Error("No anchor node");
|
|
73919
73985
|
if (!t.focusNode) throw Error("No focus node");
|
|
73920
73986
|
if (t.anchorNode.textContent === null) throw Error("Anchor node's text content: null");
|
|
73921
73987
|
if (t.focusNode.textContent === null) throw Error("Focus node's text content: null");
|
|
73922
|
-
let n =
|
|
73988
|
+
let n = xY(e, (e) => e === t.anchorNode), r = xY(e, (e) => e === t.focusNode), i = n.length + t.anchorOffset;
|
|
73923
73989
|
return {
|
|
73924
73990
|
start: i,
|
|
73925
73991
|
length: r.length + t.focusOffset - i
|
|
73926
73992
|
};
|
|
73927
73993
|
}
|
|
73928
|
-
function
|
|
73994
|
+
function yY(e) {
|
|
73929
73995
|
let t = B(null);
|
|
73930
73996
|
function n() {
|
|
73931
73997
|
let n = document.getSelection();
|
|
73932
73998
|
if (e.value && n && n.rangeCount > 0) {
|
|
73933
73999
|
let r = n.getRangeAt(0);
|
|
73934
74000
|
if (e.value.contains(r.commonAncestorContainer)) try {
|
|
73935
|
-
t.value =
|
|
74001
|
+
t.value = vY(e.value);
|
|
73936
74002
|
} catch (e) {
|
|
73937
74003
|
console.error("Failed to get selection", e), t.value = null;
|
|
73938
74004
|
}
|
|
@@ -73942,13 +74008,13 @@ function gY(e) {
|
|
|
73942
74008
|
document.removeEventListener("selectionchange", n);
|
|
73943
74009
|
}), t;
|
|
73944
74010
|
}
|
|
73945
|
-
function
|
|
74011
|
+
function bY({ text: e, format: t }, ...n) {
|
|
73946
74012
|
return {
|
|
73947
74013
|
text: e.slice(...n),
|
|
73948
74014
|
format: t
|
|
73949
74015
|
};
|
|
73950
74016
|
}
|
|
73951
|
-
function
|
|
74017
|
+
function xY(e, t) {
|
|
73952
74018
|
let n = document.createTreeWalker(e), r = n.nextNode(), i = "";
|
|
73953
74019
|
for (; r;) {
|
|
73954
74020
|
if (t(r)) return i;
|
|
@@ -73962,8 +74028,8 @@ function vY(e, t) {
|
|
|
73962
74028
|
}
|
|
73963
74029
|
return i.endsWith("\n") && (i = i.slice(0, -1)), i;
|
|
73964
74030
|
}
|
|
73965
|
-
window.collectContentEditableText =
|
|
73966
|
-
function
|
|
74031
|
+
window.collectContentEditableText = xY;
|
|
74032
|
+
function SY(e, t) {
|
|
73967
74033
|
let n = "";
|
|
73968
74034
|
function r(e) {
|
|
73969
74035
|
if (!e) return "";
|
|
@@ -73980,27 +74046,27 @@ function yY(e, t) {
|
|
|
73980
74046
|
}
|
|
73981
74047
|
return n = r(e), n;
|
|
73982
74048
|
}
|
|
73983
|
-
function
|
|
74049
|
+
function CY(e) {
|
|
73984
74050
|
let t = [[]], n = 0;
|
|
73985
74051
|
for (; n in e;) {
|
|
73986
74052
|
let r = t.length - 1, i = e[n].text.search("\n");
|
|
73987
74053
|
if (i > -1) {
|
|
73988
|
-
let a =
|
|
74054
|
+
let a = bY(e[n], 0, i), o = bY(e[n], i + 1);
|
|
73989
74055
|
t[r].push(a);
|
|
73990
|
-
let s =
|
|
74056
|
+
let s = CY([o]);
|
|
73991
74057
|
for (let e of s) t.push(e);
|
|
73992
74058
|
} else t[r].push(e[n]);
|
|
73993
74059
|
n++;
|
|
73994
74060
|
}
|
|
73995
74061
|
return t;
|
|
73996
74062
|
}
|
|
73997
|
-
function
|
|
74063
|
+
function wY(e, t, n = !1) {
|
|
73998
74064
|
let r = [[]], i = Array.from(e.childNodes).filter((e) => e.nodeType === Node.TEXT_NODE ? (e.textContent?.length ?? 0) > 0 : e.nodeType !== Node.COMMENT_NODE);
|
|
73999
74065
|
for (let e of i) if (e.nodeType === Node.TEXT_NODE && e.textContent) r[r.length - 1].push({
|
|
74000
74066
|
text: e.textContent,
|
|
74001
74067
|
format: t
|
|
74002
74068
|
});
|
|
74003
|
-
else if (e.nodeType === Node.ELEMENT_NODE && e.tagName.toLowerCase() === "br")
|
|
74069
|
+
else if (e.nodeType === Node.ELEMENT_NODE && e.tagName.toLowerCase() === "br") SY(e, (e) => e?.tagName !== "DIV").length === 0 ? n && r[r.length - 1].push({
|
|
74004
74070
|
text: "",
|
|
74005
74071
|
format: t
|
|
74006
74072
|
}) : r.push([]);
|
|
@@ -74015,14 +74081,14 @@ function xY(e, t, n = !1) {
|
|
|
74015
74081
|
...JSON.parse(e.getAttribute("data-feature-format") ?? "{}") ?? {}
|
|
74016
74082
|
};
|
|
74017
74083
|
e.tagName.toLowerCase() === "div" && r.push([]);
|
|
74018
|
-
let o =
|
|
74084
|
+
let o = wY(e, a, n);
|
|
74019
74085
|
o.slice(0, 1);
|
|
74020
74086
|
for (let e of o.slice(0, 1)) for (let t of e) t.text === "\n" ? r.push([]) : r[r.length - 1].push(t);
|
|
74021
74087
|
for (let e of o.slice(1)) r.push(e);
|
|
74022
74088
|
}
|
|
74023
74089
|
return r.filter((e) => e.length > 0);
|
|
74024
74090
|
}
|
|
74025
|
-
function
|
|
74091
|
+
function TY(e, t, n) {
|
|
74026
74092
|
return e.map(({ text: r, format: i }, a) => {
|
|
74027
74093
|
let o = e.slice(0, a).reduce((e, { text: t }) => e + t.length, 0);
|
|
74028
74094
|
return {
|
|
@@ -74031,26 +74097,26 @@ function SY(e, t, n) {
|
|
|
74031
74097
|
};
|
|
74032
74098
|
}).filter(({ text: e }) => e.length > 0);
|
|
74033
74099
|
}
|
|
74034
|
-
function
|
|
74100
|
+
function EY(e) {
|
|
74035
74101
|
return e.reduce((e, { text: t }) => e + t.length, 0);
|
|
74036
74102
|
}
|
|
74037
|
-
function
|
|
74103
|
+
function DY(e, t, n, r) {
|
|
74038
74104
|
let i = B(t.value), a = B(t.value);
|
|
74039
74105
|
W(t, () => {
|
|
74040
74106
|
xE(i.value, t.value) || (i.value = t.value, o.value = xe());
|
|
74041
74107
|
});
|
|
74042
|
-
let o = B(xe()), s =
|
|
74108
|
+
let o = B(xe()), s = yY(e), c = (t) => {
|
|
74043
74109
|
if (e.value) {
|
|
74044
|
-
let t =
|
|
74045
|
-
let n =
|
|
74110
|
+
let t = wY(e.value, {}, !0), r = t.reduce((e, t) => {
|
|
74111
|
+
let n = CY(t);
|
|
74046
74112
|
return [...e, ...n];
|
|
74047
74113
|
}, []).filter((e, n) => [].concat(...t.slice(n)).length > 0), o = n.maxLengthPerLine ?? Infinity, s = n.maxLength ?? Infinity, c = n.maxLines ?? Infinity, l = 0;
|
|
74048
74114
|
a.value = r.map((e, t) => {
|
|
74049
74115
|
if (e.length === 1 && e[0].text === "") return e;
|
|
74050
|
-
let n =
|
|
74116
|
+
let n = EY(TY(e, 0, o));
|
|
74051
74117
|
l += n;
|
|
74052
74118
|
let r = l + t, i = t >= c ? 0 : Math.min(n - Math.max(r - s, 0), o);
|
|
74053
|
-
return [...
|
|
74119
|
+
return [...TY(e, 0, i), ...TY(e, i, Infinity).map((e) => ({
|
|
74054
74120
|
text: e.text,
|
|
74055
74121
|
format: {
|
|
74056
74122
|
...e.format,
|
|
@@ -74071,14 +74137,14 @@ function wY(e, t, n, r) {
|
|
|
74071
74137
|
let u = (e, t, n, r) => {
|
|
74072
74138
|
let i = t + n;
|
|
74073
74139
|
return CE(e.map((n, a) => {
|
|
74074
|
-
let o = a + e.slice(0, a).map(
|
|
74140
|
+
let o = a + e.slice(0, a).map(EY).reduce((e, t) => e + t, 0), s = EY(n), c = TY(n, t - o, i - o).map(({ text: e }) => e).join("");
|
|
74075
74141
|
return o + s >= t && o < i ? [
|
|
74076
|
-
...
|
|
74142
|
+
...TY(n, 0, t - o),
|
|
74077
74143
|
{
|
|
74078
74144
|
text: c,
|
|
74079
74145
|
format: r
|
|
74080
74146
|
},
|
|
74081
|
-
...
|
|
74147
|
+
...TY(n, i - o, Infinity)
|
|
74082
74148
|
] : n;
|
|
74083
74149
|
})).map((e) => {
|
|
74084
74150
|
let t = [];
|
|
@@ -74098,19 +74164,19 @@ function wY(e, t, n, r) {
|
|
|
74098
74164
|
applyFormat: (t, n, r, s = !0) => {
|
|
74099
74165
|
let { start: c, length: d } = l(t, n);
|
|
74100
74166
|
i.value = u(i.value, c, d, r), a.value = u(a.value, c, d, r), o.value = xe(), k(() => {
|
|
74101
|
-
e.value && s &&
|
|
74167
|
+
e.value && s && kY(e.value, c, d);
|
|
74102
74168
|
});
|
|
74103
74169
|
},
|
|
74104
74170
|
resolveFeatures: (e, t) => {
|
|
74105
74171
|
let n = e + t;
|
|
74106
74172
|
return i.value.map((t, r) => {
|
|
74107
|
-
let a = r + i.value.slice(0, r).map(
|
|
74108
|
-
return
|
|
74173
|
+
let a = r + i.value.slice(0, r).map(EY).reduce((e, t) => e + t, 0);
|
|
74174
|
+
return TY(t, e - a, n - a);
|
|
74109
74175
|
});
|
|
74110
74176
|
}
|
|
74111
74177
|
};
|
|
74112
74178
|
}
|
|
74113
|
-
function
|
|
74179
|
+
function OY(e, t) {
|
|
74114
74180
|
let n = document.createTreeWalker(t), r = n.nextNode(), i = 0;
|
|
74115
74181
|
for (; r;) {
|
|
74116
74182
|
if (r === e) return i;
|
|
@@ -74118,12 +74184,12 @@ function TY(e, t) {
|
|
|
74118
74184
|
}
|
|
74119
74185
|
return null;
|
|
74120
74186
|
}
|
|
74121
|
-
function
|
|
74187
|
+
function kY(e, t, n) {
|
|
74122
74188
|
let r = t + n, i = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, null), a = [], o = i.nextNode();
|
|
74123
74189
|
for (; o;) {
|
|
74124
74190
|
let n = o.textContent?.length ?? 0;
|
|
74125
74191
|
if (n > 0) {
|
|
74126
|
-
let i =
|
|
74192
|
+
let i = OY(o, e);
|
|
74127
74193
|
if (i !== null && i < r && i + n > t) {
|
|
74128
74194
|
let e = Math.max(0, t - i), s = Math.min(Math.max(0, r - i), i + n);
|
|
74129
74195
|
a.push({
|
|
@@ -74145,7 +74211,7 @@ function EY(e, t, n) {
|
|
|
74145
74211
|
}
|
|
74146
74212
|
//#endregion
|
|
74147
74213
|
//#region src/components/RichTextDisplay.vue?vue&type=script&setup=true&lang.ts
|
|
74148
|
-
var
|
|
74214
|
+
var AY = ["contenteditable", "data-ghost"], jY = ["data-paragraph"], MY = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
74149
74215
|
__name: "RichTextDisplay",
|
|
74150
74216
|
props: {
|
|
74151
74217
|
paragraphs: {},
|
|
@@ -74195,9 +74261,9 @@ var DY = ["contenteditable", "data-ghost"], OY = ["data-paragraph"], kY = /*#__P
|
|
|
74195
74261
|
key: 0,
|
|
74196
74262
|
"data-custom-br": "true",
|
|
74197
74263
|
"data-paragraph": JSON.stringify(e)
|
|
74198
|
-
}, null, 8,
|
|
74264
|
+
}, null, 8, jY)) : f("", !0)], 64))), 128))], 42, AY));
|
|
74199
74265
|
}
|
|
74200
|
-
}), [["__scopeId", "data-v-88776d3a"]]),
|
|
74266
|
+
}), [["__scopeId", "data-v-88776d3a"]]), NY = { class: "rich-text-wrapper" }, PY = ["data-feature-format"], FY = ["data-feature-format"], IY = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
74201
74267
|
__name: "RichText",
|
|
74202
74268
|
props: {
|
|
74203
74269
|
value: {},
|
|
@@ -74220,7 +74286,7 @@ var DY = ["contenteditable", "data-ghost"], OY = ["data-paragraph"], kY = /*#__P
|
|
|
74220
74286
|
"update:focus"
|
|
74221
74287
|
],
|
|
74222
74288
|
setup(e, { expose: t, emit: n }) {
|
|
74223
|
-
let r = e, i = n, a = l(() => !r.multiline), o = B(), s = B(), c = l(() => o.value?.richTextEditorDivRef), { handleInputEvent: u, paragraphs: f, visibleParagraphs: h, manipulationState: g, applyFormat: _, resolveFeatures: y, selection: b } =
|
|
74289
|
+
let r = e, i = n, a = l(() => !r.multiline), o = B(), s = B(), c = l(() => o.value?.richTextEditorDivRef), { handleInputEvent: u, paragraphs: f, visibleParagraphs: h, manipulationState: g, applyFormat: _, resolveFeatures: y, selection: b } = DY(c, le(r, "value"), {
|
|
74224
74290
|
maxLength: r.maxLength,
|
|
74225
74291
|
maxLengthPerLine: r.maxLengthPerLine,
|
|
74226
74292
|
maxLines: r.maxLines
|
|
@@ -74265,7 +74331,7 @@ var DY = ["contenteditable", "data-ghost"], OY = ["data-paragraph"], kY = /*#__P
|
|
|
74265
74331
|
}), t({
|
|
74266
74332
|
applyFormat: _,
|
|
74267
74333
|
resolveFeatures: y
|
|
74268
|
-
}), (t, n) => (L(), p("div", { class: A(["rich-text", { focus: C.value }]) }, [m("div",
|
|
74334
|
+
}), (t, n) => (L(), p("div", { class: A(["rich-text", { focus: C.value }]) }, [m("div", NY, [v(MY, {
|
|
74269
74335
|
ref_key: "richTextDisplayGhostInstance",
|
|
74270
74336
|
ref: s,
|
|
74271
74337
|
paragraphs: U(h),
|
|
@@ -74280,9 +74346,9 @@ var DY = ["contenteditable", "data-ghost"], OY = ["data-paragraph"], kY = /*#__P
|
|
|
74280
74346
|
"line-overflow": !!t.format.lineOverflow,
|
|
74281
74347
|
overflow: !!t.format.overflow
|
|
74282
74348
|
}])
|
|
74283
|
-
}, H(t.text), 11,
|
|
74349
|
+
}, H(t.text), 11, PY)]),
|
|
74284
74350
|
_: 1
|
|
74285
|
-
}, 8, ["paragraphs"]), (L(), d(
|
|
74351
|
+
}, 8, ["paragraphs"]), (L(), d(MY, {
|
|
74286
74352
|
ref_key: "richTextDisplayInstance",
|
|
74287
74353
|
ref: o,
|
|
74288
74354
|
key: U(g),
|
|
@@ -74294,7 +74360,7 @@ var DY = ["contenteditable", "data-ghost"], OY = ["data-paragraph"], kY = /*#__P
|
|
|
74294
74360
|
feature: G((t) => [m("span", {
|
|
74295
74361
|
"data-feature-format": JSON.stringify(t.format),
|
|
74296
74362
|
class: A(["feature-wrapper", { [t.cssclass(e.renderFeatureInlineStyle(t.format))]: !0 }])
|
|
74297
|
-
}, H(t.text), 11,
|
|
74363
|
+
}, H(t.text), 11, FY)]),
|
|
74298
74364
|
_: 1
|
|
74299
74365
|
}, 8, [
|
|
74300
74366
|
"paragraphs",
|
|
@@ -74305,29 +74371,29 @@ var DY = ["contenteditable", "data-ghost"], OY = ["data-paragraph"], kY = /*#__P
|
|
|
74305
74371
|
}), [["__scopeId", "data-v-53250444"]]);
|
|
74306
74372
|
//#endregion
|
|
74307
74373
|
//#region src/util/gallery.ts
|
|
74308
|
-
function
|
|
74374
|
+
function LY(e) {
|
|
74309
74375
|
return (e.canvases?.length ?? 0) >= 2;
|
|
74310
74376
|
}
|
|
74311
|
-
function
|
|
74377
|
+
function RY(e) {
|
|
74312
74378
|
let t = /* @__PURE__ */ new Map();
|
|
74313
74379
|
for (let n in e) {
|
|
74314
74380
|
let r = e[n];
|
|
74315
74381
|
if (!r) continue;
|
|
74316
|
-
let i =
|
|
74382
|
+
let i = LY(r) ? n : r.name;
|
|
74317
74383
|
t.has(i) || t.set(i, {}), t.get(i)[n] = r;
|
|
74318
74384
|
}
|
|
74319
74385
|
let n = (e, t) => Object.values(e)[0]?.name ?? t, r = Array.from(t.entries()).sort(([e, t], [r, i]) => n(t, e).toLowerCase().localeCompare(n(i, r).toLowerCase()));
|
|
74320
74386
|
return Object.fromEntries(r);
|
|
74321
74387
|
}
|
|
74322
|
-
var
|
|
74323
|
-
function
|
|
74388
|
+
var zY = "Other";
|
|
74389
|
+
function BY(e) {
|
|
74324
74390
|
return [...e].sort((e, t) => e.title.toLowerCase().localeCompare(t.title.toLowerCase()));
|
|
74325
74391
|
}
|
|
74326
|
-
function
|
|
74392
|
+
function VY(e, t) {
|
|
74327
74393
|
let n = e[t];
|
|
74328
|
-
return
|
|
74394
|
+
return LY(n) ? t : n.name;
|
|
74329
74395
|
}
|
|
74330
|
-
function
|
|
74396
|
+
function HY(e, t) {
|
|
74331
74397
|
return [...Object.entries(e).map(([e, t]) => ({
|
|
74332
74398
|
kind: "template",
|
|
74333
74399
|
key: e,
|
|
@@ -74337,13 +74403,13 @@ function zY(e, t) {
|
|
|
74337
74403
|
asset: e
|
|
74338
74404
|
}))];
|
|
74339
74405
|
}
|
|
74340
|
-
function
|
|
74341
|
-
let r =
|
|
74406
|
+
function UY(e, t, n) {
|
|
74407
|
+
let r = RY(e), i = new Map(t.map((e) => [e.id, e])), a = [], o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set();
|
|
74342
74408
|
for (let t of n) if (e[t]) {
|
|
74343
|
-
let i =
|
|
74409
|
+
let i = VY(e, t);
|
|
74344
74410
|
if (o.has(i)) continue;
|
|
74345
74411
|
o.add(i);
|
|
74346
|
-
let s = r[i], c = Object.keys(s).sort((e, t) =>
|
|
74412
|
+
let s = r[i], c = Object.keys(s).sort((e, t) => WY(n, e) - WY(n, t));
|
|
74347
74413
|
a.push({
|
|
74348
74414
|
kind: "template",
|
|
74349
74415
|
key: i,
|
|
@@ -74358,43 +74424,43 @@ function BY(e, t, n) {
|
|
|
74358
74424
|
key: e,
|
|
74359
74425
|
templates: t
|
|
74360
74426
|
});
|
|
74361
|
-
for (let e of
|
|
74427
|
+
for (let e of BY(t)) s.has(e.id) || a.push({
|
|
74362
74428
|
kind: "asset",
|
|
74363
74429
|
asset: e
|
|
74364
74430
|
});
|
|
74365
74431
|
return a;
|
|
74366
74432
|
}
|
|
74367
|
-
function
|
|
74433
|
+
function WY(e, t) {
|
|
74368
74434
|
let n = e.indexOf(t);
|
|
74369
74435
|
return n < 0 ? 2 ** 53 - 1 : n;
|
|
74370
74436
|
}
|
|
74371
|
-
function
|
|
74437
|
+
function GY(e, t, n, r = {}) {
|
|
74372
74438
|
let i = t ?? [], a = new Set((n ?? []).flatMap((e) => e.items)), o = Array.isArray(r.order) ? r.order : null, s = (t) => {
|
|
74373
74439
|
let n = {};
|
|
74374
74440
|
for (let r in e) e[r] && t(r) && (n[r] = e[r]);
|
|
74375
74441
|
return n;
|
|
74376
74442
|
}, c = (e, t, n, r, i) => {
|
|
74377
|
-
let a =
|
|
74443
|
+
let a = RY(n), o = BY(r);
|
|
74378
74444
|
return {
|
|
74379
74445
|
category: e,
|
|
74380
74446
|
categoryIndex: t,
|
|
74381
74447
|
templatesByName: a,
|
|
74382
74448
|
assets: o,
|
|
74383
|
-
items: i ?
|
|
74449
|
+
items: i ? UY(n, r, i) : HY(a, o)
|
|
74384
74450
|
};
|
|
74385
74451
|
}, l = (n ?? []).map((e, t) => c(e.label, t, s((t) => e.items.includes(t)), i.filter((t) => e.items.includes(t.id)), o ? e.items : null)), u = s((e) => !a.has(e)), d = i.filter((e) => !a.has(e.id));
|
|
74386
|
-
return (Object.keys(u).length > 0 || d.length > 0) && l.push(c(
|
|
74452
|
+
return (Object.keys(u).length > 0 || d.length > 0) && l.push(c(zY, null, u, d, o)), r.includeEmpty ? l : l.filter((e) => e.items.length > 0);
|
|
74387
74453
|
}
|
|
74388
|
-
function
|
|
74454
|
+
function KY(e, t, n) {
|
|
74389
74455
|
let r = t ?? [];
|
|
74390
|
-
return Array.isArray(n) ?
|
|
74456
|
+
return Array.isArray(n) ? UY(e, r, n) : HY(RY(e), BY(r));
|
|
74391
74457
|
}
|
|
74392
|
-
function
|
|
74393
|
-
return
|
|
74458
|
+
function qY(e, t, n) {
|
|
74459
|
+
return GY(e, t, n).map((e) => e.category);
|
|
74394
74460
|
}
|
|
74395
74461
|
//#endregion
|
|
74396
74462
|
//#region src/util/aspectRatio.ts
|
|
74397
|
-
function
|
|
74463
|
+
function JY(e, t) {
|
|
74398
74464
|
let n = [0, 1], r = [1, 0];
|
|
74399
74465
|
for (;;) {
|
|
74400
74466
|
let i = [n[0] + r[0], n[1] + r[1]];
|
|
@@ -74408,51 +74474,51 @@ function GY(e, t) {
|
|
|
74408
74474
|
}
|
|
74409
74475
|
}
|
|
74410
74476
|
}
|
|
74411
|
-
var
|
|
74412
|
-
let n =
|
|
74477
|
+
var YY = (e, t) => {
|
|
74478
|
+
let n = JY(e / t, 50);
|
|
74413
74479
|
return `${n[0]}:${n[1]}`;
|
|
74414
74480
|
};
|
|
74415
|
-
function
|
|
74416
|
-
let t = e.meta.width, n = e.meta.height, r =
|
|
74417
|
-
return r ? r.level :
|
|
74481
|
+
function XY(e) {
|
|
74482
|
+
let t = e.meta.width, n = e.meta.height, r = _Y(t, n, 300);
|
|
74483
|
+
return r ? r.level : YY(t, n);
|
|
74418
74484
|
}
|
|
74419
74485
|
//#endregion
|
|
74420
74486
|
//#region src/util/assetAuth.ts
|
|
74421
|
-
var
|
|
74422
|
-
function
|
|
74487
|
+
var ZY = "password", QY = "access_token";
|
|
74488
|
+
function $Y(e) {
|
|
74423
74489
|
return {
|
|
74424
74490
|
...e?.password ? { "X-Bluepic-Password": e.password } : {},
|
|
74425
74491
|
...e?.accessToken ? { Authorization: `Bearer ${e.accessToken}` } : {}
|
|
74426
74492
|
};
|
|
74427
74493
|
}
|
|
74428
|
-
function
|
|
74494
|
+
function eX(e, t) {
|
|
74429
74495
|
if (!t?.password && !t?.accessToken) return e;
|
|
74430
|
-
let [n, r] =
|
|
74431
|
-
return t.password && a.set(
|
|
74496
|
+
let [n, r] = tX(e), i = n.includes("?") ? "&" : "?", a = new URLSearchParams();
|
|
74497
|
+
return t.password && a.set(ZY, t.password), t.accessToken && a.set(QY, t.accessToken), `${n}${i}${a.toString()}${r}`;
|
|
74432
74498
|
}
|
|
74433
|
-
function
|
|
74499
|
+
function tX(e) {
|
|
74434
74500
|
let t = e.indexOf("#");
|
|
74435
74501
|
return t === -1 ? [e, ""] : [e.slice(0, t), e.slice(t)];
|
|
74436
74502
|
}
|
|
74437
74503
|
//#endregion
|
|
74438
74504
|
//#region src/components/AssetViewer/AssetViewer.vue?vue&type=script&setup=true&lang.ts
|
|
74439
|
-
var
|
|
74505
|
+
var nX = { class: "viewer-header-tools" }, rX = ["aria-pressed"], iX = ["disabled"], aX = { class: "page-label" }, oX = ["disabled"], sX = ["aria-label"], cX = {
|
|
74440
74506
|
key: 0,
|
|
74441
74507
|
class: "page-rail",
|
|
74442
74508
|
"aria-label": "Pages"
|
|
74443
|
-
},
|
|
74509
|
+
}, lX = [
|
|
74444
74510
|
"aria-current",
|
|
74445
74511
|
"aria-label",
|
|
74446
74512
|
"onClick"
|
|
74447
|
-
],
|
|
74513
|
+
], uX = { class: "rail-number" }, dX = ["src"], fX = ["src", "alt"], pX = ["src", "poster"], mX = {
|
|
74448
74514
|
key: 4,
|
|
74449
74515
|
class: "audio-player"
|
|
74450
|
-
},
|
|
74516
|
+
}, hX = { class: "transport" }, gX = ["aria-label"], _X = {
|
|
74451
74517
|
viewBox: "0 0 24 24",
|
|
74452
74518
|
width: "22",
|
|
74453
74519
|
height: "22",
|
|
74454
74520
|
"aria-hidden": "true"
|
|
74455
|
-
},
|
|
74521
|
+
}, vX = {
|
|
74456
74522
|
key: 0,
|
|
74457
74523
|
x: "6",
|
|
74458
74524
|
y: "5",
|
|
@@ -74460,7 +74526,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74460
74526
|
height: "14",
|
|
74461
74527
|
rx: "1.5",
|
|
74462
74528
|
fill: "currentColor"
|
|
74463
|
-
},
|
|
74529
|
+
}, yX = {
|
|
74464
74530
|
key: 1,
|
|
74465
74531
|
x: "14",
|
|
74466
74532
|
y: "5",
|
|
@@ -74468,75 +74534,75 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74468
74534
|
height: "14",
|
|
74469
74535
|
rx: "1.5",
|
|
74470
74536
|
fill: "currentColor"
|
|
74471
|
-
},
|
|
74537
|
+
}, bX = {
|
|
74472
74538
|
key: 2,
|
|
74473
74539
|
d: "M8 5.5v13l11-6.5z",
|
|
74474
74540
|
fill: "currentColor"
|
|
74475
|
-
},
|
|
74541
|
+
}, xX = { class: "time" }, SX = { class: "time total" }, CX = ["src"], wX = {
|
|
74476
74542
|
key: 5,
|
|
74477
74543
|
class: "sheet-view"
|
|
74478
|
-
},
|
|
74544
|
+
}, TX = {
|
|
74479
74545
|
key: 0,
|
|
74480
74546
|
class: "text-status"
|
|
74481
|
-
},
|
|
74547
|
+
}, EX = {
|
|
74482
74548
|
key: 0,
|
|
74483
74549
|
class: "doc-toolbar"
|
|
74484
|
-
},
|
|
74550
|
+
}, DX = { class: "sheet-scroll" }, OX = { class: "sheet-table" }, kX = { class: "row-number" }, AX = {
|
|
74485
74551
|
key: 1,
|
|
74486
74552
|
class: "text-status"
|
|
74487
|
-
},
|
|
74553
|
+
}, jX = {
|
|
74488
74554
|
key: 2,
|
|
74489
74555
|
class: "text-status"
|
|
74490
|
-
},
|
|
74556
|
+
}, MX = {
|
|
74491
74557
|
key: 6,
|
|
74492
74558
|
class: "email-view"
|
|
74493
|
-
},
|
|
74559
|
+
}, NX = {
|
|
74494
74560
|
key: 0,
|
|
74495
74561
|
class: "text-status"
|
|
74496
|
-
},
|
|
74562
|
+
}, PX = { class: "email-headers" }, FX = { key: 0 }, IX = { key: 1 }, LX = {
|
|
74497
74563
|
key: 0,
|
|
74498
74564
|
class: "email-attachments"
|
|
74499
|
-
},
|
|
74565
|
+
}, RX = { class: "attachment-label" }, zX = ["innerHTML"], BX = {
|
|
74500
74566
|
key: 2,
|
|
74501
74567
|
class: "text-status"
|
|
74502
|
-
},
|
|
74568
|
+
}, VX = {
|
|
74503
74569
|
key: 7,
|
|
74504
74570
|
class: "markdown-view"
|
|
74505
|
-
},
|
|
74571
|
+
}, HX = {
|
|
74506
74572
|
key: 0,
|
|
74507
74573
|
class: "text-status"
|
|
74508
|
-
},
|
|
74574
|
+
}, UX = ["innerHTML"], WX = {
|
|
74509
74575
|
key: 2,
|
|
74510
74576
|
class: "text-status"
|
|
74511
|
-
},
|
|
74577
|
+
}, GX = {
|
|
74512
74578
|
key: 8,
|
|
74513
74579
|
class: "text-view"
|
|
74514
|
-
},
|
|
74580
|
+
}, KX = {
|
|
74515
74581
|
key: 0,
|
|
74516
74582
|
class: "text-status"
|
|
74517
|
-
},
|
|
74583
|
+
}, qX = { class: "text-body" }, JX = {
|
|
74518
74584
|
key: 0,
|
|
74519
74585
|
class: "text-status"
|
|
74520
|
-
},
|
|
74586
|
+
}, YX = {
|
|
74521
74587
|
key: 2,
|
|
74522
74588
|
class: "text-status"
|
|
74523
|
-
},
|
|
74589
|
+
}, XX = {
|
|
74524
74590
|
key: 0,
|
|
74525
74591
|
class: "font-error"
|
|
74526
|
-
},
|
|
74592
|
+
}, ZX = { class: "specimen-controls" }, QX = { class: "specimen-scale" }, $X = { class: "scale-label" }, eZ = {
|
|
74527
74593
|
key: 2,
|
|
74528
74594
|
class: "font-loading"
|
|
74529
|
-
},
|
|
74595
|
+
}, tZ = ["src", "alt"], nZ = {
|
|
74530
74596
|
key: 11,
|
|
74531
74597
|
class: "no-preview"
|
|
74532
|
-
},
|
|
74598
|
+
}, rZ = { class: "ext-badge" }, iZ = { class: "name" }, aZ = {
|
|
74533
74599
|
key: 12,
|
|
74534
74600
|
class: "rendering",
|
|
74535
74601
|
"aria-live": "polite"
|
|
74536
|
-
},
|
|
74602
|
+
}, oZ = {
|
|
74537
74603
|
key: 1,
|
|
74538
74604
|
class: "description"
|
|
74539
|
-
},
|
|
74605
|
+
}, sZ = 3, cZ = 2, lZ = 524288, uZ = 500, dZ = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
74540
74606
|
__name: "AssetViewer",
|
|
74541
74607
|
props: {
|
|
74542
74608
|
asset: {},
|
|
@@ -74549,9 +74615,9 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74549
74615
|
let n = e, r = t, i = /pdf|postscript|illustrator|photoshop|eps|psd/, s = /csv|tab-separated|spreadsheet|ms-excel/, c = /font|opentype|truetype|woff/, u = l(() => {
|
|
74550
74616
|
let e = n.asset.mime;
|
|
74551
74617
|
return n.asset.kind === "image" ? "image" : e.startsWith("video/") ? "video" : e.startsWith("audio/") ? "audio" : c.test(e) ? "font" : s.test(e) || /\.(csv|tsv|xlsx?|ods)$/i.test(n.asset.filename) ? "sheet" : e === "message/rfc822" || /\.eml$/i.test(n.asset.filename) ? "email" : e === "text/markdown" || /\.mdx?$/i.test(n.asset.filename) ? "markdown" : e.startsWith("text/") || e === "application/json" ? "text" : n.renderPage && (n.asset.documentUrl || i.test(e)) ? "page" : "none";
|
|
74552
|
-
}), h = l(() => n.asset.downloadUrl.replace(/\/download(?=$|\?)/, "/preview")), g = l(() =>
|
|
74618
|
+
}), h = l(() => n.asset.downloadUrl.replace(/\/download(?=$|\?)/, "/preview")), g = l(() => eX(h.value, n.assetAuth)), _ = l(() => ({
|
|
74553
74619
|
credentials: "omit",
|
|
74554
|
-
headers:
|
|
74620
|
+
headers: $Y(n.assetAuth)
|
|
74555
74621
|
})), y = B(), b = B(), x = B(), S = B(!1), C = B();
|
|
74556
74622
|
async function w() {
|
|
74557
74623
|
if (!(u.value !== "text" && u.value !== "markdown" || x.value !== void 0)) {
|
|
@@ -74560,7 +74626,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74560
74626
|
let e = await fetch(h.value, _.value);
|
|
74561
74627
|
if (!e.ok) throw Error(`Could not load the file (${e.status})`);
|
|
74562
74628
|
let t = await e.arrayBuffer();
|
|
74563
|
-
S.value = t.byteLength >
|
|
74629
|
+
S.value = t.byteLength > lZ, x.value = new TextDecoder("utf-8", { fatal: !1 }).decode(t.slice(0, lZ)), qe.value = !0, u.value === "markdown" && await pe(x.value);
|
|
74564
74630
|
} catch (e) {
|
|
74565
74631
|
console.warn("[AssetViewer] text could not be loaded", e), C.value = "This file could not be loaded for preview. You can still download it.";
|
|
74566
74632
|
}
|
|
@@ -74581,7 +74647,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74581
74647
|
if (s === "\"") a = !0;
|
|
74582
74648
|
else if (s === t) r.push(i), i = "";
|
|
74583
74649
|
else if (s === "\n") {
|
|
74584
|
-
if (r.push(i), n.push(r), r = [], i = "", n.length >
|
|
74650
|
+
if (r.push(i), n.push(r), r = [], i = "", n.length > uZ) break;
|
|
74585
74651
|
} else s !== "\r" && (i += s);
|
|
74586
74652
|
}
|
|
74587
74653
|
return (i !== "" || r.length) && (r.push(i), n.push(r)), n;
|
|
@@ -74610,7 +74676,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74610
74676
|
raw: !1,
|
|
74611
74677
|
defval: ""
|
|
74612
74678
|
});
|
|
74613
|
-
O.value = r.length >
|
|
74679
|
+
O.value = r.length > uZ, T.value = r.slice(0, uZ).map((e) => e.map((e) => String(e ?? "")));
|
|
74614
74680
|
}
|
|
74615
74681
|
async function ne() {
|
|
74616
74682
|
if (!(u.value !== "sheet" || T.value.length || k.value)) try {
|
|
@@ -74620,7 +74686,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74620
74686
|
if (/sheet|ms-excel/.test(n.asset.mime) || /\.(xlsx?|ods)$/i.test(n.asset.filename)) j = (await import("./xlsx-Bm1OL5B8.js")).read(t, { type: "array" }), E.value = j.SheetNames, D.value = E.value[0] ?? "", D.value && await R(D.value);
|
|
74621
74687
|
else {
|
|
74622
74688
|
let e = new TextDecoder("utf-8", { fatal: !1 }).decode(t), n = ee(e, I(e));
|
|
74623
|
-
O.value = n.length >
|
|
74689
|
+
O.value = n.length > uZ, T.value = n.slice(0, uZ);
|
|
74624
74690
|
}
|
|
74625
74691
|
qe.value = !0;
|
|
74626
74692
|
} catch (e) {
|
|
@@ -74847,12 +74913,12 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74847
74913
|
if (it || t !== rt) return;
|
|
74848
74914
|
let i = b.value;
|
|
74849
74915
|
if (!i) return;
|
|
74850
|
-
let a = Math.min(typeof window < "u" && window.devicePixelRatio || 1,
|
|
74916
|
+
let a = Math.min(typeof window < "u" && window.devicePixelRatio || 1, cZ);
|
|
74851
74917
|
if (await n.renderPage(r, i, {
|
|
74852
74918
|
page: e,
|
|
74853
74919
|
dpi: 96 * a
|
|
74854
74920
|
}), it || t !== rt) return;
|
|
74855
|
-
if (i.width && i.height && (Ge.value = i.width / i.height), qe.value = !0, nt.set(e, i), nt.size >
|
|
74921
|
+
if (i.width && i.height && (Ge.value = i.width / i.height), qe.value = !0, nt.set(e, i), nt.size > sZ) {
|
|
74856
74922
|
let e = nt.keys().next().value;
|
|
74857
74923
|
e !== void 0 && nt.delete(e);
|
|
74858
74924
|
}
|
|
@@ -74909,7 +74975,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74909
74975
|
key: 0,
|
|
74910
74976
|
to: U(ge) || void 0
|
|
74911
74977
|
}, {
|
|
74912
|
-
default: G(() => [m("div",
|
|
74978
|
+
default: G(() => [m("div", nX, [
|
|
74913
74979
|
u.value === "page" && Ze.value > 1 ? (L(), p(a, { key: 0 }, [
|
|
74914
74980
|
m("button", {
|
|
74915
74981
|
class: A(["tool-btn rail-toggle", { active: st.value }]),
|
|
@@ -74949,22 +75015,22 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
74949
75015
|
stroke: "currentColor",
|
|
74950
75016
|
"stroke-width": "1.6"
|
|
74951
75017
|
})
|
|
74952
|
-
], -1)]], 10,
|
|
75018
|
+
], -1)]], 10, rX),
|
|
74953
75019
|
m("button", {
|
|
74954
75020
|
class: "tool-btn",
|
|
74955
75021
|
type: "button",
|
|
74956
75022
|
disabled: Xe.value <= 1,
|
|
74957
75023
|
"aria-label": "Previous page",
|
|
74958
75024
|
onClick: n[1] ||= (e) => mt(Xe.value - 1)
|
|
74959
|
-
}, "‹", 8,
|
|
74960
|
-
m("span",
|
|
75025
|
+
}, "‹", 8, iX),
|
|
75026
|
+
m("span", aX, H(Xe.value) + " / " + H(Ze.value), 1),
|
|
74961
75027
|
m("button", {
|
|
74962
75028
|
class: "tool-btn",
|
|
74963
75029
|
type: "button",
|
|
74964
75030
|
disabled: Xe.value >= Ze.value,
|
|
74965
75031
|
"aria-label": "Next page",
|
|
74966
75032
|
onClick: n[2] ||= (e) => mt(Xe.value + 1)
|
|
74967
|
-
}, "›", 8,
|
|
75033
|
+
}, "›", 8, oX)
|
|
74968
75034
|
], 64)) : f("", !0),
|
|
74969
75035
|
u.value === "markdown" ? (L(), d(vF, {
|
|
74970
75036
|
key: 1,
|
|
@@ -75006,7 +75072,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75006
75072
|
"aria-modal": "true",
|
|
75007
75073
|
"aria-label": e.asset.title
|
|
75008
75074
|
}, [
|
|
75009
|
-
ct.value ? (L(), p("aside",
|
|
75075
|
+
ct.value ? (L(), p("aside", cX, [(L(!0), p(a, null, re(Ze.value, (e) => (L(), p("button", {
|
|
75010
75076
|
key: e,
|
|
75011
75077
|
class: A(["rail-item", { current: e === Xe.value }]),
|
|
75012
75078
|
type: "button",
|
|
@@ -75017,7 +75083,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75017
75083
|
ref_for: !0,
|
|
75018
75084
|
ref: (t) => ft(e, t),
|
|
75019
75085
|
class: "rail-thumb"
|
|
75020
|
-
}, null, 512), m("span",
|
|
75086
|
+
}, null, 512), m("span", uX, H(e), 1)], 10, lX))), 128))])) : f("", !0),
|
|
75021
75087
|
m("div", {
|
|
75022
75088
|
ref_key: "stageRef",
|
|
75023
75089
|
ref: y,
|
|
@@ -75029,14 +75095,14 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75029
75095
|
src: e.asset.previewUrl,
|
|
75030
75096
|
alt: "",
|
|
75031
75097
|
"aria-hidden": "true"
|
|
75032
|
-
}, null, 8,
|
|
75098
|
+
}, null, 8, dX)) : f("", !0),
|
|
75033
75099
|
u.value === "image" ? (L(), p("img", {
|
|
75034
75100
|
key: 1,
|
|
75035
75101
|
class: "full",
|
|
75036
75102
|
src: g.value,
|
|
75037
75103
|
alt: e.asset.title,
|
|
75038
75104
|
onLoad: Ke
|
|
75039
|
-
}, null, 40,
|
|
75105
|
+
}, null, 40, fX)) : u.value === "page" && !Ye.value ? (L(), p("canvas", {
|
|
75040
75106
|
key: 2,
|
|
75041
75107
|
ref_key: "canvasRef",
|
|
75042
75108
|
ref: b,
|
|
@@ -75049,21 +75115,21 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75049
75115
|
controls: "",
|
|
75050
75116
|
playsinline: "",
|
|
75051
75117
|
onLoadeddata: n[5] ||= (e) => qe.value = !0
|
|
75052
|
-
}, null, 40,
|
|
75118
|
+
}, null, 40, pX)) : u.value === "audio" ? (L(), p("div", mX, [
|
|
75053
75119
|
m("canvas", {
|
|
75054
75120
|
ref_key: "waveCanvasRef",
|
|
75055
75121
|
ref: ke,
|
|
75056
75122
|
class: "wave",
|
|
75057
75123
|
"aria-hidden": "true"
|
|
75058
75124
|
}, null, 512),
|
|
75059
|
-
m("div",
|
|
75125
|
+
m("div", hX, [
|
|
75060
75126
|
m("button", {
|
|
75061
75127
|
class: "play",
|
|
75062
75128
|
type: "button",
|
|
75063
75129
|
"aria-label": Ae.value ? "Pause" : "Play",
|
|
75064
75130
|
onClick: Ue
|
|
75065
|
-
}, [(L(), p("svg",
|
|
75066
|
-
m("span",
|
|
75131
|
+
}, [(L(), p("svg", _X, [Ae.value ? (L(), p("rect", vX)) : f("", !0), Ae.value ? (L(), p("rect", yX)) : (L(), p("path", bX))]))], 8, gX),
|
|
75132
|
+
m("span", xX, H(We(Me.value)), 1),
|
|
75067
75133
|
v(eo, {
|
|
75068
75134
|
class: "seek",
|
|
75069
75135
|
"model-value": Me.value,
|
|
@@ -75078,7 +75144,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75078
75144
|
"max",
|
|
75079
75145
|
"aria-valuetext"
|
|
75080
75146
|
]),
|
|
75081
|
-
m("span",
|
|
75147
|
+
m("span", SX, H(We(je.value)), 1)
|
|
75082
75148
|
]),
|
|
75083
75149
|
m("audio", {
|
|
75084
75150
|
ref_key: "audioRef",
|
|
@@ -75093,37 +75159,37 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75093
75159
|
onPlay: Re,
|
|
75094
75160
|
onPause: n[8] ||= (e) => Ae.value = !1,
|
|
75095
75161
|
onEnded: n[9] ||= (e) => Ae.value = !1
|
|
75096
|
-
}, null, 40,
|
|
75097
|
-
])) : u.value === "sheet" ? (L(), p("div",
|
|
75098
|
-
E.value.length > 1 ? (L(), p("div",
|
|
75162
|
+
}, null, 40, CX)
|
|
75163
|
+
])) : u.value === "sheet" ? (L(), p("div", wX, [k.value ? (L(), p("div", TX, H(k.value), 1)) : T.value.length ? (L(), p(a, { key: 1 }, [
|
|
75164
|
+
E.value.length > 1 ? (L(), p("div", EX, [v(vF, {
|
|
75099
75165
|
"model-value": D.value,
|
|
75100
75166
|
tabs: me.value,
|
|
75101
75167
|
size: "small",
|
|
75102
75168
|
"aria-label": "Sheets",
|
|
75103
75169
|
"onUpdate:modelValue": te
|
|
75104
75170
|
}, null, 8, ["model-value", "tabs"])])) : f("", !0),
|
|
75105
|
-
m("div",
|
|
75171
|
+
m("div", DX, [m("table", OX, [m("thead", null, [m("tr", null, [n[14] ||= m("th", {
|
|
75106
75172
|
class: "row-number",
|
|
75107
75173
|
scope: "col"
|
|
75108
75174
|
}, null, -1), (L(!0), p(a, null, re(T.value[0], (e, t) => (L(), p("th", {
|
|
75109
75175
|
key: t,
|
|
75110
75176
|
scope: "col"
|
|
75111
|
-
}, H(e), 1))), 128))])]), m("tbody", null, [(L(!0), p(a, null, re(T.value.slice(1), (e, t) => (L(), p("tr", { key: t }, [m("td",
|
|
75177
|
+
}, H(e), 1))), 128))])]), m("tbody", null, [(L(!0), p(a, null, re(T.value.slice(1), (e, t) => (L(), p("tr", { key: t }, [m("td", kX, H(t + 2), 1), (L(!0), p(a, null, re(e, (e, t) => (L(), p("td", {
|
|
75112
75178
|
key: t,
|
|
75113
75179
|
class: A({ numeric: P(e) })
|
|
75114
75180
|
}, H(e), 3))), 128))]))), 128))])])]),
|
|
75115
|
-
O.value ? (L(), p("div",
|
|
75116
|
-
], 64)) : (L(), p("div",
|
|
75117
|
-
m("dl",
|
|
75118
|
-
V.value.attachments.length ? (L(), p("div",
|
|
75181
|
+
O.value ? (L(), p("div", AX, "Showing the first " + H(uZ) + " rows — download the file for the rest.")) : f("", !0)
|
|
75182
|
+
], 64)) : (L(), p("div", jX, "Loading…"))])) : u.value === "email" ? (L(), p("div", MX, [ae.value ? (L(), p("div", NX, H(ae.value), 1)) : V.value ? (L(), p(a, { key: 1 }, [
|
|
75183
|
+
m("dl", PX, [(L(!0), p(a, null, re(oe.value, (e) => (L(), p(a, { key: e.label }, [e.value ? (L(), p("dt", FX, H(e.label), 1)) : f("", !0), e.value ? (L(), p("dd", IX, H(e.value), 1)) : f("", !0)], 64))), 128))]),
|
|
75184
|
+
V.value.attachments.length ? (L(), p("div", LX, [m("span", RX, H(V.value.attachments.length) + " attachment" + H(V.value.attachments.length === 1 ? "" : "s") + ":", 1), (L(!0), p(a, null, re(V.value.attachments, (e) => (L(), p("span", {
|
|
75119
75185
|
key: e,
|
|
75120
75186
|
class: "attachment-chip"
|
|
75121
75187
|
}, H(e), 1))), 128))])) : f("", !0),
|
|
75122
75188
|
m("div", {
|
|
75123
75189
|
class: "email-body",
|
|
75124
75190
|
innerHTML: V.value.bodyHtml
|
|
75125
|
-
}, null, 8,
|
|
75126
|
-
], 64)) : (L(), p("div",
|
|
75191
|
+
}, null, 8, zX)
|
|
75192
|
+
], 64)) : (L(), p("div", BX, "Loading…"))])) : u.value === "markdown" ? (L(), p("div", VX, [C.value ? (L(), p("div", HX, H(C.value), 1)) : x.value === void 0 ? (L(), p("div", WX, "Loading…")) : (L(), p(a, { key: 1 }, [ue.value ? (L(), d(oG, {
|
|
75127
75193
|
key: 1,
|
|
75128
75194
|
code: x.value,
|
|
75129
75195
|
language: "markdown",
|
|
@@ -75132,12 +75198,12 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75132
75198
|
key: 0,
|
|
75133
75199
|
class: "markdown-body",
|
|
75134
75200
|
innerHTML: de.value
|
|
75135
|
-
}, null, 8,
|
|
75201
|
+
}, null, 8, UX))], 64))])) : u.value === "text" ? (L(), p("div", GX, [C.value ? (L(), p("div", KX, H(C.value), 1)) : x.value === void 0 ? (L(), p("div", YX, "Loading…")) : (L(), p(a, { key: 1 }, [m("pre", qX, H(x.value), 1), S.value ? (L(), p("div", JX, " Showing the first " + H(Math.round(lZ / 1024)) + " KB — download the file for the rest. ", 1)) : f("", !0)], 64))])) : u.value === "font" ? (L(), p("div", {
|
|
75136
75202
|
key: 9,
|
|
75137
75203
|
class: "font-book",
|
|
75138
75204
|
style: M({ "--specimen-family": we.value })
|
|
75139
|
-
}, [Ce.value ? (L(), p("div",
|
|
75140
|
-
m("div",
|
|
75205
|
+
}, [Ce.value ? (L(), p("div", XX, H(Ce.value), 1)) : Se.value ? (L(), p(a, { key: 1 }, [
|
|
75206
|
+
m("div", ZX, [v(TO, {
|
|
75141
75207
|
modelValue: be.value,
|
|
75142
75208
|
"onUpdate:modelValue": n[10] ||= (e) => be.value = e,
|
|
75143
75209
|
class: "specimen-input",
|
|
@@ -75162,7 +75228,7 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75162
75228
|
m("div", { class: "glyph-row" }, "abcdefghijklmnopqrstuvwxyz"),
|
|
75163
75229
|
m("div", { class: "glyph-row" }, "0123456789 & ! ? @ # € $ % ( ) [ ] { } / \\ — “ ” ‘ ’")
|
|
75164
75230
|
], -1),
|
|
75165
|
-
m("div",
|
|
75231
|
+
m("div", QX, [(L(), p(a, null, re([
|
|
75166
75232
|
12,
|
|
75167
75233
|
16,
|
|
75168
75234
|
24,
|
|
@@ -75172,31 +75238,31 @@ var $Y = { class: "viewer-header-tools" }, eX = ["aria-pressed"], tX = ["disable
|
|
|
75172
75238
|
key: e,
|
|
75173
75239
|
class: "scale-row",
|
|
75174
75240
|
style: M({ fontSize: `${e}px` })
|
|
75175
|
-
}, [m("span",
|
|
75176
|
-
], 64)) : (L(), p("div",
|
|
75241
|
+
}, [m("span", $X, H(e), 1), n[15] ||= m("span", { class: "scale-sample" }, "The quick brown fox jumps over the lazy dog", -1)], 4)), 64))])
|
|
75242
|
+
], 64)) : (L(), p("div", eZ, "Loading typeface…"))], 4)) : e.asset.previewUrl ? (L(), p("img", {
|
|
75177
75243
|
key: 10,
|
|
75178
75244
|
class: "full generated-preview",
|
|
75179
75245
|
src: e.asset.previewUrl,
|
|
75180
75246
|
alt: e.asset.title,
|
|
75181
75247
|
onLoad: n[12] ||= (e) => qe.value = !0
|
|
75182
|
-
}, null, 40,
|
|
75183
|
-
m("div",
|
|
75184
|
-
m("p",
|
|
75248
|
+
}, null, 40, tZ)) : (L(), p("div", nZ, [
|
|
75249
|
+
m("div", rZ, H(Qe.value), 1),
|
|
75250
|
+
m("p", iZ, H(e.asset.filename), 1),
|
|
75185
75251
|
n[17] ||= m("p", { class: "hint" }, "This file type can’t be previewed here.", -1)
|
|
75186
75252
|
])),
|
|
75187
|
-
Je.value ? (L(), p("div",
|
|
75253
|
+
Je.value ? (L(), p("div", aZ, "Rendering…")) : f("", !0)
|
|
75188
75254
|
], 2),
|
|
75189
|
-
e.asset.description ? (L(), p("p",
|
|
75190
|
-
], 14,
|
|
75255
|
+
e.asset.description ? (L(), p("p", oZ, H(e.asset.description), 1)) : f("", !0)
|
|
75256
|
+
], 14, sX)], 64));
|
|
75191
75257
|
}
|
|
75192
|
-
}), [["__scopeId", "data-v-fcc6d687"]]),
|
|
75193
|
-
function
|
|
75258
|
+
}), [["__scopeId", "data-v-fcc6d687"]]), fZ;
|
|
75259
|
+
function pZ() {
|
|
75194
75260
|
let e = B(!1), t = B(!1), n = B(0), r = B(!1), i, a, o = 0;
|
|
75195
75261
|
function s() {
|
|
75196
75262
|
a &&= (URL.revokeObjectURL(a), void 0), i &&= (i.pause(), i.removeAttribute("src"), i.load(), void 0), r.value = !1, e.value = !1, t.value = !1, n.value = 0;
|
|
75197
75263
|
}
|
|
75198
75264
|
function c() {
|
|
75199
|
-
o++,
|
|
75265
|
+
o++, fZ === s && (fZ = void 0), s();
|
|
75200
75266
|
}
|
|
75201
75267
|
async function l(c, l) {
|
|
75202
75268
|
if (i) {
|
|
@@ -75204,7 +75270,7 @@ function uZ() {
|
|
|
75204
75270
|
return;
|
|
75205
75271
|
}
|
|
75206
75272
|
let u = ++o;
|
|
75207
|
-
|
|
75273
|
+
fZ?.(), fZ = s, t.value = !0;
|
|
75208
75274
|
let d;
|
|
75209
75275
|
try {
|
|
75210
75276
|
d = typeof c == "function" ? await c() : c;
|
|
@@ -75248,19 +75314,19 @@ function uZ() {
|
|
|
75248
75314
|
}
|
|
75249
75315
|
//#endregion
|
|
75250
75316
|
//#region src/components/BxAudioPlayButton.vue?vue&type=script&setup=true&lang.ts
|
|
75251
|
-
var
|
|
75317
|
+
var mZ = ["aria-label", "aria-busy"], hZ = {
|
|
75252
75318
|
class: "ring",
|
|
75253
75319
|
viewBox: "0 0 44 44",
|
|
75254
75320
|
"aria-hidden": "true"
|
|
75255
|
-
},
|
|
75321
|
+
}, gZ = ["stroke-dashoffset"], _Z = {
|
|
75256
75322
|
class: "glyph",
|
|
75257
75323
|
viewBox: "0 0 24 24",
|
|
75258
75324
|
"aria-hidden": "true"
|
|
75259
|
-
},
|
|
75325
|
+
}, vZ = {
|
|
75260
75326
|
key: 1,
|
|
75261
75327
|
d: "M8.5 5.5v13l10-6.5z",
|
|
75262
75328
|
fill: "currentColor"
|
|
75263
|
-
},
|
|
75329
|
+
}, yZ = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
75264
75330
|
__name: "BxAudioPlayButton",
|
|
75265
75331
|
props: {
|
|
75266
75332
|
playing: {
|
|
@@ -75285,7 +75351,7 @@ var dZ = ["aria-label", "aria-busy"], fZ = {
|
|
|
75285
75351
|
"aria-label": e.playing ? "Pause" : "Play",
|
|
75286
75352
|
"aria-busy": e.loading || void 0,
|
|
75287
75353
|
onClick: n[0] ||= ye((e) => r("toggle"), ["stop"])
|
|
75288
|
-
}, [(L(), p("svg",
|
|
75354
|
+
}, [(L(), p("svg", hZ, [n[1] ||= m("circle", {
|
|
75289
75355
|
class: "track",
|
|
75290
75356
|
cx: "22",
|
|
75291
75357
|
cy: "22",
|
|
@@ -75297,7 +75363,7 @@ var dZ = ["aria-label", "aria-busy"], fZ = {
|
|
|
75297
75363
|
r: "20",
|
|
75298
75364
|
"stroke-dasharray": i,
|
|
75299
75365
|
"stroke-dashoffset": i * (1 - o.value)
|
|
75300
|
-
}, null, 8,
|
|
75366
|
+
}, null, 8, gZ)])), (L(), p("svg", _Z, [e.playing ? (L(), p(a, { key: 0 }, [n[2] ||= m("rect", {
|
|
75301
75367
|
x: "7",
|
|
75302
75368
|
y: "5",
|
|
75303
75369
|
width: "3.5",
|
|
@@ -75311,9 +75377,9 @@ var dZ = ["aria-label", "aria-busy"], fZ = {
|
|
|
75311
75377
|
height: "14",
|
|
75312
75378
|
rx: "1.25",
|
|
75313
75379
|
fill: "currentColor"
|
|
75314
|
-
}, null, -1)], 64)) : (L(), p("path",
|
|
75380
|
+
}, null, -1)], 64)) : (L(), p("path", vZ))]))], 10, mZ));
|
|
75315
75381
|
}
|
|
75316
|
-
}), [["__scopeId", "data-v-09ee9555"]]),
|
|
75382
|
+
}), [["__scopeId", "data-v-09ee9555"]]), bZ = ["aria-label"], xZ = /*#__PURE__*/ q(/* @__PURE__ */ y({
|
|
75317
75383
|
__name: "BxWaveformThumb",
|
|
75318
75384
|
props: {
|
|
75319
75385
|
src: {},
|
|
@@ -75325,9 +75391,9 @@ var dZ = ["aria-label", "aria-busy"], fZ = {
|
|
|
75325
75391
|
style: M({ "--bx-waveform-src": `url(${JSON.stringify(e.src)})` }),
|
|
75326
75392
|
role: "img",
|
|
75327
75393
|
"aria-label": e.alt
|
|
75328
|
-
}, null, 12,
|
|
75394
|
+
}, null, 12, bZ));
|
|
75329
75395
|
}
|
|
75330
|
-
}), [["__scopeId", "data-v-69c139e5"]]),
|
|
75396
|
+
}), [["__scopeId", "data-v-69c139e5"]]), SZ = "bluepic-app-wrapper", CZ = `.${SZ}`;
|
|
75331
75397
|
oO(), window.bluepicPopupProvider = new BI();
|
|
75332
75398
|
//#endregion
|
|
75333
|
-
export {
|
|
75399
|
+
export { QY as ASSET_AUTH_QUERY_ACCESS_TOKEN, ZY as ASSET_AUTH_QUERY_PASSWORD, Ub as ASSET_PROXY_KEY, GJ as BluepicEmbed, wI as BluepicFieldComponents, WL as BluepicLogo, jG as BluepicSpinner, wR as BxAlert, dZ as BxAssetViewer, yZ as BxAudioPlayButton, EG as BxAvatar, DG as BxBadge, Yb as BxButton, iI as BxButtonGroup, cE as BxCard, tj as BxCheckbox, oG as BxCode, KF as BxColorPicker, ZF as BxColorPickerPopover, lA as BxCropper, CK as BxDatePicker, FK as BxDatePickerPopover, _G as BxDrawer, yk as BxDropdown, IJ as BxEmbedThemeDarkmode, RJ as BxEmbedThemeDarkmodeWcag, LJ as BxEmbedThemeLightmode, zJ as BxEmbedThemeLightmodeWcag, PO as BxEmpty, MI as BxFields, XS as BxIcon, mA as BxImageCropper, TO as BxInput, sk as BxList, fk as BxListItem, oL as BxLiveTemplate, WD as BxMenu, eI as BxNumberInput, ID as BxPopover, QT as BxPopup, $I as BxPreviewLayer, XT as BxProgress, qK as BxRadio, WK as BxRadioGroup, dT as BxScrollbar, QD as BxSelect, eo as BxSlider, Kb as BxSpin, gG as BxStepper, sG as BxSwitch, zK as BxTab, QL as BxTable, vF as BxTabs, LR as BxTag, tG as BxTemplateEditor, lO as BxTooltip, mE as BxUpload, xZ as BxWaveformThumb, yF as CSS_COLOR_NAMES, qL as CircularProgress, HI as CollectionFieldPopup, cY as DIN_LEVELS, BR as ExportAnalytics, gA as FACE_VERTICAL_ANCHOR, $P as FieldIcons, SZ as GLOBAL_APP_WRAPPER_CLASS, CZ as GLOBAL_APP_WRAPPER_SELECTOR, bJ as LEGACY_BRIDGE, hA as MIN_FACE_SCORE, lF as MapboxMap, zY as OTHER_CATEGORY, IY as RichText, cq as SEMANTIC_PREFIX, lq as SEMANTIC_TOKEN_GROUPS, sq as SEMANTIC_TOKEN_NAMES, fq as STATUS_BASES, BL as SlidesNavigation, dq as THEME_HOUSE_PRESETS, uq as THEME_PRESETS, sY as Tabs, zL as TemplateView, aq as UserAvatar, rY as UserInfo, kE as anyTextToRichText, EA as applyAutoCrop, Rb as applyColorMatricesToImage, Hb as applyColorMatrix, Lb as applyColorMatrixToColor, PJ as applyTheme, JY as aspectRatio, YY as aspectRatioStr, $Y as assetRequestHeaders, VR as canvasLabel, HR as canvasSizeToken, CE as cloneDeep, qY as collectPortalCategories, UI as convertDeprecatedField, TR as cropImage, Bb as cropToVisibleBBox, vb as cssFontsCache, CF as cyrb53, wF as cyrb53ToHex, WR as deliverableFileNames, gY as dinPixels, Nb as exportSVGDocument, RR as extractHost, BJ as fetchWithProgress, VJ as fetchWithProgressV1, UR as fitCanvasBox, KY as flatPortalItems, GP as flattenFieldTable, JP as flattenFields, eF as getDefaultValueForFieldModel, ZP as getFieldDescription, QP as getFieldsDescription, $K as getInitials, OE as getRawText, XY as getTemplateAspectRatioHumanReadable, ZK as getTemplateLiveUrl, XK as getTemplatePreviewUrl, YK as getTemplateSerialUrl, DJ as getThemeStyle, zb as getVisibleBBox, TE as groupFeatureByLinebreaks, GY as groupPortalItemsByCategory, RY as groupTemplatesByName, xA as hasFaceDetector, bF as hslToRgb, _Y as identifyDin, bk as imageInfo, yb as imagesCache, qJ as initEmbeds, oO as initInputModality, GT as injectPortal, SF as isDark, LY as isMultiCanvasTemplateDescriptor, TJ as looksLikeThemeInput, KP as modelField, Sk as normalizeAdjust, xk as normalizeCrop, XJ as openPopup, QK as optimizePreviewUrl, UY as orderPortalItems, EF as parseColor, Vb as rasterize, tF as realizeField, rF as renderFieldIcon, Ib as renderSVG, Wv as resolveAssetUrl, wb as resolveCSSFontFile, Eb as resolveImage, yJ as resolveTheme, kJ as resolveThemeStyle, OF as rgbToHex, kF as rgbToHsv, xF as rgba, bA as setFaceDetector, iO as setInputModality, vA as solveAutoCrop, BY as sortPortalAssetsByTitle, TF as stringToHslColor, nF as stringifyField, xb as textIsInUnicodeRange, pq as themeColor, EJ as themeInputFromLegacyCustomStyle, wJ as themeToCssText, CJ as themeToCssVars, DF as toHex2, EE as ungroupFeaturesDividedByLinebreaks, Wb as useAssetProxy, pZ as useAudioPlayback, XP as useFields, YP as useMobileFields, WT as usePopup, FJ as useTheme, NJ as useThemeV2, Sa as useUpload, oq as waitUntil, eX as withAssetAuthQuery };
|