react-voice-recorder-player
Version:
Voice Recorder Component for React
1,314 lines (1,311 loc) • 91.8 kB
JavaScript
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".voice-recorder_waveformcontainer{border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#efefef96;background-image:-webkit-linear-gradient(top,rgb(243,242,242),white)}.voice-recorder_defaultcontainer{align-items:center;display:flex;height:100%;padding:0 15px;width:100%}.voice-recorder_defaultcontainer p{font-style:italic}.voice-recorder_recordcontainer{height:100%;margin:0 20px}.voice-recorder_recordcontainer canvas{height:100%;width:100%}.voice-recorder_playbackcontainer{height:100%;margin:0 20px}.voice-recorder_playbackcontainer #playback,.voice-recorder_playbackcontainer audio{display:none}.voice-recorder_playbackcontainer canvas{width:100%;height:100%}.voice-recorder_playbackcontainer .voice-recorder_canvascontainer{position:relative;height:100%}.voice-recorder_playbackcontainer .voice-recorder_canvascontainer .progressbar,.voice-recorder_playbackcontainer .voice-recorder_canvascontainer .waveformgraph-played-graph{position:absolute;left:0}.voice-recorder_controlscontainer{align-items:center;background-color:#efefef;border-top:1px solid #d8d5d5;border-bottom-left-radius:10px;border-bottom-right-radius:10px;display:flex;justify-content:flex-start;padding:0 15px}.voice-recorder_controlscontainer .voice-recorder_controls{align-items:center;display:flex;height:100%;width:100%}.voice-recorder_controlscontainer .voice-recorder_controlgeneric{all:unset;background:none;border:none;height:70%;transition:all .2s ease-in-out}.voice-recorder_controlscontainer .voice-recorder_controlgeneric:disabled{pointer-events:none;opacity:.5}.voice-recorder_controlscontainer .voice-recorder_controlgeneric:hover{cursor:pointer;opacity:.8}.voice-recorder_controlscontainer .voice-recorder_controlgeneric svg{height:auto;width:65%;transition:all .1s ease-in-out}.voice-recorder_controlscontainer .voice-recorder_controlgeneric>svg:hover{cursor:pointer;opacity:.8}.voice-recorder_controlscontainer .voice-recorder_control{align-items:center;aspect-ratio:1;background:rgba(128,128,128,.1607843137);background-image:-webkit-linear-gradient(283deg,rgba(236,236,236,.83) 50%,#dbdbdb 65%);border:1px solid #d8d5d5;border-radius:100%;box-shadow:0 0 8px #d2d2d2;display:flex;justify-content:center;margin-right:10px;position:relative;transition:all .2s ease-in-out}.voice-recorder_controlscontainer .voice-recorder_stopcontainer{align-items:center;background-color:#bebcbc29;border-radius:50px;display:flex;font-size:small;height:100%;justify-content:space-between;padding:0}.voice-recorder_controlscontainer .voice-recorder_stopcontainer .voice-recorder_stopwatch{margin-right:10px}.voice-recorder_controlscontainer .voice-recorder_stopcontainer .voice-recorder_control{height:100%}.voice-recorder_controlscontainer .voice-recorder_showblinking{animation:blinker 2s ease-in-out infinite}@keyframes blinker{50%{opacity:.5}}.voice-recorder_controlscontainer .voice-recorder_download{align-items:center;display:flex;height:100%;margin-left:auto;justify-content:end}@-webkit-keyframes rotating{0%{-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotating{0%{-ms-transform:rotate(0deg);-moz-transform:rotate(0deg);-webkit-transform:rotate(0deg);-o-transform:rotate(0deg);transform:rotate(0)}to{-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg);transform:rotate(360deg)}}.voice-recorder_controlscontainer .voice-recorder_rotate{-webkit-animation:rotating 1.5s linear infinite;-moz-animation:rotating 1.5s linear infinite;-ms-animation:rotating 1.5s linear infinite;-o-animation:rotating 1.5s linear infinite;animation:rotating 1.5s linear infinite}.voice-recorder_maincontainer{aspect-ratio:3/1;border:0px solid #d8d5d5;border-radius:10px;box-shadow:0 4px 8px #cecbcb;display:grid;grid-template-rows:2fr 1fr;margin:10px 30px;width:400px;color:#717171;font-family:Inter,Avenir,Helvetica,Arial,sans-serif;font-size:16px;line-height:24px;font-weight:400;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}.voice-recorder_maincontainer canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}@media (max-width: 600px){.voice-recorder_maincontainer{aspect-ratio:auto;margin:0;width:100%;height:150px}}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
import * as B from "react";
import ze, { createContext as br, useState as he, useContext as wr, useRef as ue, useEffect as pe, useId as zr } from "react";
var Hr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
function Jr(r) {
return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
}
var We = { exports: {} }, Te = {};
/**
* @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 cr;
function Xr() {
if (cr)
return Te;
cr = 1;
var r = ze, l = Symbol.for("react.element"), d = Symbol.for("react.fragment"), u = Object.prototype.hasOwnProperty, m = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
function E(n, s, t) {
var b, g = {}, S = null, P = null;
t !== void 0 && (S = "" + t), s.key !== void 0 && (S = "" + s.key), s.ref !== void 0 && (P = s.ref);
for (b in s)
u.call(s, b) && !p.hasOwnProperty(b) && (g[b] = s[b]);
if (n && n.defaultProps)
for (b in s = n.defaultProps, s)
g[b] === void 0 && (g[b] = s[b]);
return { $$typeof: l, type: n, key: S, ref: P, props: g, _owner: m.current };
}
return Te.Fragment = d, Te.jsx = E, Te.jsxs = E, Te;
}
var _e = {};
/**
* @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 ur;
function Zr() {
return ur || (ur = 1, process.env.NODE_ENV !== "production" && function() {
var r = ze, l = Symbol.for("react.element"), d = Symbol.for("react.portal"), u = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), E = Symbol.for("react.provider"), n = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), t = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), j = Symbol.iterator, R = "@@iterator";
function x(e) {
if (e === null || typeof e != "object")
return null;
var a = j && e[j] || e[R];
return typeof a == "function" ? a : null;
}
var h = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function c(e) {
{
for (var a = arguments.length, v = new Array(a > 1 ? a - 1 : 0), k = 1; k < a; k++)
v[k - 1] = arguments[k];
f("error", e, v);
}
}
function f(e, a, v) {
{
var k = h.ReactDebugCurrentFrame, z = k.getStackAddendum();
z !== "" && (a += "%s", v = v.concat([z]));
var re = v.map(function(Y) {
return String(Y);
});
re.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, re);
}
}
var T = !1, o = !1, $ = !1, G = !1, I = !1, w;
w = Symbol.for("react.module.reference");
function _(e) {
return !!(typeof e == "string" || typeof e == "function" || e === u || e === p || I || e === m || e === t || e === b || G || e === P || T || o || $ || typeof e == "object" && e !== null && (e.$$typeof === S || e.$$typeof === g || e.$$typeof === E || e.$$typeof === n || e.$$typeof === s || // 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 === w || e.getModuleId !== void 0));
}
function H(e, a, v) {
var k = e.displayName;
if (k)
return k;
var z = a.displayName || a.name || "";
return z !== "" ? v + "(" + z + ")" : v;
}
function ee(e) {
return e.displayName || "Context";
}
function N(e) {
if (e == null)
return null;
if (typeof e.tag == "number" && c("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 u:
return "Fragment";
case d:
return "Portal";
case p:
return "Profiler";
case m:
return "StrictMode";
case t:
return "Suspense";
case b:
return "SuspenseList";
}
if (typeof e == "object")
switch (e.$$typeof) {
case n:
var a = e;
return ee(a) + ".Consumer";
case E:
var v = e;
return ee(v._context) + ".Provider";
case s:
return H(e, e.render, "ForwardRef");
case g:
var k = e.displayName || null;
return k !== null ? k : N(e.type) || "Memo";
case S: {
var z = e, re = z._payload, Y = z._init;
try {
return N(Y(re));
} catch {
return null;
}
}
}
return null;
}
var K = Object.assign, ne = 0, Q, te, le, ae, i, C, O;
function D() {
}
D.__reactDisabledLog = !0;
function A() {
{
if (ne === 0) {
Q = console.log, te = console.info, le = console.warn, ae = console.error, i = console.group, C = console.groupCollapsed, O = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: D,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
});
}
ne++;
}
}
function U() {
{
if (ne--, ne === 0) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: K({}, e, {
value: Q
}),
info: K({}, e, {
value: te
}),
warn: K({}, e, {
value: le
}),
error: K({}, e, {
value: ae
}),
group: K({}, e, {
value: i
}),
groupCollapsed: K({}, e, {
value: C
}),
groupEnd: K({}, e, {
value: O
})
});
}
ne < 0 && c("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
var F = h.ReactCurrentDispatcher, M;
function L(e, a, v) {
{
if (M === void 0)
try {
throw Error();
} catch (z) {
var k = z.stack.trim().match(/\n( *(at )?)/);
M = k && k[1] || "";
}
return `
` + M + e;
}
}
var q = !1, V;
{
var se = typeof WeakMap == "function" ? WeakMap : Map;
V = new se();
}
function y(e, a) {
if (!e || q)
return "";
{
var v = V.get(e);
if (v !== void 0)
return v;
}
var k;
q = !0;
var z = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var re;
re = F.current, F.current = null, A();
try {
if (a) {
var Y = function() {
throw Error();
};
if (Object.defineProperty(Y.prototype, "props", {
set: function() {
throw Error();
}
}), typeof Reflect == "object" && Reflect.construct) {
try {
Reflect.construct(Y, []);
} catch (ve) {
k = ve;
}
Reflect.construct(e, [], Y);
} else {
try {
Y.call();
} catch (ve) {
k = ve;
}
e.call(Y.prototype);
}
} else {
try {
throw Error();
} catch (ve) {
k = ve;
}
e();
}
} catch (ve) {
if (ve && k && typeof ve.stack == "string") {
for (var W = ve.stack.split(`
`), ce = k.stack.split(`
`), oe = W.length - 1, ie = ce.length - 1; oe >= 1 && ie >= 0 && W[oe] !== ce[ie]; )
ie--;
for (; oe >= 1 && ie >= 0; oe--, ie--)
if (W[oe] !== ce[ie]) {
if (oe !== 1 || ie !== 1)
do
if (oe--, ie--, ie < 0 || W[oe] !== ce[ie]) {
var de = `
` + W[oe].replace(" at new ", " at ");
return e.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", e.displayName)), typeof e == "function" && V.set(e, de), de;
}
while (oe >= 1 && ie >= 0);
break;
}
}
} finally {
q = !1, F.current = re, U(), Error.prepareStackTrace = z;
}
var Ce = e ? e.displayName || e.name : "", sr = Ce ? L(Ce) : "";
return typeof e == "function" && V.set(e, sr), sr;
}
function fe(e, a, v) {
return y(e, !1);
}
function be(e) {
var a = e.prototype;
return !!(a && a.isReactComponent);
}
function me(e, a, v) {
if (e == null)
return "";
if (typeof e == "function")
return y(e, be(e));
if (typeof e == "string")
return L(e);
switch (e) {
case t:
return L("Suspense");
case b:
return L("SuspenseList");
}
if (typeof e == "object")
switch (e.$$typeof) {
case s:
return fe(e.render);
case g:
return me(e.type, a, v);
case S: {
var k = e, z = k._payload, re = k._init;
try {
return me(re(z), a, v);
} catch {
}
}
}
return "";
}
var Pe = Object.prototype.hasOwnProperty, Je = {}, Xe = h.ReactDebugCurrentFrame;
function Oe(e) {
if (e) {
var a = e._owner, v = me(e.type, e._source, a ? a.type : null);
Xe.setExtraStackFrame(v);
} else
Xe.setExtraStackFrame(null);
}
function xr(e, a, v, k, z) {
{
var re = Function.call.bind(Pe);
for (var Y in e)
if (re(e, Y)) {
var W = void 0;
try {
if (typeof e[Y] != "function") {
var ce = Error((k || "React class") + ": " + v + " type `" + Y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[Y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
throw ce.name = "Invariant Violation", ce;
}
W = e[Y](a, Y, k, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (oe) {
W = oe;
}
W && !(W instanceof Error) && (Oe(z), c("%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).", k || "React class", v, Y, typeof W), Oe(null)), W instanceof Error && !(W.message in Je) && (Je[W.message] = !0, Oe(z), c("Failed %s type: %s", v, W.message), Oe(null));
}
}
}
var Pr = Array.isArray;
function Ie(e) {
return Pr(e);
}
function Or(e) {
{
var a = typeof Symbol == "function" && Symbol.toStringTag, v = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
return v;
}
}
function kr(e) {
try {
return Ze(e), !1;
} catch {
return !0;
}
}
function Ze(e) {
return "" + e;
}
function Ke(e) {
if (kr(e))
return c("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Or(e)), Ze(e);
}
var Se = h.ReactCurrentOwner, Ar = {
key: !0,
ref: !0,
__self: !0,
__source: !0
}, Qe, er, Me;
Me = {};
function Fr(e) {
if (Pe.call(e, "ref")) {
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
if (a && a.isReactWarning)
return !1;
}
return e.ref !== void 0;
}
function Ir(e) {
if (Pe.call(e, "key")) {
var a = Object.getOwnPropertyDescriptor(e, "key").get;
if (a && a.isReactWarning)
return !1;
}
return e.key !== void 0;
}
function Mr(e, a) {
if (typeof e.ref == "string" && Se.current && a && Se.current.stateNode !== a) {
var v = N(Se.current.type);
Me[v] || (c('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', N(Se.current.type), e.ref), Me[v] = !0);
}
}
function jr(e, a) {
{
var v = function() {
Qe || (Qe = !0, c("%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)", a));
};
v.isReactWarning = !0, Object.defineProperty(e, "key", {
get: v,
configurable: !0
});
}
}
function Dr(e, a) {
{
var v = function() {
er || (er = !0, c("%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)", a));
};
v.isReactWarning = !0, Object.defineProperty(e, "ref", {
get: v,
configurable: !0
});
}
}
var Br = function(e, a, v, k, z, re, Y) {
var W = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: l,
// Built-in properties that belong on the element
type: e,
key: a,
ref: v,
props: Y,
// Record the component responsible for creating this element.
_owner: re
};
return W._store = {}, Object.defineProperty(W._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}), Object.defineProperty(W, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: k
}), Object.defineProperty(W, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: z
}), Object.freeze && (Object.freeze(W.props), Object.freeze(W)), W;
};
function $r(e, a, v, k, z) {
{
var re, Y = {}, W = null, ce = null;
v !== void 0 && (Ke(v), W = "" + v), Ir(a) && (Ke(a.key), W = "" + a.key), Fr(a) && (ce = a.ref, Mr(a, z));
for (re in a)
Pe.call(a, re) && !Ar.hasOwnProperty(re) && (Y[re] = a[re]);
if (e && e.defaultProps) {
var oe = e.defaultProps;
for (re in oe)
Y[re] === void 0 && (Y[re] = oe[re]);
}
if (W || ce) {
var ie = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
W && jr(Y, ie), ce && Dr(Y, ie);
}
return Br(e, W, ce, z, k, Se.current, Y);
}
}
var je = h.ReactCurrentOwner, rr = h.ReactDebugCurrentFrame;
function we(e) {
if (e) {
var a = e._owner, v = me(e.type, e._source, a ? a.type : null);
rr.setExtraStackFrame(v);
} else
rr.setExtraStackFrame(null);
}
var De;
De = !1;
function Be(e) {
return typeof e == "object" && e !== null && e.$$typeof === l;
}
function tr() {
{
if (je.current) {
var e = N(je.current.type);
if (e)
return `
Check the render method of \`` + e + "`.";
}
return "";
}
}
function Lr(e) {
{
if (e !== void 0) {
var a = e.fileName.replace(/^.*[\\\/]/, ""), v = e.lineNumber;
return `
Check your code at ` + a + ":" + v + ".";
}
return "";
}
}
var nr = {};
function Nr(e) {
{
var a = tr();
if (!a) {
var v = typeof e == "string" ? e : e.displayName || e.name;
v && (a = `
Check the top-level render call using <` + v + ">.");
}
return a;
}
}
function or(e, a) {
{
if (!e._store || e._store.validated || e.key != null)
return;
e._store.validated = !0;
var v = Nr(a);
if (nr[v])
return;
nr[v] = !0;
var k = "";
e && e._owner && e._owner !== je.current && (k = " It was passed a child from " + N(e._owner.type) + "."), we(e), c('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, k), we(null);
}
}
function ar(e, a) {
{
if (typeof e != "object")
return;
if (Ie(e))
for (var v = 0; v < e.length; v++) {
var k = e[v];
Be(k) && or(k, a);
}
else if (Be(e))
e._store && (e._store.validated = !0);
else if (e) {
var z = x(e);
if (typeof z == "function" && z !== e.entries)
for (var re = z.call(e), Y; !(Y = re.next()).done; )
Be(Y.value) && or(Y.value, a);
}
}
}
function Ur(e) {
{
var a = e.type;
if (a == null || typeof a == "string")
return;
var v;
if (typeof a == "function")
v = a.propTypes;
else if (typeof a == "object" && (a.$$typeof === s || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
a.$$typeof === g))
v = a.propTypes;
else
return;
if (v) {
var k = N(a);
xr(v, e.props, "prop", k, e);
} else if (a.PropTypes !== void 0 && !De) {
De = !0;
var z = N(a);
c("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", z || "Unknown");
}
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && c("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
function Vr(e) {
{
for (var a = Object.keys(e.props), v = 0; v < a.length; v++) {
var k = a[v];
if (k !== "children" && k !== "key") {
we(e), c("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", k), we(null);
break;
}
}
e.ref !== null && (we(e), c("Invalid attribute `ref` supplied to `React.Fragment`."), we(null));
}
}
function ir(e, a, v, k, z, re) {
{
var Y = _(e);
if (!Y) {
var W = "";
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (W += " 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 ce = Lr(z);
ce ? W += ce : W += tr();
var oe;
e === null ? oe = "null" : Ie(e) ? oe = "array" : e !== void 0 && e.$$typeof === l ? (oe = "<" + (N(e.type) || "Unknown") + " />", W = " Did you accidentally export a JSX literal instead of a component?") : oe = typeof e, c("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", oe, W);
}
var ie = $r(e, a, v, z, re);
if (ie == null)
return ie;
if (Y) {
var de = a.children;
if (de !== void 0)
if (k)
if (Ie(de)) {
for (var Ce = 0; Ce < de.length; Ce++)
ar(de[Ce], e);
Object.freeze && Object.freeze(de);
} else
c("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
ar(de, e);
}
return e === u ? Vr(ie) : Ur(ie), ie;
}
}
function qr(e, a, v) {
return ir(e, a, v, !0);
}
function Wr(e, a, v) {
return ir(e, a, v, !1);
}
var Yr = Wr, Gr = qr;
_e.Fragment = u, _e.jsx = Yr, _e.jsxs = Gr;
}()), _e;
}
process.env.NODE_ENV === "production" ? We.exports = Xr() : We.exports = Zr();
var Cr = We.exports;
const Z = Cr.jsx, ye = Cr.jsxs;
var Ye = { exports: {} }, ke = { exports: {} }, J = {};
/** @license React v16.13.1
* react-is.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 lr;
function Kr() {
if (lr)
return J;
lr = 1;
var r = typeof Symbol == "function" && Symbol.for, l = r ? Symbol.for("react.element") : 60103, d = r ? Symbol.for("react.portal") : 60106, u = r ? Symbol.for("react.fragment") : 60107, m = r ? Symbol.for("react.strict_mode") : 60108, p = r ? Symbol.for("react.profiler") : 60114, E = r ? Symbol.for("react.provider") : 60109, n = r ? Symbol.for("react.context") : 60110, s = r ? Symbol.for("react.async_mode") : 60111, t = r ? Symbol.for("react.concurrent_mode") : 60111, b = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, S = r ? Symbol.for("react.suspense_list") : 60120, P = r ? Symbol.for("react.memo") : 60115, j = r ? Symbol.for("react.lazy") : 60116, R = r ? Symbol.for("react.block") : 60121, x = r ? Symbol.for("react.fundamental") : 60117, h = r ? Symbol.for("react.responder") : 60118, c = r ? Symbol.for("react.scope") : 60119;
function f(o) {
if (typeof o == "object" && o !== null) {
var $ = o.$$typeof;
switch ($) {
case l:
switch (o = o.type, o) {
case s:
case t:
case u:
case p:
case m:
case g:
return o;
default:
switch (o = o && o.$$typeof, o) {
case n:
case b:
case j:
case P:
case E:
return o;
default:
return $;
}
}
case d:
return $;
}
}
}
function T(o) {
return f(o) === t;
}
return J.AsyncMode = s, J.ConcurrentMode = t, J.ContextConsumer = n, J.ContextProvider = E, J.Element = l, J.ForwardRef = b, J.Fragment = u, J.Lazy = j, J.Memo = P, J.Portal = d, J.Profiler = p, J.StrictMode = m, J.Suspense = g, J.isAsyncMode = function(o) {
return T(o) || f(o) === s;
}, J.isConcurrentMode = T, J.isContextConsumer = function(o) {
return f(o) === n;
}, J.isContextProvider = function(o) {
return f(o) === E;
}, J.isElement = function(o) {
return typeof o == "object" && o !== null && o.$$typeof === l;
}, J.isForwardRef = function(o) {
return f(o) === b;
}, J.isFragment = function(o) {
return f(o) === u;
}, J.isLazy = function(o) {
return f(o) === j;
}, J.isMemo = function(o) {
return f(o) === P;
}, J.isPortal = function(o) {
return f(o) === d;
}, J.isProfiler = function(o) {
return f(o) === p;
}, J.isStrictMode = function(o) {
return f(o) === m;
}, J.isSuspense = function(o) {
return f(o) === g;
}, J.isValidElementType = function(o) {
return typeof o == "string" || typeof o == "function" || o === u || o === t || o === p || o === m || o === g || o === S || typeof o == "object" && o !== null && (o.$$typeof === j || o.$$typeof === P || o.$$typeof === E || o.$$typeof === n || o.$$typeof === b || o.$$typeof === x || o.$$typeof === h || o.$$typeof === c || o.$$typeof === R);
}, J.typeOf = f, J;
}
var X = {};
/** @license React v16.13.1
* react-is.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 fr;
function Qr() {
return fr || (fr = 1, process.env.NODE_ENV !== "production" && function() {
var r = typeof Symbol == "function" && Symbol.for, l = r ? Symbol.for("react.element") : 60103, d = r ? Symbol.for("react.portal") : 60106, u = r ? Symbol.for("react.fragment") : 60107, m = r ? Symbol.for("react.strict_mode") : 60108, p = r ? Symbol.for("react.profiler") : 60114, E = r ? Symbol.for("react.provider") : 60109, n = r ? Symbol.for("react.context") : 60110, s = r ? Symbol.for("react.async_mode") : 60111, t = r ? Symbol.for("react.concurrent_mode") : 60111, b = r ? Symbol.for("react.forward_ref") : 60112, g = r ? Symbol.for("react.suspense") : 60113, S = r ? Symbol.for("react.suspense_list") : 60120, P = r ? Symbol.for("react.memo") : 60115, j = r ? Symbol.for("react.lazy") : 60116, R = r ? Symbol.for("react.block") : 60121, x = r ? Symbol.for("react.fundamental") : 60117, h = r ? Symbol.for("react.responder") : 60118, c = r ? Symbol.for("react.scope") : 60119;
function f(y) {
return typeof y == "string" || typeof y == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
y === u || y === t || y === p || y === m || y === g || y === S || typeof y == "object" && y !== null && (y.$$typeof === j || y.$$typeof === P || y.$$typeof === E || y.$$typeof === n || y.$$typeof === b || y.$$typeof === x || y.$$typeof === h || y.$$typeof === c || y.$$typeof === R);
}
function T(y) {
if (typeof y == "object" && y !== null) {
var fe = y.$$typeof;
switch (fe) {
case l:
var be = y.type;
switch (be) {
case s:
case t:
case u:
case p:
case m:
case g:
return be;
default:
var me = be && be.$$typeof;
switch (me) {
case n:
case b:
case j:
case P:
case E:
return me;
default:
return fe;
}
}
case d:
return fe;
}
}
}
var o = s, $ = t, G = n, I = E, w = l, _ = b, H = u, ee = j, N = P, K = d, ne = p, Q = m, te = g, le = !1;
function ae(y) {
return le || (le = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), i(y) || T(y) === s;
}
function i(y) {
return T(y) === t;
}
function C(y) {
return T(y) === n;
}
function O(y) {
return T(y) === E;
}
function D(y) {
return typeof y == "object" && y !== null && y.$$typeof === l;
}
function A(y) {
return T(y) === b;
}
function U(y) {
return T(y) === u;
}
function F(y) {
return T(y) === j;
}
function M(y) {
return T(y) === P;
}
function L(y) {
return T(y) === d;
}
function q(y) {
return T(y) === p;
}
function V(y) {
return T(y) === m;
}
function se(y) {
return T(y) === g;
}
X.AsyncMode = o, X.ConcurrentMode = $, X.ContextConsumer = G, X.ContextProvider = I, X.Element = w, X.ForwardRef = _, X.Fragment = H, X.Lazy = ee, X.Memo = N, X.Portal = K, X.Profiler = ne, X.StrictMode = Q, X.Suspense = te, X.isAsyncMode = ae, X.isConcurrentMode = i, X.isContextConsumer = C, X.isContextProvider = O, X.isElement = D, X.isForwardRef = A, X.isFragment = U, X.isLazy = F, X.isMemo = M, X.isPortal = L, X.isProfiler = q, X.isStrictMode = V, X.isSuspense = se, X.isValidElementType = f, X.typeOf = T;
}()), X;
}
var dr;
function Er() {
return dr || (dr = 1, process.env.NODE_ENV === "production" ? ke.exports = Kr() : ke.exports = Qr()), ke.exports;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var $e, pr;
function et() {
if (pr)
return $e;
pr = 1;
var r = Object.getOwnPropertySymbols, l = Object.prototype.hasOwnProperty, d = Object.prototype.propertyIsEnumerable;
function u(p) {
if (p == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(p);
}
function m() {
try {
if (!Object.assign)
return !1;
var p = new String("abc");
if (p[5] = "de", Object.getOwnPropertyNames(p)[0] === "5")
return !1;
for (var E = {}, n = 0; n < 10; n++)
E["_" + String.fromCharCode(n)] = n;
var s = Object.getOwnPropertyNames(E).map(function(b) {
return E[b];
});
if (s.join("") !== "0123456789")
return !1;
var t = {};
return "abcdefghijklmnopqrst".split("").forEach(function(b) {
t[b] = b;
}), Object.keys(Object.assign({}, t)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return $e = m() ? Object.assign : function(p, E) {
for (var n, s = u(p), t, b = 1; b < arguments.length; b++) {
n = Object(arguments[b]);
for (var g in n)
l.call(n, g) && (s[g] = n[g]);
if (r) {
t = r(n);
for (var S = 0; S < t.length; S++)
d.call(n, t[S]) && (s[t[S]] = n[t[S]]);
}
}
return s;
}, $e;
}
var Le, vr;
function He() {
if (vr)
return Le;
vr = 1;
var r = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return Le = r, Le;
}
var Ne, gr;
function Sr() {
return gr || (gr = 1, Ne = Function.call.bind(Object.prototype.hasOwnProperty)), Ne;
}
var Ue, hr;
function rt() {
if (hr)
return Ue;
hr = 1;
var r = function() {
};
if (process.env.NODE_ENV !== "production") {
var l = He(), d = {}, u = Sr();
r = function(p) {
var E = "Warning: " + p;
typeof console < "u" && console.error(E);
try {
throw new Error(E);
} catch {
}
};
}
function m(p, E, n, s, t) {
if (process.env.NODE_ENV !== "production") {
for (var b in p)
if (u(p, b)) {
var g;
try {
if (typeof p[b] != "function") {
var S = Error(
(s || "React class") + ": " + n + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof p[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw S.name = "Invariant Violation", S;
}
g = p[b](E, b, s, n, null, l);
} catch (j) {
g = j;
}
if (g && !(g instanceof Error) && r(
(s || "React class") + ": type specification of " + n + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof g + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), g instanceof Error && !(g.message in d)) {
d[g.message] = !0;
var P = t ? t() : "";
r(
"Failed " + n + " type: " + g.message + (P ?? "")
);
}
}
}
}
return m.resetWarningCache = function() {
process.env.NODE_ENV !== "production" && (d = {});
}, Ue = m, Ue;
}
var Ve, yr;
function tt() {
if (yr)
return Ve;
yr = 1;
var r = Er(), l = et(), d = He(), u = Sr(), m = rt(), p = function() {
};
process.env.NODE_ENV !== "production" && (p = function(n) {
var s = "Warning: " + n;
typeof console < "u" && console.error(s);
try {
throw new Error(s);
} catch {
}
});
function E() {
return null;
}
return Ve = function(n, s) {
var t = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator";
function g(i) {
var C = i && (t && i[t] || i[b]);
if (typeof C == "function")
return C;
}
var S = "<<anonymous>>", P = {
array: h("array"),
bigint: h("bigint"),
bool: h("boolean"),
func: h("function"),
number: h("number"),
object: h("object"),
string: h("string"),
symbol: h("symbol"),
any: c(),
arrayOf: f,
element: T(),
elementType: o(),
instanceOf: $,
node: _(),
objectOf: I,
oneOf: G,
oneOfType: w,
shape: ee,
exact: N
};
function j(i, C) {
return i === C ? i !== 0 || 1 / i === 1 / C : i !== i && C !== C;
}
function R(i, C) {
this.message = i, this.data = C && typeof C == "object" ? C : {}, this.stack = "";
}
R.prototype = Error.prototype;
function x(i) {
if (process.env.NODE_ENV !== "production")
var C = {}, O = 0;
function D(U, F, M, L, q, V, se) {
if (L = L || S, V = V || M, se !== d) {
if (s) {
var y = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
);
throw y.name = "Invariant Violation", y;
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
var fe = L + ":" + M;
!C[fe] && // Avoid spamming the console because they are often not actionable except for lib authors
O < 3 && (p(
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + L + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
), C[fe] = !0, O++);
}
}
return F[M] == null ? U ? F[M] === null ? new R("The " + q + " `" + V + "` is marked as required " + ("in `" + L + "`, but its value is `null`.")) : new R("The " + q + " `" + V + "` is marked as required in " + ("`" + L + "`, but its value is `undefined`.")) : null : i(F, M, L, q, V);
}
var A = D.bind(null, !1);
return A.isRequired = D.bind(null, !0), A;
}
function h(i) {
function C(O, D, A, U, F, M) {
var L = O[D], q = Q(L);
if (q !== i) {
var V = te(L);
return new R(
"Invalid " + U + " `" + F + "` of type " + ("`" + V + "` supplied to `" + A + "`, expected ") + ("`" + i + "`."),
{ expectedType: i }
);
}
return null;
}
return x(C);
}
function c() {
return x(E);
}
function f(i) {
function C(O, D, A, U, F) {
if (typeof i != "function")
return new R("Property `" + F + "` of component `" + A + "` has invalid PropType notation inside arrayOf.");
var M = O[D];
if (!Array.isArray(M)) {
var L = Q(M);
return new R("Invalid " + U + " `" + F + "` of type " + ("`" + L + "` supplied to `" + A + "`, expected an array."));
}
for (var q = 0; q < M.length; q++) {
var V = i(M, q, A, U, F + "[" + q + "]", d);
if (V instanceof Error)
return V;
}
return null;
}
return x(C);
}
function T() {
function i(C, O, D, A, U) {
var F = C[O];
if (!n(F)) {
var M = Q(F);
return new R("Invalid " + A + " `" + U + "` of type " + ("`" + M + "` supplied to `" + D + "`, expected a single ReactElement."));
}
return null;
}
return x(i);
}
function o() {
function i(C, O, D, A, U) {
var F = C[O];
if (!r.isValidElementType(F)) {
var M = Q(F);
return new R("Invalid " + A + " `" + U + "` of type " + ("`" + M + "` supplied to `" + D + "`, expected a single ReactElement type."));
}
return null;
}
return x(i);
}
function $(i) {
function C(O, D, A, U, F) {
if (!(O[D] instanceof i)) {
var M = i.name || S, L = ae(O[D]);
return new R("Invalid " + U + " `" + F + "` of type " + ("`" + L + "` supplied to `" + A + "`, expected ") + ("instance of `" + M + "`."));
}
return null;
}
return x(C);
}
function G(i) {
if (!Array.isArray(i))
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? p(
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
) : p("Invalid argument supplied to oneOf, expected an array.")), E;
function C(O, D, A, U, F) {
for (var M = O[D], L = 0; L < i.length; L++)
if (j(M, i[L]))
return null;
var q = JSON.stringify(i, function(se, y) {
var fe = te(y);
return fe === "symbol" ? String(y) : y;
});
return new R("Invalid " + U + " `" + F + "` of value `" + String(M) + "` " + ("supplied to `" + A + "`, expected one of " + q + "."));
}
return x(C);
}
function I(i) {
function C(O, D, A, U, F) {
if (typeof i != "function")
return new R("Property `" + F + "` of component `" + A + "` has invalid PropType notation inside objectOf.");
var M = O[D], L = Q(M);
if (L !== "object")
return new R("Invalid " + U + " `" + F + "` of type " + ("`" + L + "` supplied to `" + A + "`, expected an object."));
for (var q in M)
if (u(M, q)) {
var V = i(M, q, A, U, F + "." + q, d);
if (V instanceof Error)
return V;
}
return null;
}
return x(C);
}
function w(i) {
if (!Array.isArray(i))
return process.env.NODE_ENV !== "production" && p("Invalid argument supplied to oneOfType, expected an instance of array."), E;
for (var C = 0; C < i.length; C++) {
var O = i[C];
if (typeof O != "function")
return p(
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + le(O) + " at index " + C + "."
), E;
}
function D(A, U, F, M, L) {
for (var q = [], V = 0; V < i.length; V++) {
var se = i[V], y = se(A, U, F, M, L, d);
if (y == null)
return null;
y.data && u(y.data, "expectedType") && q.push(y.data.expectedType);
}
var fe = q.length > 0 ? ", expected one of type [" + q.join(", ") + "]" : "";
return new R("Invalid " + M + " `" + L + "` supplied to " + ("`" + F + "`" + fe + "."));
}
return x(D);
}
function _() {
function i(C, O, D, A, U) {
return K(C[O]) ? null : new R("Invalid " + A + " `" + U + "` supplied to " + ("`" + D + "`, expected a ReactNode."));
}
return x(i);
}
function H(i, C, O, D, A) {
return new R(
(i || "React class") + ": " + C + " type `" + O + "." + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + A + "`."
);
}
function ee(i) {
function C(O, D, A, U, F) {
var M = O[D], L = Q(M);
if (L !== "object")
return new R("Invalid " + U + " `" + F + "` of type `" + L + "` " + ("supplied to `" + A + "`, expected `object`."));
for (var q in i) {
var V = i[q];
if (typeof V != "function")
return H(A, U, F, q, te(V));
var se = V(M, q, A, U, F + "." + q, d);
if (se)
return se;
}
return null;
}
return x(C);
}
function N(i) {
function C(O, D, A, U, F) {
var M = O[D], L = Q(M);
if (L !== "object")
return new R("Invalid " + U + " `" + F + "` of type `" + L + "` " + ("supplied to `" + A + "`, expected `object`."));
var q = l({}, O[D], i);
for (var V in q) {
var se = i[V];
if (u(i, V) && typeof se != "function")
return H(A, U, F, V, te(se));
if (!se)
return new R(
"Invalid " + U + " `" + F + "` key `" + V + "` supplied to `" + A + "`.\nBad object: " + JSON.stringify(O[D], null, " ") + `
Valid keys: ` + JSON.stringify(Object.keys(i), null, " ")
);
var y = se(M, V, A, U, F + "." + V, d);
if (y)
return y;
}
return null;
}
return x(C);
}
function K(i) {
switch (typeof i) {
case "number":
case "string":
case "undefined":
return !0;
case "boolean":
return !i;
case "object":
if (Array.isArray(i))
return i.every(K);
if (i === null || n(i))
return !0;
var C = g(i);
if (C) {
var O = C.call(i), D;
if (C !== i.entries) {
for (; !(D = O.next()).done; )
if (!K(D.value))
return !1;
} else
for (; !(D = O.next()).done; ) {
var A = D.value;
if (A && !K(A[1]))
return !1;
}
} else
return !1;
return !0;
default:
return !1;
}
}
function ne(i, C) {
return i === "symbol" ? !0 : C ? C["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && C instanceof Symbol : !1;
}
function Q(i) {
var C = typeof i;
return Array.isArray(i) ? "array" : i instanceof RegExp ? "object" : ne(C, i) ? "symbol" : C;
}
function te(i) {
if (typeof i > "u" || i === null)
return "" + i;
var C = Q(i);
if (C === "object") {
if (i instanceof Date)
return "date";
if (i instanceof RegExp)
return "regexp";
}
return C;
}
function le(i) {
var C = te(i);
switch (C) {
case "array":
case "object":
return "an " + C;
case "boolean":
case "date":
case "regexp":
return "a " + C;
default:
return C;
}
}
function ae(i) {
return !i.constructor || !i.constructor.name ? S : i.constructor.name;
}
return P.checkPropTypes = m, P.resetWarningCache = m.resetWarningCache, P.PropTypes = P, P;
}, Ve;
}
var qe, mr;
function nt() {
if (mr)
return qe;
mr = 1;
var r = He();
function l() {
}
function d() {
}
return d.resetWarningCache = l, qe = function() {
function u(E, n, s, t, b, g) {
if (g !== r) {
var S = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
);
throw S.name = "Invariant Violation", S;
}
}
u.isRequired = u;
function m() {
return u;
}
var p = {
array: u,
bigint: u,
bool: u,
func: u,
number: u,
object: u,
string: u,
symbol: u,
any: u,
arrayOf: m,
element: u,
elementType: u,
instanceOf: m,
node: u,
objectOf: m,
oneOf: m,
oneOfType: m,
shape: m,
exact: m,
checkPropTypes: d,
resetWarningCache: l
};
return p.PropTypes = p, p;
}, qe;
}
if (process.env.NODE_ENV !== "production") {
var ot = Er(), at = !0;
Ye.exports = tt()(ot.isElement, at);
} else
Ye.exports = nt()();
var it = Ye.exports;
const Re = /* @__PURE__ */ Jr(it), Tr = br({
audioStatus: "",
audioFile: void 0,
audioRecording: void 0,
audioFileProcessing: !1,
updateAudioStatus: () => {
},
updateAudioRecording: () => {
},
convertAudioFile: () => {
},
setAudioFileProcessing: () => {
}
});
function st({ children: r }) {
const [l, d] = he(""), [u, m] = he(), [p, E] = he(), [n, s] = he(!1),