@eka-care/medassist-widget 0.1.98-1 → 0.1.98
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/{medassist-widget-MediaCard-BpqutVIy.js → medassist-widget-MediaCard-CvX9sGuE.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as d, A as v, d as
|
|
1
|
+
import { c as d, A as v, d as x, y as C, u as e, s as L, p as P, F as _, S as j, B as D } from "./medassist-widget.js";
|
|
2
2
|
const R = [
|
|
3
3
|
[
|
|
4
4
|
"path",
|
|
@@ -32,7 +32,7 @@ const z = [
|
|
|
32
32
|
["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
|
|
33
33
|
["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
|
|
34
34
|
], A = d("lock", z);
|
|
35
|
-
function
|
|
35
|
+
function u(a) {
|
|
36
36
|
try {
|
|
37
37
|
return new URL(a, window.location.href).pathname.toLowerCase().endsWith(".pdf");
|
|
38
38
|
} catch {
|
|
@@ -82,20 +82,20 @@ async function g(a, n) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
function S({ card: a }) {
|
|
85
|
-
const { title: n, description: t, tags_text: o, banner_text: m, action: s, link: r } = a, i = v(null), [b, f] =
|
|
85
|
+
const { title: n, description: t, tags_text: o, banner_text: m, action: s, link: r } = a, i = v(null), [b, f] = x(!1), [c, h] = x(
|
|
86
86
|
"loading"
|
|
87
|
-
),
|
|
87
|
+
), p = !!r && u(r), l = !!r && !u(r);
|
|
88
88
|
C(() => {
|
|
89
|
-
if (f(!1), !r || !
|
|
90
|
-
let
|
|
89
|
+
if (f(!1), !r || !u(r)) return;
|
|
90
|
+
let w = !1;
|
|
91
91
|
return h("loading"), H(r).then((k) => {
|
|
92
|
-
|
|
92
|
+
w || h(k);
|
|
93
93
|
}), () => {
|
|
94
|
-
|
|
94
|
+
w = !0;
|
|
95
95
|
};
|
|
96
96
|
}, [r]);
|
|
97
97
|
const N = () => {
|
|
98
|
-
s === "screenshot" ? g(i, `screenshot-${Date.now()}.png`) : s === "download" && (
|
|
98
|
+
s === "screenshot" ? g(i, `screenshot-${Date.now()}.png`) : s === "download" && (p && r ? I(r) : g(i, "card.png"));
|
|
99
99
|
};
|
|
100
100
|
return /* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: [
|
|
101
101
|
/* @__PURE__ */ e(
|
|
@@ -120,7 +120,7 @@ function S({ card: a }) {
|
|
|
120
120
|
}
|
|
121
121
|
) })
|
|
122
122
|
] }),
|
|
123
|
-
|
|
123
|
+
p && /* @__PURE__ */ e(
|
|
124
124
|
"button",
|
|
125
125
|
{
|
|
126
126
|
type: "button",
|
package/dist/medassist-widget.js
CHANGED
|
@@ -12184,7 +12184,7 @@ const sm = Be(
|
|
|
12184
12184
|
), cm = Be(
|
|
12185
12185
|
() => import("./medassist-widget-CardList-CVIEpN-E.js").then((e) => ({ default: e.CardList }))
|
|
12186
12186
|
), dm = Be(
|
|
12187
|
-
() => import("./medassist-widget-MediaCard-
|
|
12187
|
+
() => import("./medassist-widget-MediaCard-CvX9sGuE.js").then((e) => ({ default: e.MediaCard }))
|
|
12188
12188
|
);
|
|
12189
12189
|
function Ie({ className: e }) {
|
|
12190
12190
|
return /* @__PURE__ */ a(
|