@tavus/widget 0.2.1 → 0.2.2
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/index.iife.js +34 -34
- package/dist/index.mjs +36 -27
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3579,18 +3579,20 @@ var On = /* @__PURE__ */ a(((e) => {
|
|
|
3579
3579
|
})), ir = /* @__PURE__ */ a(((e, t) => {
|
|
3580
3580
|
var { normalizeIPv6: n, removeDotSegments: r, recomposeAuthority: i, normalizePercentEncoding: a, normalizePathEncoding: o, escapePreservingEscapes: s, reescapeHostDelimiters: c, isIPv4: l, nonSimpleDomain: u } = nr(), { SCHEMES: d, getSchemeHandler: f } = rr();
|
|
3581
3581
|
function p(e, t) {
|
|
3582
|
-
return typeof e == "string" ? e =
|
|
3582
|
+
return typeof e == "string" ? e = w(e, t) : typeof e == "object" && (e = C(_(e, t), t)), e;
|
|
3583
3583
|
}
|
|
3584
3584
|
function m(e, t, n) {
|
|
3585
|
-
let r = n ? Object.assign({ scheme: "null" }, n) : { scheme: "null" }, i =
|
|
3586
|
-
|
|
3585
|
+
let r = n ? Object.assign({ scheme: "null" }, n) : { scheme: "null" }, { parsed: i, malformedAuthorityOrPort: a } = S(e, r), { parsed: o, malformedAuthorityOrPort: s } = S(t, r);
|
|
3586
|
+
if (a || s) throw Error(i.error || o.error || "URI is malformed.");
|
|
3587
|
+
let c = h(i, o, r, !0);
|
|
3588
|
+
return r.skipEscape = !0, _(c, r);
|
|
3587
3589
|
}
|
|
3588
3590
|
function h(e, t, n, i) {
|
|
3589
3591
|
let a = {};
|
|
3590
|
-
return i || (e =
|
|
3592
|
+
return i || (e = C(_(e, n), n), t = C(_(t, n), n)), n ||= {}, !n.tolerant && t.scheme ? (a.scheme = t.scheme, a.userinfo = t.userinfo, a.host = t.host, a.port = t.port, a.path = r(t.path || ""), a.query = t.query) : (t.userinfo !== void 0 || t.host !== void 0 || t.port !== void 0 ? (a.userinfo = t.userinfo, a.host = t.host, a.port = t.port, a.path = r(t.path || ""), a.query = t.query) : (t.path ? (t.path[0] === "/" ? a.path = r(t.path) : ((e.userinfo !== void 0 || e.host !== void 0 || e.port !== void 0) && !e.path ? a.path = "/" + t.path : e.path ? a.path = e.path.slice(0, e.path.lastIndexOf("/") + 1) + t.path : a.path = t.path, a.path = r(a.path)), a.query = t.query) : (a.path = e.path, t.query === void 0 ? a.query = e.query : a.query = t.query), a.userinfo = e.userinfo, a.host = e.host, a.port = e.port), a.scheme = e.scheme), a.fragment = t.fragment, a;
|
|
3591
3593
|
}
|
|
3592
3594
|
function g(e, t, n) {
|
|
3593
|
-
let r =
|
|
3595
|
+
let r = te(e, n), i = te(t, n);
|
|
3594
3596
|
return r !== void 0 && i !== void 0 && r.toLowerCase() === i.toLowerCase();
|
|
3595
3597
|
}
|
|
3596
3598
|
function _(e, t) {
|
|
@@ -3618,12 +3620,12 @@ var On = /* @__PURE__ */ a(((e) => {
|
|
|
3618
3620
|
}
|
|
3619
3621
|
return n.query !== void 0 && c.push("?", n.query), n.fragment !== void 0 && c.push("#", n.fragment), c.join("");
|
|
3620
3622
|
}
|
|
3621
|
-
var v = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u
|
|
3622
|
-
function
|
|
3623
|
+
var v = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u, y = /^(?:[^#/:?]+:)?\/\/([^/?#]*)/, b = /^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;
|
|
3624
|
+
function x(e, t) {
|
|
3623
3625
|
if (t[2] !== void 0 && e.path && e.path[0] !== "/") return "URI path must start with \"/\" when authority is present.";
|
|
3624
3626
|
if (typeof e.port == "number" && (e.port < 0 || e.port > 65535)) return "URI port is malformed.";
|
|
3625
3627
|
}
|
|
3626
|
-
function
|
|
3628
|
+
function S(e, t) {
|
|
3627
3629
|
let r = Object.assign({}, t), i = {
|
|
3628
3630
|
scheme: void 0,
|
|
3629
3631
|
userinfo: void 0,
|
|
@@ -3634,63 +3636,70 @@ var On = /* @__PURE__ */ a(((e) => {
|
|
|
3634
3636
|
fragment: void 0
|
|
3635
3637
|
}, a = !1, s = !1;
|
|
3636
3638
|
r.reference === "suffix" && (e = r.scheme ? r.scheme + ":" + e : "//" + e);
|
|
3637
|
-
let d = e.match(
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3639
|
+
let d = e.match(y);
|
|
3640
|
+
d !== null && d[1].indexOf("\\") !== -1 && (i.error = "URI authority must not contain a literal backslash.", a = !0);
|
|
3641
|
+
let p = e.match(b);
|
|
3642
|
+
if (p !== null) {
|
|
3643
|
+
let e = p[1], t = e.replace(/[\t\n\r]/g, "");
|
|
3644
|
+
t.length >= 2 && (t.slice(0, 2) === "//" ? e.length !== t.length && (i.error = i.error || "URI authority introducer must not contain whitespace.", a = !0) : (i.error = i.error || "URI authority must not contain a literal backslash.", a = !0));
|
|
3645
|
+
}
|
|
3646
|
+
let m = e.match(v);
|
|
3647
|
+
if (m) {
|
|
3648
|
+
i.scheme = m[1], i.userinfo = m[3], i.host = m[4], i.port = parseInt(m[5], 10), i.path = m[6] || "", i.query = m[7], i.fragment = m[8], isNaN(i.port) && (i.port = m[5]);
|
|
3649
|
+
let t = x(i, m);
|
|
3641
3650
|
if (t !== void 0 && (i.error = i.error || t, a = !0), i.host) if (l(i.host) === !1) {
|
|
3642
3651
|
let e = n(i.host);
|
|
3643
3652
|
i.host = e.host.toLowerCase(), s = e.isIPV6;
|
|
3644
3653
|
} else s = !0;
|
|
3645
3654
|
i.scheme === void 0 && i.userinfo === void 0 && i.host === void 0 && i.port === void 0 && i.query === void 0 && !i.path ? i.reference = "same-document" : i.scheme === void 0 ? i.reference = "relative" : i.fragment === void 0 ? i.reference = "absolute" : i.reference = "uri", r.reference && r.reference !== "suffix" && r.reference !== i.reference && (i.error = i.error || "URI is not a " + r.reference + " reference.");
|
|
3646
|
-
let
|
|
3647
|
-
if (!r.unicodeSupport && (!
|
|
3655
|
+
let d = f(r.scheme || i.scheme);
|
|
3656
|
+
if (!r.unicodeSupport && (!d || !d.unicodeSupport) && i.host && (r.domainHost || d && d.domainHost) && s === !1 && u(i.host)) try {
|
|
3648
3657
|
i.host = new URL("http://" + i.host).hostname;
|
|
3649
3658
|
} catch (e) {
|
|
3650
3659
|
i.error = i.error || "Host's domain name can not be converted to ASCII: " + e;
|
|
3651
3660
|
}
|
|
3652
|
-
if ((!
|
|
3661
|
+
if ((!d || d && !d.skipNormalize) && (e.indexOf("%") !== -1 && (i.scheme !== void 0 && (i.scheme = unescape(i.scheme)), i.host !== void 0 && (i.host = c(unescape(i.host), s))), i.path &&= o(i.path), i.fragment)) try {
|
|
3653
3662
|
i.fragment = encodeURI(decodeURIComponent(i.fragment));
|
|
3654
3663
|
} catch {
|
|
3655
3664
|
i.error = i.error || "URI malformed";
|
|
3656
3665
|
}
|
|
3657
|
-
|
|
3666
|
+
d && d.parse && d.parse(i, r);
|
|
3658
3667
|
} else i.error = i.error || "URI can not be parsed.";
|
|
3659
3668
|
return {
|
|
3660
3669
|
parsed: i,
|
|
3661
3670
|
malformedAuthorityOrPort: a
|
|
3662
3671
|
};
|
|
3663
3672
|
}
|
|
3664
|
-
function
|
|
3665
|
-
return
|
|
3673
|
+
function C(e, t) {
|
|
3674
|
+
return S(e, t).parsed;
|
|
3666
3675
|
}
|
|
3667
|
-
function
|
|
3668
|
-
return
|
|
3676
|
+
function w(e, t) {
|
|
3677
|
+
return ee(e, t).normalized;
|
|
3669
3678
|
}
|
|
3670
|
-
function
|
|
3671
|
-
let { parsed: n, malformedAuthorityOrPort: r } =
|
|
3679
|
+
function ee(e, t) {
|
|
3680
|
+
let { parsed: n, malformedAuthorityOrPort: r } = S(e, t);
|
|
3672
3681
|
return {
|
|
3673
3682
|
normalized: r ? e : _(n, t),
|
|
3674
3683
|
malformedAuthorityOrPort: r
|
|
3675
3684
|
};
|
|
3676
3685
|
}
|
|
3677
|
-
function
|
|
3686
|
+
function te(e, t) {
|
|
3678
3687
|
if (typeof e == "string") {
|
|
3679
|
-
let { normalized: n, malformedAuthorityOrPort: r } =
|
|
3688
|
+
let { normalized: n, malformedAuthorityOrPort: r } = ee(e, t);
|
|
3680
3689
|
return r ? void 0 : n;
|
|
3681
3690
|
}
|
|
3682
3691
|
if (typeof e == "object") return _(e, t);
|
|
3683
3692
|
}
|
|
3684
|
-
var
|
|
3693
|
+
var ne = {
|
|
3685
3694
|
SCHEMES: d,
|
|
3686
3695
|
normalize: p,
|
|
3687
3696
|
resolve: m,
|
|
3688
3697
|
resolveComponent: h,
|
|
3689
3698
|
equal: g,
|
|
3690
3699
|
serialize: _,
|
|
3691
|
-
parse:
|
|
3700
|
+
parse: C
|
|
3692
3701
|
};
|
|
3693
|
-
t.exports =
|
|
3702
|
+
t.exports = ne, t.exports.default = ne, t.exports.fastUri = ne;
|
|
3694
3703
|
})), ar = /* @__PURE__ */ a(((e) => {
|
|
3695
3704
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
3696
3705
|
var t = ir();
|