@developer.notchatbot/webchat 1.2.6 → 1.2.8
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.
|
@@ -16964,6 +16964,25 @@ También puedes pedir hablar con nuestro equipo de los sueños!`, bd = (e) => ({
|
|
|
16964
16964
|
}
|
|
16965
16965
|
);
|
|
16966
16966
|
};
|
|
16967
|
+
(() => {
|
|
16968
|
+
if (typeof document == "undefined") return;
|
|
16969
|
+
const e = {}, t = document.dispatchEvent.bind(document);
|
|
16970
|
+
document.dispatchEvent = (r) => {
|
|
16971
|
+
const o = r == null ? void 0 : r.type;
|
|
16972
|
+
return (o === "WebChatReady" || o === "EmbedChatReady") && (e[o] = !0), t(r);
|
|
16973
|
+
};
|
|
16974
|
+
const n = document.addEventListener.bind(document);
|
|
16975
|
+
document.addEventListener = (r, o, i) => {
|
|
16976
|
+
const a = r;
|
|
16977
|
+
if ((a === "WebChatReady" || a === "EmbedChatReady") && e[a]) {
|
|
16978
|
+
const l = new CustomEvent(a);
|
|
16979
|
+
setTimeout(() => {
|
|
16980
|
+
typeof o == "function" ? o.call(document, l) : o && typeof o.handleEvent == "function" && o.handleEvent(l);
|
|
16981
|
+
}, 0);
|
|
16982
|
+
}
|
|
16983
|
+
return n(r, o, i);
|
|
16984
|
+
};
|
|
16985
|
+
})();
|
|
16967
16986
|
let En = null;
|
|
16968
16987
|
const Er = {}, No = {};
|
|
16969
16988
|
let et = null, Te = null, ns = !1, Wr = {};
|
|
@@ -17130,32 +17149,36 @@ typeof window != "undefined" && (window.WebChat = ym, window.EmbedChat = wm, win
|
|
|
17130
17149
|
window.setWebChatPosition(t);
|
|
17131
17150
|
}
|
|
17132
17151
|
}), setTimeout(() => {
|
|
17133
|
-
const e = new CustomEvent("WebChatReady");
|
|
17152
|
+
const e = new CustomEvent("WebChatReady", { bubbles: !0 });
|
|
17134
17153
|
document.dispatchEvent(e);
|
|
17135
17154
|
}, 0), setTimeout(() => {
|
|
17136
|
-
const e = new CustomEvent("EmbedChatReady");
|
|
17155
|
+
const e = new CustomEvent("EmbedChatReady", { bubbles: !0 });
|
|
17137
17156
|
document.dispatchEvent(e);
|
|
17138
17157
|
}, 0));
|
|
17139
17158
|
const xm = () => {
|
|
17140
|
-
const e = new CustomEvent("WebChatReady");
|
|
17159
|
+
const e = new CustomEvent("WebChatReady", { bubbles: !0 });
|
|
17141
17160
|
document.dispatchEvent(e);
|
|
17142
17161
|
}, Ed = () => {
|
|
17143
|
-
const e = new CustomEvent("EmbedChatReady");
|
|
17162
|
+
const e = new CustomEvent("EmbedChatReady", { bubbles: !0 });
|
|
17144
17163
|
document.dispatchEvent(e);
|
|
17145
17164
|
}, Nu = () => {
|
|
17146
17165
|
xm(), Ed();
|
|
17147
17166
|
}, fl = () => {
|
|
17148
|
-
|
|
17167
|
+
requestAnimationFrame(() => {
|
|
17168
|
+
setTimeout(() => {
|
|
17169
|
+
Ed();
|
|
17170
|
+
}, 50);
|
|
17171
|
+
});
|
|
17149
17172
|
};
|
|
17150
17173
|
document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", Nu) : setTimeout(Nu, 0);
|
|
17151
17174
|
(function(e) {
|
|
17152
17175
|
const t = e.pushState, n = e.replaceState;
|
|
17153
17176
|
e.pushState = function(...r) {
|
|
17154
17177
|
const o = t.apply(e, r);
|
|
17155
|
-
return window.dispatchEvent(new Event("routechange")),
|
|
17178
|
+
return window.dispatchEvent(new Event("routechange")), o;
|
|
17156
17179
|
}, e.replaceState = function(...r) {
|
|
17157
17180
|
const o = n.apply(e, r);
|
|
17158
|
-
return window.dispatchEvent(new Event("routechange")),
|
|
17181
|
+
return window.dispatchEvent(new Event("routechange")), o;
|
|
17159
17182
|
};
|
|
17160
17183
|
})(window.history);
|
|
17161
17184
|
window.addEventListener("popstate", fl);
|