@calcom/embed-react
Advanced tools
| export {}; | ||
| //# sourceMappingURL=element-click.d.ts.map |
| {"version":3,"file":"element-click.d.ts","sourceRoot":"","sources":["../../element-click.tsx"],"names":[],"mappings":""} |
| export {}; | ||
| //# sourceMappingURL=floating.d.ts.map |
| {"version":3,"file":"floating.d.ts","sourceRoot":"","sources":["../../floating.tsx"],"names":[],"mappings":""} |
| export {}; | ||
| //# sourceMappingURL=inline.d.ts.map |
| {"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../inline.tsx"],"names":[],"mappings":""} |
+9
-0
| # @calcom/embed-react | ||
| ## 1.5.2 | ||
| ### Patch Changes | ||
| - Bundle size reduction for embed-react | ||
| - Updated dependencies | ||
| - @calcom/embed-core@1.5.2 | ||
| - @calcom/embed-snippet@1.3.2 | ||
| ## 1.5.1 | ||
@@ -4,0 +13,0 @@ |
+67
-693
@@ -1,18 +0,19 @@ | ||
| import Oe, { useState as lr, useEffect as Se, useRef as Ce } from "react"; | ||
| const fr = "https://app.cal.com/embed/embed.js"; | ||
| function X(C = fr) { | ||
| (function(g, m, y) { | ||
| let p = function(u, d) { | ||
| u.q.push(d); | ||
| }, R = g.document; | ||
| g.Cal = g.Cal || function() { | ||
| let u = g.Cal, d = arguments; | ||
| if (u.loaded || (u.ns = {}, u.q = u.q || [], R.head.appendChild(R.createElement("script")).src = m, u.loaded = !0), d[0] === y) { | ||
| const l = function() { | ||
| p(l, arguments); | ||
| }, b = d[1]; | ||
| l.q = l.q || [], typeof b == "string" ? (u.ns[b] = u.ns[b] || l, p(u.ns[b], d), p(u, ["initNamespace", b])) : p(u, d); | ||
| import { useState as C, useEffect as g, useRef as p } from "react"; | ||
| import { jsx as w } from "react/jsx-runtime"; | ||
| const b = "https://app.cal.com/embed/embed.js"; | ||
| function m(s = b) { | ||
| (function(r, e, l) { | ||
| let t = function(n, i) { | ||
| n.q.push(i); | ||
| }, o = r.document; | ||
| r.Cal = r.Cal || function() { | ||
| let n = r.Cal, i = arguments; | ||
| if (n.loaded || (n.ns = {}, n.q = n.q || [], o.head.appendChild(o.createElement("script")).src = e, n.loaded = !0), i[0] === l) { | ||
| const u = function() { | ||
| t(u, arguments); | ||
| }, c = i[1]; | ||
| u.q = u.q || [], typeof c == "string" ? (n.ns[c] = n.ns[c] || u, t(n.ns[c], i), t(n, ["initNamespace", c])) : t(n, i); | ||
| return; | ||
| } | ||
| p(u, d); | ||
| t(n, i); | ||
| }; | ||
@@ -22,3 +23,3 @@ })( | ||
| //! Replace it with "https://cal.com/embed.js" or the URL where you have embed.js installed | ||
| C, | ||
| s, | ||
| "init" | ||
@@ -29,692 +30,65 @@ ); | ||
| } | ||
| X.toString(); | ||
| function cr(C) { | ||
| const [g, m] = lr(); | ||
| return Se(() => { | ||
| m(() => X(C)); | ||
| }, []), g; | ||
| m.toString(); | ||
| function q(s) { | ||
| const [r, e] = C(); | ||
| return g(() => { | ||
| e(() => m(s)); | ||
| }, []), r; | ||
| } | ||
| var H = { exports: {} }, A = {}; | ||
| /** | ||
| * @license React | ||
| * react-jsx-runtime.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| var Te; | ||
| function dr() { | ||
| if (Te) | ||
| return A; | ||
| Te = 1; | ||
| var C = Oe, g = Symbol.for("react.element"), m = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, p = C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
| function u(d, l, b) { | ||
| var f, _ = {}, w = null, $ = null; | ||
| b !== void 0 && (w = "" + b), l.key !== void 0 && (w = "" + l.key), l.ref !== void 0 && ($ = l.ref); | ||
| for (f in l) | ||
| y.call(l, f) && !R.hasOwnProperty(f) && (_[f] = l[f]); | ||
| if (d && d.defaultProps) | ||
| for (f in l = d.defaultProps, l) | ||
| _[f] === void 0 && (_[f] = l[f]); | ||
| return { $$typeof: g, type: d, key: w, ref: $, props: _, _owner: p.current }; | ||
| } | ||
| return A.Fragment = m, A.jsx = u, A.jsxs = u, A; | ||
| } | ||
| var I = {}; | ||
| /** | ||
| * @license React | ||
| * react-jsx-runtime.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| var we; | ||
| function vr() { | ||
| return we || (we = 1, process.env.NODE_ENV !== "production" && function() { | ||
| var C = Oe, g = Symbol.for("react.element"), m = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), Z = Symbol.iterator, Pe = "@@iterator"; | ||
| function xe(e) { | ||
| if (e === null || typeof e != "object") | ||
| return null; | ||
| var r = Z && e[Z] || e[Pe]; | ||
| return typeof r == "function" ? r : null; | ||
| } | ||
| var x = C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
| function h(e) { | ||
| { | ||
| for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) | ||
| t[n - 1] = arguments[n]; | ||
| je("error", e, t); | ||
| } | ||
| } | ||
| function je(e, r, t) { | ||
| { | ||
| var n = x.ReactDebugCurrentFrame, o = n.getStackAddendum(); | ||
| o !== "" && (r += "%s", t = t.concat([o])); | ||
| var s = t.map(function(i) { | ||
| return String(i); | ||
| }); | ||
| s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s); | ||
| } | ||
| } | ||
| var ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Q; | ||
| Q = Symbol.for("react.module.reference"); | ||
| function $e(e) { | ||
| return !!(typeof e == "string" || typeof e == "function" || e === y || e === R || Ie || e === p || e === b || e === f || Ae || e === $ || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === _ || e.$$typeof === u || e.$$typeof === d || e.$$typeof === l || // This needs to include all possible module reference object | ||
| // types supported by any Flight configuration anywhere since | ||
| // we don't know which Flight build this will end up being used | ||
| // with. | ||
| e.$$typeof === Q || e.getModuleId !== void 0)); | ||
| } | ||
| function We(e, r, t) { | ||
| var n = e.displayName; | ||
| if (n) | ||
| return n; | ||
| var o = r.displayName || r.name || ""; | ||
| return o !== "" ? t + "(" + o + ")" : t; | ||
| } | ||
| function ee(e) { | ||
| return e.displayName || "Context"; | ||
| } | ||
| function O(e) { | ||
| if (e == null) | ||
| return null; | ||
| if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
| return e.displayName || e.name || null; | ||
| if (typeof e == "string") | ||
| return e; | ||
| switch (e) { | ||
| case y: | ||
| return "Fragment"; | ||
| case m: | ||
| return "Portal"; | ||
| case R: | ||
| return "Profiler"; | ||
| case p: | ||
| return "StrictMode"; | ||
| case b: | ||
| return "Suspense"; | ||
| case f: | ||
| return "SuspenseList"; | ||
| } | ||
| if (typeof e == "object") | ||
| switch (e.$$typeof) { | ||
| case d: | ||
| var r = e; | ||
| return ee(r) + ".Consumer"; | ||
| case u: | ||
| var t = e; | ||
| return ee(t._context) + ".Provider"; | ||
| case l: | ||
| return We(e, e.render, "ForwardRef"); | ||
| case _: | ||
| var n = e.displayName || null; | ||
| return n !== null ? n : O(e.type) || "Memo"; | ||
| case w: { | ||
| var o = e, s = o._payload, i = o._init; | ||
| try { | ||
| return O(i(s)); | ||
| } catch { | ||
| return null; | ||
| } | ||
| } | ||
| } | ||
| return null; | ||
| } | ||
| var P = Object.assign, D = 0, re, te, ne, ae, ie, oe, ue; | ||
| function se() { | ||
| } | ||
| se.__reactDisabledLog = !0; | ||
| function Ye() { | ||
| { | ||
| if (D === 0) { | ||
| re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd; | ||
| var e = { | ||
| configurable: !0, | ||
| enumerable: !0, | ||
| value: se, | ||
| writable: !0 | ||
| }; | ||
| Object.defineProperties(console, { | ||
| info: e, | ||
| log: e, | ||
| warn: e, | ||
| error: e, | ||
| group: e, | ||
| groupCollapsed: e, | ||
| groupEnd: e | ||
| }); | ||
| } | ||
| D++; | ||
| } | ||
| } | ||
| function Le() { | ||
| { | ||
| if (D--, D === 0) { | ||
| var e = { | ||
| configurable: !0, | ||
| enumerable: !0, | ||
| writable: !0 | ||
| }; | ||
| Object.defineProperties(console, { | ||
| log: P({}, e, { | ||
| value: re | ||
| }), | ||
| info: P({}, e, { | ||
| value: te | ||
| }), | ||
| warn: P({}, e, { | ||
| value: ne | ||
| }), | ||
| error: P({}, e, { | ||
| value: ae | ||
| }), | ||
| group: P({}, e, { | ||
| value: ie | ||
| }), | ||
| groupCollapsed: P({}, e, { | ||
| value: oe | ||
| }), | ||
| groupEnd: P({}, e, { | ||
| value: ue | ||
| }) | ||
| }); | ||
| } | ||
| D < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
| } | ||
| } | ||
| var V = x.ReactCurrentDispatcher, M; | ||
| function W(e, r, t) { | ||
| { | ||
| if (M === void 0) | ||
| try { | ||
| throw Error(); | ||
| } catch (o) { | ||
| var n = o.stack.trim().match(/\n( *(at )?)/); | ||
| M = n && n[1] || ""; | ||
| } | ||
| return ` | ||
| ` + M + e; | ||
| } | ||
| } | ||
| var q = !1, Y; | ||
| { | ||
| var Ne = typeof WeakMap == "function" ? WeakMap : Map; | ||
| Y = new Ne(); | ||
| } | ||
| function le(e, r) { | ||
| if (!e || q) | ||
| return ""; | ||
| { | ||
| var t = Y.get(e); | ||
| if (t !== void 0) | ||
| return t; | ||
| } | ||
| var n; | ||
| q = !0; | ||
| var o = Error.prepareStackTrace; | ||
| Error.prepareStackTrace = void 0; | ||
| var s; | ||
| s = V.current, V.current = null, Ye(); | ||
| try { | ||
| if (r) { | ||
| var i = function() { | ||
| throw Error(); | ||
| }; | ||
| if (Object.defineProperty(i.prototype, "props", { | ||
| set: function() { | ||
| throw Error(); | ||
| } | ||
| }), typeof Reflect == "object" && Reflect.construct) { | ||
| try { | ||
| Reflect.construct(i, []); | ||
| } catch (S) { | ||
| n = S; | ||
| } | ||
| Reflect.construct(e, [], i); | ||
| } else { | ||
| try { | ||
| i.call(); | ||
| } catch (S) { | ||
| n = S; | ||
| } | ||
| e.call(i.prototype); | ||
| } | ||
| } else { | ||
| try { | ||
| throw Error(); | ||
| } catch (S) { | ||
| n = S; | ||
| } | ||
| e(); | ||
| } | ||
| } catch (S) { | ||
| if (S && n && typeof S.stack == "string") { | ||
| for (var a = S.stack.split(` | ||
| `), E = n.stack.split(` | ||
| `), c = a.length - 1, v = E.length - 1; c >= 1 && v >= 0 && a[c] !== E[v]; ) | ||
| v--; | ||
| for (; c >= 1 && v >= 0; c--, v--) | ||
| if (a[c] !== E[v]) { | ||
| if (c !== 1 || v !== 1) | ||
| do | ||
| if (c--, v--, v < 0 || a[c] !== E[v]) { | ||
| var T = ` | ||
| ` + a[c].replace(" at new ", " at "); | ||
| return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, T), T; | ||
| } | ||
| while (c >= 1 && v >= 0); | ||
| break; | ||
| } | ||
| } | ||
| } finally { | ||
| q = !1, V.current = s, Le(), Error.prepareStackTrace = o; | ||
| } | ||
| var k = e ? e.displayName || e.name : "", _e = k ? W(k) : ""; | ||
| return typeof e == "function" && Y.set(e, _e), _e; | ||
| } | ||
| function Ue(e, r, t) { | ||
| return le(e, !1); | ||
| } | ||
| function Ve(e) { | ||
| var r = e.prototype; | ||
| return !!(r && r.isReactComponent); | ||
| } | ||
| function L(e, r, t) { | ||
| if (e == null) | ||
| return ""; | ||
| if (typeof e == "function") | ||
| return le(e, Ve(e)); | ||
| if (typeof e == "string") | ||
| return W(e); | ||
| switch (e) { | ||
| case b: | ||
| return W("Suspense"); | ||
| case f: | ||
| return W("SuspenseList"); | ||
| } | ||
| if (typeof e == "object") | ||
| switch (e.$$typeof) { | ||
| case l: | ||
| return Ue(e.render); | ||
| case _: | ||
| return L(e.type, r, t); | ||
| case w: { | ||
| var n = e, o = n._payload, s = n._init; | ||
| try { | ||
| return L(s(o), r, t); | ||
| } catch { | ||
| } | ||
| } | ||
| } | ||
| return ""; | ||
| } | ||
| var N = Object.prototype.hasOwnProperty, fe = {}, ce = x.ReactDebugCurrentFrame; | ||
| function U(e) { | ||
| if (e) { | ||
| var r = e._owner, t = L(e.type, e._source, r ? r.type : null); | ||
| ce.setExtraStackFrame(t); | ||
| } else | ||
| ce.setExtraStackFrame(null); | ||
| } | ||
| function Me(e, r, t, n, o) { | ||
| { | ||
| var s = Function.call.bind(N); | ||
| for (var i in e) | ||
| if (s(e, i)) { | ||
| var a = void 0; | ||
| try { | ||
| if (typeof e[i] != "function") { | ||
| var E = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
| throw E.name = "Invariant Violation", E; | ||
| } | ||
| a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
| } catch (c) { | ||
| a = c; | ||
| } | ||
| a && !(a instanceof Error) && (U(o), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), U(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, U(o), h("Failed %s type: %s", t, a.message), U(null)); | ||
| } | ||
| } | ||
| } | ||
| var qe = Array.isArray; | ||
| function B(e) { | ||
| return qe(e); | ||
| } | ||
| function Be(e) { | ||
| { | ||
| var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
| return t; | ||
| } | ||
| } | ||
| function Je(e) { | ||
| try { | ||
| return de(e), !1; | ||
| } catch { | ||
| return !0; | ||
| } | ||
| } | ||
| function de(e) { | ||
| return "" + e; | ||
| } | ||
| function ve(e) { | ||
| if (Je(e)) | ||
| return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), de(e); | ||
| } | ||
| var F = x.ReactCurrentOwner, Ge = { | ||
| key: !0, | ||
| ref: !0, | ||
| __self: !0, | ||
| __source: !0 | ||
| }, pe, ge, J; | ||
| J = {}; | ||
| function ze(e) { | ||
| if (N.call(e, "ref")) { | ||
| var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
| if (r && r.isReactWarning) | ||
| return !1; | ||
| } | ||
| return e.ref !== void 0; | ||
| } | ||
| function Ke(e) { | ||
| if (N.call(e, "key")) { | ||
| var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
| if (r && r.isReactWarning) | ||
| return !1; | ||
| } | ||
| return e.key !== void 0; | ||
| } | ||
| function He(e, r) { | ||
| if (typeof e.ref == "string" && F.current && r && F.current.stateNode !== r) { | ||
| var t = O(F.current.type); | ||
| J[t] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(F.current.type), e.ref), J[t] = !0); | ||
| } | ||
| } | ||
| function Xe(e, r) { | ||
| { | ||
| var t = function() { | ||
| pe || (pe = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
| }; | ||
| t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
| get: t, | ||
| configurable: !0 | ||
| }); | ||
| } | ||
| } | ||
| function Ze(e, r) { | ||
| { | ||
| var t = function() { | ||
| ge || (ge = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
| }; | ||
| t.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
| get: t, | ||
| configurable: !0 | ||
| }); | ||
| } | ||
| } | ||
| var Qe = function(e, r, t, n, o, s, i) { | ||
| var a = { | ||
| // This tag allows us to uniquely identify this as a React Element | ||
| $$typeof: g, | ||
| // Built-in properties that belong on the element | ||
| type: e, | ||
| key: r, | ||
| ref: t, | ||
| props: i, | ||
| // Record the component responsible for creating this element. | ||
| _owner: s | ||
| }; | ||
| return a._store = {}, Object.defineProperty(a._store, "validated", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !0, | ||
| value: !1 | ||
| }), Object.defineProperty(a, "_self", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !1, | ||
| value: n | ||
| }), Object.defineProperty(a, "_source", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !1, | ||
| value: o | ||
| }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a; | ||
| }; | ||
| function er(e, r, t, n, o) { | ||
| { | ||
| var s, i = {}, a = null, E = null; | ||
| t !== void 0 && (ve(t), a = "" + t), Ke(r) && (ve(r.key), a = "" + r.key), ze(r) && (E = r.ref, He(r, o)); | ||
| for (s in r) | ||
| N.call(r, s) && !Ge.hasOwnProperty(s) && (i[s] = r[s]); | ||
| if (e && e.defaultProps) { | ||
| var c = e.defaultProps; | ||
| for (s in c) | ||
| i[s] === void 0 && (i[s] = c[s]); | ||
| } | ||
| if (a || E) { | ||
| var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
| a && Xe(i, v), E && Ze(i, v); | ||
| } | ||
| return Qe(e, a, E, o, n, F.current, i); | ||
| } | ||
| } | ||
| var G = x.ReactCurrentOwner, me = x.ReactDebugCurrentFrame; | ||
| function j(e) { | ||
| if (e) { | ||
| var r = e._owner, t = L(e.type, e._source, r ? r.type : null); | ||
| me.setExtraStackFrame(t); | ||
| } else | ||
| me.setExtraStackFrame(null); | ||
| } | ||
| var z; | ||
| z = !1; | ||
| function K(e) { | ||
| return typeof e == "object" && e !== null && e.$$typeof === g; | ||
| } | ||
| function be() { | ||
| { | ||
| if (G.current) { | ||
| var e = O(G.current.type); | ||
| if (e) | ||
| return ` | ||
| Check the render method of \`` + e + "`."; | ||
| } | ||
| return ""; | ||
| } | ||
| } | ||
| function rr(e) { | ||
| { | ||
| if (e !== void 0) { | ||
| var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber; | ||
| return ` | ||
| Check your code at ` + r + ":" + t + "."; | ||
| } | ||
| return ""; | ||
| } | ||
| } | ||
| var he = {}; | ||
| function tr(e) { | ||
| { | ||
| var r = be(); | ||
| if (!r) { | ||
| var t = typeof e == "string" ? e : e.displayName || e.name; | ||
| t && (r = ` | ||
| Check the top-level render call using <` + t + ">."); | ||
| } | ||
| return r; | ||
| } | ||
| } | ||
| function Ee(e, r) { | ||
| { | ||
| if (!e._store || e._store.validated || e.key != null) | ||
| return; | ||
| e._store.validated = !0; | ||
| var t = tr(r); | ||
| if (he[t]) | ||
| return; | ||
| he[t] = !0; | ||
| var n = ""; | ||
| e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + O(e._owner.type) + "."), j(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), j(null); | ||
| } | ||
| } | ||
| function ye(e, r) { | ||
| { | ||
| if (typeof e != "object") | ||
| return; | ||
| if (B(e)) | ||
| for (var t = 0; t < e.length; t++) { | ||
| var n = e[t]; | ||
| K(n) && Ee(n, r); | ||
| } | ||
| else if (K(e)) | ||
| e._store && (e._store.validated = !0); | ||
| else if (e) { | ||
| var o = xe(e); | ||
| if (typeof o == "function" && o !== e.entries) | ||
| for (var s = o.call(e), i; !(i = s.next()).done; ) | ||
| K(i.value) && Ee(i.value, r); | ||
| } | ||
| } | ||
| } | ||
| function nr(e) { | ||
| { | ||
| var r = e.type; | ||
| if (r == null || typeof r == "string") | ||
| return; | ||
| var t; | ||
| if (typeof r == "function") | ||
| t = r.propTypes; | ||
| else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here. | ||
| // Inner props are checked in the reconciler. | ||
| r.$$typeof === _)) | ||
| t = r.propTypes; | ||
| else | ||
| return; | ||
| if (t) { | ||
| var n = O(r); | ||
| Me(t, e.props, "prop", n, e); | ||
| } else if (r.PropTypes !== void 0 && !z) { | ||
| z = !0; | ||
| var o = O(r); | ||
| h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown"); | ||
| } | ||
| typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
| } | ||
| } | ||
| function ar(e) { | ||
| { | ||
| for (var r = Object.keys(e.props), t = 0; t < r.length; t++) { | ||
| var n = r[t]; | ||
| if (n !== "children" && n !== "key") { | ||
| j(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), j(null); | ||
| break; | ||
| } | ||
| } | ||
| e.ref !== null && (j(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), j(null)); | ||
| } | ||
| } | ||
| function Re(e, r, t, n, o, s) { | ||
| { | ||
| var i = $e(e); | ||
| if (!i) { | ||
| var a = ""; | ||
| (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
| var E = rr(o); | ||
| E ? a += E : a += be(); | ||
| var c; | ||
| e === null ? c = "null" : B(e) ? c = "array" : e !== void 0 && e.$$typeof === g ? (c = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a); | ||
| } | ||
| var v = er(e, r, t, o, s); | ||
| if (v == null) | ||
| return v; | ||
| if (i) { | ||
| var T = r.children; | ||
| if (T !== void 0) | ||
| if (n) | ||
| if (B(T)) { | ||
| for (var k = 0; k < T.length; k++) | ||
| ye(T[k], e); | ||
| Object.freeze && Object.freeze(T); | ||
| } else | ||
| h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
| else | ||
| ye(T, e); | ||
| } | ||
| return e === y ? ar(v) : nr(v), v; | ||
| } | ||
| } | ||
| function ir(e, r, t) { | ||
| return Re(e, r, t, !0); | ||
| } | ||
| function or(e, r, t) { | ||
| return Re(e, r, t, !1); | ||
| } | ||
| var ur = or, sr = ir; | ||
| I.Fragment = y, I.jsx = ur, I.jsxs = sr; | ||
| }()), I; | ||
| } | ||
| process.env.NODE_ENV === "production" ? H.exports = dr() : H.exports = vr(); | ||
| var pr = H.exports; | ||
| const gr = pr.jsx, mr = function(g) { | ||
| const h = function(r) { | ||
| const { | ||
| calLink: m, | ||
| calOrigin: y, | ||
| namespace: p = "", | ||
| config: R, | ||
| initConfig: u = {}, | ||
| embedJsUrl: d, | ||
| ...l | ||
| } = g; | ||
| if (!m) | ||
| calLink: e, | ||
| calOrigin: l, | ||
| namespace: t = "", | ||
| config: o, | ||
| initConfig: n = {}, | ||
| embedJsUrl: i, | ||
| ...u | ||
| } = r; | ||
| if (!e) | ||
| throw new Error("calLink is required"); | ||
| const b = Ce(!1), f = cr(d), _ = Ce(null); | ||
| return Se(() => { | ||
| if (!f || b.current || !_.current) | ||
| const c = p(!1), a = q(i), f = p(null); | ||
| return g(() => { | ||
| if (!a || c.current || !f.current) | ||
| return; | ||
| b.current = !0; | ||
| const w = _.current; | ||
| p ? (f("init", p, { | ||
| ...u, | ||
| origin: y | ||
| }), f.ns[p]("inline", { | ||
| elementOrSelector: w, | ||
| calLink: m, | ||
| config: R | ||
| })) : (f("init", { | ||
| ...u, | ||
| origin: y | ||
| }), f("inline", { | ||
| elementOrSelector: w, | ||
| calLink: m, | ||
| config: R | ||
| c.current = !0; | ||
| const d = f.current; | ||
| t ? (a("init", t, { | ||
| ...n, | ||
| origin: l | ||
| }), a.ns[t]("inline", { | ||
| elementOrSelector: d, | ||
| calLink: e, | ||
| config: o | ||
| })) : (a("init", { | ||
| ...n, | ||
| origin: l | ||
| }), a("inline", { | ||
| elementOrSelector: d, | ||
| calLink: e, | ||
| config: o | ||
| })); | ||
| }, [f, m, R, p, y, u]), f ? /* @__PURE__ */ gr("div", { | ||
| ref: _, | ||
| ...l | ||
| }, [a, e, o, t, l, n]), a ? /* @__PURE__ */ w("div", { | ||
| ref: f, | ||
| ...u | ||
| }) : null; | ||
| }, hr = mr; | ||
| function Er(C) { | ||
| const g = typeof C == "string" ? { embedJsUrl: C } : C ?? {}, { namespace: m = "", embedJsUrl: y } = g; | ||
| return new Promise(function p(R) { | ||
| const u = X(y); | ||
| u("init", m); | ||
| const d = m ? u.ns[m] : u; | ||
| if (!d) { | ||
| }, R = h; | ||
| function j(s) { | ||
| const r = typeof s == "string" ? { embedJsUrl: s } : s ?? {}, { namespace: e = "", embedJsUrl: l } = r; | ||
| return new Promise(function t(o) { | ||
| const n = m(l); | ||
| n("init", e); | ||
| const i = e ? n.ns[e] : n; | ||
| if (!i) { | ||
| setTimeout(() => { | ||
| p(R); | ||
| t(o); | ||
| }, 50); | ||
| return; | ||
| } | ||
| R(d); | ||
| o(i); | ||
| }); | ||
| } | ||
| export { | ||
| hr as default, | ||
| Er as getCalApi | ||
| R as default, | ||
| j as getCalApi | ||
| }; |
+67
-693
@@ -1,18 +0,19 @@ | ||
| import Oe, { useState as lr, useEffect as Se, useRef as Ce } from "react"; | ||
| const fr = "https://app.cal.com/embed/embed.js"; | ||
| function X(C = fr) { | ||
| (function(g, m, y) { | ||
| let p = function(u, d) { | ||
| u.q.push(d); | ||
| }, R = g.document; | ||
| g.Cal = g.Cal || function() { | ||
| let u = g.Cal, d = arguments; | ||
| if (u.loaded || (u.ns = {}, u.q = u.q || [], R.head.appendChild(R.createElement("script")).src = m, u.loaded = !0), d[0] === y) { | ||
| const l = function() { | ||
| p(l, arguments); | ||
| }, b = d[1]; | ||
| l.q = l.q || [], typeof b == "string" ? (u.ns[b] = u.ns[b] || l, p(u.ns[b], d), p(u, ["initNamespace", b])) : p(u, d); | ||
| import { useState as C, useEffect as g, useRef as p } from "react"; | ||
| import { jsx as w } from "react/jsx-runtime"; | ||
| const b = "https://app.cal.com/embed/embed.js"; | ||
| function m(s = b) { | ||
| (function(r, e, l) { | ||
| let t = function(n, i) { | ||
| n.q.push(i); | ||
| }, o = r.document; | ||
| r.Cal = r.Cal || function() { | ||
| let n = r.Cal, i = arguments; | ||
| if (n.loaded || (n.ns = {}, n.q = n.q || [], o.head.appendChild(o.createElement("script")).src = e, n.loaded = !0), i[0] === l) { | ||
| const u = function() { | ||
| t(u, arguments); | ||
| }, c = i[1]; | ||
| u.q = u.q || [], typeof c == "string" ? (n.ns[c] = n.ns[c] || u, t(n.ns[c], i), t(n, ["initNamespace", c])) : t(n, i); | ||
| return; | ||
| } | ||
| p(u, d); | ||
| t(n, i); | ||
| }; | ||
@@ -22,3 +23,3 @@ })( | ||
| //! Replace it with "https://cal.com/embed.js" or the URL where you have embed.js installed | ||
| C, | ||
| s, | ||
| "init" | ||
@@ -29,692 +30,65 @@ ); | ||
| } | ||
| X.toString(); | ||
| function cr(C) { | ||
| const [g, m] = lr(); | ||
| return Se(() => { | ||
| m(() => X(C)); | ||
| }, []), g; | ||
| m.toString(); | ||
| function q(s) { | ||
| const [r, e] = C(); | ||
| return g(() => { | ||
| e(() => m(s)); | ||
| }, []), r; | ||
| } | ||
| var H = { exports: {} }, A = {}; | ||
| /** | ||
| * @license React | ||
| * react-jsx-runtime.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| var Te; | ||
| function dr() { | ||
| if (Te) | ||
| return A; | ||
| Te = 1; | ||
| var C = Oe, g = Symbol.for("react.element"), m = Symbol.for("react.fragment"), y = Object.prototype.hasOwnProperty, p = C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
| function u(d, l, b) { | ||
| var f, _ = {}, w = null, $ = null; | ||
| b !== void 0 && (w = "" + b), l.key !== void 0 && (w = "" + l.key), l.ref !== void 0 && ($ = l.ref); | ||
| for (f in l) | ||
| y.call(l, f) && !R.hasOwnProperty(f) && (_[f] = l[f]); | ||
| if (d && d.defaultProps) | ||
| for (f in l = d.defaultProps, l) | ||
| _[f] === void 0 && (_[f] = l[f]); | ||
| return { $$typeof: g, type: d, key: w, ref: $, props: _, _owner: p.current }; | ||
| } | ||
| return A.Fragment = m, A.jsx = u, A.jsxs = u, A; | ||
| } | ||
| var I = {}; | ||
| /** | ||
| * @license React | ||
| * react-jsx-runtime.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
| var we; | ||
| function vr() { | ||
| return we || (we = 1, process.env.NODE_ENV !== "production" && function() { | ||
| var C = Oe, g = Symbol.for("react.element"), m = Symbol.for("react.portal"), y = Symbol.for("react.fragment"), p = Symbol.for("react.strict_mode"), R = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), d = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), _ = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), Z = Symbol.iterator, Pe = "@@iterator"; | ||
| function xe(e) { | ||
| if (e === null || typeof e != "object") | ||
| return null; | ||
| var r = Z && e[Z] || e[Pe]; | ||
| return typeof r == "function" ? r : null; | ||
| } | ||
| var x = C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
| function h(e) { | ||
| { | ||
| for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++) | ||
| t[n - 1] = arguments[n]; | ||
| je("error", e, t); | ||
| } | ||
| } | ||
| function je(e, r, t) { | ||
| { | ||
| var n = x.ReactDebugCurrentFrame, o = n.getStackAddendum(); | ||
| o !== "" && (r += "%s", t = t.concat([o])); | ||
| var s = t.map(function(i) { | ||
| return String(i); | ||
| }); | ||
| s.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, s); | ||
| } | ||
| } | ||
| var ke = !1, De = !1, Fe = !1, Ae = !1, Ie = !1, Q; | ||
| Q = Symbol.for("react.module.reference"); | ||
| function $e(e) { | ||
| return !!(typeof e == "string" || typeof e == "function" || e === y || e === R || Ie || e === p || e === b || e === f || Ae || e === $ || ke || De || Fe || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === _ || e.$$typeof === u || e.$$typeof === d || e.$$typeof === l || // This needs to include all possible module reference object | ||
| // types supported by any Flight configuration anywhere since | ||
| // we don't know which Flight build this will end up being used | ||
| // with. | ||
| e.$$typeof === Q || e.getModuleId !== void 0)); | ||
| } | ||
| function We(e, r, t) { | ||
| var n = e.displayName; | ||
| if (n) | ||
| return n; | ||
| var o = r.displayName || r.name || ""; | ||
| return o !== "" ? t + "(" + o + ")" : t; | ||
| } | ||
| function ee(e) { | ||
| return e.displayName || "Context"; | ||
| } | ||
| function O(e) { | ||
| if (e == null) | ||
| return null; | ||
| if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
| return e.displayName || e.name || null; | ||
| if (typeof e == "string") | ||
| return e; | ||
| switch (e) { | ||
| case y: | ||
| return "Fragment"; | ||
| case m: | ||
| return "Portal"; | ||
| case R: | ||
| return "Profiler"; | ||
| case p: | ||
| return "StrictMode"; | ||
| case b: | ||
| return "Suspense"; | ||
| case f: | ||
| return "SuspenseList"; | ||
| } | ||
| if (typeof e == "object") | ||
| switch (e.$$typeof) { | ||
| case d: | ||
| var r = e; | ||
| return ee(r) + ".Consumer"; | ||
| case u: | ||
| var t = e; | ||
| return ee(t._context) + ".Provider"; | ||
| case l: | ||
| return We(e, e.render, "ForwardRef"); | ||
| case _: | ||
| var n = e.displayName || null; | ||
| return n !== null ? n : O(e.type) || "Memo"; | ||
| case w: { | ||
| var o = e, s = o._payload, i = o._init; | ||
| try { | ||
| return O(i(s)); | ||
| } catch { | ||
| return null; | ||
| } | ||
| } | ||
| } | ||
| return null; | ||
| } | ||
| var P = Object.assign, D = 0, re, te, ne, ae, ie, oe, ue; | ||
| function se() { | ||
| } | ||
| se.__reactDisabledLog = !0; | ||
| function Ye() { | ||
| { | ||
| if (D === 0) { | ||
| re = console.log, te = console.info, ne = console.warn, ae = console.error, ie = console.group, oe = console.groupCollapsed, ue = console.groupEnd; | ||
| var e = { | ||
| configurable: !0, | ||
| enumerable: !0, | ||
| value: se, | ||
| writable: !0 | ||
| }; | ||
| Object.defineProperties(console, { | ||
| info: e, | ||
| log: e, | ||
| warn: e, | ||
| error: e, | ||
| group: e, | ||
| groupCollapsed: e, | ||
| groupEnd: e | ||
| }); | ||
| } | ||
| D++; | ||
| } | ||
| } | ||
| function Le() { | ||
| { | ||
| if (D--, D === 0) { | ||
| var e = { | ||
| configurable: !0, | ||
| enumerable: !0, | ||
| writable: !0 | ||
| }; | ||
| Object.defineProperties(console, { | ||
| log: P({}, e, { | ||
| value: re | ||
| }), | ||
| info: P({}, e, { | ||
| value: te | ||
| }), | ||
| warn: P({}, e, { | ||
| value: ne | ||
| }), | ||
| error: P({}, e, { | ||
| value: ae | ||
| }), | ||
| group: P({}, e, { | ||
| value: ie | ||
| }), | ||
| groupCollapsed: P({}, e, { | ||
| value: oe | ||
| }), | ||
| groupEnd: P({}, e, { | ||
| value: ue | ||
| }) | ||
| }); | ||
| } | ||
| D < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
| } | ||
| } | ||
| var V = x.ReactCurrentDispatcher, M; | ||
| function W(e, r, t) { | ||
| { | ||
| if (M === void 0) | ||
| try { | ||
| throw Error(); | ||
| } catch (o) { | ||
| var n = o.stack.trim().match(/\n( *(at )?)/); | ||
| M = n && n[1] || ""; | ||
| } | ||
| return ` | ||
| ` + M + e; | ||
| } | ||
| } | ||
| var q = !1, Y; | ||
| { | ||
| var Ne = typeof WeakMap == "function" ? WeakMap : Map; | ||
| Y = new Ne(); | ||
| } | ||
| function le(e, r) { | ||
| if (!e || q) | ||
| return ""; | ||
| { | ||
| var t = Y.get(e); | ||
| if (t !== void 0) | ||
| return t; | ||
| } | ||
| var n; | ||
| q = !0; | ||
| var o = Error.prepareStackTrace; | ||
| Error.prepareStackTrace = void 0; | ||
| var s; | ||
| s = V.current, V.current = null, Ye(); | ||
| try { | ||
| if (r) { | ||
| var i = function() { | ||
| throw Error(); | ||
| }; | ||
| if (Object.defineProperty(i.prototype, "props", { | ||
| set: function() { | ||
| throw Error(); | ||
| } | ||
| }), typeof Reflect == "object" && Reflect.construct) { | ||
| try { | ||
| Reflect.construct(i, []); | ||
| } catch (S) { | ||
| n = S; | ||
| } | ||
| Reflect.construct(e, [], i); | ||
| } else { | ||
| try { | ||
| i.call(); | ||
| } catch (S) { | ||
| n = S; | ||
| } | ||
| e.call(i.prototype); | ||
| } | ||
| } else { | ||
| try { | ||
| throw Error(); | ||
| } catch (S) { | ||
| n = S; | ||
| } | ||
| e(); | ||
| } | ||
| } catch (S) { | ||
| if (S && n && typeof S.stack == "string") { | ||
| for (var a = S.stack.split(` | ||
| `), E = n.stack.split(` | ||
| `), c = a.length - 1, v = E.length - 1; c >= 1 && v >= 0 && a[c] !== E[v]; ) | ||
| v--; | ||
| for (; c >= 1 && v >= 0; c--, v--) | ||
| if (a[c] !== E[v]) { | ||
| if (c !== 1 || v !== 1) | ||
| do | ||
| if (c--, v--, v < 0 || a[c] !== E[v]) { | ||
| var T = ` | ||
| ` + a[c].replace(" at new ", " at "); | ||
| return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, T), T; | ||
| } | ||
| while (c >= 1 && v >= 0); | ||
| break; | ||
| } | ||
| } | ||
| } finally { | ||
| q = !1, V.current = s, Le(), Error.prepareStackTrace = o; | ||
| } | ||
| var k = e ? e.displayName || e.name : "", _e = k ? W(k) : ""; | ||
| return typeof e == "function" && Y.set(e, _e), _e; | ||
| } | ||
| function Ue(e, r, t) { | ||
| return le(e, !1); | ||
| } | ||
| function Ve(e) { | ||
| var r = e.prototype; | ||
| return !!(r && r.isReactComponent); | ||
| } | ||
| function L(e, r, t) { | ||
| if (e == null) | ||
| return ""; | ||
| if (typeof e == "function") | ||
| return le(e, Ve(e)); | ||
| if (typeof e == "string") | ||
| return W(e); | ||
| switch (e) { | ||
| case b: | ||
| return W("Suspense"); | ||
| case f: | ||
| return W("SuspenseList"); | ||
| } | ||
| if (typeof e == "object") | ||
| switch (e.$$typeof) { | ||
| case l: | ||
| return Ue(e.render); | ||
| case _: | ||
| return L(e.type, r, t); | ||
| case w: { | ||
| var n = e, o = n._payload, s = n._init; | ||
| try { | ||
| return L(s(o), r, t); | ||
| } catch { | ||
| } | ||
| } | ||
| } | ||
| return ""; | ||
| } | ||
| var N = Object.prototype.hasOwnProperty, fe = {}, ce = x.ReactDebugCurrentFrame; | ||
| function U(e) { | ||
| if (e) { | ||
| var r = e._owner, t = L(e.type, e._source, r ? r.type : null); | ||
| ce.setExtraStackFrame(t); | ||
| } else | ||
| ce.setExtraStackFrame(null); | ||
| } | ||
| function Me(e, r, t, n, o) { | ||
| { | ||
| var s = Function.call.bind(N); | ||
| for (var i in e) | ||
| if (s(e, i)) { | ||
| var a = void 0; | ||
| try { | ||
| if (typeof e[i] != "function") { | ||
| var E = Error((n || "React class") + ": " + t + " type `" + i + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[i] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
| throw E.name = "Invariant Violation", E; | ||
| } | ||
| a = e[i](r, i, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
| } catch (c) { | ||
| a = c; | ||
| } | ||
| a && !(a instanceof Error) && (U(o), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", n || "React class", t, i, typeof a), U(null)), a instanceof Error && !(a.message in fe) && (fe[a.message] = !0, U(o), h("Failed %s type: %s", t, a.message), U(null)); | ||
| } | ||
| } | ||
| } | ||
| var qe = Array.isArray; | ||
| function B(e) { | ||
| return qe(e); | ||
| } | ||
| function Be(e) { | ||
| { | ||
| var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
| return t; | ||
| } | ||
| } | ||
| function Je(e) { | ||
| try { | ||
| return de(e), !1; | ||
| } catch { | ||
| return !0; | ||
| } | ||
| } | ||
| function de(e) { | ||
| return "" + e; | ||
| } | ||
| function ve(e) { | ||
| if (Je(e)) | ||
| return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Be(e)), de(e); | ||
| } | ||
| var F = x.ReactCurrentOwner, Ge = { | ||
| key: !0, | ||
| ref: !0, | ||
| __self: !0, | ||
| __source: !0 | ||
| }, pe, ge, J; | ||
| J = {}; | ||
| function ze(e) { | ||
| if (N.call(e, "ref")) { | ||
| var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
| if (r && r.isReactWarning) | ||
| return !1; | ||
| } | ||
| return e.ref !== void 0; | ||
| } | ||
| function Ke(e) { | ||
| if (N.call(e, "key")) { | ||
| var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
| if (r && r.isReactWarning) | ||
| return !1; | ||
| } | ||
| return e.key !== void 0; | ||
| } | ||
| function He(e, r) { | ||
| if (typeof e.ref == "string" && F.current && r && F.current.stateNode !== r) { | ||
| var t = O(F.current.type); | ||
| J[t] || (h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', O(F.current.type), e.ref), J[t] = !0); | ||
| } | ||
| } | ||
| function Xe(e, r) { | ||
| { | ||
| var t = function() { | ||
| pe || (pe = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
| }; | ||
| t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
| get: t, | ||
| configurable: !0 | ||
| }); | ||
| } | ||
| } | ||
| function Ze(e, r) { | ||
| { | ||
| var t = function() { | ||
| ge || (ge = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r)); | ||
| }; | ||
| t.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
| get: t, | ||
| configurable: !0 | ||
| }); | ||
| } | ||
| } | ||
| var Qe = function(e, r, t, n, o, s, i) { | ||
| var a = { | ||
| // This tag allows us to uniquely identify this as a React Element | ||
| $$typeof: g, | ||
| // Built-in properties that belong on the element | ||
| type: e, | ||
| key: r, | ||
| ref: t, | ||
| props: i, | ||
| // Record the component responsible for creating this element. | ||
| _owner: s | ||
| }; | ||
| return a._store = {}, Object.defineProperty(a._store, "validated", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !0, | ||
| value: !1 | ||
| }), Object.defineProperty(a, "_self", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !1, | ||
| value: n | ||
| }), Object.defineProperty(a, "_source", { | ||
| configurable: !1, | ||
| enumerable: !1, | ||
| writable: !1, | ||
| value: o | ||
| }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a; | ||
| }; | ||
| function er(e, r, t, n, o) { | ||
| { | ||
| var s, i = {}, a = null, E = null; | ||
| t !== void 0 && (ve(t), a = "" + t), Ke(r) && (ve(r.key), a = "" + r.key), ze(r) && (E = r.ref, He(r, o)); | ||
| for (s in r) | ||
| N.call(r, s) && !Ge.hasOwnProperty(s) && (i[s] = r[s]); | ||
| if (e && e.defaultProps) { | ||
| var c = e.defaultProps; | ||
| for (s in c) | ||
| i[s] === void 0 && (i[s] = c[s]); | ||
| } | ||
| if (a || E) { | ||
| var v = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
| a && Xe(i, v), E && Ze(i, v); | ||
| } | ||
| return Qe(e, a, E, o, n, F.current, i); | ||
| } | ||
| } | ||
| var G = x.ReactCurrentOwner, me = x.ReactDebugCurrentFrame; | ||
| function j(e) { | ||
| if (e) { | ||
| var r = e._owner, t = L(e.type, e._source, r ? r.type : null); | ||
| me.setExtraStackFrame(t); | ||
| } else | ||
| me.setExtraStackFrame(null); | ||
| } | ||
| var z; | ||
| z = !1; | ||
| function K(e) { | ||
| return typeof e == "object" && e !== null && e.$$typeof === g; | ||
| } | ||
| function be() { | ||
| { | ||
| if (G.current) { | ||
| var e = O(G.current.type); | ||
| if (e) | ||
| return ` | ||
| Check the render method of \`` + e + "`."; | ||
| } | ||
| return ""; | ||
| } | ||
| } | ||
| function rr(e) { | ||
| { | ||
| if (e !== void 0) { | ||
| var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber; | ||
| return ` | ||
| Check your code at ` + r + ":" + t + "."; | ||
| } | ||
| return ""; | ||
| } | ||
| } | ||
| var he = {}; | ||
| function tr(e) { | ||
| { | ||
| var r = be(); | ||
| if (!r) { | ||
| var t = typeof e == "string" ? e : e.displayName || e.name; | ||
| t && (r = ` | ||
| Check the top-level render call using <` + t + ">."); | ||
| } | ||
| return r; | ||
| } | ||
| } | ||
| function Ee(e, r) { | ||
| { | ||
| if (!e._store || e._store.validated || e.key != null) | ||
| return; | ||
| e._store.validated = !0; | ||
| var t = tr(r); | ||
| if (he[t]) | ||
| return; | ||
| he[t] = !0; | ||
| var n = ""; | ||
| e && e._owner && e._owner !== G.current && (n = " It was passed a child from " + O(e._owner.type) + "."), j(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), j(null); | ||
| } | ||
| } | ||
| function ye(e, r) { | ||
| { | ||
| if (typeof e != "object") | ||
| return; | ||
| if (B(e)) | ||
| for (var t = 0; t < e.length; t++) { | ||
| var n = e[t]; | ||
| K(n) && Ee(n, r); | ||
| } | ||
| else if (K(e)) | ||
| e._store && (e._store.validated = !0); | ||
| else if (e) { | ||
| var o = xe(e); | ||
| if (typeof o == "function" && o !== e.entries) | ||
| for (var s = o.call(e), i; !(i = s.next()).done; ) | ||
| K(i.value) && Ee(i.value, r); | ||
| } | ||
| } | ||
| } | ||
| function nr(e) { | ||
| { | ||
| var r = e.type; | ||
| if (r == null || typeof r == "string") | ||
| return; | ||
| var t; | ||
| if (typeof r == "function") | ||
| t = r.propTypes; | ||
| else if (typeof r == "object" && (r.$$typeof === l || // Note: Memo only checks outer props here. | ||
| // Inner props are checked in the reconciler. | ||
| r.$$typeof === _)) | ||
| t = r.propTypes; | ||
| else | ||
| return; | ||
| if (t) { | ||
| var n = O(r); | ||
| Me(t, e.props, "prop", n, e); | ||
| } else if (r.PropTypes !== void 0 && !z) { | ||
| z = !0; | ||
| var o = O(r); | ||
| h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", o || "Unknown"); | ||
| } | ||
| typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
| } | ||
| } | ||
| function ar(e) { | ||
| { | ||
| for (var r = Object.keys(e.props), t = 0; t < r.length; t++) { | ||
| var n = r[t]; | ||
| if (n !== "children" && n !== "key") { | ||
| j(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), j(null); | ||
| break; | ||
| } | ||
| } | ||
| e.ref !== null && (j(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), j(null)); | ||
| } | ||
| } | ||
| function Re(e, r, t, n, o, s) { | ||
| { | ||
| var i = $e(e); | ||
| if (!i) { | ||
| var a = ""; | ||
| (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (a += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."); | ||
| var E = rr(o); | ||
| E ? a += E : a += be(); | ||
| var c; | ||
| e === null ? c = "null" : B(e) ? c = "array" : e !== void 0 && e.$$typeof === g ? (c = "<" + (O(e.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : c = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", c, a); | ||
| } | ||
| var v = er(e, r, t, o, s); | ||
| if (v == null) | ||
| return v; | ||
| if (i) { | ||
| var T = r.children; | ||
| if (T !== void 0) | ||
| if (n) | ||
| if (B(T)) { | ||
| for (var k = 0; k < T.length; k++) | ||
| ye(T[k], e); | ||
| Object.freeze && Object.freeze(T); | ||
| } else | ||
| h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
| else | ||
| ye(T, e); | ||
| } | ||
| return e === y ? ar(v) : nr(v), v; | ||
| } | ||
| } | ||
| function ir(e, r, t) { | ||
| return Re(e, r, t, !0); | ||
| } | ||
| function or(e, r, t) { | ||
| return Re(e, r, t, !1); | ||
| } | ||
| var ur = or, sr = ir; | ||
| I.Fragment = y, I.jsx = ur, I.jsxs = sr; | ||
| }()), I; | ||
| } | ||
| process.env.NODE_ENV === "production" ? H.exports = dr() : H.exports = vr(); | ||
| var pr = H.exports; | ||
| const gr = pr.jsx, mr = function(g) { | ||
| const h = function(r) { | ||
| const { | ||
| calLink: m, | ||
| calOrigin: y, | ||
| namespace: p = "", | ||
| config: R, | ||
| initConfig: u = {}, | ||
| embedJsUrl: d, | ||
| ...l | ||
| } = g; | ||
| if (!m) | ||
| calLink: e, | ||
| calOrigin: l, | ||
| namespace: t = "", | ||
| config: o, | ||
| initConfig: n = {}, | ||
| embedJsUrl: i, | ||
| ...u | ||
| } = r; | ||
| if (!e) | ||
| throw new Error("calLink is required"); | ||
| const b = Ce(!1), f = cr(d), _ = Ce(null); | ||
| return Se(() => { | ||
| if (!f || b.current || !_.current) | ||
| const c = p(!1), a = q(i), f = p(null); | ||
| return g(() => { | ||
| if (!a || c.current || !f.current) | ||
| return; | ||
| b.current = !0; | ||
| const w = _.current; | ||
| p ? (f("init", p, { | ||
| ...u, | ||
| origin: y | ||
| }), f.ns[p]("inline", { | ||
| elementOrSelector: w, | ||
| calLink: m, | ||
| config: R | ||
| })) : (f("init", { | ||
| ...u, | ||
| origin: y | ||
| }), f("inline", { | ||
| elementOrSelector: w, | ||
| calLink: m, | ||
| config: R | ||
| c.current = !0; | ||
| const d = f.current; | ||
| t ? (a("init", t, { | ||
| ...n, | ||
| origin: l | ||
| }), a.ns[t]("inline", { | ||
| elementOrSelector: d, | ||
| calLink: e, | ||
| config: o | ||
| })) : (a("init", { | ||
| ...n, | ||
| origin: l | ||
| }), a("inline", { | ||
| elementOrSelector: d, | ||
| calLink: e, | ||
| config: o | ||
| })); | ||
| }, [f, m, R, p, y, u]), f ? /* @__PURE__ */ gr("div", { | ||
| ref: _, | ||
| ...l | ||
| }, [a, e, o, t, l, n]), a ? /* @__PURE__ */ w("div", { | ||
| ref: f, | ||
| ...u | ||
| }) : null; | ||
| }, hr = mr; | ||
| function Er(C) { | ||
| const g = typeof C == "string" ? { embedJsUrl: C } : C ?? {}, { namespace: m = "", embedJsUrl: y } = g; | ||
| return new Promise(function p(R) { | ||
| const u = X(y); | ||
| u("init", m); | ||
| const d = m ? u.ns[m] : u; | ||
| if (!d) { | ||
| }, R = h; | ||
| function j(s) { | ||
| const r = typeof s == "string" ? { embedJsUrl: s } : s ?? {}, { namespace: e = "", embedJsUrl: l } = r; | ||
| return new Promise(function t(o) { | ||
| const n = m(l); | ||
| n("init", e); | ||
| const i = e ? n.ns[e] : n; | ||
| if (!i) { | ||
| setTimeout(() => { | ||
| p(R); | ||
| t(o); | ||
| }, 50); | ||
| return; | ||
| } | ||
| R(d); | ||
| o(i); | ||
| }); | ||
| } | ||
| export { | ||
| hr as default, | ||
| Er as getCalApi | ||
| R as default, | ||
| j as getCalApi | ||
| }; |
+1
-27
@@ -1,27 +0,1 @@ | ||
| (function(j,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],w):(j=typeof globalThis<"u"?globalThis:j||self,w(j.Cal={},j.React))})(this,function(j,w){"use strict";const Se="https://app.cal.com/embed/embed.js";function B(C=Se){(function(g,m,y){let p=function(u,d){u.q.push(d)},R=g.document;g.Cal=g.Cal||function(){let u=g.Cal,d=arguments;if(u.loaded||(u.ns={},u.q=u.q||[],R.head.appendChild(R.createElement("script")).src=m,u.loaded=!0),d[0]===y){const l=function(){p(l,arguments)},b=d[1];l.q=l.q||[],typeof b=="string"?(u.ns[b]=u.ns[b]||l,p(u.ns[b],d),p(u,["initNamespace",b])):p(u,d);return}p(u,d)}})(window,C,"init");/*! Copying ends here. */return window.Cal}B.toString();function Pe(C){const[g,m]=w.useState();return w.useEffect(()=>{m(()=>B(C))},[]),g}var q={exports:{}},A={};/** | ||
| * @license React | ||
| * react-jsx-runtime.production.min.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */var ee;function je(){if(ee)return A;ee=1;var C=w,g=Symbol.for("react.element"),m=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,p=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,R={key:!0,ref:!0,__self:!0,__source:!0};function u(d,l,b){var f,_={},O=null,L=null;b!==void 0&&(O=""+b),l.key!==void 0&&(O=""+l.key),l.ref!==void 0&&(L=l.ref);for(f in l)y.call(l,f)&&!R.hasOwnProperty(f)&&(_[f]=l[f]);if(d&&d.defaultProps)for(f in l=d.defaultProps,l)_[f]===void 0&&(_[f]=l[f]);return{$$typeof:g,type:d,key:O,ref:L,props:_,_owner:p.current}}return A.Fragment=m,A.jsx=u,A.jsxs=u,A}var I={};/** | ||
| * @license React | ||
| * react-jsx-runtime.development.js | ||
| * | ||
| * Copyright (c) Facebook, Inc. and its affiliates. | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */var re;function xe(){return re||(re=1,process.env.NODE_ENV!=="production"&&function(){var C=w,g=Symbol.for("react.element"),m=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),d=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),L=Symbol.for("react.offscreen"),te=Symbol.iterator,Ie="@@iterator";function We(e){if(e===null||typeof e!="object")return null;var r=te&&e[te]||e[Ie];return typeof r=="function"?r:null}var k=C.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Ye("error",e,t)}}function Ye(e,r,t){{var n=k.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var s=t.map(function(i){return String(i)});s.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,s)}}var Le=!1,Ne=!1,Me=!1,Ue=!1,Ve=!1,ne;ne=Symbol.for("react.module.reference");function $e(e){return!!(typeof e=="string"||typeof e=="function"||e===y||e===R||Ve||e===p||e===b||e===f||Ue||e===L||Le||Ne||Me||typeof e=="object"&&e!==null&&(e.$$typeof===O||e.$$typeof===_||e.$$typeof===u||e.$$typeof===d||e.$$typeof===l||e.$$typeof===ne||e.getModuleId!==void 0))}function Be(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function ae(e){return e.displayName||"Context"}function S(e){if(e==null)return null;if(typeof e.tag=="number"&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case y:return"Fragment";case m:return"Portal";case R:return"Profiler";case p:return"StrictMode";case b:return"Suspense";case f:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case d:var r=e;return ae(r)+".Consumer";case u:var t=e;return ae(t._context)+".Provider";case l:return Be(e,e.render,"ForwardRef");case _:var n=e.displayName||null;return n!==null?n:S(e.type)||"Memo";case O:{var o=e,s=o._payload,i=o._init;try{return S(i(s))}catch{return null}}}return null}var x=Object.assign,W=0,ie,oe,ue,se,le,fe,ce;function de(){}de.__reactDisabledLog=!0;function qe(){{if(W===0){ie=console.log,oe=console.info,ue=console.warn,se=console.error,le=console.group,fe=console.groupCollapsed,ce=console.groupEnd;var e={configurable:!0,enumerable:!0,value:de,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}W++}}function Je(){{if(W--,W===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x({},e,{value:ie}),info:x({},e,{value:oe}),warn:x({},e,{value:ue}),error:x({},e,{value:se}),group:x({},e,{value:le}),groupCollapsed:x({},e,{value:fe}),groupEnd:x({},e,{value:ce})})}W<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=k.ReactCurrentDispatcher,G;function N(e,r,t){{if(G===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);G=n&&n[1]||""}return` | ||
| `+G+e}}var z=!1,M;{var Ge=typeof WeakMap=="function"?WeakMap:Map;M=new Ge}function ve(e,r){if(!e||z)return"";{var t=M.get(e);if(t!==void 0)return t}var n;z=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var s;s=J.current,J.current=null,qe();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(P){n=P}Reflect.construct(e,[],i)}else{try{i.call()}catch(P){n=P}e.call(i.prototype)}}else{try{throw Error()}catch(P){n=P}e()}}catch(P){if(P&&n&&typeof P.stack=="string"){for(var a=P.stack.split(` | ||
| `),E=n.stack.split(` | ||
| `),c=a.length-1,v=E.length-1;c>=1&&v>=0&&a[c]!==E[v];)v--;for(;c>=1&&v>=0;c--,v--)if(a[c]!==E[v]){if(c!==1||v!==1)do if(c--,v--,v<0||a[c]!==E[v]){var T=` | ||
| `+a[c].replace(" at new "," at ");return e.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",e.displayName)),typeof e=="function"&&M.set(e,T),T}while(c>=1&&v>=0);break}}}finally{z=!1,J.current=s,Je(),Error.prepareStackTrace=o}var F=e?e.displayName||e.name:"",Oe=F?N(F):"";return typeof e=="function"&&M.set(e,Oe),Oe}function ze(e,r,t){return ve(e,!1)}function Ke(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function U(e,r,t){if(e==null)return"";if(typeof e=="function")return ve(e,Ke(e));if(typeof e=="string")return N(e);switch(e){case b:return N("Suspense");case f:return N("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case l:return ze(e.render);case _:return U(e.type,r,t);case O:{var n=e,o=n._payload,s=n._init;try{return U(s(o),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,pe={},ge=k.ReactDebugCurrentFrame;function $(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ge.setExtraStackFrame(t)}else ge.setExtraStackFrame(null)}function He(e,r,t,n,o){{var s=Function.call.bind(V);for(var i in e)if(s(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var E=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw E.name="Invariant Violation",E}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c){a=c}a&&!(a instanceof Error)&&($(o),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),$(null)),a instanceof Error&&!(a.message in pe)&&(pe[a.message]=!0,$(o),h("Failed %s type: %s",t,a.message),$(null))}}}var Xe=Array.isArray;function K(e){return Xe(e)}function Ze(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Qe(e){try{return me(e),!1}catch{return!0}}function me(e){return""+e}function be(e){if(Qe(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ze(e)),me(e)}var Y=k.ReactCurrentOwner,er={key:!0,ref:!0,__self:!0,__source:!0},he,Ee,H;H={};function rr(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function tr(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function nr(e,r){if(typeof e.ref=="string"&&Y.current&&r&&Y.current.stateNode!==r){var t=S(Y.current.type);H[t]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',S(Y.current.type),e.ref),H[t]=!0)}}function ar(e,r){{var t=function(){he||(he=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ir(e,r){{var t=function(){Ee||(Ee=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var or=function(e,r,t,n,o,s,i){var a={$$typeof:g,type:e,key:r,ref:t,props:i,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ur(e,r,t,n,o){{var s,i={},a=null,E=null;t!==void 0&&(be(t),a=""+t),tr(r)&&(be(r.key),a=""+r.key),rr(r)&&(E=r.ref,nr(r,o));for(s in r)V.call(r,s)&&!er.hasOwnProperty(s)&&(i[s]=r[s]);if(e&&e.defaultProps){var c=e.defaultProps;for(s in c)i[s]===void 0&&(i[s]=c[s])}if(a||E){var v=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&ar(i,v),E&&ir(i,v)}return or(e,a,E,o,n,Y.current,i)}}var X=k.ReactCurrentOwner,ye=k.ReactDebugCurrentFrame;function D(e){if(e){var r=e._owner,t=U(e.type,e._source,r?r.type:null);ye.setExtraStackFrame(t)}else ye.setExtraStackFrame(null)}var Z;Z=!1;function Q(e){return typeof e=="object"&&e!==null&&e.$$typeof===g}function Re(){{if(X.current){var e=S(X.current.type);if(e)return` | ||
| Check the render method of \``+e+"`."}return""}}function sr(e){{if(e!==void 0){var r=e.fileName.replace(/^.*[\\\/]/,""),t=e.lineNumber;return` | ||
| Check your code at `+r+":"+t+"."}return""}}var _e={};function lr(e){{var r=Re();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` | ||
| Check the top-level render call using <`+t+">.")}return r}}function Ce(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=lr(r);if(_e[t])return;_e[t]=!0;var n="";e&&e._owner&&e._owner!==X.current&&(n=" It was passed a child from "+S(e._owner.type)+"."),D(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),D(null)}}function Te(e,r){{if(typeof e!="object")return;if(K(e))for(var t=0;t<e.length;t++){var n=e[t];Q(n)&&Ce(n,r)}else if(Q(e))e._store&&(e._store.validated=!0);else if(e){var o=We(e);if(typeof o=="function"&&o!==e.entries)for(var s=o.call(e),i;!(i=s.next()).done;)Q(i.value)&&Ce(i.value,r)}}}function fr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===l||r.$$typeof===_))t=r.propTypes;else return;if(t){var n=S(r);He(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!Z){Z=!0;var o=S(r);h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function cr(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){D(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),D(null);break}}e.ref!==null&&(D(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),D(null))}}function we(e,r,t,n,o,s){{var i=$e(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var E=sr(o);E?a+=E:a+=Re();var c;e===null?c="null":K(e)?c="array":e!==void 0&&e.$$typeof===g?(c="<"+(S(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):c=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,a)}var v=ur(e,r,t,o,s);if(v==null)return v;if(i){var T=r.children;if(T!==void 0)if(n)if(K(T)){for(var F=0;F<T.length;F++)Te(T[F],e);Object.freeze&&Object.freeze(T)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Te(T,e)}return e===y?cr(v):fr(v),v}}function dr(e,r,t){return we(e,r,t,!0)}function vr(e,r,t){return we(e,r,t,!1)}var pr=vr,gr=dr;I.Fragment=y,I.jsx=pr,I.jsxs=gr}()),I}process.env.NODE_ENV==="production"?q.exports=je():q.exports=xe();var ke=q.exports;const De=ke.jsx,Fe=function(g){const{calLink:m,calOrigin:y,namespace:p="",config:R,initConfig:u={},embedJsUrl:d,...l}=g;if(!m)throw new Error("calLink is required");const b=w.useRef(!1),f=Pe(d),_=w.useRef(null);return w.useEffect(()=>{if(!f||b.current||!_.current)return;b.current=!0;const O=_.current;p?(f("init",p,{...u,origin:y}),f.ns[p]("inline",{elementOrSelector:O,calLink:m,config:R})):(f("init",{...u,origin:y}),f("inline",{elementOrSelector:O,calLink:m,config:R}))},[f,m,R,p,y,u]),f?De("div",{ref:_,...l}):null};function Ae(C){const g=typeof C=="string"?{embedJsUrl:C}:C??{},{namespace:m="",embedJsUrl:y}=g;return new Promise(function p(R){const u=B(y);u("init",m);const d=m?u.ns[m]:u;if(!d){setTimeout(()=>{p(R)},50);return}R(d)})}j.default=Fe,j.getCalApi=Ae,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
| (function(s,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("react"),require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime"],o):(s=typeof globalThis<"u"?globalThis:s||self,o(s.Cal={},s.React,s.jsxRuntime))})(this,function(s,o,g){"use strict";const b="https://app.cal.com/embed/embed.js";function m(c=b){(function(r,n,a){let t=function(e,i){e.q.push(i)},u=r.document;r.Cal=r.Cal||function(){let e=r.Cal,i=arguments;if(e.loaded||(e.ns={},e.q=e.q||[],u.head.appendChild(u.createElement("script")).src=n,e.loaded=!0),i[0]===a){const d=function(){t(d,arguments)},l=i[1];d.q=d.q||[],typeof l=="string"?(e.ns[l]=e.ns[l]||d,t(e.ns[l],i),t(e,["initNamespace",l])):t(e,i);return}t(e,i)}})(window,c,"init");/*! Copying ends here. */return window.Cal}m.toString();function h(c){const[r,n]=o.useState();return o.useEffect(()=>{n(()=>m(c))},[]),r}const q=function(r){const{calLink:n,calOrigin:a,namespace:t="",config:u,initConfig:e={},embedJsUrl:i,...d}=r;if(!n)throw new Error("calLink is required");const l=o.useRef(!1),f=h(i),p=o.useRef(null);return o.useEffect(()=>{if(!f||l.current||!p.current)return;l.current=!0;const C=p.current;t?(f("init",t,{...e,origin:a}),f.ns[t]("inline",{elementOrSelector:C,calLink:n,config:u})):(f("init",{...e,origin:a}),f("inline",{elementOrSelector:C,calLink:n,config:u}))},[f,n,u,t,a,e]),f?g.jsx("div",{ref:p,...d}):null};function w(c){const r=typeof c=="string"?{embedJsUrl:c}:c??{},{namespace:n="",embedJsUrl:a}=r;return new Promise(function t(u){const e=m(a);e("init",n);const i=n?e.ns[n]:e;if(!i){setTimeout(()=>{t(u)},50);return}u(i)})}s.default=q,s.getCalApi=w,Object.defineProperties(s,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
| import type { GlobalCal, GlobalCalWithoutNs } from "@calcom/embed-core"; | ||
| import Cal from "./Cal"; | ||
| export type { EmbedEvent } from "@calcom/embed-core"; | ||
| export declare function getCalApi(options?: { | ||
@@ -4,0 +5,0 @@ embedJsUrl?: string; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,SAAS,GAAG,kBAAkB,CAAC,CAAC;AAC5C,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,kBAAkB,CAAC,CAAC;AA4BvF,eAAe,GAAG,CAAC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAGxE,OAAO,GAAG,MAAM,OAAO,CAAC;AAGxB,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,SAAS,GAAG,kBAAkB,CAAC,CAAC;AAC5C,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,kBAAkB,CAAC,CAAC;AA4BvF,eAAe,GAAG,CAAC"} |
+3
-3
| { | ||
| "name": "@calcom/embed-react", | ||
| "sideEffects": false, | ||
| "version": "1.5.1", | ||
| "version": "1.5.2", | ||
| "description": "Embed Cal Link as a React Component", | ||
@@ -57,5 +57,5 @@ "license": "SEE LICENSE IN LICENSE", | ||
| "dependencies": { | ||
| "@calcom/embed-core": "1.5.1", | ||
| "@calcom/embed-snippet": "1.3.1" | ||
| "@calcom/embed-core": "1.5.2", | ||
| "@calcom/embed-snippet": "1.3.2" | ||
| } | ||
| } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Unidentified License
LicenseSomething that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
21
40%2
-87.5%17801
-75.46%232
-85.04%1
Infinity%+ Added
+ Added
- Removed
- Removed
Updated
Updated