movius-chats 1.4.17 → 1.4.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react-native"),r=require("twrnc"),n=require("react"),o=require("react-native-svg"),i=require("react-native-video"),a=require("react-native-gesture-handler"),A=require("react-native-reanimated");function s(e,t){this.v=e,this.k=t}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r,n,o,i,a){try{var A=e[i](a),s=A.value}catch(e){return void r(e)}A.done?t(s):Promise.resolve(s).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,A,"next",e)}function A(e){c(i,n,o,a,A,"throw",e)}a(void 0)}))}}function d(e,t,r){return t=v(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e,t,r){return(t=O(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){f(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x(){
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react-native"),r=require("twrnc"),n=require("react"),o=require("react-native-svg"),i=require("react-native-video"),a=require("react-native-gesture-handler"),s=require("react-native-reanimated");function l(e,t){this.v=e,this.k=t}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(e){return void r(e)}s.done?t(l):Promise.resolve(l).then(n,o)}function u(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,s,"next",e)}function s(e){c(i,n,o,a,s,"throw",e)}a(void 0)}))}}function d(e,t,r){return t=v(t),function(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,r||[],v(e).constructor):t.apply(e,r))}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t,r){return t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e,t,r){return(t=_(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){h(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function x(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
3
- var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var s=n&&n.prototype instanceof A?n:A,l=Object.create(s.prototype);return E(l,"_invoke",function(r,n,o){var i,A,s,l=0,c=o||[],u=!1,d={p:0,n:0,v:e,a:C,f:C.bind(e,4),d:function(t,r){return i=t,A=0,s=e,d.n=r,a}};function C(r,n){for(A=r,s=n,t=0;!u&&l&&!o&&t<c.length;t++){var o,i=c[t],C=d.p,h=i[2];r>3?(o=h===n)&&(s=i[(A=i[4])?5:(A=3,3)],i[4]=i[5]=e):i[0]<=C&&((o=r<2&&C<i[1])?(A=0,d.v=n,d.n=i[1]):C<h&&(o=r<3||i[0]>n||n>h)&&(i[4]=r,i[5]=n,d.n=h,A=0))}if(o||r>1)return a;throw u=!0,n}return function(o,c,h){if(l>1)throw TypeError("Generator is already running");for(u&&1===c&&C(c,h),A=c,s=h;(t=A<2?e:s)||!u;){i||(A?A<3?(A>1&&(d.n=-1),C(A,s)):d.n=s:d.v=s);try{if(l=2,i){if(A||(o="next"),t=i[o]){if(!(t=t.call(i,s)))throw TypeError("iterator result is not an object");if(!t.done)return t;s=t.value,A<2&&(A=0)}else 1===A&&(t=i.return)&&t.call(i),A<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),A=1);i=e}else if((t=(u=d.n<0)?s:r.call(n,d))!==a)break}catch(t){i=e,A=1,s=t}finally{l=1}}return{value:t,done:u}}}(r,o,i),!0),l}var a={};function A(){}function s(){}function l(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(E(t={},n,(function(){return this})),t),u=l.prototype=A.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,l):(e.__proto__=l,E(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=l,E(u,"constructor",l),E(l,"constructor",s),s.displayName="GeneratorFunction",E(l,o,"GeneratorFunction"),E(u),E(u,o,"Generator"),E(u,n,(function(){return this})),E(u,"toString",(function(){return"[object Generator]"})),(x=function(){return{w:i,m:d}})()}function w(e,t,r,n,o){var i=S(e,t,r,n,o);return i.next().then((function(e){return e.done?e.value:i.next()}))}function S(e,t,r,n,o){return new b(x().w(e,t,r,n),o||Promise)}function b(e,t){function r(n,o,i,a){try{var A=e[n](o),l=A.value;return l instanceof s?t.resolve(l.v).then((function(e){r("next",e,i,a)}),(function(e){r("throw",e,i,a)})):t.resolve(l).then((function(e){A.value=e,i(A)}),(function(e){return r("throw",e,i,a)}))}catch(e){a(e)}}var n;this.next||(E(b.prototype),E(b.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),E(this,"_invoke",(function(e,o,i){function a(){return new t((function(t,n){r(e,i,t,n)}))}return n=n?n.then(a,a):a()}),!0)}function E(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}E=function(e,t,r,n){function i(t,r){E(e,t,(function(e){return this._invoke(t,r,e)}))}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},E(e,t,r,n)}function k(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}}function I(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,A=[],s=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(s=(n=i.call(r)).done)&&(A.push(n.value),A.length!==t);s=!0);}catch(e){l=!0,o=e}finally{try{if(!s&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return A}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function O(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function j(){var e=x(),t=e.m(j),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===r||"GeneratorFunction"===(t.displayName||t.name))}var o={throw:1,return:2,break:3,continue:3};function i(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,o[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,I(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(j=function(){return{wrap:function(t,r,n,o){return e.w(i(t),r,n,o&&o.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(e,t){return new s(e,t)},AsyncIterator:b,async:function(e,t,r,o,a){return(n(t)?S:w)(i(e),t,r,o,a)},keys:k,values:I}})()}var T=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 48 48",children:e.jsx(o.Path,{fill:n,fillRule:"evenodd",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M8 9.115c0-1.82 2.235-2.694 3.47-1.356l29.432 31.884c1.182 1.282.273 3.357-1.47 3.357H10a2 2 0 0 1-2-2z",clipRule:"evenodd"})})},G=["children"],V=n.createContext(void 0),P=function(t){var r=t.children,o=y(t,G),i=R(n.useState(null),2),a=i[0],A=i[1],s=R(n.useState(!1),2),l=s[0],c=s[1];return e.jsx(V.Provider,{value:g(g({},o),{},{mediaViewerGallery:a,setMediaViewerGallery:function(e,t){A({items:e,initialIndex:t});var r=e[t];c("video"===(null==r?void 0:r.kind))},clearMediaViewerGallery:function(){A(null),c(!1)},isVideoPlaying:l,setIsVideoPlaying:c}),children:r})},K=function(){var e=n.useContext(V);if(!e)throw new Error("useChatContext must be used within a ChatProvider");return e};function D(e){return null==e?void 0:e.colors}function L(e,t){var r,n,o,i,a=D(e),A=t?null!==(r=null==a?void 0:a.sentMediaTimestampBackground)&&void 0!==r?r:"rgba(0,0,0,0.45)":null!==(n=null==a?void 0:a.receivedMediaTimestampBackground)&&void 0!==n?n:"rgba(0,0,0,0.45)",s=t?null==e||null===(o=e.messageStyle)||void 0===o?void 0:o.sentMediaTimestampContainerStyle:null==e||null===(i=e.messageStyle)||void 0===i?void 0:i.receivedMediaTimestampContainerStyle;return g(g({},{paddingHorizontal:8,paddingVertical:4,borderRadius:6}),{},{backgroundColor:A},s)}function F(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentBackground)&&void 0!==n?n:"rgba(255, 255, 255, 0.15)":null!==(r=null==o?void 0:o.receivedFileAttachmentBackground)&&void 0!==r?r:"rgba(0, 0, 0, 0.08)"}function B(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentTextColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedFileAttachmentTextColor)&&void 0!==r?r:"#1f2937"}function H(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentSubtitleColor)&&void 0!==n?n:"rgba(255,255,255,0.7)":null!==(r=null==o?void 0:o.receivedFileAttachmentSubtitleColor)&&void 0!==r?r:"rgba(31,41,55,0.65)"}function U(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentAudioSpeedTextColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioSpeedTextColor)&&void 0!==r?r:"#e5e7eb"}function W(e,t){var r=D(e);return t?null==r?void 0:r.sentMessageTextColor:null==r?void 0:r.receivedMessageTextColor}function Y(e,t){var r=D(e);return t?null==r?void 0:r.sentBubbleBackgroundColor:null==r?void 0:r.receivedBubbleBackgroundColor}function N(e){if(e.mediaItems&&e.mediaItems.length>0)return e.mediaItems;var t=[];return e.image&&t.push({uri:e.image,kind:"image"}),e.video&&t.push({uri:e.video,kind:"video"}),t}var z="ios"===t.Platform.OS?"h-6 w-6":"w-6 h-6";function Q(e,t){return t?[e,{fontFamily:t}]:e}function J(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var q,X={exports:{}},$={exports:{}},Z={};var ee,te,re,ne,oe,ie,ae,Ae,se,le,ce,ue,de,Ce,he,fe={};
3
+ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(r,n,o,i){var l=n&&n.prototype instanceof s?n:s,A=Object.create(l.prototype);return E(A,"_invoke",function(r,n,o){var i,s,l,A=0,c=o||[],u=!1,d={p:0,n:0,v:e,a:C,f:C.bind(e,4),d:function(t,r){return i=t,s=0,l=e,d.n=r,a}};function C(r,n){for(s=r,l=n,t=0;!u&&A&&!o&&t<c.length;t++){var o,i=c[t],C=d.p,f=i[2];r>3?(o=f===n)&&(l=i[(s=i[4])?5:(s=3,3)],i[4]=i[5]=e):i[0]<=C&&((o=r<2&&C<i[1])?(s=0,d.v=n,d.n=i[1]):C<f&&(o=r<3||i[0]>n||n>f)&&(i[4]=r,i[5]=n,d.n=f,s=0))}if(o||r>1)return a;throw u=!0,n}return function(o,c,f){if(A>1)throw TypeError("Generator is already running");for(u&&1===c&&C(c,f),s=c,l=f;(t=s<2?e:l)||!u;){i||(s?s<3?(s>1&&(d.n=-1),C(s,l)):d.n=l:d.v=l);try{if(A=2,i){if(s||(o="next"),t=i[o]){if(!(t=t.call(i,l)))throw TypeError("iterator result is not an object");if(!t.done)return t;l=t.value,s<2&&(s=0)}else 1===s&&(t=i.return)&&t.call(i),s<2&&(l=TypeError("The iterator does not provide a '"+o+"' method"),s=1);i=e}else if((t=(u=d.n<0)?l:r.call(n,d))!==a)break}catch(t){i=e,s=1,l=t}finally{A=1}}return{value:t,done:u}}}(r,o,i),!0),A}var a={};function s(){}function l(){}function A(){}t=Object.getPrototypeOf;var c=[][n]?t(t([][n]())):(E(t={},n,(function(){return this})),t),u=A.prototype=s.prototype=Object.create(c);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,A):(e.__proto__=A,E(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return l.prototype=A,E(u,"constructor",A),E(A,"constructor",l),l.displayName="GeneratorFunction",E(A,o,"GeneratorFunction"),E(u),E(u,o,"Generator"),E(u,n,(function(){return this})),E(u,"toString",(function(){return"[object Generator]"})),(x=function(){return{w:i,m:d}})()}function b(e,t,r,n,o){var i=w(e,t,r,n,o);return i.next().then((function(e){return e.done?e.value:i.next()}))}function w(e,t,r,n,o){return new S(x().w(e,t,r,n),o||Promise)}function S(e,t){function r(n,o,i,a){try{var s=e[n](o),A=s.value;return A instanceof l?t.resolve(A.v).then((function(e){r("next",e,i,a)}),(function(e){r("throw",e,i,a)})):t.resolve(A).then((function(e){s.value=e,i(s)}),(function(e){return r("throw",e,i,a)}))}catch(e){a(e)}}var n;this.next||(E(S.prototype),E(S.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),E(this,"_invoke",(function(e,o,i){function a(){return new t((function(t,n){r(e,i,t,n)}))}return n=n?n.then(a,a):a()}),!0)}function E(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}E=function(e,t,r,n){function i(t,r){E(e,t,(function(e){return this._invoke(t,r,e)}))}t?o?o(e,t,{value:r,enumerable:!n,configurable:!n,writable:!n}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},E(e,t,r,n)}function j(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}}function k(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(typeof e+" is not iterable")}function I(e,t){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},I(e,t)}function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,s=[],l=!0,A=!1;try{if(i=(r=r.call(e)).next,0===t);else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){A=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(A)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t);if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function O(){var e=x(),t=e.m(O),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===r||"GeneratorFunction"===(t.displayName||t.name))}var o={throw:1,return:2,break:3,continue:3};function i(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,o[e],t)},delegateYield:function(e,o,i){return t.resultName=o,r(n.d,k(e),i)},finish:function(e){return r(n.f,e)}},r=function(e,r,o){n.p=t.prev,n.n=t.next;try{return e(r,o)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(O=function(){return{wrap:function(t,r,n,o){return e.w(i(t),r,n,o&&o.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(e,t){return new l(e,t)},AsyncIterator:S,async:function(e,t,r,o,a){return(n(t)?w:b)(i(e),t,r,o,a)},keys:j,values:k}})()}var P=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 48 48",children:e.jsx(o.Path,{fill:n,fillRule:"evenodd",stroke:n,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"4",d:"M8 9.115c0-1.82 2.235-2.694 3.47-1.356l29.432 31.884c1.182 1.282.273 3.357-1.47 3.357H10a2 2 0 0 1-2-2z",clipRule:"evenodd"})})},G=["children"],V=n.createContext(void 0),T=function(t){var r=t.children,o=g(t,G),i=R(n.useState(null),2),a=i[0],s=i[1],l=R(n.useState(!1),2),A=l[0],c=l[1];return e.jsx(V.Provider,{value:y(y({},o),{},{mediaViewerGallery:a,setMediaViewerGallery:function(e,t){s({items:e,initialIndex:t});var r=e[t];c("video"===(null==r?void 0:r.kind))},clearMediaViewerGallery:function(){s(null),c(!1)},isVideoPlaying:A,setIsVideoPlaying:c}),children:r})},D=function(){var e=n.useContext(V);if(!e)throw new Error("useChatContext must be used within a ChatProvider");return e};function F(e){return null==e?void 0:e.colors}function K(e,t){var r,n,o,i,a=F(e),s=t?null!==(r=null==a?void 0:a.sentMediaTimestampBackground)&&void 0!==r?r:"rgba(0,0,0,0.45)":null!==(n=null==a?void 0:a.receivedMediaTimestampBackground)&&void 0!==n?n:"rgba(0,0,0,0.45)",l=t?null==e||null===(o=e.messageStyle)||void 0===o?void 0:o.sentMediaTimestampContainerStyle:null==e||null===(i=e.messageStyle)||void 0===i?void 0:i.receivedMediaTimestampContainerStyle;return y(y({},{paddingHorizontal:8,paddingVertical:4,borderRadius:6}),{},{backgroundColor:s},l)}function L(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentBackground)&&void 0!==n?n:"rgba(255, 255, 255, 0.15)":null!==(r=null==o?void 0:o.receivedFileAttachmentBackground)&&void 0!==r?r:"rgba(0, 0, 0, 0.08)"}function B(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentTextColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedFileAttachmentTextColor)&&void 0!==r?r:"#1f2937"}function H(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentFileAttachmentSubtitleColor)&&void 0!==n?n:"rgba(255,255,255,0.7)":null!==(r=null==o?void 0:o.receivedFileAttachmentSubtitleColor)&&void 0!==r?r:"rgba(31,41,55,0.65)"}function U(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentAudioSpeedTextColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioSpeedTextColor)&&void 0!==r?r:"#e5e7eb"}function N(e,t){var r=F(e);return t?null==r?void 0:r.sentMessageTextColor:null==r?void 0:r.receivedMessageTextColor}function Y(e,t){var r=F(e);return t?null==r?void 0:r.sentBubbleBackgroundColor:null==r?void 0:r.receivedBubbleBackgroundColor}function W(e){if(e.mediaItems&&e.mediaItems.length>0)return e.mediaItems;var t=[];return e.image&&t.push({uri:e.image,kind:"image"}),e.video&&t.push({uri:e.video,kind:"video"}),t}var z="ios"===t.Platform.OS?"h-6 w-6":"w-6 h-6";function Q(e,t){return t?[e,{fontFamily:t}]:e}function q(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var J,X={exports:{}},$={exports:{}},Z={};var ee,te,re,ne,oe,ie,ae,se,le,Ae,ce,ue,de,Ce,fe,he={};
4
4
  /** @license React v16.13.1
5
5
  * react-is.development.js
6
6
  *
@@ -8,10 +8,10 @@ var e,t,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",o=r.toS
8
8
  *
9
9
  * This source code is licensed under the MIT license found in the
10
10
  * LICENSE file in the root directory of this source tree.
11
- */function ve(){return te||(te=1,"production"===process.env.NODE_ENV?$.exports=function(){if(q)return Z;q=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,A=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:switch(e=e.type){case s:case l:case n:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case A:case c:case h:case C:case a:return e;default:return d}}case r:return d}}}function y(e){return g(e)===l}return Z.AsyncMode=s,Z.ConcurrentMode=l,Z.ContextConsumer=A,Z.ContextProvider=a,Z.Element=t,Z.ForwardRef=c,Z.Fragment=n,Z.Lazy=h,Z.Memo=C,Z.Portal=r,Z.Profiler=i,Z.StrictMode=o,Z.Suspense=u,Z.isAsyncMode=function(e){return y(e)||g(e)===s},Z.isConcurrentMode=y,Z.isContextConsumer=function(e){return g(e)===A},Z.isContextProvider=function(e){return g(e)===a},Z.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Z.isForwardRef=function(e){return g(e)===c},Z.isFragment=function(e){return g(e)===n},Z.isLazy=function(e){return g(e)===h},Z.isMemo=function(e){return g(e)===C},Z.isPortal=function(e){return g(e)===r},Z.isProfiler=function(e){return g(e)===i},Z.isStrictMode=function(e){return g(e)===o},Z.isSuspense=function(e){return g(e)===u},Z.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===l||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===C||e.$$typeof===a||e.$$typeof===A||e.$$typeof===c||e.$$typeof===v||e.$$typeof===p||e.$$typeof===m||e.$$typeof===f)},Z.typeOf=g,Z}():$.exports=(ee||(ee=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,A=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var f=e.type;switch(f){case s:case l:case n:case i:case o:case u:return f;default:var v=f&&f.$$typeof;switch(v){case A:case c:case h:case C:case a:return v;default:return d}}case r:return d}}}var y=s,x=l,w=A,S=a,b=t,E=c,k=n,I=h,_=C,R=r,M=i,O=o,j=u,T=!1;function G(e){return g(e)===l}fe.AsyncMode=y,fe.ConcurrentMode=x,fe.ContextConsumer=w,fe.ContextProvider=S,fe.Element=b,fe.ForwardRef=E,fe.Fragment=k,fe.Lazy=I,fe.Memo=_,fe.Portal=R,fe.Profiler=M,fe.StrictMode=O,fe.Suspense=j,fe.isAsyncMode=function(e){return T||(T=!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.")),G(e)||g(e)===s},fe.isConcurrentMode=G,fe.isContextConsumer=function(e){return g(e)===A},fe.isContextProvider=function(e){return g(e)===a},fe.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},fe.isForwardRef=function(e){return g(e)===c},fe.isFragment=function(e){return g(e)===n},fe.isLazy=function(e){return g(e)===h},fe.isMemo=function(e){return g(e)===C},fe.isPortal=function(e){return g(e)===r},fe.isProfiler=function(e){return g(e)===i},fe.isStrictMode=function(e){return g(e)===o},fe.isSuspense=function(e){return g(e)===u},fe.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===l||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===C||e.$$typeof===a||e.$$typeof===A||e.$$typeof===c||e.$$typeof===v||e.$$typeof===p||e.$$typeof===m||e.$$typeof===f)},fe.typeOf=g}()),fe)),$.exports}
11
+ */function ve(){return te||(te=1,"production"===process.env.NODE_ENV?$.exports=function(){if(J)return Z;J=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,A=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:switch(e=e.type){case l:case A:case n:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case s:case c:case f:case C:case a:return e;default:return d}}case r:return d}}}function g(e){return y(e)===A}return Z.AsyncMode=l,Z.ConcurrentMode=A,Z.ContextConsumer=s,Z.ContextProvider=a,Z.Element=t,Z.ForwardRef=c,Z.Fragment=n,Z.Lazy=f,Z.Memo=C,Z.Portal=r,Z.Profiler=i,Z.StrictMode=o,Z.Suspense=u,Z.isAsyncMode=function(e){return g(e)||y(e)===l},Z.isConcurrentMode=g,Z.isContextConsumer=function(e){return y(e)===s},Z.isContextProvider=function(e){return y(e)===a},Z.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Z.isForwardRef=function(e){return y(e)===c},Z.isFragment=function(e){return y(e)===n},Z.isLazy=function(e){return y(e)===f},Z.isMemo=function(e){return y(e)===C},Z.isPortal=function(e){return y(e)===r},Z.isProfiler=function(e){return y(e)===i},Z.isStrictMode=function(e){return y(e)===o},Z.isSuspense=function(e){return y(e)===u},Z.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===A||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===C||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===v||e.$$typeof===p||e.$$typeof===m||e.$$typeof===h)},Z.typeOf=y,Z}():$.exports=(ee||(ee=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,A=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,C=e?Symbol.for("react.memo"):60115,f=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,p=e?Symbol.for("react.responder"):60118,m=e?Symbol.for("react.scope"):60119;function y(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var h=e.type;switch(h){case l:case A:case n:case i:case o:case u:return h;default:var v=h&&h.$$typeof;switch(v){case s:case c:case f:case C:case a:return v;default:return d}}case r:return d}}}var g=l,x=A,b=s,w=a,S=t,E=c,j=n,k=f,I=C,R=r,M=i,_=o,O=u,P=!1;function G(e){return y(e)===A}he.AsyncMode=g,he.ConcurrentMode=x,he.ContextConsumer=b,he.ContextProvider=w,he.Element=S,he.ForwardRef=E,he.Fragment=j,he.Lazy=k,he.Memo=I,he.Portal=R,he.Profiler=M,he.StrictMode=_,he.Suspense=O,he.isAsyncMode=function(e){return P||(P=!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.")),G(e)||y(e)===l},he.isConcurrentMode=G,he.isContextConsumer=function(e){return y(e)===s},he.isContextProvider=function(e){return y(e)===a},he.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},he.isForwardRef=function(e){return y(e)===c},he.isFragment=function(e){return y(e)===n},he.isLazy=function(e){return y(e)===f},he.isMemo=function(e){return y(e)===C},he.isPortal=function(e){return y(e)===r},he.isProfiler=function(e){return y(e)===i},he.isStrictMode=function(e){return y(e)===o},he.isSuspense=function(e){return y(e)===u},he.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===A||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===f||e.$$typeof===C||e.$$typeof===a||e.$$typeof===s||e.$$typeof===c||e.$$typeof===v||e.$$typeof===p||e.$$typeof===m||e.$$typeof===h)},he.typeOf=y}()),he)),$.exports}
12
12
  /*
13
13
  object-assign
14
14
  (c) Sindre Sorhus
15
15
  @license MIT
16
- */function pe(){if(ne)return re;ne=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return re=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(n,o){for(var i,a,A=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(n),s=1;s<arguments.length;s++){for(var l in i=Object(arguments[s]))t.call(i,l)&&(A[l]=i[l]);if(e){a=e(i);for(var c=0;c<a.length;c++)r.call(i,a[c])&&(A[a[c]]=i[a[c]])}}return A},re}function me(){if(ie)return oe;ie=1;return oe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ge(){return Ae?ae:(Ae=1,ae=Function.call.bind(Object.prototype.hasOwnProperty))}function ye(){if(le)return se;le=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=me(),r={},n=ge();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,A,s){if("production"!==process.env.NODE_ENV)for(var l in o)if(n(o,l)){var c;try{if("function"!=typeof o[l]){var u=Error((A||"React class")+": "+a+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=o[l](i,l,A,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((A||"React class")+": type specification of "+a+" `"+l+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in r)){r[c.message]=!0;var d=s?s():"";e("Failed "+a+" type: "+c.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},se=o}function xe(){if(ue)return ce;ue=1;var e=ve(),t=pe(),r=me(),n=ge(),o=ye(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ce=function(A,s){var l="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:h(a),arrayOf:function(e){return h((function(t,n,o,i,a){if("function"!=typeof e)return new C("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var A=t[n];if(!Array.isArray(A))return new C("Invalid "+i+" `"+a+"` of type `"+m(A)+"` supplied to `"+o+"`, expected an array.");for(var s=0;s<A.length;s++){var l=e(A,s,o,i,a+"["+s+"]",r);if(l instanceof Error)return l}return null}))},element:h((function(e,t,r,n,o){var i=e[t];return A(i)?null:new C("Invalid "+n+" `"+o+"` of type `"+m(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:h((function(t,r,n,o,i){var a=t[r];return e.isValidElementType(a)?null:new C("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return h((function(t,r,n,o,i){if(!(t[r]instanceof e)){var a=e.name||c;return new C("Invalid "+o+" `"+i+"` of type `"+(((A=t[r]).constructor&&A.constructor.name?A.constructor.name:c)+"` supplied to `")+n+"`, expected instance of `"+a+"`.")}var A;return null}))},node:h((function(e,t,r,n,o){return p(e[t])?null:new C("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,a,A){if("function"!=typeof e)return new C("Property `"+A+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[o],l=m(s);if("object"!==l)return new C("Invalid "+a+" `"+A+"` of type `"+l+"` supplied to `"+i+"`, expected an object.");for(var c in s)if(n(s,c)){var u=e(s,c,i,a,A+"."+c,r);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"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]).":"Invalid argument supplied to oneOf, expected an array."),a;return h((function(t,r,n,o,i){for(var a=t[r],A=0;A<e.length;A++)if(d(a,e[A]))return null;var s=JSON.stringify(e,(function(e,t){return"symbol"===g(t)?String(t):t}));return new C("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+n+"`, expected one of "+s+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+y(o)+" at index "+t+"."),a}return h((function(t,o,i,a,A){for(var s=[],l=0;l<e.length;l++){var c=(0,e[l])(t,o,i,a,A,r);if(null==c)return null;c.data&&n(c.data,"expectedType")&&s.push(c.data.expectedType)}return new C("Invalid "+a+" `"+A+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,n,o,i,a){var A=t[n],s=m(A);if("object"!==s)return new C("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+o+"`, expected `object`.");for(var l in e){var c=e[l];if("function"!=typeof c)return v(o,i,a,l,g(c));var u=c(A,l,o,i,a+"."+l,r);if(u)return u}return null}))},exact:function(e){return h((function(o,i,a,A,s){var l=o[i],c=m(l);if("object"!==c)return new C("Invalid "+A+" `"+s+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var u=t({},o[i],e);for(var d in u){var h=e[d];if(n(e,d)&&"function"!=typeof h)return v(a,A,s,d,g(h));if(!h)return new C("Invalid "+A+" `"+s+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var f=h(l,d,a,A,s+"."+d,r);if(f)return f}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function C(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function h(e){if("production"!==process.env.NODE_ENV)var t={},n=0;function o(o,a,A,l,u,d,h){if(l=l||c,d=d||A,h!==r){if(s){var f=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 f.name="Invariant Violation",f}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=l+":"+A;!t[v]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` 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."),t[v]=!0,n++)}}return null==a[A]?o?null===a[A]?new C("The "+u+" `"+d+"` is marked as required in `"+l+"`, but its value is `null`."):new C("The "+u+" `"+d+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(a,A,l,u,d)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function f(e){return h((function(t,r,n,o,i,a){var A=t[r];return m(A)!==e?new C("Invalid "+o+" `"+i+"` of type `"+g(A)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,r,n,o){return new C((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function p(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(p);if(null===e||A(e))return!0;var t=function(e){var t=e&&(l&&e[l]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var r,n=t.call(e);if(t!==e.entries){for(;!(r=n.next()).done;)if(!p(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function g(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=g(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return C.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},ce}function we(){if(Ce)return de;Ce=1;var e=me();function t(){}function r(){}return r.resetWarningCache=t,de=function(){function n(t,r,n,o,i,a){if(a!==e){var A=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 A.name="Invariant Violation",A}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}function Se(){if(he)return X.exports;if(he=1,"production"!==process.env.NODE_ENV){var e=ve();X.exports=xe()(e.isElement,true)}else X.exports=we()();return X.exports}var be=J(Se()),Ee=function(){return h((function e(t,r){C(this,e),this.text=t,this.patterns=r||[]}),[{key:"parse",value:function(){var e=this,t=[{children:this.text}];return this.patterns.forEach((function(r){var n=[],o=r.nonExhaustiveModeMaxMatchCount||0,i=Math.min(Math.max(Number.isInteger(o)?o:0,0)||Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),a=0;t.forEach((function(t){if(t._matched)n.push(t);else{var o,A=[],s=t.children,l=0;for(r.pattern.lastIndex=0;s&&(o=r.pattern.exec(s));){var c=s.substr(0,o.index);if(l=o.index,++a>i)break;A.push({children:c}),A.push(e.getMatchedPart(r,o[0],o,l)),s=s.substr(o.index+o[0].length),l+=o[0].length-1,r.pattern.lastIndex=0}A.push({children:s}),n.push.apply(n,A)}})),t=n})),t.forEach((function(e){return delete e._matched})),t.filter((function(e){return!!e.children}))}},{key:"getMatchedPart",value:function(e,t,r,n){var o={};Object.keys(e).forEach((function(r){"pattern"!==r&&"renderText"!==r&&"nonExhaustiveModeMaxMatchCount"!==r&&("function"==typeof e[r]?o[r]=function(){return e[r](t,n)}:o[r]=e[r])}));var i=t;return e.renderText&&"function"==typeof e.renderText&&(i=e.renderText(t,r)),g(g({},o),{},{children:i,_matched:!0})}}])}(),ke=["type"],Ie=["style"],_e=["parse","childrenProps"],Re={url:/(https?:\/\/|www\.)[-a-zA-Z0-9@:%._\+~#=]{1,256}\.(xn--)?[a-z0-9-]{2,20}\b([-a-zA-Z0-9@:%_\+\[\],.~#?&\/=]*[-a-zA-Z0-9@:%_\+\]~#?&\/=])*/i,phone:/[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,7}/,email:/\S+@\S+\.\S+/},Me=be.shape(g(g({},t.Text.propTypes),{},{type:be.oneOf(Object.keys(Re)).isRequired,nonExhaustiveMaxMatchCount:be.number})),Oe=be.shape(g(g({},t.Text.propTypes),{},{pattern:be.oneOfType([be.string,be.instanceOf(RegExp)]).isRequired,nonExhaustiveMaxMatchCount:be.number})),je=function(){function r(){return C(this,r),d(this,r,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(r,n.Component),h(r,[{key:"setNativeProps",value:function(e){this._root.setNativeProps(e)}},{key:"getPatterns",value:function(){return this.props.parse.map((function(e){var t=e.type,r=y(e,ke);if(t){if(!Re[t])throw new Error("".concat(e.type," is not a supported type"));r.pattern=Re[t]}return r}))}},{key:"getParsedText",value:function(){var r=this;return this.props.parse?"string"!=typeof this.props.children?this.props.children:new Ee(this.props.children,this.getPatterns()).parse().map((function(n,o){var i=r.props.style,a=n.style,A=y(n,Ie);return e.jsx(t.Text,g(g({style:[i,a]},r.props.childrenProps),A),"parsedText-".concat(o))})):this.props.children}},{key:"render",value:function(){var r=this,n=g({},this.props);n.parse,n.childrenProps;var o=y(n,_e);return e.jsx(t.Text,g(g({ref:function(e){return r._root=e}},o),{},{children:this.getParsedText()}))}}])}();je.displayName="ParsedText",je.propTypes=g(g({},t.Text.propTypes),{},{parse:be.arrayOf(be.oneOfType([Me,Oe])),childrenProps:be.shape(t.Text.propTypes)}),je.defaultProps={parse:null,childrenProps:{}};var Te,Ge,Ve,Pe,Ke,De,Le,Fe,Be,He,Ue,We=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 15 15",children:e.jsx(o.Path,{fill:n,fillRule:"evenodd",d:"M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z",clipRule:"evenodd"})})},Ye=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:n,d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})},Ne=n.createContext(void 0),ze=function(t){var r=t.children,o=R(n.useState(null),2),i=o[0],a=o[1];return e.jsx(Ne.Provider,{value:{currentlyPlayingId:i,setCurrentlyPlayingId:a},children:r})},Qe=function(e){var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r<10?"0":"").concat(r)},Je=[1,1.5,2],qe=42;function Xe(n){var o,i,a,A,s,l=n.isPlaying,c=n.playbackRate,u=n.onCycleSpeed,d=n.senderAvatar,C=n.senderName,h=n.isCurrentUser,f=n.theme;return l?e.jsx(t.Pressable,{onPress:u,style:[r(Te||(Te=M(["rounded-full items-center justify-center"]))),{width:qe,height:qe,backgroundColor:h?"rgba(0,0,0,0.22)":"rgba(255,255,255,0.12)"},null==f||null===(o=f.messageStyle)||void 0===o?void 0:o.audioSpeedButtonStyle],children:e.jsx(t.Text,{style:Q([r(Ge||(Ge=M(["text-xs font-semibold"]))),{color:U(f,h)},null==f||null===(i=f.messageStyle)||void 0===i?void 0:i.audioSpeedTextStyle],null==f?void 0:f.fontFamily),children:1===c?"1x":"".concat(c,"x")})}):d?e.jsx(t.Image,{source:{uri:d},style:[r(Ve||(Ve=M(["rounded-full"]))),{width:qe,height:qe},null==f||null===(a=f.bubbleStyle)||void 0===a?void 0:a.avatarImageStyle],resizeMode:"cover"}):e.jsx(t.View,{style:[r(Pe||(Pe=M(["rounded-full items-center justify-center"]))),{width:qe,height:qe,backgroundColor:h?"rgba(0,0,0,0.2)":"#9ca3af"}],children:e.jsx(t.Text,{style:Q([r(Ke||(Ke=M(["text-base font-semibold capitalize"]))),{color:"#ffffff"}],null==f?void 0:f.fontFamily),children:(A=C,s=null==A?void 0:A.trim(),s?s.charAt(0).toUpperCase():"?")})})}var $e,Ze,et,tt,rt,nt,ot,it,at=function(o){var a,A,s=o.audioUrl,l=o.audioId,c=o.isVideoPlaying,u=o.isCurrentUser,d=o.senderAvatar,C=o.senderName,h=o.reserveStatusSpace,f=void 0===h||h,v=K(),p=v.theme,m=v.CustomPlayIcon,y=v.CustomPauseIcon,x=v.showMessageStatus,w=function(){var e=n.useContext(Ne);if(!e)throw new Error("useAudio must be used within an AudioProvider");return e}(),S=w.currentlyPlayingId,b=w.setCurrentlyPlayingId,E=n.useRef(null),k=R(n.useState(!1),2),I=k[0],_=k[1],O=R(n.useState(0),2),j=O[0],T=O[1],G=R(n.useState(0),2),V=G[0],P=G[1],L=R(n.useState(!1),2),F=L[0],B=L[1],H=R(n.useState(1),2),U=H[0],W=H[1],Y=R(n.useState(0),2),N=Y[0],z=Y[1],J=n.useRef(null),q=n.useMemo((function(){return function(e,t){for(var r=5381,n=0;n<e.length;n++)r=(r<<5)+r+e.charCodeAt(n)|0;return Array.from({length:t},(function(e,t){return r=0|Math.imul(r^r>>>16,73244475+31337*t),r^=r>>>13,.18+Math.abs(r)%100/100*.82}))}(s,50)}),[s]),X=function(e,t){var r,n,o,i,a=D(e);return t?{inactive:null!==(o=null==a?void 0:a.sentAudioWaveformColor)&&void 0!==o?o:"rgba(255,255,255,0.35)",active:null!==(i=null==a?void 0:a.sentAudioWaveformActiveColor)&&void 0!==i?i:"rgba(255,255,255,0.95)"}:{inactive:null!==(r=null==a?void 0:a.receivedAudioWaveformColor)&&void 0!==r?r:"rgba(0,0,0,0.20)",active:null!==(n=null==a?void 0:a.receivedAudioWaveformActiveColor)&&void 0!==n?n:"rgba(0,0,0,0.60)"}}(p,u),$=X.inactive,Z=X.active,ee=function(e,t){var r,n,o,i,a=D(e);return t?null!==(o=null!==(i=null==a?void 0:a.sentAudioTimestampColor)&&void 0!==i?i:null==a?void 0:a.sentTimestampColor)&&void 0!==o?o:"rgba(255,255,255,0.75)":null!==(r=null!==(n=null==a?void 0:a.receivedAudioTimestampColor)&&void 0!==n?n:null==a?void 0:a.receivedTimestampColor)&&void 0!==r?r:"rgba(0,0,0,0.45)"}(p,u),te=function(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentAudioPlayIconColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioPlayIconColor)&&void 0!==r?r:"#374151"}(p,u),re=function(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentAudioPauseIconColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioPauseIconColor)&&void 0!==r?r:"#374151"}(p,u),ne=I&&!(c||!!S&&S!==l),oe=V>0?j/V:0,ie=n.useCallback((function(e){var t;(P(e.duration),null!==J.current)&&(null===(t=E.current)||void 0===t||t.seek(J.current),J.current=null)}),[]),ae=n.useCallback((function(e){var t=e.currentTime;F||T(t)}),[F]),Ae=n.useCallback((function(){var e;_(!1),T(0),null===(e=E.current)||void 0===e||e.seek(0),b(null)}),[b]),se=n.useCallback((function(){ne?(_(!1),b(null)):(b(l),_(!0))}),[ne,l,b]),le=n.useCallback((function(){W((function(e){var t=Je.indexOf(e),r=Je[(t+1)%Je.length];return null!=r?r:1}))}),[]),ce=n.useCallback((function(e){var t=N;if(!(t<=0||V<=0)){var r,n=Math.max(0,Math.min(e/t,1))*V;if(T(n),V>0)null===(r=E.current)||void 0===r||r.seek(n);else J.current=n}}),[V,N]),ue=n.useMemo((function(){return t.PanResponder.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return!0},onPanResponderGrant:function(e){B(!0),ce(e.nativeEvent.locationX)},onPanResponderMove:function(e){return ce(e.nativeEvent.locationX)},onPanResponderRelease:function(){return B(!1)},onPanResponderTerminate:function(){return B(!1)}})}),[ce]),de=e.jsx(t.Pressable,{onPress:se,hitSlop:8,style:r(De||(De=M(["shrink-0 px-0.5"]))),children:ne?y?e.jsx(y,{}):e.jsx(We,{style:r.style("h-6 w-6"),color:re}):m?e.jsx(m,{}):e.jsx(Ye,{style:r.style("h-6 w-6"),color:te})}),Ce=e.jsx(Xe,{isPlaying:ne,playbackRate:U,onCycleSpeed:le,senderAvatar:d,senderName:C,isCurrentUser:u,theme:p}),he=e.jsx(t.View,{style:[r(Le||(Le=M(["flex-1 min-w-0"]))),{height:36}],onLayout:function(e){return z(e.nativeEvent.layout.width)},children:e.jsx(t.View,g(g({style:[{flex:1,flexDirection:"row",alignItems:"center"},null==p||null===(a=p.messageStyle)||void 0===a?void 0:a.progressBarStyle]},ue.panHandlers),{},{children:q.map((function(r,n){var o,i=(n+.5)/50<=oe;return e.jsx(t.View,{style:[{flex:1,marginHorizontal:.5,height:Math.max(3,Math.round(36*r)),borderRadius:2,backgroundColor:i?Z:$},i?null==p||null===(o=p.messageStyle)||void 0===o?void 0:o.activeProgressBarStyle:void 0]},n)}))}))});return e.jsxs(t.View,{style:[r(Fe||(Fe=M(["min-w-[240px] max-w-[280px] py-1.5 px-1"]))),f&&x&&r(Be||(Be=M(["pb-4"])))],children:[e.jsx(i,{ref:E,source:{uri:s},paused:!ne,rate:U,playInBackground:!1,playWhenInactive:!1,onLoad:ie,onProgress:ae,onEnd:Ae,style:{width:0,height:0},progressUpdateInterval:80}),e.jsx(t.View,{style:r(He||(He=M(["flex-row items-center gap-1.5"]))),children:u?e.jsxs(e.Fragment,{children:[Ce,de,he]}):e.jsxs(e.Fragment,{children:[de,he,Ce]})}),e.jsx(t.Text,{style:Q([r(Ue||(Ue=M(["text-[11px] mt-1"]))),{color:ee,paddingLeft:u?82:34},null==p||null===(A=p.messageStyle)||void 0===A?void 0:A.audioDurationStyle],null==p?void 0:p.fontFamily),children:Qe(ne?j:V>0?V:j)})]})},At=n.memo(at),st=function(r){var i=r.style,a=r.spinning,A=void 0!==a&&a,s=n.useRef(new t.Animated.Value(0)).current;n.useEffect((function(){A&&t.Animated.loop(t.Animated.timing(s,{toValue:1,duration:1e3,easing:t.Easing.linear,useNativeDriver:!0})).start()}),[A]);var l=s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return e.jsx(t.Animated.View,{style:A?{transform:[{rotate:l}]}:void 0,children:e.jsx(o,{style:i,viewBox:"0 0 1024 1024",children:e.jsx(o.Path,{d:"M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36",fill:"white"})})})},lt=320,ct=lt,ut=Math.round(176),dt=lt-ut-2,Ct=Math.round(159),ht=function(o){var a,A=o.uri,s=o.cellStyle,l=o.roundedStyle,c=K(),u=c.theme,d=c.CustomPlayIcon,C=n.useRef(null),h=R(n.useState(0),2),f=h[0],v=h[1],p=R(n.useState(!0),2),m=p[0],g=p[1],y=R(n.useState(!1),2),x=y[0],w=y[1];return e.jsxs(t.View,{style:[s,l],pointerEvents:"none",children:[e.jsx(i,{source:{uri:A},ref:C,paused:!0,muted:!0,playInBackground:!1,playWhenInactive:!1,pointerEvents:"none",style:[l,{width:"100%",height:"100%"}],resizeMode:"cover",onLoadStart:function(){g(!0),w(!1)},onLoad:function(e){v(e.duration),g(!1)},onError:function(){w(!0),g(!1)}}),m&&e.jsx(t.View,{style:[r($e||($e=M(["absolute inset-0 items-center justify-center bg-black/40"]))),l],children:e.jsx(st,{style:r.style("h-8 w-8"),spinning:!0})}),!m&&!x&&e.jsxs(e.Fragment,{children:[e.jsx(t.View,{style:r(Ze||(Ze=M(["pointer-events-none absolute inset-0 items-center justify-center"]))),children:d?e.jsx(d,{}):e.jsx(Ye,{style:r.style("h-10 w-10"),color:(null==u||null===(a=u.colors)||void 0===a?void 0:a.videoPlayIconColor)||"white"})}),e.jsx(t.View,{style:r(et||(et=M(["pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded"]))),children:e.jsx(t.Text,{style:r(tt||(tt=M(["text-white text-[10px] font-semibold"]))),children:ft(f)})})]}),x&&e.jsx(t.View,{style:[r(rt||(rt=M(["absolute inset-0 items-center justify-center bg-red-500/50"]))),l],children:e.jsx(t.Text,{style:Q(r(nt||(nt=M(["text-white text-xs"]))),null==u?void 0:u.fontFamily),children:"Video"})})]})};function ft(e){if(!e||Number.isNaN(e))return"0:00";var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r.toString().padStart(2,"0"))}var vt,pt,mt,gt,yt,xt,wt,St,bt,Et,kt,It,_t,Rt,Mt,Ot,jt,Tt,Gt,Vt,Pt,Kt,Dt,Lt,Ft=function(n){var o=n.items,i=n.onOpenGallery,a=t.useWindowDimensions().width,A=Math.min(240,.72*a);if(0===o.length)return null;var s={borderRadius:6,overflow:"hidden"};if(1===o.length){var l=o[0];return e.jsx(t.Pressable,{onPress:function(){return i(o,0)},style:{width:A,height:320,marginVertical:8},children:"image"===l.kind?e.jsx(t.Image,{source:{uri:l.uri},style:{width:"100%",height:"100%",borderRadius:8},resizeMode:"cover"}):e.jsx(ht,{uri:l.uri,cellStyle:{width:A,height:320},roundedStyle:{borderRadius:8}})})}if(2===o.length){var c=(A-2)/2;return e.jsx(t.View,{style:{width:A,height:ct,flexDirection:"row",gap:2,marginVertical:8},children:o.slice(0,2).map((function(r,n){return e.jsx(t.Pressable,{onPress:function(){return i(o,n)},style:{width:c,height:ct},children:"image"===r.kind?e.jsx(t.Image,{source:{uri:r.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ht,{uri:r.uri,cellStyle:{width:c,height:ct},roundedStyle:s})},"".concat(r.uri,"-").concat(n))}))})}if(3===o.length){var u=o[0],d=o[1],C=o[2],h=(A-2)/2;return e.jsxs(t.View,{style:{width:A,height:lt,marginVertical:8,gap:2},children:[e.jsx(t.Pressable,{onPress:function(){return i(o,0)},style:{width:A,height:ut},children:"image"===u.kind?e.jsx(t.Image,{source:{uri:u.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ht,{uri:u.uri,cellStyle:{width:A,height:ut},roundedStyle:s})}),e.jsxs(t.View,{style:{flexDirection:"row",gap:2,height:dt},children:[e.jsx(t.Pressable,{onPress:function(){return i(o,1)},style:{width:h,height:dt},children:"image"===d.kind?e.jsx(t.Image,{source:{uri:d.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ht,{uri:d.uri,cellStyle:{width:h,height:dt},roundedStyle:s})},"".concat(d.uri,"-1")),e.jsx(t.Pressable,{onPress:function(){return i(o,2)},style:{width:h,height:dt},children:"image"===C.kind?e.jsx(t.Image,{source:{uri:C.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ht,{uri:C.uri,cellStyle:{width:h,height:dt},roundedStyle:s})},"".concat(C.uri,"-2"))]})]})}var f=(A-2)/2,v=o.length-4,p=o.slice(0,4);return e.jsx(t.View,{style:{width:A,height:lt,flexWrap:"wrap",flexDirection:"row",gap:2,marginVertical:8},children:p.map((function(n,a){return e.jsxs(t.Pressable,{onPress:function(){return i(o,a)},style:{width:f,height:Ct,position:"relative"},children:["image"===n.kind?e.jsx(t.Image,{source:{uri:n.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ht,{uri:n.uri,cellStyle:{width:f,height:Ct},roundedStyle:s}),3===a&&v>0&&e.jsx(t.View,{style:r(ot||(ot=M(["absolute inset-0 bg-black/55 items-center justify-center"]))),children:e.jsxs(t.Text,{style:r(it||(it=M(["text-white text-lg font-bold"]))),children:["+",v]})})]},"".concat(n.uri,"-").concat(a))}))})},Bt=function(o){var i,a,A,s,l=o.message,c=o.onGalleryOpen,u=o.isVideoPlaying,d=o.isCurrentUser,C=K(),h=C.theme,f=C.showMessageStatus,v=C.onFileAttachmentPress,p=n.useMemo((function(){return N(l)}),[l]);return e.jsxs(t.View,{children:[p.length>0&&e.jsx(Ft,{items:p,onOpenGallery:c}),(null!==(i=l.fileAttachments)&&void 0!==i?i:[]).map((function(n,o){var i,a,A,s,l,c;return e.jsxs(t.Pressable,{onPress:function(){v?v(n):t.Linking.openURL(n.uri.startsWith("http")||n.uri.startsWith("file:")?n.uri:"file://".concat(n.uri))},style:[r(vt||(vt=M(["my-1.5 py-2 px-3 rounded-lg max-w-[220px]"]))),{backgroundColor:F(h,d)},d?null==h||null===(i=h.messageStyle)||void 0===i?void 0:i.sentFileAttachmentStyle:null==h||null===(a=h.messageStyle)||void 0===a?void 0:a.receivedFileAttachmentStyle],children:[e.jsxs(t.Text,{style:Q([r(pt||(pt=M(["text-xs font-semibold"]))),{color:B(h,d)},d?null==h||null===(A=h.messageStyle)||void 0===A?void 0:A.sentFileAttachmentTextStyle:null==h||null===(s=h.messageStyle)||void 0===s?void 0:s.receivedFileAttachmentTextStyle],null==h?void 0:h.fontFamily),numberOfLines:2,children:["📎 ",n.name]}),e.jsx(t.Text,{style:Q([r(mt||(mt=M(["text-[10px] mt-0.5"]))),{color:H(h,d)},d?null==h||null===(l=h.messageStyle)||void 0===l?void 0:l.sentFileAttachmentSubtitleStyle:null==h||null===(c=h.messageStyle)||void 0===c?void 0:c.receivedFileAttachmentSubtitleStyle],null==h?void 0:h.fontFamily),children:n.type})]},"".concat(n.uri,"-").concat(o))})),l.audio&&e.jsx(At,{audioUrl:l.audio,audioId:l.id,isVideoPlaying:u,isCurrentUser:d,senderAvatar:l.senderAvatar,senderName:l.senderName,reserveStatusSpace:!l.text}),l.text&&e.jsx(je,{style:Q([r(gt||(gt=M(["pt-1"]))),r(f?yt||(yt=M(["pb-0"])):xt||(xt=M(["pb-2"]))),{wordBreak:"break-word",overflowWrap:"break-word"},d?null==h||null===(a=h.messageStyle)||void 0===a?void 0:a.sentTextStyle:null==h||null===(A=h.messageStyle)||void 0===A?void 0:A.receivedTextStyle,W(h,d)?{color:W(h,d)}:void 0],null==h?void 0:h.fontFamily),parse:[{type:"url",style:g({color:"blue",textDecorationLine:"underline"},(s=null==h?void 0:h.fontFamily,s?{fontFamily:s}:void 0)),onPress:function(e){return t.Linking.openURL(e.startsWith("http")?e:"https://".concat(e))}}],childrenProps:{allowFontScaling:!1},children:l.text})]})},Ht=n.memo(Bt),Ut=function(t){var r=t.style,n=t.fill;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:n,d:"M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z"})})},Wt=function(t){var r=t.style,n=t.fill;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{d:"m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z",fill:n})})},Yt=function(n){var o,i,a,A=n.time,s=n.status,l=n.isCurrentUser,c=n.hasText,u=n.hasAudio,d=n.hasGalleryMedia,C=n.hasFileAttachments,h=K(),f=h.theme,v=h.showMessageStatus,p=(d||C)&&!c&&!u,m=d&&!c&&!u?"#ffffff":p?function(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentTimestampColor)&&void 0!==n?n:"rgba(255, 255, 255, 0.75)":null!==(r=null==o?void 0:o.receivedTimestampColor)&&void 0!==r?r:"rgba(107, 114, 128, 0.85)"}(f,l):function(e,t){var r,n,o=D(e);return t?null!==(n=null==o?void 0:o.sentTimestampColor)&&void 0!==n?n:"rgba(255, 255, 255, 0.75)":null!==(r=null==o?void 0:o.receivedTimestampColor)&&void 0!==r?r:"rgba(107, 114, 128, 0.85)"}(f,l);return e.jsx(e.Fragment,{children:v&&e.jsxs(t.View,{style:[r(wt||(wt=M(["flex-row items-center"]))),c?r(St||(St=M(["justify-end pb-1 ml-4"]))):u?r(bt||(bt=M(["absolute right-3 bottom-2"]))):p?[r(Et||(Et=M(["absolute right-3 bottom-4"]))),L(f,l)]:[r(kt||(kt=M(["absolute right-3 bottom-4"]))),L(f,l)]],children:[e.jsx(t.Text,{style:Q([r(It||(It=M(["text-xs"]))),{color:m}],null==f?void 0:f.fontFamily),children:A}),l&&e.jsxs(t.View,{style:r(_t||(_t=M(["ml-1 flex-row items-center"]))),children:["sent"===s&&e.jsx(Wt,{style:r.style("h-4 w-4",{opacity:.7}),fill:(null==f||null===(o=f.colors)||void 0===o?void 0:o.sentIconColor)||"#6B7280"}),"delivered"===s&&e.jsx(Ut,{style:r.style("h-4 w-4",{opacity:.7}),fill:(null==f||null===(i=f.colors)||void 0===i?void 0:i.deliveredIconColor)||"#6B7280"}),"read"===s&&e.jsx(Ut,{style:r.style("h-4 w-4",{opacity:.9}),fill:(null==f||null===(a=f.colors)||void 0===a?void 0:a.readIconColor)||"#3B82F6"})]})]})})},Nt=n.memo(Yt),zt=function(n){var o,i,a,A,s,l,c,u,d,C,h=n.message,f=n.isCurrentUser,v=n.isFirstInSequence,p=n.onLongPress,m=K(),y=m.theme,x=m.showAvatars,w=m.showUserNames,S=m.showBubbleTail,b=m.setMediaViewerGallery,E=m.isVideoPlaying,k=N(h),I=(null!==(o=null===(i=h.fileAttachments)||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0&&0===k.length&&!h.text&&!h.audio;return e.jsxs(t.Pressable,{onLongPress:p,style:[r(Rt||(Rt=M(["px-2 my-1 max-w-[75%] relative"]))),r(f?Mt||(Mt=M(["self-end mr-3"])):Ot||(Ot=M(["self-start ml-9"]))),r(v?f?jt||(jt=M(["bg-green-500 rounded-tr-none"])):Tt||(Tt=M(["bg-white rounded-tl-none"])):f?Gt||(Gt=M(["bg-green-500"])):Vt||(Vt=M(["bg-white"]))),g(g({borderRadius:8},Y(y,f)?{backgroundColor:Y(y,f)}:{}),f?null==y||null===(a=y.bubbleStyle)||void 0===a?void 0:a.sent:null==y||null===(A=y.bubbleStyle)||void 0===A?void 0:A.received)],children:[!f&&v&&x&&e.jsxs(e.Fragment,{children:[e.jsx(t.View,{style:r(Pt||(Pt=M(["absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center"]))),children:h.senderAvatar?e.jsx(t.Image,{source:{uri:h.senderAvatar},style:[r(Kt||(Kt=M(["w-full h-full rounded-full"]))),null==y||null===(s=y.bubbleStyle)||void 0===s?void 0:s.avatarImageStyle],resizeMode:"cover"}):e.jsx(t.Text,{style:Q([r(Dt||(Dt=M(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==y||null===(l=y.bubbleStyle)||void 0===l?void 0:l.avatarTextStyle],null==y?void 0:y.fontFamily),children:null===(c=h.senderName)||void 0===c?void 0:c.charAt(0)})}),w&&h.senderName&&e.jsx(t.Text,{style:Q([r(Lt||(Lt=M(["text-sm text-black font-semibold mt-1 capitalize"]))),null==y||null===(u=y.bubbleStyle)||void 0===u?void 0:u.userNameStyle],null==y?void 0:y.fontFamily),children:h.senderName})]}),v&&S&&e.jsx(T,{style:r.style("absolute w-6 h-6",f?"rotate-90 -right-3.5 mt-[1.24px] -top-1":"rotate-180 -left-3.5 mt-[1.5px] -top-[3px]"),color:f?(null==y||null===(d=y.colors)||void 0===d?void 0:d.sentMessageTailColor)||"rgba(34, 197, 94, 1)":(null==y||null===(C=y.colors)||void 0===C?void 0:C.receivedMessageTailColor)||"white"}),e.jsx(Ht,{message:h,isCurrentUser:f,isFirstInSequence:v,onGalleryOpen:function(e,t){b(e,t)},isVideoPlaying:E}),e.jsx(Nt,{time:h.time,status:f?h.status:void 0,isCurrentUser:f,hasText:!!h.text,hasAudio:!!h.audio,hasGalleryMedia:k.length>0&&!h.text,hasFileAttachments:I})]})},Qt=n.memo(zt),Jt=function(t){var r=t.style,n=t.color;return e.jsx(o.Svg,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",strokeWidth:"1.5",stroke:n,children:[e.jsx(o.Circle,{cx:"12",cy:"13",r:"3"}),e.jsx(o.Path,{d:"M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"M19 10h-1"})]})})},qt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:n,children:[e.jsx(o.Path,{strokeLinecap:"round",strokeWidth:"1.5",d:"M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001"}),e.jsx(o.Ellipse,{cx:"14.509",cy:"9.774",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 14.51 9.774)"}),e.jsx(o.Ellipse,{cx:"8.714",cy:"11.328",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 8.714 11.328)"}),e.jsx(o.Path,{strokeWidth:"1.5",d:"M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z"}),e.jsx(o.Path,{strokeWidth:"1.5",d:"m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935"})]})})},Xt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",strokeWidth:"1.5",stroke:n,children:[e.jsx(o.Path,{d:"M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3",opacity:".5"})]})})},$t=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,fill:n,viewBox:"0 0 24 24",children:e.jsx(o.Path,{d:"M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z"})})},Zt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",strokeWidth:"1.5",stroke:n,children:[e.jsx(o.Path,{d:"m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"m17.79 6.21l-4.211 4.165",opacity:".5"})]})})};function er(){return tr.apply(this,arguments)}function tr(){return(tr=u(j().mark((function e(){var r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("android"!==t.Platform.OS){e.next=11;break}return e.prev=1,e.next=4,t.PermissionsAndroid.request(t.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,{title:"Microphone Permission",message:"This app needs access to your microphone to record audio.",buttonPositive:"OK"});case 4:return r=e.sent,e.abrupt("return",r===t.PermissionsAndroid.RESULTS.GRANTED);case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}var rr=function(t){var r=t.style,n=t.color,i=void 0===n?"#6b7280":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",fill:"none",children:e.jsx(o.Path,{d:"M6 15l6-6 6 6",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},nr=function(t){var r=t.style,n=t.color,i=void 0===n?"#6b7280":n;return e.jsxs(o,{style:r,viewBox:"0 0 24 24",fill:"none",children:[e.jsx(o.Rect,{x:"5",y:"11",width:"14",height:"10",rx:"2",stroke:i,strokeWidth:"1.5"}),e.jsx(o.Path,{d:"M8 11V7a4 4 0 0 1 8 0v4",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})},or=function(t){var r=t.style,n=t.color,i=void 0===n?"#ef4444":n;return e.jsxs(o,{style:r,viewBox:"0 0 24 24",fill:"none",children:[e.jsx(o.Path,{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx(o.Path,{d:"M10 11v6M14 11v6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})};function ir(){t.Vibration.vibrate(20)}var ar={code:"function VoiceRecorderFlowTsx1(finished){const{runOnJS,finalizeReset}=this.__closure;if(finished){runOnJS(finalizeReset)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx1","finished","runOnJS","finalizeReset","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAkKgG,SAAAA,qBAAaA,CAAAC,QAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEjG,GAAIH,QAAQ,CAAE,CACVC,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B,CACJ","ignoreList":[]}',version:"3.16.7"},Ar={code:"function VoiceRecorderFlowTsx2(_e,success){const{runOnJS,fireQuickTap}=this.__closure;if(success)runOnJS(fireQuickTap)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx2","_e","success","runOnJS","fireQuickTap","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAiPmB,QAAC,CAAAA,qBAAgBA,CAAAC,EAAA,CAAAC,OAAA,QAAAC,OAAA,CAAAC,YAAA,OAAAC,SAAA,CAExB,GAAIH,OAAO,CACPC,OAAO,CAACC,YAAY,CAAC,CAAC,CAAC,CAC/B","ignoreList":[]}',version:"3.16.7"},sr={code:"function VoiceRecorderFlowTsx3(){const{runOnJS,fireHoldStart}=this.__closure;runOnJS(fireHoldStart)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx3","runOnJS","fireHoldStart","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAwPqB,SAAAA,qBAAMA,CAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEfF,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B","ignoreList":[]}',version:"3.16.7"},lr={code:"function VoiceRecorderFlowTsx4(e){const{stateShared,STATE_HOLD,maxLeftShared,maxUpShared,translateX,translateY,enableLockShared,lockFiredShared,lockThresholdShared,runOnJS,fireLock,enableCancelShared,cancelFiredShared,cancelThresholdShared,fireCancel}=this.__closure;if(stateShared.value!==STATE_HOLD)return;const tx=Math.max(maxLeftShared.value,Math.min(0,e.translationX));const ty=Math.max(maxUpShared.value,Math.min(0,e.translationY));translateX.value=tx;translateY.value=ty;const dominantY=Math.abs(ty)>Math.abs(tx);if(dominantY&&enableLockShared.value===1&&lockFiredShared.value===0&&ty<=lockThresholdShared.value){lockFiredShared.value=1;runOnJS(fireLock)();}if(!dominantY&&enableCancelShared.value===1&&cancelFiredShared.value===0&&tx<=cancelThresholdShared.value){cancelFiredShared.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx4","e","stateShared","STATE_HOLD","maxLeftShared","maxUpShared","translateX","translateY","enableLockShared","lockFiredShared","lockThresholdShared","runOnJS","fireLock","enableCancelShared","cancelFiredShared","cancelThresholdShared","fireCancel","__closure","value","tx","Math","max","min","translationX","ty","translationY","dominantY","abs"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA4PuB,QAAC,CAAAA,qBAAKA,CAAAC,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,aAAA,CAAAC,WAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,gBAAA,CAAAC,eAAA,CAAAC,mBAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,kBAAA,CAAAC,iBAAA,CAAAC,qBAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,GAAIf,WAAW,CAACgB,KAAK,GAAKf,UAAU,CAChC,OACJ,KAAM,CAAAgB,EAAE,CAAGC,IAAI,CAACC,GAAG,CAACjB,aAAa,CAACc,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACsB,YAAY,CAAC,CAAC,CACrE,KAAM,CAAAC,EAAE,CAAGJ,IAAI,CAACC,GAAG,CAAChB,WAAW,CAACa,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACwB,YAAY,CAAC,CAAC,CACnEnB,UAAU,CAACY,KAAK,CAAGC,EAAE,CACrBZ,UAAU,CAACW,KAAK,CAAGM,EAAE,CACrB,KAAM,CAAAE,SAAS,CAAGN,IAAI,CAACO,GAAG,CAACH,EAAE,CAAC,CAAGJ,IAAI,CAACO,GAAG,CAACR,EAAE,CAAC,CAC7C,GAAIO,SAAS,EACTlB,gBAAgB,CAACU,KAAK,GAAK,CAAC,EAC5BT,eAAe,CAACS,KAAK,GAAK,CAAC,EAC3BM,EAAE,EAAId,mBAAmB,CAACQ,KAAK,CAAE,CACjCT,eAAe,CAACS,KAAK,CAAG,CAAC,CACzBP,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACvB,CACA,GAAI,CAACc,SAAS,EACVb,kBAAkB,CAACK,KAAK,GAAK,CAAC,EAC9BJ,iBAAiB,CAACI,KAAK,GAAK,CAAC,EAC7BC,EAAE,EAAIJ,qBAAqB,CAACG,KAAK,CAAE,CACnCJ,iBAAiB,CAACI,KAAK,CAAG,CAAC,CAC3BP,OAAO,CAACK,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},cr={code:"function VoiceRecorderFlowTsx5(){const{runOnJS,fireHoldEnd}=this.__closure;runOnJS(fireHoldEnd)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx5","runOnJS","fireHoldEnd","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAoRmB,SAAAA,qBAAMA,CAAA,QAAAC,OAAA,CAAAC,WAAA,OAAAC,SAAA,CAEbF,OAAO,CAACC,WAAW,CAAC,CAAC,CAAC,CAC1B","ignoreList":[]}',version:"3.16.7"},ur={code:"function VoiceRecorderFlowTsx6(){const{lockFiredShared,cancelFiredShared,translateX,withSpring,translateY}=this.__closure;if(lockFiredShared.value===0&&cancelFiredShared.value===0){translateX.value=withSpring(0,{damping:18,stiffness:180});translateY.value=withSpring(0,{damping:18,stiffness:180});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx6","lockFiredShared","cancelFiredShared","translateX","withSpring","translateY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAwRwB,SAAAA,qBAAMA,CAAA,QAAAC,eAAA,CAAAC,iBAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,UAAA,OAAAC,SAAA,CAElB,GAAIL,eAAe,CAACM,KAAK,GAAK,CAAC,EAAIL,iBAAiB,CAACK,KAAK,GAAK,CAAC,CAAE,CAC9DJ,UAAU,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEJ,UAAU,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACrE,CACJ","ignoreList":[]}',version:"3.16.7"},dr={code:"function VoiceRecorderFlowTsx7(){const{containerOpacity,containerY}=this.__closure;return{opacity:containerOpacity.value,transform:[{translateY:containerY.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx7","containerOpacity","containerY","__closure","opacity","value","transform","translateY"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAkSoD,SAAAA,sBAAA,QAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,OAAO,CACnDC,OAAO,CAAEH,gBAAgB,CAACI,KAAK,CAC/BC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEL,UAAU,CAACG,KAAM,CAAC,CAChD,CAAC","ignoreList":[]}',version:"3.16.7"},Cr={code:"function VoiceRecorderFlowTsx8(){const{stateShared,STATE_HOLD,STATE_IDLE,micPulse,translateX,translateY}=this.__closure;const isHold=stateShared.value===STATE_HOLD;const pulse=stateShared.value===STATE_IDLE?1:micPulse.value;return{transform:[{translateX:isHold?translateX.value:0},{translateY:isHold?translateY.value:0},{scale:pulse}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx8","stateShared","STATE_HOLD","STATE_IDLE","micPulse","translateX","translateY","__closure","isHold","value","pulse","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAsS4C,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,QAAA,CAAAC,UAAA,CAAAC,UAAA,OAAAC,SAAA,CAC1C,KAAM,CAAAC,MAAM,CAAGP,WAAW,CAACQ,KAAK,GAAKP,UAAU,CAC/C,KAAM,CAAAQ,KAAK,CAAGT,WAAW,CAACQ,KAAK,GAAKN,UAAU,CAAG,CAAC,CAAGC,QAAQ,CAACK,KAAK,CACnE,MAAO,CACHE,SAAS,CAAE,CACP,CAAEN,UAAU,CAAEG,MAAM,CAAGH,UAAU,CAACI,KAAK,CAAG,CAAE,CAAC,CAC7C,CAAEH,UAAU,CAAEE,MAAM,CAAGF,UAAU,CAACG,KAAK,CAAG,CAAE,CAAC,CAC7C,CAAEG,KAAK,CAAEF,KAAM,CAAC,CAExB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},hr={code:"function VoiceRecorderFlowTsx9(){const{interpolate,translateX,cancelThresholdShared,Extrapolation,arrowPulse}=this.__closure;const opacity=interpolate(translateX.value,[0,cancelThresholdShared.value],[1,0],Extrapolation.CLAMP);return{opacity:opacity,transform:[{translateX:translateX.value*0.55+arrowPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx9","interpolate","translateX","cancelThresholdShared","Extrapolation","arrowPulse","__closure","opacity","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAiToD,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,qBAAA,CAAAC,aAAA,CAAAC,UAAA,OAAAC,SAAA,CAClD,KAAM,CAAAC,OAAO,CAAGN,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEL,qBAAqB,CAACK,KAAK,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEJ,aAAa,CAACK,KAAK,CAAC,CAC5G,MAAO,CACHF,OAAO,CAAPA,OAAO,CACPG,SAAS,CAAE,CAAC,CAAER,UAAU,CAAEA,UAAU,CAACM,KAAK,CAAG,IAAI,CAAGH,UAAU,CAACG,KAAM,CAAC,CAC1E,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},fr={code:"function VoiceRecorderFlowTsx10(){const{interpolate,translateY,LOCK_REVEAL_TRAVEL,Extrapolation,lockThresholdShared}=this.__closure;const reveal=interpolate(translateY.value,[0,LOCK_REVEAL_TRAVEL],[0,1],Extrapolation.CLAMP);const lockProgress=interpolate(translateY.value,[0,lockThresholdShared.value],[0,1],Extrapolation.CLAMP);return{opacity:reveal,transform:[{scale:0.7+reveal*0.3},{translateY:interpolate(lockProgress,[0,1],[0,-22])}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx10","interpolate","translateY","LOCK_REVEAL_TRAVEL","Extrapolation","lockThresholdShared","__closure","reveal","value","CLAMP","lockProgress","opacity","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAwTmD,SAAAA,sBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,kBAAA,CAAAC,aAAA,CAAAC,mBAAA,OAAAC,SAAA,CACjD,KAAM,CAAAC,MAAM,CAAGN,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEL,kBAAkB,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACK,KAAK,CAAC,CAClG,KAAM,CAAAC,YAAY,CAAGT,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEH,mBAAmB,CAACG,KAAK,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEJ,aAAa,CAACK,KAAK,CAAC,CAC/G,MAAO,CACHE,OAAO,CAAEJ,MAAM,CACfK,SAAS,CAAE,CACP,CAAEC,KAAK,CAAE,GAAG,CAAGN,MAAM,CAAG,GAAI,CAAC,CAC7B,CAAEL,UAAU,CAAED,WAAW,CAACS,YAAY,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAE,CAAC,CAEnE,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},vr={code:'function VoiceRecorderFlowTsx11(){const{interpolate,translateY,lockThresholdShared,Extrapolation}=this.__closure;const progress=interpolate(translateY.value,[0,lockThresholdShared.value],[0,1],Extrapolation.CLAMP);return{height:Math.round(progress*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx11","interpolate","translateY","lockThresholdShared","Extrapolation","__closure","progress","value","CLAMP","height","Math","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAmUmD,SAAAA,sBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,mBAAA,CAAAC,aAAA,OAAAC,SAAA,CACjD,KAAM,CAAAC,QAAQ,CAAGL,WAAW,CAACC,UAAU,CAACK,KAAK,CAAE,CAAC,CAAC,CAAEJ,mBAAmB,CAACI,KAAK,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEH,aAAa,CAACI,KAAK,CAAC,CAC3G,MAAO,CAAEC,MAAM,CAAKC,IAAI,CAACC,KAAK,CAACL,QAAQ,CAAG,GAAG,CAAC,IAAI,CAAC,CACvD","ignoreList":[]}',version:"3.16.7"},pr={code:"function VoiceRecorderFlowTsx12(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx12","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAuU0C,SAAAA,uBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACzCC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},mr={code:"function VoiceRecorderFlowTsx13(){const{pauseOpacity}=this.__closure;return{opacity:pauseOpacity.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx13","pauseOpacity","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA0UgD,SAAAA,uBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CAC/CC,OAAO,CAAEF,YAAY,CAACG,KAC1B,CAAC","ignoreList":[]}',version:"3.16.7"},gr=function(r){var o=r.primaryColor,i=void 0===o?"#22C55E":o,s=r.backgroundColor,l=void 0===s?"#0B141A":s,c=r.timerColor,u=void 0===c?"#FFFFFF":c,d=r.microphoneColor,C=void 0===d?"#FFFFFF":d,h=r.lockColor,f=void 0===h?"#E9EDEF":h,v=r.waveformColor,p=void 0===v?"#E9EDEF":v,m=r.deleteIconColor,y=void 0===m?"#8696A0":m,x=r.cancelTextColor,w=void 0===x?"rgba(255,255,255,0.55)":x,S=r.chevronColor,b=r.lockPillBackground,E=void 0===b?"rgba(20,28,33,0.95)":b,k=r.lockPillActiveBorderColor,I=void 0===k?"#22C55E":k,_=r.borderTopColor,M=r.borderTopWidth,O=void 0===M?0:M,j=r.containerHeight,T=void 0===j?110:j,G=r.micSize,V=void 0===G?72:G,P=r.iconSize,K=void 0===P?30:P,D=r.sendIconSize,L=r.lockIconSize,F=void 0===L?20:L,B=r.enableLockRecording,H=void 0===B||B,U=r.enableSlideToCancel,W=void 0===U||U,Y=r.enableWaveform,N=void 0===Y||Y,z=r.lockSlideDistance,Q=void 0===z?100:z,J=r.cancelSlideDistance,q=void 0===J?120:J,X=r.lockPillGap,$=void 0===X?10:X,Z=r.lockPillMarginBottom,ee=void 0===Z?8:Z,te=r.waveCount,re=void 0===te?28:te,ne=r.renderMicIcon,oe=r.renderSendIcon,ie=r.renderLockIcon,ae=r.renderArrowIcon,Ae=r.renderDeleteIcon,se=r.renderWaveform,le=r.containerStyle,ce=r.barStyle,ue=r.timerTextStyle,de=r.slideTextStyle,Ce=r.waveformStyle,he=r.lockPillStyle,fe=r.trashButtonStyle,ve=r.sendButtonStyle,pe=r.onRecordingStart,me=r.onRecordingStop,ge=r.onSend,ye=r.onDelete,xe=r.onLock,we=r.onCancel,Se=-Math.abs(q),be=-Math.abs(Q),Ee=Se-30,ke=be-20,Ie=null!=D?D:K,_e=R(n.useState("IDLE"),2),Re=_e[0],Me=_e[1],Oe=R(n.useState(0),2),je=Oe[0],Te=Oe[1],Ge=n.useRef("IDLE");n.useEffect((function(){Ge.current=Re}),[Re]);var Ve=A.useSharedValue(0);n.useEffect((function(){Ve.value=function(e){switch(e){case"IDLE":return 0;case"RECORDING_TAP":return 1;case"RECORDING_HOLD":return 2;case"LOCKED_RECORDING":return 3;case"SENDING":return 4;case"CANCELLED":return 5}}(Re)}),[Re]);var Pe=A.useSharedValue(Se),Ke=A.useSharedValue(be),De=A.useSharedValue(Ee),Le=A.useSharedValue(ke),Fe=A.useSharedValue(H?1:0),Be=A.useSharedValue(W?1:0);n.useEffect((function(){Pe.value=Se,Ke.value=be,De.value=Ee,Le.value=ke,Fe.value=H?1:0,Be.value=W?1:0}),[Se,be,Ee,ke,H,W]);var He=n.useRef(0),Ue=A.useSharedValue(0),We=A.useSharedValue(0),Ye=A.useSharedValue(0),Ne=A.useSharedValue(120),ze=A.useSharedValue(1),Qe=A.useSharedValue(0),Je=A.useSharedValue(0),qe=A.useSharedValue(1),Xe=A.useSharedValue(0),$e=A.useSharedValue(0),Ze=A.useSharedValue(0);n.useEffect((function(){ze.value=A.withRepeat(A.withSequence(A.withTiming(1.06,{duration:850,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(1,{duration:850,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),Qe.value=A.withRepeat(A.withSequence(A.withTiming(-4,{duration:700,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(0,{duration:700,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),Je.value=A.withRepeat(A.withSequence(A.withTiming(-5,{duration:500,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(0,{duration:500,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),qe.value=A.withRepeat(A.withSequence(A.withTiming(.45,{duration:600,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(1,{duration:600,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),Xe.value=A.withRepeat(A.withTiming(1,{duration:4500,easing:A.Easing.linear}),-1,!1)}),[]),n.useEffect((function(){if("RECORDING_TAP"===Re||"RECORDING_HOLD"===Re||"LOCKED_RECORDING"===Re){var e=setInterval((function(){Te((Date.now()-He.current)/1e3)}),250);return function(){return clearInterval(e)}}}),[Re]);var et=n.useRef(pe);et.current=pe;var tt=n.useRef(me);tt.current=me;var rt=n.useRef(ge);rt.current=ge;var nt=n.useRef(ye);nt.current=ye;var ot=n.useRef(xe);ot.current=xe;var it=n.useRef(we);it.current=we;var at=n.useCallback((function(){var e;He.current=Date.now(),Te(0),$e.value=0,Ze.value=0,Ue.value=0,We.value=0,Ye.value=A.withTiming(1,{duration:280}),Ne.value=A.withSpring(0,{damping:18,stiffness:180}),null===(e=et.current)||void 0===e||e.call(et)}),[]),At=n.useCallback((function(){Te(0),Ue.value=0,We.value=0,Ne.value=120,Ye.value=0,Me("IDLE")}),[]),st=n.useCallback((function(){var e,t;Ye.value=A.withTiming(0,{duration:280}),Ne.value=A.withTiming(120,{duration:280,easing:A.Easing.in(A.Easing.cubic)},(e=[new global.Error,-3,-27],(t=function(e){e&&A.runOnJS(At)()}).__closure={runOnJS:A.runOnJS,finalizeReset:At},t.__workletHash=6814982830705,t.__initData=ar,t.__stackDetails=e,t))}),[At]),lt=n.useCallback((function(){var e,t,r=(Date.now()-He.current)/1e3;Me("SENDING"),null===(e=tt.current)||void 0===e||e.call(tt),null===(t=rt.current)||void 0===t||t.call(rt,{duration:r}),st()}),[st]),ct=n.useCallback((function(){var e=Ge.current;if("IDLE"===e)return Me("RECORDING_TAP"),void at();"RECORDING_TAP"!==e&&"LOCKED_RECORDING"!==e||lt()}),[at,lt]),ut=n.useCallback((function(){"IDLE"===Ge.current&&(Me("RECORDING_HOLD"),at())}),[at]),dt=n.useCallback((function(){var e;"RECORDING_HOLD"===Ge.current&&(ir(),Me("LOCKED_RECORDING"),Ue.value=A.withSpring(0,{damping:18,stiffness:180}),We.value=A.withSpring(0,{damping:18,stiffness:180}),null===(e=ot.current)||void 0===e||e.call(ot))}),[]),Ct=n.useCallback((function(){var e,t,r,n=Ge.current;"RECORDING_HOLD"!==n&&"RECORDING_TAP"!==n&&"LOCKED_RECORDING"!==n||(ir(),Me("CANCELLED"),null===(e=tt.current)||void 0===e||e.call(tt),null===(t=it.current)||void 0===t||t.call(it),null===(r=nt.current)||void 0===r||r.call(nt),st())}),[st]),ht=n.useCallback((function(){"RECORDING_HOLD"===Ge.current&&lt()}),[lt]),ft=n.useRef(ct);ft.current=ct;var vt=n.useRef(ut);vt.current=ut;var pt=n.useRef(ht);pt.current=ht;var mt=n.useRef(dt);mt.current=dt;var gt=n.useRef(Ct);gt.current=Ct;var yt,xt,wt=function(){return ft.current()},St=function(){return vt.current()},bt=function(){return pt.current()},Et=function(){return mt.current()},kt=function(){return gt.current()},It=n.useMemo((function(){var e,t,r=a.Gesture.Tap().maxDuration(290).onEnd((e=[new global.Error,-3,-27],(t=function(e,t){t&&A.runOnJS(wt)()}).__closure={runOnJS:A.runOnJS,fireQuickTap:wt},t.__workletHash=0xe487aac71a2,t.__initData=Ar,t.__stackDetails=e,t)),n=a.Gesture.Pan().activateAfterLongPress(300).onStart(function(){var e=[new global.Error,-3,-27],t=function(){A.runOnJS(St)()};return t.__closure={runOnJS:A.runOnJS,fireHoldStart:St},t.__workletHash=5634645742267,t.__initData=sr,t.__stackDetails=e,t}()).onUpdate(function(){var e=[new global.Error,-16,-27],t=function(e){if(2===Ve.value){var t=Math.max(De.value,Math.min(0,e.translationX)),r=Math.max(Le.value,Math.min(0,e.translationY));Ue.value=t,We.value=r;var n=Math.abs(r)>Math.abs(t);n&&1===Fe.value&&0===Ze.value&&r<=Ke.value&&(Ze.value=1,A.runOnJS(Et)()),!n&&1===Be.value&&0===$e.value&&t<=Pe.value&&($e.value=1,A.runOnJS(kt)())}};return t.__closure={stateShared:Ve,STATE_HOLD:2,maxLeftShared:De,maxUpShared:Le,translateX:Ue,translateY:We,enableLockShared:Fe,lockFiredShared:Ze,lockThresholdShared:Ke,runOnJS:A.runOnJS,fireLock:Et,enableCancelShared:Be,cancelFiredShared:$e,cancelThresholdShared:Pe,fireCancel:kt},t.__workletHash=0xca129e1aab7,t.__initData=lr,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-3,-27],t=function(){A.runOnJS(bt)()};return t.__closure={runOnJS:A.runOnJS,fireHoldEnd:bt},t.__workletHash=8780501045437,t.__initData=cr,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===Ze.value&&0===$e.value&&(Ue.value=A.withSpring(0,{damping:18,stiffness:180}),We.value=A.withSpring(0,{damping:18,stiffness:180}))};return t.__closure={lockFiredShared:Ze,cancelFiredShared:$e,translateX:Ue,withSpring:A.withSpring,translateY:We},t.__workletHash=0xf5629271812,t.__initData=ur,t.__stackDetails=e,t}());return a.Gesture.Race(r,n)}),[]),_t=A.useAnimatedStyle((yt=[new global.Error,-3,-27],(xt=function(){return{opacity:Ye.value,transform:[{translateY:Ne.value}]}}).__closure={containerOpacity:Ye,containerY:Ne},xt.__workletHash=0xe4a6e44ca8f,xt.__initData=dr,xt.__stackDetails=yt,xt)),Rt=A.useAnimatedStyle(function(){var e=[new global.Error,-7,-27],t=function(){var e=2===Ve.value,t=0===Ve.value?1:ze.value;return{transform:[{translateX:e?Ue.value:0},{translateY:e?We.value:0},{scale:t}]}};return t.__closure={stateShared:Ve,STATE_HOLD:2,STATE_IDLE:0,micPulse:ze,translateX:Ue,translateY:We},t.__workletHash=966893052371,t.__initData=Cr,t.__stackDetails=e,t}()),Mt=A.useAnimatedStyle(function(){var e=[new global.Error,-6,-27],t=function(){return{opacity:A.interpolate(Ue.value,[0,Pe.value],[1,0],A.Extrapolation.CLAMP),transform:[{translateX:.55*Ue.value+Qe.value}]}};return t.__closure={interpolate:A.interpolate,translateX:Ue,cancelThresholdShared:Pe,Extrapolation:A.Extrapolation,arrowPulse:Qe},t.__workletHash=7855759759759,t.__initData=hr,t.__stackDetails=e,t}()),Ot=A.useAnimatedStyle(function(){var e=[new global.Error,-6,-27],t=function(){var e=A.interpolate(We.value,[0,-10],[0,1],A.Extrapolation.CLAMP),t=A.interpolate(We.value,[0,Ke.value],[0,1],A.Extrapolation.CLAMP);return{opacity:e,transform:[{scale:.7+.3*e},{translateY:A.interpolate(t,[0,1],[0,-22])}]}};return t.__closure={interpolate:A.interpolate,translateY:We,LOCK_REVEAL_TRAVEL:-10,Extrapolation:A.Extrapolation,lockThresholdShared:Ke},t.__workletHash=0xcab79fab762,t.__initData=fr,t.__stackDetails=e,t}()),jt=A.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=A.interpolate(We.value,[0,Ke.value],[0,1],A.Extrapolation.CLAMP);return{height:"".concat(Math.round(100*e),"%")}};return t.__closure={interpolate:A.interpolate,translateY:We,lockThresholdShared:Ke,Extrapolation:A.Extrapolation},t.__workletHash=368624072523,t.__initData=vr,t.__stackDetails=e,t}()),Tt=A.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:Je.value}]}};return t.__closure={chevronPulse:Je},t.__workletHash=2094038225597,t.__initData=pr,t.__stackDetails=e,t}()),Gt=A.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:qe.value}};return t.__closure={pauseOpacity:qe},t.__workletHash=0xe14e5c18bcc,t.__initData=mr,t.__stackDetails=e,t}()),Vt="IDLE"!==Re,Pt="RECORDING_HOLD"===Re,Kt="RECORDING_TAP"===Re||"LOCKED_RECORDING"===Re||"SENDING"===Re,Dt=g({height:T,backgroundColor:l},O>0&&_?{borderTopWidth:O,borderTopColor:_}:null),Lt={position:"absolute",right:18,bottom:(T-V)/2},Ft={width:V,height:V,justifyContent:"center",alignItems:"center"},Bt={width:V,height:V,borderRadius:V/2,justifyContent:"center",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:6,backgroundColor:i},Ht={position:"absolute",right:18+(V-46)/2,bottom:T+ee,width:46,paddingVertical:12,borderRadius:28,backgroundColor:E,borderColor:I,alignItems:"center",justifyContent:"center",gap:$,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:8},Ut=null!=S?S:f,Wt=H&&Pt;return e.jsxs(t.View,{style:[Er.root,le],pointerEvents:"box-none",children:[Vt&&e.jsx(A.View,{style:[Er.bar,Dt,ce,_t],children:Kt?e.jsx(yr,{duration:je,timerColor:u,waveformColor:p,deleteIconColor:y,waveTick:Xe,pauseAnimatedStyle:Gt,renderDeleteIcon:Ae,renderWaveform:se,onDeletePress:Ct,waveCount:re,showWaveform:N,micSize:V,timerTextStyleOverride:ue,waveformStyle:Ce,trashButtonStyleOverride:fe}):e.jsx(xr,{duration:je,timerColor:u,slideTextAnimatedStyle:Mt,renderArrowIcon:ae,cancelTextColor:w,micSize:V,timerTextStyleOverride:ue,slideTextStyleOverride:de})}),Wt&&e.jsxs(A.View,{style:[Ht,Ot,he],pointerEvents:"none",children:[ie?ie():e.jsx(nr,{style:{width:F,height:F},color:f}),e.jsx(t.View,{style:Er.lockProgressTrack,children:e.jsx(A.View,{style:[Er.lockProgressFill,{backgroundColor:i},jt]})}),e.jsx(A.View,{style:Tt,children:e.jsx(rr,{style:{width:16,height:16},color:Ut})})]}),e.jsx(t.View,{style:Lt,pointerEvents:"box-none",children:e.jsx(a.GestureDetector,{gesture:It,children:e.jsx(A.View,{style:[Ft,Rt],accessibilityRole:"button",accessibilityLabel:Kt?"Send recording":"Tap to record. Long-press and slide left to cancel or up to lock.",children:e.jsx(t.View,{style:[Bt,ve],children:Kt?oe?oe():e.jsx(Zt,{style:{width:Ie,height:Ie},color:"#FFFFFF"}):ne?ne():e.jsx(Xt,{style:{width:K,height:K},color:C})})})})})]})},yr=function(r){var n=r.duration,o=r.timerColor,i=r.waveformColor,a=r.deleteIconColor,s=r.waveTick,l=r.pauseAnimatedStyle,c=r.renderDeleteIcon,u=r.renderWaveform,d=r.onDeletePress,C=r.waveCount,h=r.showWaveform,f=r.micSize,v=r.timerTextStyleOverride,p=r.waveformStyle,m=r.trashButtonStyleOverride;return e.jsxs(t.View,{style:Er.screenOneRow,children:[e.jsx(t.Pressable,{onPress:d,hitSlop:10,style:[Er.deleteWrapper,m],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:c?c():e.jsx(or,{style:{width:26,height:26},color:a})}),e.jsxs(t.View,{style:Er.screenOneCenter,children:[e.jsxs(t.View,{style:Er.timerRow,children:[e.jsx(t.Text,{style:[Er.timer,{color:o},v],numberOfLines:1,children:Qe(n)}),h&&e.jsx(t.View,{style:[Er.waveformWrapper,p],children:u?u():e.jsx(wr,{color:i,tick:s,count:C})})]}),e.jsxs(A.View,{style:[Er.pauseRow,l],children:[e.jsx(t.View,{style:Er.pauseBar}),e.jsx(t.View,{style:Er.pauseBar})]})]}),e.jsx(t.View,{style:{width:f,height:f}})]})},xr=function(r){var n=r.duration,o=r.timerColor,i=r.slideTextAnimatedStyle,a=r.renderArrowIcon,s=r.cancelTextColor,l=r.micSize,c=r.timerTextStyleOverride,u=r.slideTextStyleOverride;return e.jsxs(t.View,{style:Er.screenTwoRow,children:[e.jsx(t.Text,{style:[Er.timer,{color:o},c],numberOfLines:1,children:Qe(n)}),e.jsxs(A.View,{style:[Er.slideArea,i],children:[a?a():e.jsx(t.Text,{style:[Er.slideArrow,{color:s}],children:"‹"}),e.jsx(t.Text,{style:[Er.slideText,{color:s},u],children:"Slide to cancel"})]}),e.jsx(t.View,{style:{width:l,height:l}})]})},wr=function(r){var n=r.color,o=r.tick,i=r.count;return e.jsx(t.View,{style:Er.waveform,children:Array.from({length:i}).map((function(t,r){return e.jsx(br,{index:r,total:i,color:n,tick:o},r)}))})},Sr={code:'function VoiceRecorderFlowTsx14(){const{tick,index,total}=this.__closure;const t=tick.value*Math.PI*2;const phase1=Math.sin(t*2+index*0.55);const phase2=Math.sin(t*4+index*1.3);const phase3=Math.sin(t*0.9+index*0.27);const combined=(phase1*0.55+phase2*0.3+phase3*0.4)*0.5+0.5;const edge=Math.sin(index/Math.max(1,total-1)*Math.PI);const amp=Math.max(0.15,Math.min(1,combined)*(0.35+0.65*edge));return{height:Math.round(amp*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx14","tick","index","total","__closure","t","value","Math","PI","phase1","sin","phase2","phase3","combined","edge","max","amp","min","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA8a2C,SAAAA,sBAAMA,CAAA,QAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEzC,KAAM,CAAAC,CAAC,CAAGJ,IAAI,CAACK,KAAK,CAAGC,IAAI,CAACC,EAAE,CAAG,CAAC,CAClC,KAAM,CAAAC,MAAM,CAAGF,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC7C,KAAM,CAAAS,MAAM,CAAGJ,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,GAAG,CAAC,CAC5C,KAAM,CAAAU,MAAM,CAAGL,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,GAAG,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC/C,KAAM,CAAAW,QAAQ,CAAG,CAACJ,MAAM,CAAG,IAAI,CAAGE,MAAM,CAAG,GAAG,CAAGC,MAAM,CAAG,GAAG,EAAI,GAAG,CAAG,GAAG,CAC1E,KAAM,CAAAE,IAAI,CAAGP,IAAI,CAACG,GAAG,CAAER,KAAK,CAAGK,IAAI,CAACQ,GAAG,CAAC,CAAC,CAAEZ,KAAK,CAAG,CAAC,CAAC,CAAII,IAAI,CAACC,EAAE,CAAC,CACjE,KAAM,CAAAQ,GAAG,CAAGT,IAAI,CAACQ,GAAG,CAAC,IAAI,CAAER,IAAI,CAACU,GAAG,CAAC,CAAC,CAAEJ,QAAQ,CAAC,EAAI,IAAI,CAAG,IAAI,CAAGC,IAAI,CAAC,CAAC,CACxE,MAAO,CAAEI,MAAM,CAAKX,IAAI,CAACY,KAAK,CAACH,GAAG,CAAG,GAAG,CAAC,IAAI,CAAC,CAClD","ignoreList":[]}',version:"3.16.7"},br=function(t){var r,n,o=t.index,i=t.total,a=t.color,s=t.tick,l=A.useAnimatedStyle((r=[new global.Error,-4,-27],(n=function(){var e=s.value*Math.PI*2,t=.5*(.55*Math.sin(2*e+.55*o)+.3*Math.sin(4*e+1.3*o)+.4*Math.sin(.9*e+.27*o))+.5,r=Math.sin(o/Math.max(1,i-1)*Math.PI),n=Math.max(.15,Math.min(1,t)*(.35+.65*r));return{height:"".concat(Math.round(100*n),"%")}}).__closure={tick:s,index:o,total:i},n.__workletHash=0xecc749b626f,n.__initData=Sr,n.__stackDetails=r,n));return e.jsx(A.View,{style:[{width:3,marginHorizontal:1.5,backgroundColor:a,borderRadius:3},l]})},Er=t.StyleSheet.create({root:{position:"absolute",left:0,right:0,bottom:0},bar:{width:"100%",paddingHorizontal:18,paddingVertical:14,borderTopLeftRadius:18,borderTopRightRadius:18,flexDirection:"row",alignItems:"center"},lockProgressTrack:{width:4,height:18,borderRadius:2,backgroundColor:"rgba(255,255,255,0.15)",overflow:"hidden",justifyContent:"flex-end"},lockProgressFill:{width:"100%",borderRadius:2},screenOneRow:{flex:1,flexDirection:"row",alignItems:"center"},screenOneCenter:{flex:1,height:"100%",paddingHorizontal:12,justifyContent:"center"},screenTwoRow:{flex:1,flexDirection:"row",alignItems:"center",height:"100%"},deleteWrapper:{width:26,height:"100%",justifyContent:"flex-end",alignItems:"flex-start",paddingBottom:4},timerRow:{flexDirection:"row",alignItems:"center",gap:12},timer:{fontSize:24,fontWeight:"600",minWidth:50,letterSpacing:.3},waveformWrapper:{flex:1,alignItems:"flex-start",justifyContent:"center"},waveform:{width:200,height:36,flexDirection:"row",alignItems:"center",justifyContent:"space-between"},pauseRow:{flexDirection:"row",justifyContent:"center",alignItems:"center",marginTop:6,gap:4},pauseBar:{width:3,height:12,borderRadius:2,backgroundColor:"#F15C6D"},slideArea:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},slideArrow:{fontSize:18,lineHeight:18,fontWeight:"500",marginTop:-2},slideText:{fontSize:14,fontWeight:"500"}}),kr=function(t){var r=t.style,n=t.fill,i=void 0===n?"currentColor":n;return e.jsxs(o,{style:r,viewBox:"0 0 24 24",children:[e.jsx(o.Path,{fill:i,d:"M13 4H6v16h12V9h-5z",opacity:".3"}),e.jsx(o.Path,{fill:i,d:"m20 8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z"})]})},Ir=function(r){var n=r.fileName,o=r.style,i=K().theme;return e.jsx(t.Text,{numberOfLines:2,ellipsizeMode:"tail",style:Q([{fontSize:14,fontWeight:"600",color:"black"},o],null==i?void 0:i.fontFamily),children:function(e){var t=e.lastIndexOf(".");if(-1===t)return e;var r=e.slice(0,t),n=e.slice(t);return r.length>40?r.slice(0,40)+"..."+n:r+n}(n)})},_r=n.memo(Ir);function Rr(e){return e.filter((function(e){var t,r;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(r=e.type)||void 0===r?void 0:r.startsWith("video/"))})).map((function(e){return{uri:e.uri,kind:e.type.startsWith("video/")?"video":"image"}}))}var Mr,Or,jr,Tr,Gr,Vr,Pr,Kr,Dr,Lr,Fr,Br,Hr,Ur,Wr,Yr,Nr,zr=function(r){var n,o=r.previews,a=r.closePreview,A=r.onRemoveItem,s=r.CustomFileIcon,l=r.CustomImagePreview,c=r.CustomVideoPreview,u=r.inputHeight,d=K(),C=d.theme,h=d.setMediaViewerGallery,f=o.filter((function(e){var t,r;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(r=e.type)||void 0===r?void 0:r.startsWith("video/"))})),v=o.filter((function(e){var t,r;return!(null!==(t=e.type)&&void 0!==t&&t.startsWith("image/")||null!==(r=e.type)&&void 0!==r&&r.startsWith("video/"))})),p=Rr(o);if(0===o.length)return null;var m=function(e){0!==p.length&&h(p,e)},g=function(r){var n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:56,A=null===(n=r.type)||void 0===n?void 0:n.startsWith("image/"),s=null===(o=r.type)||void 0===o?void 0:o.startsWith("video/");return A&&l?e.jsx(l,{uri:r.uri}):s&&c?e.jsx(c,{uri:r.uri}):A?e.jsx(t.Image,{source:{uri:r.uri},style:{width:a,height:a,borderRadius:12},resizeMode:"cover"}):s?e.jsx(t.View,{style:{width:a,height:a,borderRadius:12,overflow:"hidden"},children:e.jsx(i,{source:{uri:r.uri},style:{width:"100%",height:"100%"},resizeMode:"cover",muted:!0,repeat:!0,paused:!1,pointerEvents:"none",playInBackground:!1,playWhenInactive:!1})}):null},y=function(r,n){return e.jsx(t.Pressable,{onPress:function(){return A?A(r):null==a?void 0:a()},style:{position:"absolute",zIndex:50,height:22,width:22,backgroundColor:"rgba(0,0,0,0.55)",right:-6,top:-6,borderRadius:11,justifyContent:"center",alignItems:"center",transform:n?[{rotate:n}]:void 0},children:e.jsx(t.Text,{style:Q({fontSize:13,color:"white",fontWeight:"700",lineHeight:14},null==C?void 0:C.fontFamily),children:"×"})})};return e.jsx(t.View,{style:[{position:"absolute",bottom:(null!=u?u:0)+8,zIndex:20,borderRadius:12,maxWidth:"92%",alignSelf:"flex-start"},null==C||null===(n=C.filePreviewStyle)||void 0===n?void 0:n.root],children:e.jsxs(t.View,{style:{gap:8},children:[function(){if(0===f.length)return null;if(1===f.length){var r=f[0];return r?e.jsxs(t.Pressable,{onPress:function(){return m(0)},style:{position:"relative"},children:[g(r),y(r.uri)]}):null}var n=f.slice(0,3),o=f.length>3?f.length-3:0;return e.jsx(t.View,{style:{flexDirection:"row",alignItems:"center",minHeight:68},children:n.map((function(r,i){var a=2===n.length?0===i?"-4deg":"4deg":0===i?"-10deg":1===i?"0deg":"10deg",A=2===n.length?0===i?"4deg":"-4deg":0===i?"10deg":1===i?"0deg":"-10deg";return e.jsx(t.Pressable,{onPress:function(){var e=Rr(f).findIndex((function(e){return e.uri===r.uri}));m(e>=0?e:0)},style:{marginLeft:0===i?0:-18,zIndex:i+1,transform:[{rotate:a}],position:"relative"},children:e.jsxs(t.View,{style:{position:"relative"},children:[g(r),2===i&&o>0&&e.jsx(t.View,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:12,backgroundColor:"rgba(0,0,0,0.55)",alignItems:"center",justifyContent:"center"},children:e.jsxs(t.Text,{style:{color:"#fff",fontWeight:"700",fontSize:14},children:["+",o]})}),y(r.uri,A)]})},"".concat(r.uri,"-").concat(i))}))})}(),v.length>0&&e.jsx(t.ScrollView,{scrollEnabled:v.length>3,style:{maxHeight:232},showsVerticalScrollIndicator:v.length>3,contentContainerStyle:{gap:8},nestedScrollEnabled:!0,children:v.map((function(r,n){return function(r,n){var o,i,a,A;return e.jsxs(t.View,{style:{position:"relative"},children:[e.jsxs(t.View,{style:[{backgroundColor:"white",width:240,minHeight:64,borderRadius:12,flexDirection:"row",padding:4,gap:4,alignItems:"center"},null==C||null===(o=C.filePreviewStyle)||void 0===o?void 0:o.container],children:[e.jsx(t.View,{style:[{backgroundColor:"#d1d5db",borderRadius:8,padding:4,justifyContent:"center",alignItems:"center"},null==C||null===(i=C.filePreviewStyle)||void 0===i?void 0:i.iconContainer],children:s?e.jsx(s,{}):e.jsx(kr,{style:{width:40,height:40},fill:"white"})}),e.jsx(t.View,{style:[{backgroundColor:"#f3f4f6",flex:1,borderRadius:8,justifyContent:"center",paddingHorizontal:12},null==C||null===(a=C.filePreviewStyle)||void 0===a?void 0:a.nameContainer],children:e.jsx(_r,{fileName:r.name||"File",style:null==C||null===(A=C.filePreviewStyle)||void 0===A?void 0:A.text})})]}),y(r.uri)]},"".concat(r.uri,"-").concat(n))}(r,n)}))})]})})},Qr=n.memo(zr),Jr="ios"===t.Platform.OS?32:30,qr="ios"===t.Platform.OS?50:48,Xr="h-6 w-6",$r=function(o){var i,a,A,s,l,c,d,C,h,f,v,p,m,y,x,w,S,b,E,k,I,_,O,T,G,V=o.onSendMessage,P=o.onTypingStart,D=o.onTypingEnd,L=o.onAttachmentPress,F=o.onCameraPress,B=o.onAudioRecordStart,H=o.onAudioRecordEnd,U=o.CustomEmojiIcon,W=o.CustomAttachmentIcon,Y=o.CustomCameraIcon,N=o.CustomSendIcon,J=o.CustomMicrophoneIcon,q=o.CustomFileIcon,X=o.CustomImagePreview,$=o.CustomVideoPreview,Z=R(n.useState(""),2),ee=Z[0],te=Z[1],re=R(n.useState(0),2),ne=re[0],oe=re[1],ie=R(n.useState({height:Jr,isMultiline:!1}),2),ae=ie[0],Ae=ie[1],se=K(),le=se.theme,ce=se.currentUserId,ue=se.showEmojiButton,de=se.showAttachmentsButton,Ce=se.showCameraButton,he=se.showVoiceRecordButton,fe=se.placeholder,ve=se.previewData,pe=se.previewItems,me=se.closePreview,ge=se.onRemovePreviewItem,ye=se.voiceRecorderProps,xe=se.voiceRecorderStyles,we=se.recordingUIProps,Se=se.renderVoiceRecorder,be=n.useMemo((function(){return null!=pe&&pe.length?pe:ve?[ve]:[]}),[pe,ve]),Ee=be.length>0,ke=null==le||null===(i=le.sizes)||void 0===i?void 0:i.inputIconSize,Ie=function(e){if("number"==typeof e&&e>0)return{width:e,height:e};var t="string"==typeof e&&e.trim().length>0?e.trim():z;return r.style(t)}(ke),_e="number"==typeof(G=ke)&&G>0?G:24,Re=0===ee.trim().length&&!ae.isMultiline,Me=Math.max(0,(qr-_e)/2),Oe=Re?{paddingTop:Me,paddingBottom:Me}:{paddingBottom:Me},je=n.useCallback((function(){Ae({height:Jr,isMultiline:!1}),oe((function(e){return e+1}))}),[]),Te=n.useCallback((function(e){te(e),0===e.length&&je()}),[je]),Ge=n.useCallback((function(e){var t=Math.min(Math.max(e.nativeEvent.contentSize.height,Jr),118),r=t>Jr;Ae({height:r?t:Jr,isMultiline:r})}),[]),Ve=n.useCallback((function(){var e=ee.trim();(e||Ee)&&(V({text:e,senderId:ce}),te(""),je())}),[ee,V,ce,Ee,je]);n.useEffect((function(){ee.trim()?null==P||P():null==D||D()}),[ee,P,D]);var Pe=!!ee.trim()||Ee,Ke=n.useCallback((function(e){null==H||H(e)}),[H]),De=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxDuration,r=void 0===t?300:t,o=e.onRecordStart,i=e.onRecordEnd,a=R(n.useState("idle"),2),A=a[0],s=a[1],l=R(n.useState(0),2),c=l[0],d=l[1],C=n.useRef(null),h=n.useRef(null),f=n.useRef(0),v=n.useRef(i);v.current=i;var p=n.useRef(o);p.current=o;var m=n.useRef(r);m.current=r;var g=n.useCallback((function(){h.current&&(clearInterval(h.current),h.current=null)}),[]),y=n.useCallback((function(e){g(),h.current=setInterval((function(){f.current+=1,d(f.current),f.current>=m.current&&e()}),1e3)}),[g]),x=n.useCallback(u(j().mark((function e(){var t,r;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,t=require("react-native-audio-record").default,e.next=8;break;case 4:return e.prev=4,e.t0=e.catch(0),console.error("[movius-chats] Voice recording requires react-native-audio-record. Install it: yarn add react-native-audio-record"),e.abrupt("return");case 8:return e.next=10,er();case 10:if(e.sent){e.next=14;break}return console.warn("[movius-chats] Microphone permission denied."),e.abrupt("return");case 14:try{t.init({sampleRate:16e3,channels:1,bitsPerSample:16,audioSource:6,wavFile:"movius_rec_".concat(Date.now(),".wav")}),t.start(),C.current=t,f.current=0,d(0),s("recording"),y((function(){return E.current()})),null===(r=p.current)||void 0===r||r.call(p)}catch(e){console.warn("[movius-chats] Failed to start recording:",e)}case 15:case"end":return e.stop()}}),e,null,[[0,4]])}))),[y]),w=n.useCallback(u(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C.current){e.next=2;break}return e.abrupt("return");case 2:try{C.current.stop(),s("paused"),g()}catch(e){console.warn("[movius-chats] Failed to pause:",e)}case 3:case"end":return e.stop()}}),e)}))),[g]),S=n.useCallback(u(j().mark((function e(){return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C.current){e.next=2;break}return e.abrupt("return");case 2:try{C.current.start(),s("recording"),y((function(){return E.current()}))}catch(e){console.warn("[movius-chats] Failed to resume:",e)}case 3:case"end":return e.stop()}}),e)}))),[y]),b=n.useCallback(u(j().mark((function e(){var t,r,n,o,i;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=C.current){e.next=3;break}return e.abrupt("return",null);case 3:return g(),C.current=null,r=f.current,f.current=0,s("idle"),d(0),e.prev=9,e.next=12,t.stop();case 12:if(o=e.sent){e.next=15;break}return e.abrupt("return",null);case 15:return i={uri:o.startsWith("file://")?o:"file://".concat(o),duration:Math.max(1,r),mimeType:"audio/wav"},null===(n=v.current)||void 0===n||n.call(v,i),e.abrupt("return",i);case 20:return e.prev=20,e.t0=e.catch(9),console.warn("[movius-chats] Failed to stop recording:",e.t0),e.abrupt("return",null);case 24:case"end":return e.stop()}}),e,null,[[9,20]])}))),[g]),E=n.useRef(b);E.current=b;var k=n.useCallback((function(){return E.current()}),[]),I=n.useCallback(u(j().mark((function e(){var t,r,n,o;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=C.current,g(),C.current=null,f.current=0,s("idle"),d(0),!t){e.next=25;break}return e.prev=7,e.next=10,t.stop();case 10:if(!(r=e.sent)){e.next=21;break}return e.prev=12,n=require("react-native-fs"),o=r.startsWith("file://")?r.slice(7):r,e.next=17,n.unlink(o);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(12);case 21:e.next=25;break;case 23:e.prev=23,e.t1=e.catch(7);case 25:case"end":return e.stop()}}),e,null,[[7,23],[12,19]])}))),[g]);return n.useEffect((function(){return function(){g();try{var e;null===(e=C.current)||void 0===e||e.stop()}catch(e){}}}),[g]),{status:A,duration:c,isRecording:"recording"===A,isPaused:"paused"===A,startRecording:x,pauseRecording:w,resumeRecording:S,stopRecording:k,cancelRecording:I}}({maxDuration:null!==(a=null==ye?void 0:ye.maxDuration)&&void 0!==a?a:300,onRecordStart:B,onRecordEnd:Ke}),Le=n.useRef(De);Le.current=De;var Fe=n.useCallback((function(){Le.current.startRecording()}),[]),Be=n.useCallback(u(j().mark((function e(){var t;return j().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Le.current.stopRecording();case 2:(t=e.sent)&&V({audio:t.uri,senderId:ce});case 4:case"end":return e.stop()}}),e)}))),[V,ce]),He=n.useCallback((function(){Le.current.cancelRecording()}),[]),Ue=null!==(A=null!==(s=null==we?void 0:we.recordingSendButtonBackground)&&void 0!==s?s:null==le||null===(l=le.inputStyles)||void 0===l||null===(l=l.sendButtonStyle)||void 0===l?void 0:l.backgroundColor)&&void 0!==A?A:"#22C55E",We=null!==(c=null==we?void 0:we.recordingBackground)&&void 0!==c?c:"#0B141A",Ye=null!==(d=null==we?void 0:we.timerColor)&&void 0!==d?d:"#FFFFFF",Ne=null!==(C=null!==(h=null==we?void 0:we.longPressMicColor)&&void 0!==h?h:null==le||null===(f=le.colors)||void 0===f?void 0:f.sendIconsColor)&&void 0!==C?C:"#FFFFFF",ze=null!==(v=null==we?void 0:we.waveformColor)&&void 0!==v?v:"#E9EDEF",Qe={isRecording:De.isRecording,isPaused:De.isPaused,duration:De.duration,isLocked:!1,slideOffset:{x:0,y:0},waveformData:[],startRecording:De.startRecording,stopRecording:De.stopRecording,pauseRecording:De.pauseRecording,resumeRecording:De.resumeRecording,cancelRecording:De.cancelRecording},Je=Se?Se(Qe):null,qe=!Pe&&he;return e.jsxs(t.View,{style:r(Mr||(Mr=M(["w-full px-2 relative"]))),children:[Ee&&e.jsx(Qr,{previews:be,closePreview:me,onRemoveItem:ge,CustomFileIcon:q,CustomImagePreview:X,CustomVideoPreview:$,inputHeight:ae.height}),e.jsxs(t.View,{style:[r(Or||(Or=M(["flex-row items-end gap-2"]))),null==le||null===(p=le.inputStyles)||void 0===p?void 0:p.inputSectionContainerStyle],children:[e.jsxs(t.View,{style:[r(jr||(jr=M(["flex-1 flex-row bg-white overflow-hidden px-3.5"]))),{minHeight:qr,borderRadius:Re?9999:24,alignItems:Re?"center":"flex-end"},null==le||null===(m=le.inputStyles)||void 0===m?void 0:m.inputContainerStyle],children:[ue&&e.jsx(t.View,{style:Oe,children:e.jsx(t.Pressable,{children:U?e.jsx(U,{}):e.jsx(qt,{style:Ie,color:(null==le||null===(y=le.colors)||void 0===y?void 0:y.inputsIconsColor)||"rgba(0,0,0,0.7)"})})}),e.jsx(t.TextInput,{value:ee,onChangeText:Te,placeholder:fe||"Message",style:Q([r(Tr||(Tr=M(["bg-transparent flex-1 pl-2"]))),"ios"===t.Platform.OS?r(Gr||(Gr=M(["text-[17px]"]))):r(Vr||(Vr=M(["text-[16px]"]))),{minHeight:Jr,maxHeight:118,paddingVertical:Re?0:8,marginVertical:Re?(qr-Jr)/2:4},{color:(null==le||null===(x=le.colors)||void 0===x?void 0:x.inputTextColor)||"rgba(0, 0, 0, 0.87)"}],null==le?void 0:le.fontFamily),placeholderTextColor:(null==le||null===(w=le.colors)||void 0===w?void 0:w.placeholderTextColor)||"rgba(0, 0, 0, 0.4)",multiline:!0,textAlignVertical:ae.isMultiline&&ee.length>0?"top":"center",onContentSizeChange:Ge},"chat-input-".concat(ne)),e.jsxs(t.View,{style:[r(Pr||(Pr=M(["flex-row items-center gap-4"]))),Oe],children:[de&&e.jsx(t.Pressable,{onPress:L,children:W?e.jsx(W,{}):e.jsx($t,{style:Ie,color:(null==le||null===(S=le.colors)||void 0===S?void 0:S.inputsIconsColor)||"rgba(0,0,0,0.7)"})}),Ce&&!ee.trim()&&e.jsx(t.Pressable,{onPress:F,children:Y?e.jsx(Y,{}):e.jsx(Jt,{style:Ie,color:(null==le||null===(b=le.colors)||void 0===b?void 0:b.inputsIconsColor)||"rgba(0,0,0,0.7)"})})]})]}),Pe?e.jsx(t.Pressable,{onPress:Ve,style:[r(Kr||(Kr=M(["rounded-full justify-center items-center"]))),g({height:qr,width:qr,backgroundColor:"#16a34a"},null==le||null===(E=le.inputStyles)||void 0===E?void 0:E.sendButtonStyle)],children:N?e.jsx(N,{}):e.jsx(Zt,{style:r.style(Xr),color:(null==le||null===(k=le.colors)||void 0===k?void 0:k.sendIconsColor)||"rgba(255,255,255,0.7)"})}):qe&&!Je?e.jsx(t.View,{style:{height:qr,width:qr},pointerEvents:"none"}):he&&Je?e.jsx(t.View,{style:{height:qr,width:qr,justifyContent:"center",alignItems:"center"},children:J?e.jsx(J,{}):e.jsx(Xt,{style:r.style("h-8 w-8"),color:(null==le||null===(I=le.colors)||void 0===I?void 0:I.sendIconsColor)||"rgba(255,255,255,0.7)"})}):e.jsx(t.Pressable,{onPress:Ve,style:[r(Dr||(Dr=M(["rounded-full justify-center items-center"]))),g({height:qr,width:qr,backgroundColor:"#16a34a"},null==le||null===(_=le.inputStyles)||void 0===_?void 0:_.sendButtonStyle)],children:N?e.jsx(N,{}):e.jsx(Zt,{style:r.style(Xr),color:(null==le||null===(O=le.colors)||void 0===O?void 0:O.sendIconsColor)||"rgba(255,255,255,0.7)"})})]}),null!=Je?Je:he&&e.jsx(gr,{primaryColor:Ue,backgroundColor:We,timerColor:Ye,microphoneColor:Ne,waveformColor:ze,cancelTextColor:null==we?void 0:we.cancelTextColor,chevronColor:null==we?void 0:we.chevronIconColor,lockColor:null==we?void 0:we.lockIconColor,lockPillBackground:null==we?void 0:we.lockPillBackground,lockPillActiveBorderColor:null==we?void 0:we.lockPillActiveBorderColor,borderTopColor:null==we?void 0:we.containerBorderTopColor,borderTopWidth:null==we?void 0:we.containerBorderTopWidth,iconSize:null==we?void 0:we.iconSize,sendIconSize:null==we?void 0:we.sendIconSize,lockPillGap:null==we?void 0:we.lockPillGap,lockPillMarginBottom:null==we?void 0:we.lockPillMarginBottom,lockSlideDistance:null==we?void 0:we.lockSlideDistance,waveCount:null==we?void 0:we.waveformBarCount,enableLockRecording:null==ye?void 0:ye.enableLockRecording,enableSlideToCancel:null==ye?void 0:ye.enableSlideToCancel,enableWaveform:null==ye?void 0:ye.enableWaveform,timerTextStyle:null!==(T=null==we?void 0:we.timerTextStyle)&&void 0!==T?T:null==xe?void 0:xe.timer,containerStyle:null==xe?void 0:xe.container,barStyle:null==xe?void 0:xe.bar,slideTextStyle:null==xe?void 0:xe.slideText,waveformStyle:null==xe?void 0:xe.waveform,lockPillStyle:null==xe?void 0:xe.lockPill,trashButtonStyle:null==xe?void 0:xe.trashButton,sendButtonStyle:null==xe?void 0:xe.sendButton,onRecordingStart:Fe,onSend:Be,onCancel:He,onDelete:He})]})},Zr=n.memo($r);function en(t){var n=t.style;return e.jsxs(o.Svg,{viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:r.style("h-6 w-6 text-black",n),children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18"})]})}var tn,rn,nn,on,an,An,sn,ln,cn=function(o){var i,a=o.gallery,A=o.onClose,s=K(),l=s.theme,c=s.setIsVideoPlaying,u=n.useRef(null),d=null!==(i=null==a?void 0:a.initialIndex)&&void 0!==i?i:0,C=R(n.useState(d),2),h=C[0],f=C[1],v=t.useWindowDimensions(),p=v.width,m=v.height;n.useEffect((function(){if(null!=a&&a.items.length){var e=a.initialIndex;f(e);var t=a.items[e];c("video"===(null==t?void 0:t.kind)),requestAnimationFrame((function(){try{var t;null===(t=u.current)||void 0===t||t.scrollToIndex({index:e,animated:!1})}catch(e){}}))}}),[null==a?void 0:a.initialIndex,null==a?void 0:a.items,c]);var g=n.useCallback((function(){c(!1),A()}),[A,c]),y=n.useCallback((function(e){var t=Math.round(e.nativeEvent.contentOffset.x/p);f(t);var r=null==a?void 0:a.items[t];c("video"===(null==r?void 0:r.kind))}),[null==a?void 0:a.items,p,c]);return a&&0!==a.items.length?e.jsx(t.Modal,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:g,statusBarTranslucent:!0,children:e.jsxs(t.View,{style:[r(Lr||(Lr=M(["flex-1 bg-black"]))),{width:p,height:m}],children:[e.jsx(t.Pressable,{onPress:g,style:r(Fr||(Fr=M(["absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70"]))),children:e.jsx(en,{style:r(Br||(Br=M(["h-8 w-8"])))})}),a.items.length>1&&e.jsx(t.View,{style:r(Hr||(Hr=M(["absolute top-14 left-0 right-0 z-10 items-center"]))),children:e.jsxs(t.Text,{style:Q(r(Ur||(Ur=M(["text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full"]))),null==l?void 0:l.fontFamily),children:[h+1," / ",a.items.length]})}),e.jsx(t.FlatList,{ref:u,data:a.items,horizontal:!0,pagingEnabled:!0,showsHorizontalScrollIndicator:!1,keyExtractor:function(e,t){return"".concat(e.uri,"-").concat(t)},initialScrollIndex:a.initialIndex,extraData:h,getItemLayout:function(e,t){return{length:p,offset:p*t,index:t}},onMomentumScrollEnd:y,onScrollToIndexFailed:function(e){var t=e.index;setTimeout((function(){var e;null===(e=u.current)||void 0===e||e.scrollToIndex({index:t,animated:!1})}),100)},renderItem:function(t){var r=t.item,n=t.index;return e.jsx(un,{item:r,width:p,height:m,isActive:n===h,autoPlayVideo:n===d&&"video"===r.kind})}})]})}):null},un=function(o){var a=o.item,A=o.width,s=o.height,l=o.isActive,c=o.autoPlayVideo,u=K().theme,d=n.useRef(null),C=R(n.useState("video"===a.kind),2),h=C[0],f=C[1],v=R(n.useState(!1),2),p=v[0],m=v[1],g="video"===a.kind&&l&&c;return"image"===a.kind?e.jsx(t.View,{style:{width:A,height:s,justifyContent:"center"},children:e.jsx(t.Image,{source:{uri:a.uri},style:{width:A,height:s},resizeMode:"contain"})}):e.jsxs(t.View,{style:{width:A,height:s,justifyContent:"center",alignItems:"center",paddingHorizontal:16},children:[e.jsx(i,{source:{uri:a.uri},ref:d,controls:!0,paused:!g,shutterColor:"transparent",playInBackground:!1,playWhenInactive:!1,style:{width:A-32,height:.55*s,backgroundColor:"#000"},resizeMode:"contain",onLoadStart:function(){f(!0),m(!1)},onLoad:function(){return f(!1)},onBuffer:function(e){var t=e.isBuffering;return f(t)},onError:function(){m(!0),f(!1)}}),h&&e.jsx(t.View,{style:r(Wr||(Wr=M(["absolute inset-0 items-center justify-center"]))),pointerEvents:"none",children:e.jsx(st,{style:r.style("h-14 w-14"),spinning:!0})}),p&&e.jsx(t.View,{style:r(Yr||(Yr=M(["absolute inset-0 items-center justify-center px-6"]))),children:e.jsx(t.Text,{style:Q(r(Nr||(Nr=M(["text-white font-semibold"]))),null==u?void 0:u.fontFamily),children:"Failed to load video"})})]})},dn=n.memo(cn),Cn=function(n){var o,i,a,A,s,l=n.typingUsers,c=n.currentUserId,u=K(),d=u.theme,C=u.showAvatars,h=u.renderCustomTyping,f=u.showBubbleTail,v=u.typingText,p=l.filter((function(e){return e.id!==c}));if(!p.length)return null;var m=p.slice(0,2),y=p.length-2,x=C?m.length+(y>0?1:0):0,w=x>0?24+14*Math.max(0,x-1):0,S=x>0?w+12:8,b=-(w+12);return e.jsxs(t.View,{style:[r(tn||(tn=M(["px-2 my-1 bg-white rounded-tl-none rounded-lg relative max-w-[75%] self-start"]))),{marginLeft:S},null==d||null===(o=d.bubbleStyle)||void 0===o?void 0:o.typingContainerStyle],children:[C&&x>0&&e.jsxs(t.View,{style:{position:"absolute",top:0,left:b,flexDirection:"row"},children:[m.map((function(n,o){var i,a,A;return e.jsx(t.View,{style:[r(rn||(rn=M(["bg-gray-400 w-6 h-6 rounded-full items-center"]))),{marginLeft:o>0?-10:0,zIndex:m.length+o}],children:n.avatar?e.jsx(t.Image,{source:{uri:n.avatar},style:[r(nn||(nn=M(["w-full h-full object-cover rounded-full"]))),null==d||null===(i=d.bubbleStyle)||void 0===i?void 0:i.avatarImageStyle]}):e.jsx(t.Text,{style:Q([r(on||(on=M(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==d||null===(a=d.bubbleStyle)||void 0===a?void 0:a.avatarTextStyle],null==d?void 0:d.fontFamily),children:null===(A=n.name)||void 0===A?void 0:A.charAt(0)})},n.id)})),y>0&&e.jsx(t.View,{style:[r(an||(an=M(["bg-gray-400 w-6 h-6 rounded-full items-center justify-center"]))),{marginLeft:-10,zIndex:3},g({},null==d||null===(i=d.bubbleStyle)||void 0===i?void 0:i.additionalTypingUsersContainerStyle)],children:e.jsxs(t.Text,{style:Q([r(An||(An=M(["text-white text-xs font-semibold"]))),null==d||null===(a=d.bubbleStyle)||void 0===a?void 0:a.additionalTypingUsersTextStyle],null==d?void 0:d.fontFamily),children:["+",y]})})]}),f&&e.jsx(T,{style:r.style("absolute -top-[3px] w-6 h-6 rotate-180 -left-3.5 mt-[1.5px]"),color:(null==d||null===(A=d.colors)||void 0===A?void 0:A.receivedMessageTailColor)||"white"}),h?h():e.jsx(t.View,{style:r(sn||(sn=M(["flex-row items-center py-3 px-2 justify-center"]))),children:e.jsx(t.Text,{style:Q([r(ln||(ln=M(["text-gray-600"]))),null==d||null===(s=d.bubbleStyle)||void 0===s?void 0:s.typingTextStyle],null==d?void 0:d.fontFamily),children:null!=v?v:"Typing..."})})]})};var hn={code:"function VoiceRecorderTsx1(){const{sendScale}=this.__closure;return{transform:[{scale:sendScale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx1","sendScale","__closure","transform","scale","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAuC+C,SAAAA,kBAAA,QAAAC,SAAA,OAAAC,SAAA,OAAO,CAC9CC,SAAS,CAAE,CAAC,CAAEC,KAAK,CAAEH,SAAS,CAACI,KAAM,CAAC,CAC1C,CAAC","ignoreList":[]}',version:"3.16.7"},fn={code:"function VoiceRecorderTsx2(){const{pauseOpacity}=this.__closure;return{opacity:pauseOpacity.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx2","pauseOpacity","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AA0CgD,SAAAA,kBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CAC/CC,OAAO,CAAEF,YAAY,CAACG,KAC1B,CAAC","ignoreList":[]}',version:"3.16.7"},vn=function(r){var o=r.color,i=r.count,a=r.spacing,s=r.barWidth,l=A.useSharedValue(0);n.useEffect((function(){l.value=A.withRepeat(A.withTiming(1,{duration:4500,easing:A.Easing.linear}),-1,!1)}),[]);var c=Math.min(200,i*s+(i-1)*a);return e.jsx(t.View,{style:[gn.waveform,{width:c,height:36}],children:Array.from({length:i}).map((function(t,r){return e.jsx(mn,{index:r,total:i,tick:l,color:o,width:s,spacing:a},r)}))})},pn={code:'function VoiceRecorderTsx3(){const{tick,index,total}=this.__closure;const t=tick.value*Math.PI*2;const phase1=Math.sin(t*2+index*0.55);const phase2=Math.sin(t*4+index*1.3);const phase3=Math.sin(t*0.9+index*0.27);const combined=(phase1*0.55+phase2*0.3+phase3*0.4)*0.5+0.5;const edgeFalloff=Math.sin(index/Math.max(1,total-1)*Math.PI);const amplitude=Math.max(0.15,Math.min(1,combined)*(0.35+0.65*edgeFalloff));return{height:Math.round(amplitude*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx3","tick","index","total","__closure","t","value","Math","PI","phase1","sin","phase2","phase3","combined","edgeFalloff","max","amplitude","min","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAqE2C,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEzC,KAAM,CAAAC,CAAC,CAAGJ,IAAI,CAACK,KAAK,CAAGC,IAAI,CAACC,EAAE,CAAG,CAAC,CAClC,KAAM,CAAAC,MAAM,CAAGF,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC7C,KAAM,CAAAS,MAAM,CAAGJ,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,GAAG,CAAC,CAC5C,KAAM,CAAAU,MAAM,CAAGL,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,GAAG,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC/C,KAAM,CAAAW,QAAQ,CAAG,CAACJ,MAAM,CAAG,IAAI,CAAGE,MAAM,CAAG,GAAG,CAAGC,MAAM,CAAG,GAAG,EAAI,GAAG,CAAG,GAAG,CAC1E,KAAM,CAAAE,WAAW,CAAGP,IAAI,CAACG,GAAG,CAAER,KAAK,CAAGK,IAAI,CAACQ,GAAG,CAAC,CAAC,CAAEZ,KAAK,CAAG,CAAC,CAAC,CAAII,IAAI,CAACC,EAAE,CAAC,CACxE,KAAM,CAAAQ,SAAS,CAAGT,IAAI,CAACQ,GAAG,CAAC,IAAI,CAAER,IAAI,CAACU,GAAG,CAAC,CAAC,CAAEJ,QAAQ,CAAC,EAAI,IAAI,CAAG,IAAI,CAAGC,WAAW,CAAC,CAAC,CACrF,MAAO,CACHI,MAAM,CAAKX,IAAI,CAACY,KAAK,CAACH,SAAS,CAAG,GAAG,CAAC,IAC1C,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},mn=function(t){var r,n,o=t.index,i=t.total,a=t.tick,s=t.color,l=t.width,c=t.spacing,u=A.useAnimatedStyle((r=[new global.Error,-4,-27],(n=function(){var e=a.value*Math.PI*2,t=.5*(.55*Math.sin(2*e+.55*o)+.3*Math.sin(4*e+1.3*o)+.4*Math.sin(.9*e+.27*o))+.5,r=Math.sin(o/Math.max(1,i-1)*Math.PI),n=Math.max(.15,Math.min(1,t)*(.35+.65*r));return{height:"".concat(Math.round(100*n),"%")}}).__closure={tick:a,index:o,total:i},n.__workletHash=7061037340779,n.__initData=pn,n.__stackDetails=r,n));return e.jsx(A.View,{style:[{width:l,marginHorizontal:c/2,backgroundColor:s,borderRadius:l},u]})},gn=t.StyleSheet.create({container:{width:"100%",paddingHorizontal:18,paddingVertical:14,justifyContent:"center"},row:{flex:1,flexDirection:"row",alignItems:"center"},deleteWrapper:{width:26,height:"100%",justifyContent:"flex-end",alignItems:"flex-start",paddingBottom:2},center:{flex:1,height:"100%",paddingHorizontal:12,justifyContent:"center"},timerRow:{flexDirection:"row",alignItems:"center",gap:12},timer:{fontSize:24,fontWeight:"600",minWidth:50,letterSpacing:.3},waveformWrapper:{flex:1,alignItems:"flex-start",justifyContent:"center"},waveform:{flexDirection:"row",alignItems:"center",justifyContent:"space-between"},pauseRow:{flexDirection:"row",justifyContent:"center",alignItems:"center",marginTop:6,gap:4},pauseBar:{width:3,height:12,borderRadius:2,backgroundColor:"#F15C6D"},sendButton:{width:72,height:72,borderRadius:36,justifyContent:"center",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.25,shadowRadius:8,elevation:6}}),yn="rgba(255,255,255,0.55)",xn=72,wn=70;function Sn(){t.Vibration.vibrate(20)}var bn,En,kn,In,_n,Rn={code:"function VoiceRecordingGestureTsx1(){const{cancelFired,lockFired,dragX,dragY}=this.__closure;cancelFired.value=0;lockFired.value=0;dragX.value=0;dragY.value=0;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx1","cancelFired","lockFired","dragX","dragY","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA4DiB,SAAAA,yBAAMA,CAAA,QAAAC,WAAA,CAAAC,SAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEfJ,WAAW,CAACK,KAAK,CAAG,CAAC,CACrBJ,SAAS,CAACI,KAAK,CAAG,CAAC,CACnBH,KAAK,CAACG,KAAK,CAAG,CAAC,CACfF,KAAK,CAACE,KAAK,CAAG,CAAC,CACnB","ignoreList":[]}',version:"3.16.7"},Mn={code:"function VoiceRecordingGestureTsx2(e){const{dragX,dragY,lockFired,LOCK_THRESHOLD,lockHighlight,withTiming,runOnJS,fireLock,cancelFired,CANCEL_THRESHOLD,fireCancel}=this.__closure;const x=Math.min(0,e.translationX);const y=Math.min(0,e.translationY);dragX.value=x;dragY.value=y;if(lockFired.value===0&&y<=-LOCK_THRESHOLD){lockFired.value=1;lockHighlight.value=withTiming(1,{duration:180});runOnJS(fireLock)();}if(cancelFired.value===0&&x<=-CANCEL_THRESHOLD){cancelFired.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx2","e","dragX","dragY","lockFired","LOCK_THRESHOLD","lockHighlight","withTiming","runOnJS","fireLock","cancelFired","CANCEL_THRESHOLD","fireCancel","__closure","x","Math","min","translationX","y","translationY","value","duration"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAmEmB,QAAC,CAAAA,yBAAKA,CAAAC,CAAA,QAAAC,KAAA,CAAAC,KAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,aAAA,CAAAC,UAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,WAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,CAAC,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAEf,CAAC,CAACgB,YAAY,CAAC,CACrC,KAAM,CAAAC,CAAC,CAAGH,IAAI,CAACC,GAAG,CAAC,CAAC,CAAEf,CAAC,CAACkB,YAAY,CAAC,CACrCjB,KAAK,CAACkB,KAAK,CAAGN,CAAC,CACfX,KAAK,CAACiB,KAAK,CAAGF,CAAC,CACf,GAAId,SAAS,CAACgB,KAAK,GAAK,CAAC,EAAIF,CAAC,EAAI,CAACb,cAAc,CAAE,CAC/CD,SAAS,CAACgB,KAAK,CAAG,CAAC,CACnBd,aAAa,CAACc,KAAK,CAAGb,UAAU,CAAC,CAAC,CAAE,CAAEc,QAAQ,CAAE,GAAI,CAAC,CAAC,CACtDb,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACvB,CACA,GAAIC,WAAW,CAACU,KAAK,GAAK,CAAC,EAAIN,CAAC,EAAI,CAACH,gBAAgB,CAAE,CACnDD,WAAW,CAACU,KAAK,CAAG,CAAC,CACrBZ,OAAO,CAACI,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},On={code:"function VoiceRecordingGestureTsx3(){const{lockFired,dragX,withSpring,dragY}=this.__closure;if(lockFired.value===0){dragX.value=withSpring(0,{damping:18,stiffness:180});dragY.value=withSpring(0,{damping:18,stiffness:180});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx3","lockFired","dragX","withSpring","dragY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAmFe,SAAAA,yBAAMA,CAAA,QAAAC,SAAA,CAAAC,KAAA,CAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA,CAEb,GAAIJ,SAAS,CAACK,KAAK,GAAK,CAAC,CAAE,CACvBJ,KAAK,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAC5DJ,KAAK,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAChE,CACJ","ignoreList":[]}',version:"3.16.7"},jn={code:"function VoiceRecordingGestureTsx4(){const{lockFired,dragX,withSpring,dragY}=this.__closure;if(lockFired.value===0){dragX.value=withSpring(0,{damping:18,stiffness:180});dragY.value=withSpring(0,{damping:18,stiffness:180});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx4","lockFired","dragX","withSpring","dragY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA0FoB,SAAAA,yBAAMA,CAAA,QAAAC,SAAA,CAAAC,KAAA,CAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA,CAElB,GAAIJ,SAAS,CAACK,KAAK,GAAK,CAAC,CAAE,CACvBJ,KAAK,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAC5DJ,KAAK,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAChE,CACJ","ignoreList":[]}',version:"3.16.7"},Tn={code:"function VoiceRecordingGestureTsx5(){const{dragX,CANCEL_THRESHOLD,arrowPulse}=this.__closure;const progress=Math.min(1,Math.abs(dragX.value)/CANCEL_THRESHOLD);return{transform:[{translateX:dragX.value*0.55+arrowPulse.value}],opacity:1-progress};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx5","dragX","CANCEL_THRESHOLD","arrowPulse","__closure","progress","Math","min","abs","value","transform","translateX","opacity"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAiG4C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAC1C,KAAM,CAAAC,QAAQ,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAACP,KAAK,CAACQ,KAAK,CAAC,CAAGP,gBAAgB,CAAC,CACtE,MAAO,CACHQ,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEV,KAAK,CAACQ,KAAK,CAAG,IAAI,CAAGN,UAAU,CAACM,KAAM,CAAC,CAAC,CAClEG,OAAO,CAAE,CAAC,CAAGP,QACjB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Gn={code:"function VoiceRecordingGestureTsx6(){const{dragY,LOCK_REVEAL_TRAVEL,LOCK_THRESHOLD,interpolate}=this.__closure;const reveal=Math.min(1,Math.max(0,-dragY.value/LOCK_REVEAL_TRAVEL));const lockProgress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));const rise=interpolate(lockProgress,[0,1],[0,-22]);return{opacity:reveal,transform:[{scale:0.85+reveal*0.15},{translateY:rise}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx6","dragY","LOCK_REVEAL_TRAVEL","LOCK_THRESHOLD","interpolate","__closure","reveal","Math","min","max","value","lockProgress","rise","opacity","transform","scale","translateY"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAwG2C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,kBAAA,CAAAC,cAAA,CAAAC,WAAA,OAAAC,SAAA,CACzC,KAAM,CAAAC,MAAM,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACR,KAAK,CAACS,KAAK,CAAGR,kBAAkB,CAAC,CAAC,CAC1E,KAAM,CAAAS,YAAY,CAAGJ,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACR,KAAK,CAACS,KAAK,CAAGP,cAAc,CAAC,CAAC,CAC5E,KAAM,CAAAS,IAAI,CAAGR,WAAW,CAACO,YAAY,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAC,CACxD,MAAO,CACHE,OAAO,CAAEP,MAAM,CACfQ,SAAS,CAAE,CACP,CAAEC,KAAK,CAAE,IAAI,CAAGT,MAAM,CAAG,IAAK,CAAC,CAC/B,CAAEU,UAAU,CAAEJ,IAAK,CAAC,CAE5B,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Vn={code:"function VoiceRecordingGestureTsx7(){const{dragY,LOCK_THRESHOLD,lockHighlight}=this.__closure;const lockProgress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));return{borderWidth:lockProgress>0.85||lockHighlight.value>0?1.5:0};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx7","dragY","LOCK_THRESHOLD","lockHighlight","__closure","lockProgress","Math","min","max","value","borderWidth"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAoH6C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,cAAA,CAAAC,aAAA,OAAAC,SAAA,CAC3C,KAAM,CAAAC,YAAY,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACP,KAAK,CAACQ,KAAK,CAAGP,cAAc,CAAC,CAAC,CAC5E,MAAO,CACHQ,WAAW,CAAEL,YAAY,CAAG,IAAI,EAAIF,aAAa,CAACM,KAAK,CAAG,CAAC,CAAG,GAAG,CAAG,CACxE,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Pn={code:"function VoiceRecordingGestureTsx8(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx8","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA0H0C,SAAAA,0BAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACzCC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},Kn={code:'function VoiceRecordingGestureTsx9(){const{dragY,LOCK_THRESHOLD}=this.__closure;const progress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));return{height:Math.round(progress*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx9","dragY","LOCK_THRESHOLD","__closure","progress","Math","min","max","value","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA6HmD,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,cAAA,OAAAC,SAAA,CACjD,KAAM,CAAAC,QAAQ,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACN,KAAK,CAACO,KAAK,CAAGN,cAAc,CAAC,CAAC,CACxE,MAAO,CACHO,MAAM,CAAKJ,IAAI,CAACK,KAAK,CAACN,QAAQ,CAAG,GAAG,CAAC,IACzC,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Dn={code:"function VoiceRecordingGestureTsx10(){const{lockHighlight,dragX,dragY,micPulse}=this.__closure;const lockedScale=lockHighlight.value;return{transform:[{translateX:dragX.value},{translateY:dragY.value},{scale:micPulse.value*(1+lockedScale*0.04)}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx10","lockHighlight","dragX","dragY","micPulse","__closure","lockedScale","value","transform","translateX","translateY","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAmIsC,SAAAA,0BAAMA,CAAA,QAAAC,aAAA,CAAAC,KAAA,CAAAC,KAAA,CAAAC,QAAA,OAAAC,SAAA,CACpC,KAAM,CAAAC,WAAW,CAAGL,aAAa,CAACM,KAAK,CACvC,MAAO,CACHC,SAAS,CAAE,CACP,CAAEC,UAAU,CAAEP,KAAK,CAACK,KAAM,CAAC,CAC3B,CAAEG,UAAU,CAAEP,KAAK,CAACI,KAAM,CAAC,CAC3B,CAAEI,KAAK,CAAEP,QAAQ,CAACG,KAAK,EAAI,CAAC,CAAGD,WAAW,CAAG,IAAI,CAAE,CAAC,CAE5D,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Ln=t.StyleSheet.create({wrapper:{width:"100%"},lockPill:{position:"absolute",right:31,bottom:103,width:46,paddingVertical:12,borderRadius:28,backgroundColor:"rgba(20,28,33,0.95)",borderColor:"#22C55E",alignItems:"center",justifyContent:"center",gap:10,shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:8},lockProgressTrack:{width:4,height:18,borderRadius:2,backgroundColor:"rgba(255,255,255,0.15)",overflow:"hidden",justifyContent:"flex-end"},lockProgressFill:{width:"100%",borderRadius:2},bar:{width:"100%",height:95,paddingHorizontal:18,borderTopLeftRadius:18,borderTopRightRadius:18,flexDirection:"row",alignItems:"center"},timer:{fontSize:24,fontWeight:"600",minWidth:50,letterSpacing:.3},slideArea:{flex:1,flexDirection:"row",alignItems:"center",justifyContent:"center",gap:6},slideArrow:{fontSize:18,lineHeight:18,color:yn,fontWeight:"500",marginTop:-2},slideText:{fontSize:14,color:yn,fontWeight:"500"},micPressable:{width:xn,height:xn,justifyContent:"center",alignItems:"center"},mic:{width:xn,height:xn,borderRadius:36,justifyContent:"center",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:4},shadowOpacity:.3,shadowRadius:8,elevation:6}}),Fn=function(){var o=K(),i=o.messages,a=o.currentUserId,A=o.onMessageLongPress,s=o.mediaViewerGallery,l=o.clearMediaViewerGallery,c=o.typingUsers,u=o.onSendMessage,d=o.onTypingStart,C=o.onTypingEnd,h=o.onAttachmentPress,f=o.onAudioRecordEnd,v=o.onAudioRecordStart,p=o.onCameraPress,m=o.renderCustomInput,g=o.CustomEmojiIcon,y=o.CustomAttachmentIcon,x=o.CustomCameraIcon,w=o.CustomMicrophoneIcon,S=o.CustomSendIcon,b=o.CustomFileIcon,E=o.CustomImagePreview,k=o.CustomVideoPreview,I=o.keyboardVerticalOffset,_=void 0===I?0:I,O=o.disableKeyboardAvoiding,j=void 0!==O&&O,T=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=R(n.useState(0),2),o=r[0],i=r[1];return n.useEffect((function(){if(e){var r="ios"===t.Platform.OS?"keyboardWillShow":"keyboardDidShow",n="ios"===t.Platform.OS?"keyboardWillHide":"keyboardDidHide",o=t.Keyboard.addListener(r,(function(e){i(e.endCoordinates.height)})),a=t.Keyboard.addListener(n,(function(){return i(0)}));return function(){o.remove(),a.remove()}}i(0)}),[e]),e?o:0}(!j),G=m?m():e.jsx(Zr,{onSendMessage:u,onTypingStart:d,onTypingEnd:C,onAttachmentPress:h,onAudioRecordEnd:f,onAudioRecordStart:v,onCameraPress:p,CustomEmojiIcon:g,CustomAttachmentIcon:y,CustomCameraIcon:x,CustomMicrophoneIcon:w,CustomSendIcon:S,CustomFileIcon:b,CustomImagePreview:E,CustomVideoPreview:k}),V=e.jsxs(t.View,{style:r(bn||(bn=M(["flex-1 px-2 pb-4 gap-2 relative"]))),children:[e.jsx(t.FlatList,{style:r(En||(En=M(["flex-1"]))),data:i,keyExtractor:function(e){return e.id},renderItem:function(t){var r,n=t.item,o=t.index;return e.jsx(Qt,{message:n,isCurrentUser:n.senderId===a,onLongPress:function(){return null==A?void 0:A(n)},isFirstInSequence:o===i.length-1||(null===(r=i[o+1])||void 0===r?void 0:r.senderId)!==n.senderId})},ListHeaderComponent:e.jsx(Cn,{typingUsers:c||[],currentUserId:a}),showsVerticalScrollIndicator:!1,inverted:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive"}),e.jsx(t.View,{style:!j&&T>0?{marginBottom:T}:void 0,children:G}),e.jsx(dn,{gallery:s,onClose:l})]});return j?e.jsx(t.View,{style:r(kn||(kn=M(["flex-1"]))),children:V}):"android"===t.Platform.OS?e.jsx(t.View,{style:r(In||(In=M(["flex-1"]))),children:V}):e.jsx(t.KeyboardAvoidingView,{style:r(_n||(_n=M(["flex-1"]))),behavior:"padding",keyboardVerticalOffset:_,children:V})};exports.VoiceRecorder=function(r){var o=r.primaryColor,i=void 0===o?"#22C55E":o,a=r.backgroundColor,s=void 0===a?"#0B141A":a,l=r.waveformColor,c=void 0===l?"#E9EDEF":l,u=r.timerColor,d=void 0===u?"#FFFFFF":u,C=r.sendButtonColor,h=r.deleteIconColor,f=void 0===h?"#8696A0":h,v=r.height,p=void 0===v?110:v,m=r.borderRadius,g=void 0===m?18:m,y=r.waveCount,x=void 0===y?28:y,w=r.waveSpacing,S=void 0===w?3:w,b=r.waveWidth,E=void 0===b?3:b,k=r.renderDeleteIcon,I=r.renderSendIcon,_=r.renderWaveform,M=r.onSend,O=r.onDelete,j=R(n.useState(0),2),T=j[0],G=j[1],V=n.useRef(Date.now());n.useEffect((function(){V.current=Date.now();var e=setInterval((function(){G((Date.now()-V.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var P=A.useSharedValue(1),K=A.useSharedValue(1);n.useEffect((function(){P.value=A.withRepeat(A.withSequence(A.withTiming(1.05,{duration:900,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(1,{duration:900,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),K.value=A.withRepeat(A.withSequence(A.withTiming(.45,{duration:600,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(1,{duration:600,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1)}),[]);var D,L,F=A.useAnimatedStyle((D=[new global.Error,-2,-27],(L=function(){return{transform:[{scale:P.value}]}}).__closure={sendScale:P},L.__workletHash=0xb10ea8440da,L.__initData=hn,L.__stackDetails=D,L)),B=A.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:K.value}};return t.__closure={pauseOpacity:K},t.__workletHash=0xfe959e3782e,t.__initData=fn,t.__stackDetails=e,t}()),H={height:p,backgroundColor:s,borderTopLeftRadius:g,borderTopRightRadius:g},U=null!=C?C:i;return e.jsx(t.View,{style:[gn.container,H],children:e.jsxs(t.View,{style:gn.row,children:[e.jsx(t.Pressable,{onPress:O,hitSlop:10,style:gn.deleteWrapper,accessibilityRole:"button",accessibilityLabel:"Delete recording",children:k?k():e.jsx(or,{style:{width:26,height:26},color:f})}),e.jsxs(t.View,{style:gn.center,children:[e.jsxs(t.View,{style:gn.timerRow,children:[e.jsx(t.Text,{style:[gn.timer,{color:d}],numberOfLines:1,children:Qe(T)}),e.jsx(t.View,{style:gn.waveformWrapper,children:_?_():e.jsx(vn,{color:c,count:x,spacing:S,barWidth:E})})]}),e.jsxs(A.View,{style:[gn.pauseRow,B],children:[e.jsx(t.View,{style:gn.pauseBar}),e.jsx(t.View,{style:gn.pauseBar})]})]}),e.jsx(A.View,{style:F,children:e.jsx(t.Pressable,{onPress:M,hitSlop:6,accessibilityRole:"button",accessibilityLabel:"Send recording",style:[gn.sendButton,{backgroundColor:U}],children:I?I():e.jsx(Zt,{style:{width:30,height:30},color:"#FFFFFF"})})})]})})},exports.VoiceRecorderFlow=gr,exports.VoiceRecordingGesture=function(r){var o=r.primaryColor,i=void 0===o?"#22C55E":o,s=r.backgroundColor,l=void 0===s?"#0B141A":s,c=r.timerColor,u=void 0===c?"#FFFFFF":c,d=r.microphoneColor,C=void 0===d?"#FFFFFF":d,h=r.lockColor,f=void 0===h?"#E9EDEF":h,v=r.renderMicIcon,p=r.renderLockIcon,m=r.renderArrowIcon,g=r.onCancel,y=r.onLock,x=R(n.useState(0),2),w=x[0],S=x[1],b=n.useRef(Date.now());n.useEffect((function(){b.current=Date.now();var e=setInterval((function(){S((Date.now()-b.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var E=A.useSharedValue(0),k=A.useSharedValue(0),I=A.useSharedValue(0),_=A.useSharedValue(1),M=A.useSharedValue(0),O=A.useSharedValue(0),j=A.useSharedValue(0),T=A.useSharedValue(0);n.useEffect((function(){I.value=A.withRepeat(A.withSequence(A.withTiming(-4,{duration:700,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(0,{duration:700,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),_.value=A.withRepeat(A.withSequence(A.withTiming(1.08,{duration:850,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(1,{duration:850,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1),M.value=A.withRepeat(A.withSequence(A.withTiming(-5,{duration:500,easing:A.Easing.inOut(A.Easing.ease)}),A.withTiming(0,{duration:500,easing:A.Easing.inOut(A.Easing.ease)})),-1,!1)}),[]);var G=n.useRef(g);G.current=g;var V=n.useRef(y);V.current=y;var P,K,D=function(){var e;Sn(),null===(e=G.current)||void 0===e||e.call(G)},L=function(){var e;Sn(),null===(e=V.current)||void 0===e||e.call(V)},F=a.Gesture.Pan().minDistance(0).onBegin((P=[new global.Error,-5,-27],K=function(){j.value=0,T.value=0,E.value=0,k.value=0},K.__closure={cancelFired:j,lockFired:T,dragX:E,dragY:k},K.__workletHash=9031413480896,K.__initData=Rn,K.__stackDetails=P,K)).onUpdate(function(){var e=[new global.Error,-12,-27],t=function(e){var t=Math.min(0,e.translationX),r=Math.min(0,e.translationY);E.value=t,k.value=r,0===T.value&&r<=-70&&(T.value=1,O.value=A.withTiming(1,{duration:180}),A.runOnJS(L)()),0===j.value&&t<=-90&&(j.value=1,A.runOnJS(D)())};return t.__closure={dragX:E,dragY:k,lockFired:T,LOCK_THRESHOLD:wn,lockHighlight:O,withTiming:A.withTiming,runOnJS:A.runOnJS,fireLock:L,cancelFired:j,CANCEL_THRESHOLD:90,fireCancel:D},t.__workletHash=0x920fdf71852,t.__initData=Mn,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-5,-27],t=function(){0===T.value&&(E.value=A.withSpring(0,{damping:18,stiffness:180}),k.value=A.withSpring(0,{damping:18,stiffness:180}))};return t.__closure={lockFired:T,dragX:E,withSpring:A.withSpring,dragY:k},t.__workletHash=0xb14c5cd4e31,t.__initData=On,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-5,-27],t=function(){0===T.value&&(E.value=A.withSpring(0,{damping:18,stiffness:180}),k.value=A.withSpring(0,{damping:18,stiffness:180}))};return t.__closure={lockFired:T,dragX:E,withSpring:A.withSpring,dragY:k},t.__workletHash=6312451443030,t.__initData=jn,t.__stackDetails=e,t}()),B=A.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.abs(E.value)/90);return{transform:[{translateX:.55*E.value+I.value}],opacity:1-e}};return t.__closure={dragX:E,CANCEL_THRESHOLD:90,arrowPulse:I},t.__workletHash=0xd7ebb4d9e07,t.__initData=Tn,t.__stackDetails=e,t}()),H=A.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=Math.min(1,Math.max(0,-k.value/12)),t=Math.min(1,Math.max(0,-k.value/wn));return{opacity:e,transform:[{scale:.85+.15*e},{translateY:A.interpolate(t,[0,1],[0,-22])}]}};return t.__closure={dragY:k,LOCK_REVEAL_TRAVEL:12,LOCK_THRESHOLD:wn,interpolate:A.interpolate},t.__workletHash=4153451354770,t.__initData=Gn,t.__stackDetails=e,t}()),U=A.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){return{borderWidth:Math.min(1,Math.max(0,-k.value/wn))>.85||O.value>0?1.5:0}};return t.__closure={dragY:k,LOCK_THRESHOLD:wn,lockHighlight:O},t.__workletHash=0xedc5d558aef,t.__initData=Vn,t.__stackDetails=e,t}()),W=A.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:M.value}]}};return t.__closure={chevronPulse:M},t.__workletHash=2030830631140,t.__initData=Pn,t.__stackDetails=e,t}()),Y=A.useAnimatedStyle(function(){var e=[new global.Error,-3,-27],t=function(){var e=Math.min(1,Math.max(0,-k.value/wn));return{height:"".concat(Math.round(100*e),"%")}};return t.__closure={dragY:k,LOCK_THRESHOLD:wn},t.__workletHash=0xe54f0ad7c69,t.__initData=Kn,t.__stackDetails=e,t}()),N=A.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=O.value;return{transform:[{translateX:E.value},{translateY:k.value},{scale:_.value*(1+.04*e)}]}};return t.__closure={lockHighlight:O,dragX:E,dragY:k,micPulse:_},t.__workletHash=6567433970992,t.__initData=Dn,t.__stackDetails=e,t}()),z={backgroundColor:l};return e.jsxs(t.View,{style:Ln.wrapper,pointerEvents:"box-none",children:[e.jsxs(A.View,{style:[Ln.lockPill,H,U],pointerEvents:"none",children:[e.jsx(A.View,{children:p?p():e.jsx(nr,{style:{width:20,height:20},color:f})}),e.jsx(t.View,{style:Ln.lockProgressTrack,children:e.jsx(A.View,{style:[Ln.lockProgressFill,{backgroundColor:i},Y]})}),e.jsx(A.View,{style:W,children:e.jsx(rr,{style:{width:16,height:16},color:f})})]}),e.jsxs(t.View,{style:[Ln.bar,z],children:[e.jsx(t.Text,{style:[Ln.timer,{color:u}],numberOfLines:1,children:Qe(w)}),e.jsxs(A.View,{style:[Ln.slideArea,B],children:[m?m():e.jsx(t.Text,{style:Ln.slideArrow,children:"‹"}),e.jsx(t.Text,{style:Ln.slideText,children:"Slide to cancel"})]}),e.jsx(a.GestureDetector,{gesture:F,children:e.jsx(A.View,{style:Ln.micPressable,accessibilityRole:"button",accessibilityLabel:"Hold to record. Slide left to cancel, slide up to lock.",children:e.jsx(A.View,{style:[Ln.mic,{backgroundColor:i},N],children:v?v():e.jsx(Xt,{style:{width:30,height:30},color:C})})})})]})]})},exports.default=function(t){return e.jsx(ze,{children:e.jsx(P,g(g({},t),{},{children:e.jsx(Fn,{})}))})};
16
+ */function pe(){if(ne)return re;ne=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return re=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(n,o){for(var i,a,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(n),l=1;l<arguments.length;l++){for(var A in i=Object(arguments[l]))t.call(i,A)&&(s[A]=i[A]);if(e){a=e(i);for(var c=0;c<a.length;c++)r.call(i,a[c])&&(s[a[c]]=i[a[c]])}}return s},re}function me(){if(ie)return oe;ie=1;return oe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function ye(){return se?ae:(se=1,ae=Function.call.bind(Object.prototype.hasOwnProperty))}function ge(){if(Ae)return le;Ae=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=me(),r={},n=ye();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,a,s,l){if("production"!==process.env.NODE_ENV)for(var A in o)if(n(o,A)){var c;try{if("function"!=typeof o[A]){var u=Error((s||"React class")+": "+a+" type `"+A+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[A]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}c=o[A](i,A,s,a,null,t)}catch(e){c=e}if(!c||c instanceof Error||e((s||"React class")+": type specification of "+a+" `"+A+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof c+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),c instanceof Error&&!(c.message in r)){r[c.message]=!0;var d=l?l():"";e("Failed "+a+" type: "+c.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},le=o}function xe(){if(ue)return ce;ue=1;var e=ve(),t=pe(),r=me(),n=ye(),o=ge(),i=function(){};function a(){return null}return"production"!==process.env.NODE_ENV&&(i=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),ce=function(s,l){var A="function"==typeof Symbol&&Symbol.iterator;var c="<<anonymous>>",u={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:f(a),arrayOf:function(e){return f((function(t,n,o,i,a){if("function"!=typeof e)return new C("Property `"+a+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var s=t[n];if(!Array.isArray(s))return new C("Invalid "+i+" `"+a+"` of type `"+m(s)+"` supplied to `"+o+"`, expected an array.");for(var l=0;l<s.length;l++){var A=e(s,l,o,i,a+"["+l+"]",r);if(A instanceof Error)return A}return null}))},element:f((function(e,t,r,n,o){var i=e[t];return s(i)?null:new C("Invalid "+n+" `"+o+"` of type `"+m(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:f((function(t,r,n,o,i){var a=t[r];return e.isValidElementType(a)?null:new C("Invalid "+o+" `"+i+"` of type `"+m(a)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return f((function(t,r,n,o,i){if(!(t[r]instanceof e)){var a=e.name||c;return new C("Invalid "+o+" `"+i+"` of type `"+(((s=t[r]).constructor&&s.constructor.name?s.constructor.name:c)+"` supplied to `")+n+"`, expected instance of `"+a+"`.")}var s;return null}))},node:f((function(e,t,r,n,o){return p(e[t])?null:new C("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return f((function(t,o,i,a,s){if("function"!=typeof e)return new C("Property `"+s+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var l=t[o],A=m(l);if("object"!==A)return new C("Invalid "+a+" `"+s+"` of type `"+A+"` supplied to `"+i+"`, expected an object.");for(var c in l)if(n(l,c)){var u=e(l,c,i,a,s+"."+c,r);if(u instanceof Error)return u}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i(arguments.length>1?"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]).":"Invalid argument supplied to oneOf, expected an array."),a;return f((function(t,r,n,o,i){for(var a=t[r],s=0;s<e.length;s++)if(d(a,e[s]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===y(t)?String(t):t}));return new C("Invalid "+o+" `"+i+"` of value `"+String(a)+"` supplied to `"+n+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var t=0;t<e.length;t++){var o=e[t];if("function"!=typeof o)return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+g(o)+" at index "+t+"."),a}return f((function(t,o,i,a,s){for(var l=[],A=0;A<e.length;A++){var c=(0,e[A])(t,o,i,a,s,r);if(null==c)return null;c.data&&n(c.data,"expectedType")&&l.push(c.data.expectedType)}return new C("Invalid "+a+" `"+s+"` supplied to `"+i+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return f((function(t,n,o,i,a){var s=t[n],l=m(s);if("object"!==l)return new C("Invalid "+i+" `"+a+"` of type `"+l+"` supplied to `"+o+"`, expected `object`.");for(var A in e){var c=e[A];if("function"!=typeof c)return v(o,i,a,A,y(c));var u=c(s,A,o,i,a+"."+A,r);if(u)return u}return null}))},exact:function(e){return f((function(o,i,a,s,l){var A=o[i],c=m(A);if("object"!==c)return new C("Invalid "+s+" `"+l+"` of type `"+c+"` supplied to `"+a+"`, expected `object`.");var u=t({},o[i],e);for(var d in u){var f=e[d];if(n(e,d)&&"function"!=typeof f)return v(a,s,l,d,y(f));if(!f)return new C("Invalid "+s+" `"+l+"` key `"+d+"` supplied to `"+a+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var h=f(A,d,a,s,l+"."+d,r);if(h)return h}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function C(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function f(e){if("production"!==process.env.NODE_ENV)var t={},n=0;function o(o,a,s,A,u,d,f){if(A=A||c,d=d||s,f!==r){if(l){var h=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 h.name="Invariant Violation",h}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var v=A+":"+s;!t[v]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+A+"`. 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."),t[v]=!0,n++)}}return null==a[s]?o?null===a[s]?new C("The "+u+" `"+d+"` is marked as required in `"+A+"`, but its value is `null`."):new C("The "+u+" `"+d+"` is marked as required in `"+A+"`, but its value is `undefined`."):null:e(a,s,A,u,d)}var a=o.bind(null,!1);return a.isRequired=o.bind(null,!0),a}function h(e){return f((function(t,r,n,o,i,a){var s=t[r];return m(s)!==e?new C("Invalid "+o+" `"+i+"` of type `"+y(s)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function v(e,t,r,n,o){return new C((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+o+"`.")}function p(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(p);if(null===e||s(e))return!0;var t=function(e){var t=e&&(A&&e[A]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var r,n=t.call(e);if(t!==e.entries){for(;!(r=n.next()).done;)if(!p(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!p(o[1]))return!1}return!0;default:return!1}}function m(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function y(e){if(null==e)return""+e;var t=m(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function g(e){var t=y(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return C.prototype=Error.prototype,u.checkPropTypes=o,u.resetWarningCache=o.resetWarningCache,u.PropTypes=u,u},ce}function be(){if(Ce)return de;Ce=1;var e=me();function t(){}function r(){}return r.resetWarningCache=t,de=function(){function n(t,r,n,o,i,a){if(a!==e){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}}function o(){return n}n.isRequired=n;var i={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i}}function we(){if(fe)return X.exports;if(fe=1,"production"!==process.env.NODE_ENV){var e=ve();X.exports=xe()(e.isElement,true)}else X.exports=be()();return X.exports}var Se=q(we()),Ee=function(){return f((function e(t,r){C(this,e),this.text=t,this.patterns=r||[]}),[{key:"parse",value:function(){var e=this,t=[{children:this.text}];return this.patterns.forEach((function(r){var n=[],o=r.nonExhaustiveModeMaxMatchCount||0,i=Math.min(Math.max(Number.isInteger(o)?o:0,0)||Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY),a=0;t.forEach((function(t){if(t._matched)n.push(t);else{var o,s=[],l=t.children,A=0;for(r.pattern.lastIndex=0;l&&(o=r.pattern.exec(l));){var c=l.substr(0,o.index);if(A=o.index,++a>i)break;s.push({children:c}),s.push(e.getMatchedPart(r,o[0],o,A)),l=l.substr(o.index+o[0].length),A+=o[0].length-1,r.pattern.lastIndex=0}s.push({children:l}),n.push.apply(n,s)}})),t=n})),t.forEach((function(e){return delete e._matched})),t.filter((function(e){return!!e.children}))}},{key:"getMatchedPart",value:function(e,t,r,n){var o={};Object.keys(e).forEach((function(r){"pattern"!==r&&"renderText"!==r&&"nonExhaustiveModeMaxMatchCount"!==r&&("function"==typeof e[r]?o[r]=function(){return e[r](t,n)}:o[r]=e[r])}));var i=t;return e.renderText&&"function"==typeof e.renderText&&(i=e.renderText(t,r)),y(y({},o),{},{children:i,_matched:!0})}}])}(),je=["type"],ke=["style"],Ie=["parse","childrenProps"],Re={url:/(https?:\/\/|www\.)[-a-zA-Z0-9@:%._\+~#=]{1,256}\.(xn--)?[a-z0-9-]{2,20}\b([-a-zA-Z0-9@:%_\+\[\],.~#?&\/=]*[-a-zA-Z0-9@:%_\+\]~#?&\/=])*/i,phone:/[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,7}/,email:/\S+@\S+\.\S+/},Me=Se.shape(y(y({},t.Text.propTypes),{},{type:Se.oneOf(Object.keys(Re)).isRequired,nonExhaustiveMaxMatchCount:Se.number})),_e=Se.shape(y(y({},t.Text.propTypes),{},{pattern:Se.oneOfType([Se.string,Se.instanceOf(RegExp)]).isRequired,nonExhaustiveMaxMatchCount:Se.number})),Oe=function(){function r(){return C(this,r),d(this,r,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(r,n.Component),f(r,[{key:"setNativeProps",value:function(e){this._root.setNativeProps(e)}},{key:"getPatterns",value:function(){return this.props.parse.map((function(e){var t=e.type,r=g(e,je);if(t){if(!Re[t])throw new Error("".concat(e.type," is not a supported type"));r.pattern=Re[t]}return r}))}},{key:"getParsedText",value:function(){var r=this;return this.props.parse?"string"!=typeof this.props.children?this.props.children:new Ee(this.props.children,this.getPatterns()).parse().map((function(n,o){var i=r.props.style,a=n.style,s=g(n,ke);return e.jsx(t.Text,y(y({style:[i,a]},r.props.childrenProps),s),"parsedText-".concat(o))})):this.props.children}},{key:"render",value:function(){var r=this,n=y({},this.props);n.parse,n.childrenProps;var o=g(n,Ie);return e.jsx(t.Text,y(y({ref:function(e){return r._root=e}},o),{},{children:this.getParsedText()}))}}])}();Oe.displayName="ParsedText",Oe.propTypes=y(y({},t.Text.propTypes),{},{parse:Se.arrayOf(Se.oneOfType([Me,_e])),childrenProps:Se.shape(t.Text.propTypes)}),Oe.defaultProps={parse:null,childrenProps:{}};var Pe,Ge,Ve,Te,De,Fe,Ke,Le,Be,He,Ue,Ne=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 15 15",children:e.jsx(o.Path,{fill:n,fillRule:"evenodd",d:"M6.05 2.75a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0zm4 0a.55.55 0 0 0-1.1 0v9.5a.55.55 0 0 0 1.1 0z",clipRule:"evenodd"})})},Ye=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:n,d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"})})},We=n.createContext(void 0),ze=function(t){var r=t.children,o=R(n.useState(null),2),i=o[0],a=o[1];return e.jsx(We.Provider,{value:{currentlyPlayingId:i,setCurrentlyPlayingId:a},children:r})},Qe=function(e){var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r<10?"0":"").concat(r)},qe=[1,1.5,2],Je=42;function Xe(n){var o,i,a,s,l,A=n.isPlaying,c=n.playbackRate,u=n.onCycleSpeed,d=n.senderAvatar,C=n.senderName,f=n.isCurrentUser,h=n.theme;return A?e.jsx(t.Pressable,{onPress:u,style:[r(Pe||(Pe=M(["rounded-full items-center justify-center"]))),{width:Je,height:Je,backgroundColor:f?"rgba(0,0,0,0.22)":"rgba(255,255,255,0.12)"},null==h||null===(o=h.messageStyle)||void 0===o?void 0:o.audioSpeedButtonStyle],children:e.jsx(t.Text,{style:Q([r(Ge||(Ge=M(["text-xs font-semibold"]))),{color:U(h,f)},null==h||null===(i=h.messageStyle)||void 0===i?void 0:i.audioSpeedTextStyle],null==h?void 0:h.fontFamily),children:1===c?"1x":"".concat(c,"x")})}):d?e.jsx(t.Image,{source:{uri:d},style:[r(Ve||(Ve=M(["rounded-full"]))),{width:Je,height:Je},null==h||null===(a=h.bubbleStyle)||void 0===a?void 0:a.avatarImageStyle],resizeMode:"cover"}):e.jsx(t.View,{style:[r(Te||(Te=M(["rounded-full items-center justify-center"]))),{width:Je,height:Je,backgroundColor:f?"rgba(0,0,0,0.2)":"#9ca3af"}],children:e.jsx(t.Text,{style:Q([r(De||(De=M(["text-base font-semibold capitalize"]))),{color:"#ffffff"}],null==h?void 0:h.fontFamily),children:(s=C,l=null==s?void 0:s.trim(),l?l.charAt(0).toUpperCase():"?")})})}var $e,Ze,et,tt,rt,nt,ot,it,at=function(o){var a,s,l=o.audioUrl,A=o.audioId,c=o.isVideoPlaying,u=o.isCurrentUser,d=o.senderAvatar,C=o.senderName,f=o.reserveStatusSpace,h=void 0===f||f,v=D(),p=v.theme,m=v.CustomPlayIcon,g=v.CustomPauseIcon,x=v.showMessageStatus,b=function(){var e=n.useContext(We);if(!e)throw new Error("useAudio must be used within an AudioProvider");return e}(),w=b.currentlyPlayingId,S=b.setCurrentlyPlayingId,E=n.useRef(null),j=R(n.useState(!1),2),k=j[0],I=j[1],_=R(n.useState(0),2),O=_[0],P=_[1],G=R(n.useState(0),2),V=G[0],T=G[1],K=R(n.useState(!1),2),L=K[0],B=K[1],H=R(n.useState(1),2),U=H[0],N=H[1],Y=R(n.useState(0),2),W=Y[0],z=Y[1],q=n.useRef(null),J=n.useMemo((function(){return function(e,t){for(var r=5381,n=0;n<e.length;n++)r=(r<<5)+r+e.charCodeAt(n)|0;return Array.from({length:t},(function(e,t){return r=0|Math.imul(r^r>>>16,73244475+31337*t),r^=r>>>13,.18+Math.abs(r)%100/100*.82}))}(l,50)}),[l]),X=function(e,t){var r,n,o,i,a=F(e);return t?{inactive:null!==(o=null==a?void 0:a.sentAudioWaveformColor)&&void 0!==o?o:"rgba(255,255,255,0.35)",active:null!==(i=null==a?void 0:a.sentAudioWaveformActiveColor)&&void 0!==i?i:"rgba(255,255,255,0.95)"}:{inactive:null!==(r=null==a?void 0:a.receivedAudioWaveformColor)&&void 0!==r?r:"rgba(0,0,0,0.20)",active:null!==(n=null==a?void 0:a.receivedAudioWaveformActiveColor)&&void 0!==n?n:"rgba(0,0,0,0.60)"}}(p,u),$=X.inactive,Z=X.active,ee=function(e,t){var r,n,o,i,a=F(e);return t?null!==(o=null!==(i=null==a?void 0:a.sentAudioTimestampColor)&&void 0!==i?i:null==a?void 0:a.sentTimestampColor)&&void 0!==o?o:"rgba(255,255,255,0.75)":null!==(r=null!==(n=null==a?void 0:a.receivedAudioTimestampColor)&&void 0!==n?n:null==a?void 0:a.receivedTimestampColor)&&void 0!==r?r:"rgba(0,0,0,0.45)"}(p,u),te=function(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentAudioPlayIconColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioPlayIconColor)&&void 0!==r?r:"#374151"}(p,u),re=function(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentAudioPauseIconColor)&&void 0!==n?n:"#ffffff":null!==(r=null==o?void 0:o.receivedAudioPauseIconColor)&&void 0!==r?r:"#374151"}(p,u),ne=k&&!(c||!!w&&w!==A),oe=V>0?O/V:0,ie=n.useCallback((function(e){var t;(T(e.duration),null!==q.current)&&(null===(t=E.current)||void 0===t||t.seek(q.current),q.current=null)}),[]),ae=n.useCallback((function(e){var t=e.currentTime;L||P(t)}),[L]),se=n.useCallback((function(){var e;I(!1),P(0),null===(e=E.current)||void 0===e||e.seek(0),S(null)}),[S]),le=n.useCallback((function(){ne?(I(!1),S(null)):(S(A),I(!0))}),[ne,A,S]),Ae=n.useCallback((function(){N((function(e){var t=qe.indexOf(e),r=qe[(t+1)%qe.length];return null!=r?r:1}))}),[]),ce=n.useCallback((function(e){var t=W;if(!(t<=0||V<=0)){var r,n=Math.max(0,Math.min(e/t,1))*V;if(P(n),V>0)null===(r=E.current)||void 0===r||r.seek(n);else q.current=n}}),[V,W]),ue=n.useMemo((function(){return t.PanResponder.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return!0},onPanResponderGrant:function(e){B(!0),ce(e.nativeEvent.locationX)},onPanResponderMove:function(e){return ce(e.nativeEvent.locationX)},onPanResponderRelease:function(){return B(!1)},onPanResponderTerminate:function(){return B(!1)}})}),[ce]),de=e.jsx(t.Pressable,{onPress:le,hitSlop:8,style:r(Fe||(Fe=M(["shrink-0 px-0.5"]))),children:ne?g?e.jsx(g,{}):e.jsx(Ne,{style:r.style("h-6 w-6"),color:re}):m?e.jsx(m,{}):e.jsx(Ye,{style:r.style("h-6 w-6"),color:te})}),Ce=e.jsx(Xe,{isPlaying:ne,playbackRate:U,onCycleSpeed:Ae,senderAvatar:d,senderName:C,isCurrentUser:u,theme:p}),fe=e.jsx(t.View,{style:[r(Ke||(Ke=M(["flex-1 min-w-0"]))),{height:36}],onLayout:function(e){return z(e.nativeEvent.layout.width)},children:e.jsx(t.View,y(y({style:[{flex:1,flexDirection:"row",alignItems:"center"},null==p||null===(a=p.messageStyle)||void 0===a?void 0:a.progressBarStyle]},ue.panHandlers),{},{children:J.map((function(r,n){var o,i=(n+.5)/50<=oe;return e.jsx(t.View,{style:[{flex:1,marginHorizontal:.5,height:Math.max(3,Math.round(36*r)),borderRadius:2,backgroundColor:i?Z:$},i?null==p||null===(o=p.messageStyle)||void 0===o?void 0:o.activeProgressBarStyle:void 0]},n)}))}))});return e.jsxs(t.View,{style:[r(Le||(Le=M(["min-w-[240px] max-w-[280px] py-1.5 px-1"]))),h&&x&&r(Be||(Be=M(["pb-4"])))],children:[e.jsx(i,{ref:E,source:{uri:l},paused:!ne,rate:U,playInBackground:!1,playWhenInactive:!1,onLoad:ie,onProgress:ae,onEnd:se,style:{width:0,height:0},progressUpdateInterval:80}),e.jsx(t.View,{style:r(He||(He=M(["flex-row items-center gap-1.5"]))),children:u?e.jsxs(e.Fragment,{children:[Ce,de,fe]}):e.jsxs(e.Fragment,{children:[de,fe,Ce]})}),e.jsx(t.Text,{style:Q([r(Ue||(Ue=M(["text-[11px] mt-1"]))),{color:ee,paddingLeft:u?82:34},null==p||null===(s=p.messageStyle)||void 0===s?void 0:s.audioDurationStyle],null==p?void 0:p.fontFamily),children:Qe(ne?O:V>0?V:O)})]})},st=n.memo(at),lt=function(r){var i=r.style,a=r.spinning,s=void 0!==a&&a,l=n.useRef(new t.Animated.Value(0)).current;n.useEffect((function(){s&&t.Animated.loop(t.Animated.timing(l,{toValue:1,duration:1e3,easing:t.Easing.linear,useNativeDriver:!0})).start()}),[s]);var A=l.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return e.jsx(t.Animated.View,{style:s?{transform:[{rotate:A}]}:void 0,children:e.jsx(o,{style:i,viewBox:"0 0 1024 1024",children:e.jsx(o.Path,{d:"M988 548c-19.9 0-36-16.1-36-36c0-59.4-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3c.1 19.9-16 36-35.9 36",fill:"white"})})})},At=320,ct=At,ut=Math.round(176),dt=At-ut-2,Ct=Math.round(159),ft=function(o){var a,s=o.uri,l=o.cellStyle,A=o.roundedStyle,c=D(),u=c.theme,d=c.CustomPlayIcon,C=n.useRef(null),f=R(n.useState(0),2),h=f[0],v=f[1],p=R(n.useState(!0),2),m=p[0],y=p[1],g=R(n.useState(!1),2),x=g[0],b=g[1];return e.jsxs(t.View,{style:[l,A],pointerEvents:"none",children:[e.jsx(i,{source:{uri:s},ref:C,paused:!0,muted:!0,playInBackground:!1,playWhenInactive:!1,pointerEvents:"none",style:[A,{width:"100%",height:"100%"}],resizeMode:"cover",onLoadStart:function(){y(!0),b(!1)},onLoad:function(e){v(e.duration),y(!1)},onError:function(){b(!0),y(!1)}}),m&&e.jsx(t.View,{style:[r($e||($e=M(["absolute inset-0 items-center justify-center bg-black/40"]))),A],children:e.jsx(lt,{style:r.style("h-8 w-8"),spinning:!0})}),!m&&!x&&e.jsxs(e.Fragment,{children:[e.jsx(t.View,{style:r(Ze||(Ze=M(["pointer-events-none absolute inset-0 items-center justify-center"]))),children:d?e.jsx(d,{}):e.jsx(Ye,{style:r.style("h-10 w-10"),color:(null==u||null===(a=u.colors)||void 0===a?void 0:a.videoPlayIconColor)||"white"})}),e.jsx(t.View,{style:r(et||(et=M(["pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded"]))),children:e.jsx(t.Text,{style:r(tt||(tt=M(["text-white text-[10px] font-semibold"]))),children:ht(h)})})]}),x&&e.jsx(t.View,{style:[r(rt||(rt=M(["absolute inset-0 items-center justify-center bg-red-500/50"]))),A],children:e.jsx(t.Text,{style:Q(r(nt||(nt=M(["text-white text-xs"]))),null==u?void 0:u.fontFamily),children:"Video"})})]})};function ht(e){if(!e||Number.isNaN(e))return"0:00";var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r.toString().padStart(2,"0"))}var vt,pt,mt,yt,gt,xt,bt,wt,St,Et,jt,kt,It,Rt,Mt,_t,Ot,Pt,Gt,Vt,Tt,Dt,Ft,Kt,Lt=function(n){var o=n.items,i=n.onOpenGallery,a=t.useWindowDimensions().width,s=Math.min(240,.72*a);if(0===o.length)return null;var l={borderRadius:6,overflow:"hidden"};if(1===o.length){var A=o[0];return e.jsx(t.Pressable,{onPress:function(){return i(o,0)},style:{width:s,height:320,marginVertical:8},children:"image"===A.kind?e.jsx(t.Image,{source:{uri:A.uri},style:{width:"100%",height:"100%",borderRadius:8},resizeMode:"cover"}):e.jsx(ft,{uri:A.uri,cellStyle:{width:s,height:320},roundedStyle:{borderRadius:8}})})}if(2===o.length){var c=(s-2)/2;return e.jsx(t.View,{style:{width:s,height:ct,flexDirection:"row",gap:2,marginVertical:8},children:o.slice(0,2).map((function(r,n){return e.jsx(t.Pressable,{onPress:function(){return i(o,n)},style:{width:c,height:ct},children:"image"===r.kind?e.jsx(t.Image,{source:{uri:r.uri},style:[l,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ft,{uri:r.uri,cellStyle:{width:c,height:ct},roundedStyle:l})},"".concat(r.uri,"-").concat(n))}))})}if(3===o.length){var u=o[0],d=o[1],C=o[2],f=(s-2)/2;return e.jsxs(t.View,{style:{width:s,height:At,marginVertical:8,gap:2},children:[e.jsx(t.Pressable,{onPress:function(){return i(o,0)},style:{width:s,height:ut},children:"image"===u.kind?e.jsx(t.Image,{source:{uri:u.uri},style:[l,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ft,{uri:u.uri,cellStyle:{width:s,height:ut},roundedStyle:l})}),e.jsxs(t.View,{style:{flexDirection:"row",gap:2,height:dt},children:[e.jsx(t.Pressable,{onPress:function(){return i(o,1)},style:{width:f,height:dt},children:"image"===d.kind?e.jsx(t.Image,{source:{uri:d.uri},style:[l,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ft,{uri:d.uri,cellStyle:{width:f,height:dt},roundedStyle:l})},"".concat(d.uri,"-1")),e.jsx(t.Pressable,{onPress:function(){return i(o,2)},style:{width:f,height:dt},children:"image"===C.kind?e.jsx(t.Image,{source:{uri:C.uri},style:[l,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ft,{uri:C.uri,cellStyle:{width:f,height:dt},roundedStyle:l})},"".concat(C.uri,"-2"))]})]})}var h=(s-2)/2,v=o.length-4,p=o.slice(0,4);return e.jsx(t.View,{style:{width:s,height:At,flexWrap:"wrap",flexDirection:"row",gap:2,marginVertical:8},children:p.map((function(n,a){return e.jsxs(t.Pressable,{onPress:function(){return i(o,a)},style:{width:h,height:Ct,position:"relative"},children:["image"===n.kind?e.jsx(t.Image,{source:{uri:n.uri},style:[l,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(ft,{uri:n.uri,cellStyle:{width:h,height:Ct},roundedStyle:l}),3===a&&v>0&&e.jsx(t.View,{style:r(ot||(ot=M(["absolute inset-0 bg-black/55 items-center justify-center"]))),children:e.jsxs(t.Text,{style:r(it||(it=M(["text-white text-lg font-bold"]))),children:["+",v]})})]},"".concat(n.uri,"-").concat(a))}))})},Bt=function(o){var i,a,s,l,A=o.message,c=o.onGalleryOpen,u=o.isVideoPlaying,d=o.isCurrentUser,C=D(),f=C.theme,h=C.showMessageStatus,v=C.onFileAttachmentPress,p=n.useMemo((function(){return W(A)}),[A]);return e.jsxs(t.View,{children:[p.length>0&&e.jsx(Lt,{items:p,onOpenGallery:c}),(null!==(i=A.fileAttachments)&&void 0!==i?i:[]).map((function(n,o){var i,a,s,l,A,c;return e.jsxs(t.Pressable,{onPress:function(){v?v(n):t.Linking.openURL(n.uri.startsWith("http")||n.uri.startsWith("file:")?n.uri:"file://".concat(n.uri))},style:[r(vt||(vt=M(["my-1.5 py-2 px-3 rounded-lg max-w-[220px]"]))),{backgroundColor:L(f,d)},d?null==f||null===(i=f.messageStyle)||void 0===i?void 0:i.sentFileAttachmentStyle:null==f||null===(a=f.messageStyle)||void 0===a?void 0:a.receivedFileAttachmentStyle],children:[e.jsxs(t.Text,{style:Q([r(pt||(pt=M(["text-xs font-semibold"]))),{color:B(f,d)},d?null==f||null===(s=f.messageStyle)||void 0===s?void 0:s.sentFileAttachmentTextStyle:null==f||null===(l=f.messageStyle)||void 0===l?void 0:l.receivedFileAttachmentTextStyle],null==f?void 0:f.fontFamily),numberOfLines:2,children:["📎 ",n.name]}),e.jsx(t.Text,{style:Q([r(mt||(mt=M(["text-[10px] mt-0.5"]))),{color:H(f,d)},d?null==f||null===(A=f.messageStyle)||void 0===A?void 0:A.sentFileAttachmentSubtitleStyle:null==f||null===(c=f.messageStyle)||void 0===c?void 0:c.receivedFileAttachmentSubtitleStyle],null==f?void 0:f.fontFamily),children:n.type})]},"".concat(n.uri,"-").concat(o))})),A.audio&&e.jsx(st,{audioUrl:A.audio,audioId:A.id,isVideoPlaying:u,isCurrentUser:d,senderAvatar:A.senderAvatar,senderName:A.senderName,reserveStatusSpace:!A.text}),A.text&&e.jsx(Oe,{style:Q([r(yt||(yt=M(["pt-1"]))),r(h?gt||(gt=M(["pb-0"])):xt||(xt=M(["pb-2"]))),{wordBreak:"break-word",overflowWrap:"break-word"},d?null==f||null===(a=f.messageStyle)||void 0===a?void 0:a.sentTextStyle:null==f||null===(s=f.messageStyle)||void 0===s?void 0:s.receivedTextStyle,N(f,d)?{color:N(f,d)}:void 0],null==f?void 0:f.fontFamily),parse:[{type:"url",style:y({color:"blue",textDecorationLine:"underline"},(l=null==f?void 0:f.fontFamily,l?{fontFamily:l}:void 0)),onPress:function(e){return t.Linking.openURL(e.startsWith("http")?e:"https://".concat(e))}}],childrenProps:{allowFontScaling:!1},children:A.text})]})},Ht=n.memo(Bt),Ut=function(t){var r=t.style,n=t.fill;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:n,d:"M.41 13.41L6 19l1.41-1.42L1.83 12m20.41-6.42L11.66 16.17L7.5 12l-1.43 1.41L11.66 19l12-12M18 7l-1.41-1.42l-6.35 6.35l1.42 1.41z"})})},Nt=function(t){var r=t.style,n=t.fill;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{d:"m9.55 18l-5.7-5.7l1.425-1.425L9.55 15.15l9.175-9.175L20.15 7.4z",fill:n})})},Yt=function(n){var o,i,a,s=n.time,l=n.status,A=n.isCurrentUser,c=n.hasText,u=n.hasAudio,d=n.hasGalleryMedia,C=n.hasFileAttachments,f=D(),h=f.theme,v=f.showMessageStatus,p=(d||C)&&!c&&!u,m=d&&!c&&!u?"#ffffff":p?function(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentTimestampColor)&&void 0!==n?n:"rgba(255, 255, 255, 0.75)":null!==(r=null==o?void 0:o.receivedTimestampColor)&&void 0!==r?r:"rgba(107, 114, 128, 0.85)"}(h,A):function(e,t){var r,n,o=F(e);return t?null!==(n=null==o?void 0:o.sentTimestampColor)&&void 0!==n?n:"rgba(255, 255, 255, 0.75)":null!==(r=null==o?void 0:o.receivedTimestampColor)&&void 0!==r?r:"rgba(107, 114, 128, 0.85)"}(h,A);return e.jsx(e.Fragment,{children:v&&e.jsxs(t.View,{style:[r(bt||(bt=M(["flex-row items-center"]))),c?r(wt||(wt=M(["justify-end pb-1 ml-4"]))):u?r(St||(St=M(["absolute right-3 bottom-2"]))):p?[r(Et||(Et=M(["absolute right-3 bottom-4"]))),K(h,A)]:[r(jt||(jt=M(["absolute right-3 bottom-4"]))),K(h,A)]],children:[e.jsx(t.Text,{style:Q([r(kt||(kt=M(["text-xs"]))),{color:m}],null==h?void 0:h.fontFamily),children:s}),A&&e.jsxs(t.View,{style:r(It||(It=M(["ml-1 flex-row items-center"]))),children:["sent"===l&&e.jsx(Nt,{style:r.style("h-4 w-4",{opacity:.7}),fill:(null==h||null===(o=h.colors)||void 0===o?void 0:o.sentIconColor)||"#6B7280"}),"delivered"===l&&e.jsx(Ut,{style:r.style("h-4 w-4",{opacity:.7}),fill:(null==h||null===(i=h.colors)||void 0===i?void 0:i.deliveredIconColor)||"#6B7280"}),"read"===l&&e.jsx(Ut,{style:r.style("h-4 w-4",{opacity:.9}),fill:(null==h||null===(a=h.colors)||void 0===a?void 0:a.readIconColor)||"#3B82F6"})]})]})})},Wt=n.memo(Yt),zt=function(n){var o,i,a,s,l,A,c,u,d,C,f=n.message,h=n.isCurrentUser,v=n.isFirstInSequence,p=n.onLongPress,m=D(),g=m.theme,x=m.showAvatars,b=m.showUserNames,w=m.showBubbleTail,S=m.setMediaViewerGallery,E=m.isVideoPlaying,j=W(f),k=(null!==(o=null===(i=f.fileAttachments)||void 0===i?void 0:i.length)&&void 0!==o?o:0)>0&&0===j.length&&!f.text&&!f.audio;return e.jsxs(t.Pressable,{onLongPress:p,style:[r(Rt||(Rt=M(["px-2 my-1 max-w-[75%] relative"]))),r(h?Mt||(Mt=M(["self-end mr-3"])):_t||(_t=M(["self-start ml-9"]))),r(v?h?Ot||(Ot=M(["bg-green-500 rounded-tr-none"])):Pt||(Pt=M(["bg-white rounded-tl-none"])):h?Gt||(Gt=M(["bg-green-500"])):Vt||(Vt=M(["bg-white"]))),y(y({borderRadius:8},Y(g,h)?{backgroundColor:Y(g,h)}:{}),h?null==g||null===(a=g.bubbleStyle)||void 0===a?void 0:a.sent:null==g||null===(s=g.bubbleStyle)||void 0===s?void 0:s.received)],children:[!h&&v&&x&&e.jsxs(e.Fragment,{children:[e.jsx(t.View,{style:r(Tt||(Tt=M(["absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center"]))),children:f.senderAvatar?e.jsx(t.Image,{source:{uri:f.senderAvatar},style:[r(Dt||(Dt=M(["w-full h-full rounded-full"]))),null==g||null===(l=g.bubbleStyle)||void 0===l?void 0:l.avatarImageStyle],resizeMode:"cover"}):e.jsx(t.Text,{style:Q([r(Ft||(Ft=M(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==g||null===(A=g.bubbleStyle)||void 0===A?void 0:A.avatarTextStyle],null==g?void 0:g.fontFamily),children:null===(c=f.senderName)||void 0===c?void 0:c.charAt(0)})}),b&&f.senderName&&e.jsx(t.Text,{style:Q([r(Kt||(Kt=M(["text-sm text-black font-semibold mt-1 capitalize"]))),null==g||null===(u=g.bubbleStyle)||void 0===u?void 0:u.userNameStyle],null==g?void 0:g.fontFamily),children:f.senderName})]}),v&&w&&e.jsx(P,{style:r.style("absolute w-6 h-6",h?"rotate-90 -right-3.5 mt-[1.24px] -top-1":"rotate-180 -left-3.5 mt-[1.5px] -top-[3px]"),color:h?(null==g||null===(d=g.colors)||void 0===d?void 0:d.sentMessageTailColor)||"rgba(34, 197, 94, 1)":(null==g||null===(C=g.colors)||void 0===C?void 0:C.receivedMessageTailColor)||"white"}),e.jsx(Ht,{message:f,isCurrentUser:h,isFirstInSequence:v,onGalleryOpen:function(e,t){S(e,t)},isVideoPlaying:E}),e.jsx(Wt,{time:f.time,status:h?f.status:void 0,isCurrentUser:h,hasText:!!f.text,hasAudio:!!f.audio,hasGalleryMedia:j.length>0&&!f.text,hasFileAttachments:k})]})},Qt=n.memo(zt),qt=function(t){var r=t.style,n=t.color;return e.jsx(o.Svg,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",strokeWidth:"1.5",stroke:n,children:[e.jsx(o.Circle,{cx:"12",cy:"13",r:"3"}),e.jsx(o.Path,{d:"M9.778 21h4.444c3.121 0 4.682 0 5.803-.735a4.4 4.4 0 0 0 1.226-1.204c.749-1.1.749-2.633.749-5.697s0-4.597-.749-5.697a4.4 4.4 0 0 0-1.226-1.204c-.72-.473-1.622-.642-3.003-.702c-.659 0-1.226-.49-1.355-1.125A2.064 2.064 0 0 0 13.634 3h-3.268c-.988 0-1.839.685-2.033 1.636c-.129.635-.696 1.125-1.355 1.125c-1.38.06-2.282.23-3.003.702A4.4 4.4 0 0 0 2.75 7.667C2 8.767 2 10.299 2 13.364s0 4.596.749 5.697c.324.476.74.885 1.226 1.204C5.096 21 6.657 21 9.778 21Z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"M19 10h-1"})]})})},Jt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:n,children:[e.jsx(o.Path,{strokeLinecap:"round",strokeWidth:"1.5",d:"M8.913 15.934c1.258.315 2.685.315 4.122-.07s2.673-1.099 3.605-2.001"}),e.jsx(o.Ellipse,{cx:"14.509",cy:"9.774",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 14.51 9.774)"}),e.jsx(o.Ellipse,{cx:"8.714",cy:"11.328",fill:"currentColor",rx:"1",ry:"1.5",transform:"rotate(-15 8.714 11.328)"}),e.jsx(o.Path,{strokeWidth:"1.5",d:"M3.204 14.357c-1.112-4.147-1.667-6.22-.724-7.853s3.016-2.19 7.163-3.3c4.147-1.112 6.22-1.667 7.853-.724s2.19 3.016 3.3 7.163c1.111 4.147 1.667 6.22.724 7.853s-3.016 2.19-7.163 3.3c-4.147 1.111-6.22 1.667-7.853.724s-2.19-3.016-3.3-7.163Z"}),e.jsx(o.Path,{strokeWidth:"1.5",d:"m13 16l.478.974a1.5 1.5 0 1 0 2.693-1.322l-.46-.935"})]})})},Xt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",strokeWidth:"1.5",stroke:n,children:[e.jsx(o.Path,{d:"M7 8a5 5 0 0 1 10 0v3a5 5 0 0 1-10 0z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"M13.5 8H17m-3.5 3H17M7 8h2m-2 3h2m11-1v1a8 8 0 0 1-8 8m-8-9v1a8 8 0 0 0 8 8m0 0v3",opacity:".5"})]})})},$t=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,fill:n,viewBox:"0 0 24 24",children:e.jsx(o.Path,{d:"M17.346 15.539q0 2.271-1.565 3.866T11.952 21t-3.838-1.595t-1.576-3.867v-8.73q0-1.587 1.092-2.697Q8.72 3 10.308 3t2.678 1.11t1.091 2.698v8.269q0 .88-.615 1.517q-.614.637-1.498.637t-1.52-.627t-.636-1.527V6.769h1v8.308q0 .479.327.816q.328.338.807.338t.807-.338t.328-.816V6.789q-.006-1.166-.802-1.977Q11.48 4 10.308 4q-1.163 0-1.966.821q-.804.821-.804 1.987v8.73q-.005 1.853 1.283 3.157Q10.11 20 11.96 20q1.823 0 3.1-1.305t1.287-3.156v-8.77h1z"})})},Zt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",strokeWidth:"1.5",stroke:n,children:[e.jsx(o.Path,{d:"m18.636 15.67l1.716-5.15c1.5-4.498 2.25-6.747 1.062-7.934s-3.436-.438-7.935 1.062L8.33 5.364C4.7 6.574 2.885 7.18 2.37 8.067a2.72 2.72 0 0 0 0 2.73c.515.888 2.33 1.493 5.96 2.704c.584.194.875.291 1.119.454c.236.158.439.361.597.597c.163.244.26.535.454 1.118c1.21 3.63 1.816 5.446 2.703 5.962a2.72 2.72 0 0 0 2.731 0c.887-.516 1.492-2.331 2.703-5.962Z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"m17.79 6.21l-4.211 4.165",opacity:".5"})]})})};function er(){return tr.apply(this,arguments)}function tr(){return(tr=u(O().mark((function e(){var r;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("android"!==t.Platform.OS){e.next=11;break}return e.prev=1,e.next=4,t.PermissionsAndroid.request(t.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,{title:"Microphone Permission",message:"This app needs access to your microphone to record audio.",buttonPositive:"OK"});case 4:return r=e.sent,e.abrupt("return",r===t.PermissionsAndroid.RESULTS.GRANTED);case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",!1);case 11:return e.abrupt("return",!0);case 12:case"end":return e.stop()}}),e,null,[[1,8]])})))).apply(this,arguments)}var rr,nr,or,ir,ar,sr,lr,Ar,cr,ur,dr,Cr,fr,hr,vr,pr,mr,yr,gr,xr,br=function(t){var r=t.style,n=t.color,i=void 0===n?"#6b7280":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",fill:"none",children:e.jsx(o.Path,{d:"M6 15l6-6 6 6",stroke:i,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})},wr=function(t){var r=t.style,n=t.color,i=void 0===n?"#6b7280":n;return e.jsxs(o,{style:r,viewBox:"0 0 24 24",fill:"none",children:[e.jsx(o.Rect,{x:"5",y:"11",width:"14",height:"10",rx:"2",stroke:i,strokeWidth:"1.5"}),e.jsx(o.Path,{d:"M8 11V7a4 4 0 0 1 8 0v4",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})},Sr=function(t){var r=t.style,n=t.color,i=void 0===n?"#ef4444":n;return e.jsxs(o,{style:r,viewBox:"0 0 24 24",fill:"none",children:[e.jsx(o.Path,{d:"M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),e.jsx(o.Path,{d:"M10 11v6M14 11v6",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"})]})};var Er="ios"===t.Platform.OS?50:48;function jr(){t.Vibration.vibrate(15)}var kr={code:"function VoiceRecorderFlowTsx1(_e,success){const{runOnJS,fireQuickTap}=this.__closure;if(success)runOnJS(fireQuickTap)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx1","_e","success","runOnJS","fireQuickTap","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA2QmB,QAAC,CAAAA,qBAAgBA,CAAAC,EAAA,CAAAC,OAAA,QAAAC,OAAA,CAAAC,YAAA,OAAAC,SAAA,CAExB,GAAIH,OAAO,CACPC,OAAO,CAACC,YAAY,CAAC,CAAC,CAAC,CAC/B","ignoreList":[]}',version:"3.16.7"},Ir={code:"function VoiceRecorderFlowTsx2(){const{runOnJS,fireHoldStart}=this.__closure;runOnJS(fireHoldStart)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx2","runOnJS","fireHoldStart","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAkRqB,SAAAA,qBAAMA,CAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEfF,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B","ignoreList":[]}',version:"3.16.7"},Rr={code:"function VoiceRecorderFlowTsx3(e){const{stateShared,STATE_HOLD,maxLeftShared,maxUpShared,translateX,translateY,enableLockShared,lockFiredShared,lockThresholdShared,runOnJS,fireLock,enableCancelShared,cancelFiredShared,cancelThresholdShared,fireCancel}=this.__closure;if(stateShared.value!==STATE_HOLD)return;const tx=Math.max(maxLeftShared.value,Math.min(0,e.translationX));const ty=Math.max(maxUpShared.value,Math.min(0,e.translationY));translateX.value=tx;translateY.value=ty;const dominantY=Math.abs(ty)>Math.abs(tx);if(dominantY&&enableLockShared.value===1&&lockFiredShared.value===0&&ty<=lockThresholdShared.value){lockFiredShared.value=1;runOnJS(fireLock)();}if(!dominantY&&enableCancelShared.value===1&&cancelFiredShared.value===0&&tx<=cancelThresholdShared.value){cancelFiredShared.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx3","e","stateShared","STATE_HOLD","maxLeftShared","maxUpShared","translateX","translateY","enableLockShared","lockFiredShared","lockThresholdShared","runOnJS","fireLock","enableCancelShared","cancelFiredShared","cancelThresholdShared","fireCancel","__closure","value","tx","Math","max","min","translationX","ty","translationY","dominantY","abs"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAsRuB,QAAC,CAAAA,qBAAKA,CAAAC,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,aAAA,CAAAC,WAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,gBAAA,CAAAC,eAAA,CAAAC,mBAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,kBAAA,CAAAC,iBAAA,CAAAC,qBAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,GAAIf,WAAW,CAACgB,KAAK,GAAKf,UAAU,CAChC,OACJ,KAAM,CAAAgB,EAAE,CAAGC,IAAI,CAACC,GAAG,CAACjB,aAAa,CAACc,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACsB,YAAY,CAAC,CAAC,CACrE,KAAM,CAAAC,EAAE,CAAGJ,IAAI,CAACC,GAAG,CAAChB,WAAW,CAACa,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACwB,YAAY,CAAC,CAAC,CACnEnB,UAAU,CAACY,KAAK,CAAGC,EAAE,CACrBZ,UAAU,CAACW,KAAK,CAAGM,EAAE,CACrB,KAAM,CAAAE,SAAS,CAAGN,IAAI,CAACO,GAAG,CAACH,EAAE,CAAC,CAAGJ,IAAI,CAACO,GAAG,CAACR,EAAE,CAAC,CAC7C,GAAIO,SAAS,EACTlB,gBAAgB,CAACU,KAAK,GAAK,CAAC,EAC5BT,eAAe,CAACS,KAAK,GAAK,CAAC,EAC3BM,EAAE,EAAId,mBAAmB,CAACQ,KAAK,CAAE,CACjCT,eAAe,CAACS,KAAK,CAAG,CAAC,CACzBP,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACvB,CACA,GAAI,CAACc,SAAS,EACVb,kBAAkB,CAACK,KAAK,GAAK,CAAC,EAC9BJ,iBAAiB,CAACI,KAAK,GAAK,CAAC,EAC7BC,EAAE,EAAIJ,qBAAqB,CAACG,KAAK,CAAE,CACnCJ,iBAAiB,CAACI,KAAK,CAAG,CAAC,CAC3BP,OAAO,CAACK,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},Mr={code:"function VoiceRecorderFlowTsx4(){const{runOnJS,fireHoldEnd}=this.__closure;runOnJS(fireHoldEnd)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx4","runOnJS","fireHoldEnd","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA8SmB,SAAAA,qBAAMA,CAAA,QAAAC,OAAA,CAAAC,WAAA,OAAAC,SAAA,CAEbF,OAAO,CAACC,WAAW,CAAC,CAAC,CAAC,CAC1B","ignoreList":[]}',version:"3.16.7"},_r={code:"function VoiceRecorderFlowTsx5(){const{lockFiredShared,cancelFiredShared,translateX,withSpring,translateY}=this.__closure;if(lockFiredShared.value===0&&cancelFiredShared.value===0){translateX.value=withSpring(0,{damping:18,stiffness:220});translateY.value=withSpring(0,{damping:18,stiffness:220});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx5","lockFiredShared","cancelFiredShared","translateX","withSpring","translateY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAkTwB,SAAAA,qBAAMA,CAAA,QAAAC,eAAA,CAAAC,iBAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,UAAA,OAAAC,SAAA,CAElB,GAAIL,eAAe,CAACM,KAAK,GAAK,CAAC,EAAIL,iBAAiB,CAACK,KAAK,GAAK,CAAC,CAAE,CAC9DJ,UAAU,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEJ,UAAU,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACrE,CACJ","ignoreList":[]}',version:"3.16.7"},Or={code:"function VoiceRecorderFlowTsx6(){const{stateShared,STATE_HOLD,translateX,translateY,micScale}=this.__closure;const isHold=stateShared.value===STATE_HOLD;return{transform:[{translateX:isHold?translateX.value:0},{translateY:isHold?translateY.value:0},{scale:micScale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx6","stateShared","STATE_HOLD","translateX","translateY","micScale","__closure","isHold","value","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA4T6C,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,QAAA,OAAAC,SAAA,CAC3C,KAAM,CAAAC,MAAM,CAAGN,WAAW,CAACO,KAAK,GAAKN,UAAU,CAC/C,MAAO,CACHO,SAAS,CAAE,CACP,CAAEN,UAAU,CAAEI,MAAM,CAAGJ,UAAU,CAACK,KAAK,CAAG,CAAE,CAAC,CAC7C,CAAEJ,UAAU,CAAEG,MAAM,CAAGH,UAAU,CAACI,KAAK,CAAG,CAAE,CAAC,CAC7C,CAAEE,KAAK,CAAEL,QAAQ,CAACG,KAAM,CAAC,CAEjC,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Pr={code:"function VoiceRecorderFlowTsx7(){const{interpolate,translateX,cancelThresholdShared,Extrapolation,arrowPulse}=this.__closure;const opacity=interpolate(translateX.value,[0,cancelThresholdShared.value],[1,0],Extrapolation.CLAMP);return{opacity:opacity,transform:[{translateX:translateX.value*0.4+arrowPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx7","interpolate","translateX","cancelThresholdShared","Extrapolation","arrowPulse","__closure","opacity","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAsUoD,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,qBAAA,CAAAC,aAAA,CAAAC,UAAA,OAAAC,SAAA,CAClD,KAAM,CAAAC,OAAO,CAAGN,WAAW,CAACC,UAAU,CAACM,KAAK,CAAE,CAAC,CAAC,CAAEL,qBAAqB,CAACK,KAAK,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEJ,aAAa,CAACK,KAAK,CAAC,CAC5G,MAAO,CACHF,OAAO,CAAPA,OAAO,CACPG,SAAS,CAAE,CAAC,CAAER,UAAU,CAAEA,UAAU,CAACM,KAAK,CAAG,GAAG,CAAGH,UAAU,CAACG,KAAM,CAAC,CACzE,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Gr={code:"function VoiceRecorderFlowTsx8(){const{interpolate,translateY,lockThresholdShared,Extrapolation}=this.__closure;const lockProgress=interpolate(translateY.value,[0,lockThresholdShared.value],[0,1],Extrapolation.CLAMP);return{transform:[{translateY:interpolate(lockProgress,[0,1],[0,-22])}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx8","interpolate","translateY","lockThresholdShared","Extrapolation","__closure","lockProgress","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA6UmD,SAAAA,qBAAMA,CAAA,QAAAC,WAAA,CAAAC,UAAA,CAAAC,mBAAA,CAAAC,aAAA,OAAAC,SAAA,CACjD,KAAM,CAAAC,YAAY,CAAGL,WAAW,CAACC,UAAU,CAACK,KAAK,CAAE,CAAC,CAAC,CAAEJ,mBAAmB,CAACI,KAAK,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAEH,aAAa,CAACI,KAAK,CAAC,CAC/G,MAAO,CACHC,SAAS,CAAE,CACP,CAAEP,UAAU,CAAED,WAAW,CAACK,YAAY,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAE,CAAC,CAEnE,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},Vr={code:"function VoiceRecorderFlowTsx9(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx9","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAqVkD,SAAAA,sBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACjDC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},Tr={code:"function VoiceRecorderFlowTsx10(){const{isPaused,pausePulse}=this.__closure;return{opacity:isPaused?1:pausePulse.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx10","isPaused","pausePulse","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAwV6C,SAAAA,uBAAA,QAAAC,QAAA,CAAAC,UAAA,OAAAC,SAAA,OAAO,CAC5CC,OAAO,CAAEH,QAAQ,CAAG,CAAC,CAAGC,UAAU,CAACG,KACvC,CAAC","ignoreList":[]}',version:"3.16.7"},Dr={code:"function VoiceRecorderFlowTsx11(){const{recBlink}=this.__closure;return{opacity:recBlink.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx11","recBlink","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AA2VyC,SAAAA,uBAAA,QAAAC,QAAA,OAAAC,SAAA,OAAO,CACxCC,OAAO,CAAEF,QAAQ,CAACG,KACtB,CAAC","ignoreList":[]}',version:"3.16.7"},Fr=function(o){var i=o.primaryColor,l=void 0===i?"#16A34A":i,A=o.backgroundColor,c=void 0===A?"#0B141A":A,u=o.holdPillBackground,d=void 0===u?"#1F2C33":u,C=o.timerColor,f=void 0===C?"#FFFFFF":C,h=o.microphoneColor,v=void 0===h?"#FFFFFF":h,p=o.lockColor,m=void 0===p?"#E9EDEF":p,y=o.waveformColor,g=void 0===y?"#E9EDEF":y,x=o.deleteIconColor,b=void 0===x?"#8696A0":x,w=o.cancelTextColor,S=void 0===w?"rgba(255,255,255,0.6)":w,E=o.chevronColor,j=o.pauseIconColor,k=void 0===j?"#F15C6D":j,I=o.lockPillBackground,_=void 0===I?"#1F2C33":I,O=o.inputBarHeight,P=void 0===O?Er:O,G=o.micSize,V=o.holdMicScale,T=void 0===V?1.18:V,D=o.iconSize,F=void 0===D?22:D,K=o.lockIconSize,L=void 0===K?18:K,B=o.enableLockRecording,H=void 0===B||B,U=o.enableSlideToCancel,N=void 0===U||U,Y=o.enableWaveform,W=void 0===Y||Y,z=o.lockSlideDistance,Q=void 0===z?70:z,q=o.cancelSlideDistance,J=void 0===q?90:q,X=o.waveCount,$=void 0===X?32:X,Z=o.renderInputPill,ee=o.renderMicIcon,te=o.renderSendIcon,re=o.renderLockIcon,ne=o.renderArrowIcon,oe=o.renderDeleteIcon,ie=o.renderPauseIcon,ae=o.renderPlayIcon,se=o.renderWaveform,le=o.containerStyle,Ae=o.barStyle,ce=o.timerTextStyle,ue=o.slideTextStyle,de=o.waveformStyle,Ce=o.lockPillStyle,fe=o.trashButtonStyle,he=o.sendButtonStyle,ve=o.onRecordingStart,pe=o.onRecordingStop,me=o.onSend,ye=o.onDelete,ge=o.onLock,xe=o.onCancel,be=o.onPauseRecording,we=o.onResumeRecording,Se=o.onStateChange,Ee=null!=G?G:P,je=-Math.abs(J),ke=-Math.abs(Q),Ie=je-30,Re=ke-20,Me=R(n.useState("IDLE"),2),_e=Me[0],Oe=Me[1],Pe=R(n.useState(0),2),Ge=Pe[0],Ve=Pe[1],Te=R(n.useState(!1),2),De=Te[0],Fe=Te[1],Ke=n.useRef("IDLE");n.useEffect((function(){Ke.current=_e,null==Se||Se(_e)}),[_e,Se]);var Le=s.useSharedValue(0);n.useEffect((function(){Le.value=function(e){switch(e){case"IDLE":return 0;case"RECORDING_TAP":return 1;case"RECORDING_HOLD":return 2;case"LOCKED_RECORDING":return 3;case"SENDING":return 4;case"CANCELLED":return 5}}(_e)}),[_e]);var Be=s.useSharedValue(je),He=s.useSharedValue(ke),Ue=s.useSharedValue(Ie),We=s.useSharedValue(Re),ze=s.useSharedValue(H?1:0),qe=s.useSharedValue(N?1:0);n.useEffect((function(){Be.value=je,He.value=ke,Ue.value=Ie,We.value=Re,ze.value=H?1:0,qe.value=N?1:0}),[je,ke,Ie,Re,H,N]);var Je=n.useRef(0),Xe=n.useRef(0),$e=n.useRef(0),Ze=s.useSharedValue(0),et=s.useSharedValue(0),tt=s.useSharedValue(1),rt=s.useSharedValue(0),nt=s.useSharedValue(0),ot=s.useSharedValue(1),it=s.useSharedValue(0),at=s.useSharedValue(1),st=s.useSharedValue(0),lt=s.useSharedValue(0);n.useEffect((function(){rt.value=s.withRepeat(s.withSequence(s.withTiming(-4,{duration:700,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(0,{duration:700,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1),nt.value=s.withRepeat(s.withSequence(s.withTiming(-4,{duration:600,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(0,{duration:600,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1),ot.value=s.withRepeat(s.withSequence(s.withTiming(.5,{duration:600,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(1,{duration:600,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1),it.value=s.withRepeat(s.withTiming(1,{duration:4500,easing:s.Easing.linear}),-1,!1),at.value=s.withRepeat(s.withSequence(s.withTiming(.3,{duration:600}),s.withTiming(1,{duration:600})),-1,!1)}),[]),n.useEffect((function(){tt.value="RECORDING_HOLD"===_e?s.withSpring(T,{damping:14,stiffness:220}):s.withSpring(1,{damping:16,stiffness:220})}),[_e,T]),n.useEffect((function(){if(("RECORDING_TAP"===_e||"RECORDING_HOLD"===_e||"LOCKED_RECORDING"===_e)&&!De){var e=setInterval((function(){var e=Date.now()-Je.current-Xe.current;Ve(e/1e3)}),250);return function(){return clearInterval(e)}}}),[_e,De]);var At=n.useRef(ve);At.current=ve;var ct=n.useRef(pe);ct.current=pe;var ut=n.useRef(me);ut.current=me;var dt=n.useRef(ye);dt.current=ye;var Ct=n.useRef(ge);Ct.current=ge;var ft=n.useRef(xe);ft.current=xe;var ht=n.useRef(be);ht.current=be;var vt=n.useRef(we);vt.current=we;var pt=n.useCallback((function(){var e;Je.current=Date.now(),Xe.current=0,$e.current=0,Fe(!1),Ve(0),st.value=0,lt.value=0,Ze.value=0,et.value=0,null===(e=At.current)||void 0===e||e.call(At)}),[]),mt=n.useCallback((function(){Ve(0),Fe(!1),Xe.current=0,$e.current=0,Ze.value=0,et.value=0,Oe("IDLE")}),[]),yt=n.useCallback((function(){var e,t,r=(Date.now()-Je.current-Xe.current)/1e3;Oe("SENDING"),null===(e=ct.current)||void 0===e||e.call(ct),null===(t=ut.current)||void 0===t||t.call(ut,{duration:r}),mt()}),[mt]),gt=n.useCallback((function(){var e=Ke.current;if("IDLE"===e)return Oe("RECORDING_TAP"),void pt();"RECORDING_TAP"!==e&&"LOCKED_RECORDING"!==e||yt()}),[pt,yt]),xt=n.useCallback((function(){"IDLE"===Ke.current&&(Oe("RECORDING_HOLD"),pt())}),[pt]),bt=n.useCallback((function(){var e;"RECORDING_HOLD"===Ke.current&&(jr(),Oe("LOCKED_RECORDING"),Ze.value=s.withSpring(0,{damping:18,stiffness:220}),et.value=s.withSpring(0,{damping:18,stiffness:220}),null===(e=Ct.current)||void 0===e||e.call(Ct))}),[]),wt=n.useCallback((function(){var e,t,r,n=Ke.current;"RECORDING_HOLD"!==n&&"RECORDING_TAP"!==n&&"LOCKED_RECORDING"!==n||(jr(),Oe("CANCELLED"),null===(e=ct.current)||void 0===e||e.call(ct),null===(t=ft.current)||void 0===t||t.call(ft),null===(r=dt.current)||void 0===r||r.call(dt),mt())}),[mt]),St=n.useCallback((function(){"RECORDING_HOLD"===Ke.current&&yt()}),[yt]),Et=n.useCallback((function(){Fe((function(e){var t,r,n=!e;n?($e.current=Date.now(),null===(t=ht.current)||void 0===t||t.call(ht)):(Xe.current+=Date.now()-$e.current,$e.current=0,null===(r=vt.current)||void 0===r||r.call(vt));return n}))}),[]),jt=n.useRef(gt);jt.current=gt;var kt=n.useRef(xt);kt.current=xt;var It=n.useRef(St);It.current=St;var Rt=n.useRef(bt);Rt.current=bt;var Mt=n.useRef(wt);Mt.current=wt;var _t,Ot,Pt=function(){return jt.current()},Gt=function(){return kt.current()},Vt=function(){return It.current()},Tt=function(){return Rt.current()},Dt=function(){return Mt.current()},Ft=n.useMemo((function(){var e,t,r=a.Gesture.Tap().maxDuration(210).onEnd((e=[new global.Error,-3,-27],(t=function(e,t){t&&s.runOnJS(Pt)()}).__closure={runOnJS:s.runOnJS,fireQuickTap:Pt},t.__workletHash=9325345103105,t.__initData=kr,t.__stackDetails=e,t)),n=a.Gesture.Pan().activateAfterLongPress(220).onStart(function(){var e=[new global.Error,-3,-27],t=function(){s.runOnJS(Gt)()};return t.__closure={runOnJS:s.runOnJS,fireHoldStart:Gt},t.__workletHash=0xe657c07c81a,t.__initData=Ir,t.__stackDetails=e,t}()).onUpdate(function(){var e=[new global.Error,-16,-27],t=function(e){if(2===Le.value){var t=Math.max(Ue.value,Math.min(0,e.translationX)),r=Math.max(We.value,Math.min(0,e.translationY));Ze.value=t,et.value=r;var n=Math.abs(r)>Math.abs(t);n&&1===ze.value&&0===lt.value&&r<=He.value&&(lt.value=1,s.runOnJS(Tt)()),!n&&1===qe.value&&0===st.value&&t<=Be.value&&(st.value=1,s.runOnJS(Dt)())}};return t.__closure={stateShared:Le,STATE_HOLD:2,maxLeftShared:Ue,maxUpShared:We,translateX:Ze,translateY:et,enableLockShared:ze,lockFiredShared:lt,lockThresholdShared:He,runOnJS:s.runOnJS,fireLock:Tt,enableCancelShared:qe,cancelFiredShared:st,cancelThresholdShared:Be,fireCancel:Dt},t.__workletHash=5451569651792,t.__initData=Rr,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-3,-27],t=function(){s.runOnJS(Vt)()};return t.__closure={runOnJS:s.runOnJS,fireHoldEnd:Vt},t.__workletHash=2168024754460,t.__initData=Mr,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===lt.value&&0===st.value&&(Ze.value=s.withSpring(0,{damping:18,stiffness:220}),et.value=s.withSpring(0,{damping:18,stiffness:220}))};return t.__closure={lockFiredShared:lt,cancelFiredShared:st,translateX:Ze,withSpring:s.withSpring,translateY:et},t.__workletHash=9056995889201,t.__initData=_r,t.__stackDetails=e,t}());return a.Gesture.Race(r,n)}),[]),Kt=s.useAnimatedStyle((_t=[new global.Error,-6,-27],Ot=function(){var e=2===Le.value;return{transform:[{translateX:e?Ze.value:0},{translateY:e?et.value:0},{scale:tt.value}]}},Ot.__closure={stateShared:Le,STATE_HOLD:2,translateX:Ze,translateY:et,micScale:tt},Ot.__workletHash=5947495949280,Ot.__initData=Or,Ot.__stackDetails=_t,Ot)),Lt=s.useAnimatedStyle(function(){var e=[new global.Error,-6,-27],t=function(){return{opacity:s.interpolate(Ze.value,[0,Be.value],[1,0],s.Extrapolation.CLAMP),transform:[{translateX:.4*Ze.value+rt.value}]}};return t.__closure={interpolate:s.interpolate,translateX:Ze,cancelThresholdShared:Be,Extrapolation:s.Extrapolation,arrowPulse:rt},t.__workletHash=3512418322197,t.__initData=Pr,t.__stackDetails=e,t}()),Bt=s.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=s.interpolate(et.value,[0,He.value],[0,1],s.Extrapolation.CLAMP);return{transform:[{translateY:s.interpolate(e,[0,1],[0,-22])}]}};return t.__closure={interpolate:s.interpolate,translateY:et,lockThresholdShared:He,Extrapolation:s.Extrapolation},t.__workletHash=0xb5ea02d3a17,t.__initData=Gr,t.__stackDetails=e,t}()),Ht=s.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:nt.value}]}};return t.__closure={chevronPulse:nt},t.__workletHash=9964200918503,t.__initData=Vr,t.__stackDetails=e,t}()),Ut=s.useAnimatedStyle(function(){var e=[new global.Error,-3,-27],t=function(){return{opacity:De?1:ot.value}};return t.__closure={isPaused:De,pausePulse:ot},t.__workletHash=4860774981143,t.__initData=Tr,t.__stackDetails=e,t}()),Nt=s.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:at.value}};return t.__closure={recBlink:at},t.__workletHash=0xe977a9dad0e,t.__initData=Dr,t.__stackDetails=e,t}()),Yt="RECORDING_HOLD"===_e,Wt=null!=E?E:m,zt={height:Ee,width:Ee,backgroundColor:l},Qt={minHeight:P+50,backgroundColor:c},qt={minHeight:P,backgroundColor:d},Jt={width:Ee-8,backgroundColor:_};return"RECORDING_TAP"===_e||"LOCKED_RECORDING"===_e||"SENDING"===_e?e.jsxs(t.View,{style:[r(rr||(rr=M(["w-full rounded-2xl px-4 py-2.5"]))),Qt,le,Ae],children:[e.jsxs(t.View,{style:r(nr||(nr=M(["flex-row items-center gap-3 px-1 pt-1.5 pb-2"]))),children:[e.jsx(s.View,{style:[r(or||(or=M(["w-1.5 h-1.5 rounded-full"]))),{backgroundColor:k},Nt]}),e.jsx(t.Text,{style:[r(ir||(ir=M(["text-base font-semibold text-white"]))),{color:f,minWidth:42},ce],numberOfLines:1,children:Qe(Ge)}),W&&e.jsx(t.View,{style:[r(ar||(ar=M(["flex-1"]))),de],children:se?se():e.jsx(Kr,{color:g,tick:it,count:$})})]}),e.jsxs(t.View,{style:r(sr||(sr=M(["flex-row items-center justify-between mt-1"]))),children:[e.jsx(t.Pressable,{onPress:wt,hitSlop:12,style:[r(lr||(lr=M(["items-center justify-center rounded-full"]))),{width:Ee,height:Ee},fe],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:oe?oe():e.jsx(Sr,{style:r.style("w-6 h-6"),color:b})}),e.jsx(t.Pressable,{onPress:Et,hitSlop:12,style:r(Ar||(Ar=M(["items-center justify-center px-4"]))),accessibilityRole:"button",accessibilityLabel:De?"Resume recording":"Pause recording",children:De?ae?ae():e.jsx(Ye,{style:r.style("w-7 h-7"),color:k}):e.jsx(s.View,{style:Ut,children:ie?ie():e.jsx(Ne,{style:r.style("w-7 h-7"),color:k})})}),e.jsx(a.GestureDetector,{gesture:Ft,children:e.jsx(s.View,{style:[r(cr||(cr=M(["items-center justify-center rounded-full"]))),zt,he,Kt],accessibilityRole:"button",accessibilityLabel:"Send recording",children:te?te():e.jsx(Zt,{style:{width:F,height:F},color:"#FFFFFF"})})})]})]}):e.jsxs(t.View,{style:[r(ur||(ur=M(["flex-row items-end gap-2 relative"]))),le],pointerEvents:"box-none",children:[Yt?e.jsxs(t.View,{style:[r(dr||(dr=M(["flex-1 flex-row items-center px-4 rounded-3xl"]))),qt],children:[e.jsx(t.Text,{style:[r(Cr||(Cr=M(["text-base font-semibold"]))),{color:f,minWidth:42},ce],numberOfLines:1,children:Qe(Ge)}),e.jsxs(s.View,{style:[r(fr||(fr=M(["flex-1 flex-row items-center justify-center gap-1.5"]))),Lt],children:[ne?ne():e.jsx(t.Text,{style:[r(hr||(hr=M(["text-base leading-none"]))),{color:S,marginTop:-2}],children:"‹"}),e.jsx(t.Text,{style:[r(vr||(vr=M(["text-sm"]))),{color:S},ue],children:"Slide to cancel"})]})]}):null==Z?void 0:Z(),e.jsxs(t.View,{style:[r(pr||(pr=M(["relative items-center justify-center"]))),{height:P,width:P}],children:[H&&Yt&&e.jsxs(s.View,{style:[r(mr||(mr=M(["absolute items-center justify-center rounded-2xl py-2.5"]))),Jt,{bottom:Ee+6,gap:6},Ce,Bt],pointerEvents:"none",children:[re?re():e.jsx(wr,{style:{width:L,height:L},color:m}),e.jsx(s.View,{style:Ht,children:e.jsx(br,{style:{width:14,height:14},color:Wt})})]}),e.jsx(a.GestureDetector,{gesture:Ft,children:e.jsx(s.View,{style:[r(yr||(yr=M(["items-center justify-center rounded-full"]))),zt,he,Kt],accessibilityRole:"button",accessibilityLabel:"Tap to record. Long-press and slide left to cancel or up to lock.",children:ee?ee():e.jsx(Xt,{style:{width:F+6,height:F+6},color:v})})})]})]})},Kr=function(n){var o=n.color,i=n.tick,a=n.count;return e.jsx(t.View,{style:r(gr||(gr=M(["flex-row items-center justify-between h-6"]))),children:Array.from({length:a}).map((function(t,r){return e.jsx(Br,{index:r,total:a,color:o,tick:i},r)}))})},Lr={code:'function VoiceRecorderFlowTsx12(){const{tick,index,total}=this.__closure;const t=tick.value*Math.PI*2;const phase1=Math.sin(t*2+index*0.55);const phase2=Math.sin(t*4+index*1.3);const phase3=Math.sin(t*0.9+index*0.27);const combined=(phase1*0.55+phase2*0.3+phase3*0.4)*0.5+0.5;const edge=Math.sin(index/Math.max(1,total-1)*Math.PI);const amp=Math.max(0.18,Math.min(1,combined)*(0.35+0.65*edge));return{height:Math.round(amp*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderFlowTsx12","tick","index","total","__closure","t","value","Math","PI","phase1","sin","phase2","phase3","combined","edge","max","amp","min","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow.tsx"],"mappings":"AAyb2C,SAAAA,sBAAMA,CAAA,QAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEzC,KAAM,CAAAC,CAAC,CAAGJ,IAAI,CAACK,KAAK,CAAGC,IAAI,CAACC,EAAE,CAAG,CAAC,CAClC,KAAM,CAAAC,MAAM,CAAGF,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC7C,KAAM,CAAAS,MAAM,CAAGJ,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,GAAG,CAAC,CAC5C,KAAM,CAAAU,MAAM,CAAGL,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,GAAG,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC/C,KAAM,CAAAW,QAAQ,CAAG,CAACJ,MAAM,CAAG,IAAI,CAAGE,MAAM,CAAG,GAAG,CAAGC,MAAM,CAAG,GAAG,EAAI,GAAG,CAAG,GAAG,CAC1E,KAAM,CAAAE,IAAI,CAAGP,IAAI,CAACG,GAAG,CAAER,KAAK,CAAGK,IAAI,CAACQ,GAAG,CAAC,CAAC,CAAEZ,KAAK,CAAG,CAAC,CAAC,CAAII,IAAI,CAACC,EAAE,CAAC,CACjE,KAAM,CAAAQ,GAAG,CAAGT,IAAI,CAACQ,GAAG,CAAC,IAAI,CAAER,IAAI,CAACU,GAAG,CAAC,CAAC,CAAEJ,QAAQ,CAAC,EAAI,IAAI,CAAG,IAAI,CAAGC,IAAI,CAAC,CAAC,CACxE,MAAO,CAAEI,MAAM,CAAKX,IAAI,CAACY,KAAK,CAACH,GAAG,CAAG,GAAG,CAAC,IAAI,CAAC,CAClD","ignoreList":[]}',version:"3.16.7"},Br=function(t){var n,o,i=t.index,a=t.total,l=t.color,A=t.tick,c=s.useAnimatedStyle((n=[new global.Error,-4,-27],(o=function(){var e=A.value*Math.PI*2,t=.5*(.55*Math.sin(2*e+.55*i)+.3*Math.sin(4*e+1.3*i)+.4*Math.sin(.9*e+.27*i))+.5,r=Math.sin(i/Math.max(1,a-1)*Math.PI),n=Math.max(.18,Math.min(1,t)*(.35+.65*r));return{height:"".concat(Math.round(100*n),"%")}}).__closure={tick:A,index:i,total:a},o.__workletHash=0xe1b8edd2cc4,o.__initData=Lr,o.__stackDetails=n,o));return e.jsx(s.View,{style:[r(xr||(xr=M(["mx-px rounded-full"]))),{width:2,backgroundColor:l},c]})},Hr=function(t){var r=t.style,n=t.fill,i=void 0===n?"currentColor":n;return e.jsxs(o,{style:r,viewBox:"0 0 24 24",children:[e.jsx(o.Path,{fill:i,d:"M13 4H6v16h12V9h-5z",opacity:".3"}),e.jsx(o.Path,{fill:i,d:"m20 8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2zm-2 12H6V4h7v5h5z"})]})},Ur=function(r){var n=r.fileName,o=r.style,i=D().theme;return e.jsx(t.Text,{numberOfLines:2,ellipsizeMode:"tail",style:Q([{fontSize:14,fontWeight:"600",color:"black"},o],null==i?void 0:i.fontFamily),children:function(e){var t=e.lastIndexOf(".");if(-1===t)return e;var r=e.slice(0,t),n=e.slice(t);return r.length>40?r.slice(0,40)+"..."+n:r+n}(n)})},Nr=n.memo(Ur);function Yr(e){return e.filter((function(e){var t,r;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(r=e.type)||void 0===r?void 0:r.startsWith("video/"))})).map((function(e){return{uri:e.uri,kind:e.type.startsWith("video/")?"video":"image"}}))}var Wr,zr,Qr,qr,Jr,Xr,$r,Zr,en,tn,rn,nn,on,an,sn,ln,An,cn=function(r){var n,o=r.previews,a=r.closePreview,s=r.onRemoveItem,l=r.CustomFileIcon,A=r.CustomImagePreview,c=r.CustomVideoPreview,u=r.inputHeight,d=D(),C=d.theme,f=d.setMediaViewerGallery,h=o.filter((function(e){var t,r;return(null===(t=e.type)||void 0===t?void 0:t.startsWith("image/"))||(null===(r=e.type)||void 0===r?void 0:r.startsWith("video/"))})),v=o.filter((function(e){var t,r;return!(null!==(t=e.type)&&void 0!==t&&t.startsWith("image/")||null!==(r=e.type)&&void 0!==r&&r.startsWith("video/"))})),p=Yr(o);if(0===o.length)return null;var m=function(e){0!==p.length&&f(p,e)},y=function(r){var n,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:56,s=null===(n=r.type)||void 0===n?void 0:n.startsWith("image/"),l=null===(o=r.type)||void 0===o?void 0:o.startsWith("video/");return s&&A?e.jsx(A,{uri:r.uri}):l&&c?e.jsx(c,{uri:r.uri}):s?e.jsx(t.Image,{source:{uri:r.uri},style:{width:a,height:a,borderRadius:12},resizeMode:"cover"}):l?e.jsx(t.View,{style:{width:a,height:a,borderRadius:12,overflow:"hidden"},children:e.jsx(i,{source:{uri:r.uri},style:{width:"100%",height:"100%"},resizeMode:"cover",muted:!0,repeat:!0,paused:!1,pointerEvents:"none",playInBackground:!1,playWhenInactive:!1})}):null},g=function(r,n){return e.jsx(t.Pressable,{onPress:function(){return s?s(r):null==a?void 0:a()},style:{position:"absolute",zIndex:50,height:22,width:22,backgroundColor:"rgba(0,0,0,0.55)",right:-6,top:-6,borderRadius:11,justifyContent:"center",alignItems:"center",transform:n?[{rotate:n}]:void 0},children:e.jsx(t.Text,{style:Q({fontSize:13,color:"white",fontWeight:"700",lineHeight:14},null==C?void 0:C.fontFamily),children:"×"})})};return e.jsx(t.View,{style:[{position:"absolute",bottom:(null!=u?u:0)+8,zIndex:20,borderRadius:12,maxWidth:"92%",alignSelf:"flex-start"},null==C||null===(n=C.filePreviewStyle)||void 0===n?void 0:n.root],children:e.jsxs(t.View,{style:{gap:8},children:[function(){if(0===h.length)return null;if(1===h.length){var r=h[0];return r?e.jsxs(t.Pressable,{onPress:function(){return m(0)},style:{position:"relative"},children:[y(r),g(r.uri)]}):null}var n=h.slice(0,3),o=h.length>3?h.length-3:0;return e.jsx(t.View,{style:{flexDirection:"row",alignItems:"center",minHeight:68},children:n.map((function(r,i){var a=2===n.length?0===i?"-4deg":"4deg":0===i?"-10deg":1===i?"0deg":"10deg",s=2===n.length?0===i?"4deg":"-4deg":0===i?"10deg":1===i?"0deg":"-10deg";return e.jsx(t.Pressable,{onPress:function(){var e=Yr(h).findIndex((function(e){return e.uri===r.uri}));m(e>=0?e:0)},style:{marginLeft:0===i?0:-18,zIndex:i+1,transform:[{rotate:a}],position:"relative"},children:e.jsxs(t.View,{style:{position:"relative"},children:[y(r),2===i&&o>0&&e.jsx(t.View,{style:{position:"absolute",top:0,left:0,right:0,bottom:0,borderRadius:12,backgroundColor:"rgba(0,0,0,0.55)",alignItems:"center",justifyContent:"center"},children:e.jsxs(t.Text,{style:{color:"#fff",fontWeight:"700",fontSize:14},children:["+",o]})}),g(r.uri,s)]})},"".concat(r.uri,"-").concat(i))}))})}(),v.length>0&&e.jsx(t.ScrollView,{scrollEnabled:v.length>3,style:{maxHeight:232},showsVerticalScrollIndicator:v.length>3,contentContainerStyle:{gap:8},nestedScrollEnabled:!0,children:v.map((function(r,n){return function(r,n){var o,i,a,s;return e.jsxs(t.View,{style:{position:"relative"},children:[e.jsxs(t.View,{style:[{backgroundColor:"white",width:240,minHeight:64,borderRadius:12,flexDirection:"row",padding:4,gap:4,alignItems:"center"},null==C||null===(o=C.filePreviewStyle)||void 0===o?void 0:o.container],children:[e.jsx(t.View,{style:[{backgroundColor:"#d1d5db",borderRadius:8,padding:4,justifyContent:"center",alignItems:"center"},null==C||null===(i=C.filePreviewStyle)||void 0===i?void 0:i.iconContainer],children:l?e.jsx(l,{}):e.jsx(Hr,{style:{width:40,height:40},fill:"white"})}),e.jsx(t.View,{style:[{backgroundColor:"#f3f4f6",flex:1,borderRadius:8,justifyContent:"center",paddingHorizontal:12},null==C||null===(a=C.filePreviewStyle)||void 0===a?void 0:a.nameContainer],children:e.jsx(Nr,{fileName:r.name||"File",style:null==C||null===(s=C.filePreviewStyle)||void 0===s?void 0:s.text})})]}),g(r.uri)]},"".concat(r.uri,"-").concat(n))}(r,n)}))})]})})},un=n.memo(cn),dn="ios"===t.Platform.OS?32:30,Cn="ios"===t.Platform.OS?50:48,fn=function(o){var i,a,s,l,A,c,d,C,f,h,v,p,m,g,x=o.onSendMessage,b=o.onTypingStart,w=o.onTypingEnd,S=o.onAttachmentPress,E=o.onCameraPress,j=o.onAudioRecordStart,k=o.onAudioRecordEnd,I=o.CustomEmojiIcon,_=o.CustomAttachmentIcon,P=o.CustomCameraIcon,G=o.CustomSendIcon,V=o.CustomMicrophoneIcon,T=o.CustomFileIcon,F=o.CustomImagePreview,K=o.CustomVideoPreview,L=R(n.useState(""),2),B=L[0],H=L[1],U=R(n.useState(0),2),N=U[0],Y=U[1],W=R(n.useState({height:dn,isMultiline:!1}),2),q=W[0],J=W[1],X=D(),$=X.theme,Z=X.currentUserId,ee=X.showEmojiButton,te=X.showAttachmentsButton,re=X.showCameraButton,ne=X.showVoiceRecordButton,oe=X.placeholder,ie=X.previewData,ae=X.previewItems,se=X.closePreview,le=X.onRemovePreviewItem,Ae=X.voiceRecorderProps,ce=X.voiceRecorderStyles,ue=X.recordingUIProps,de=X.renderVoiceRecorder,Ce=n.useMemo((function(){return null!=ae&&ae.length?ae:ie?[ie]:[]}),[ae,ie]),fe=Ce.length>0,he=null==$||null===(i=$.sizes)||void 0===i?void 0:i.inputIconSize,ve=function(e){if("number"==typeof e&&e>0)return{width:e,height:e};var t="string"==typeof e&&e.trim().length>0?e.trim():z;return r.style(t)}(he),pe="number"==typeof(g=he)&&g>0?g:24,me=0===B.trim().length&&!q.isMultiline,ye=Math.max(0,(Cn-pe)/2),ge=me?{paddingTop:ye,paddingBottom:ye}:{paddingBottom:ye},xe=n.useCallback((function(){J({height:dn,isMultiline:!1}),Y((function(e){return e+1}))}),[]),be=n.useCallback((function(e){H(e),0===e.length&&xe()}),[xe]),we=n.useCallback((function(e){var t=Math.min(Math.max(e.nativeEvent.contentSize.height,dn),118),r=t>dn;J({height:r?t:dn,isMultiline:r})}),[]),Se=n.useCallback((function(){var e=B.trim();(e||fe)&&(x({text:e,senderId:Z}),H(""),xe())}),[B,x,Z,fe,xe]);n.useEffect((function(){B.trim()?null==b||b():null==w||w()}),[B,b,w]);var Ee=!!B.trim()||fe,je=n.useCallback((function(e){null==k||k(e)}),[k]),ke=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.maxDuration,r=void 0===t?300:t,o=e.onRecordStart,i=e.onRecordEnd,a=R(n.useState("idle"),2),s=a[0],l=a[1],A=R(n.useState(0),2),c=A[0],d=A[1],C=n.useRef(null),f=n.useRef(null),h=n.useRef(0),v=n.useRef(i);v.current=i;var p=n.useRef(o);p.current=o;var m=n.useRef(r);m.current=r;var y=n.useCallback((function(){f.current&&(clearInterval(f.current),f.current=null)}),[]),g=n.useCallback((function(e){y(),f.current=setInterval((function(){h.current+=1,d(h.current),h.current>=m.current&&e()}),1e3)}),[y]),x=n.useCallback(u(O().mark((function e(){var t,r;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,t=require("react-native-audio-record").default,e.next=8;break;case 4:return e.prev=4,e.t0=e.catch(0),console.error("[movius-chats] Voice recording requires react-native-audio-record. Install it: yarn add react-native-audio-record"),e.abrupt("return");case 8:return e.next=10,er();case 10:if(e.sent){e.next=14;break}return console.warn("[movius-chats] Microphone permission denied."),e.abrupt("return");case 14:try{t.init({sampleRate:16e3,channels:1,bitsPerSample:16,audioSource:6,wavFile:"movius_rec_".concat(Date.now(),".wav")}),t.start(),C.current=t,h.current=0,d(0),l("recording"),g((function(){return E.current()})),null===(r=p.current)||void 0===r||r.call(p)}catch(e){console.warn("[movius-chats] Failed to start recording:",e)}case 15:case"end":return e.stop()}}),e,null,[[0,4]])}))),[g]),b=n.useCallback(u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C.current){e.next=2;break}return e.abrupt("return");case 2:try{C.current.stop(),l("paused"),y()}catch(e){console.warn("[movius-chats] Failed to pause:",e)}case 3:case"end":return e.stop()}}),e)}))),[y]),w=n.useCallback(u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(C.current){e.next=2;break}return e.abrupt("return");case 2:try{C.current.start(),l("recording"),g((function(){return E.current()}))}catch(e){console.warn("[movius-chats] Failed to resume:",e)}case 3:case"end":return e.stop()}}),e)}))),[g]),S=n.useCallback(u(O().mark((function e(){var t,r,n,o,i;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=C.current){e.next=3;break}return e.abrupt("return",null);case 3:return y(),C.current=null,r=h.current,h.current=0,l("idle"),d(0),e.prev=9,e.next=12,t.stop();case 12:if(o=e.sent){e.next=15;break}return e.abrupt("return",null);case 15:return i={uri:o.startsWith("file://")?o:"file://".concat(o),duration:Math.max(1,r),mimeType:"audio/wav"},null===(n=v.current)||void 0===n||n.call(v,i),e.abrupt("return",i);case 20:return e.prev=20,e.t0=e.catch(9),console.warn("[movius-chats] Failed to stop recording:",e.t0),e.abrupt("return",null);case 24:case"end":return e.stop()}}),e,null,[[9,20]])}))),[y]),E=n.useRef(S);E.current=S;var j=n.useCallback((function(){return E.current()}),[]),k=n.useCallback(u(O().mark((function e(){var t,r,n,o;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=C.current,y(),C.current=null,h.current=0,l("idle"),d(0),!t){e.next=25;break}return e.prev=7,e.next=10,t.stop();case 10:if(!(r=e.sent)){e.next=21;break}return e.prev=12,n=require("react-native-fs"),o=r.startsWith("file://")?r.slice(7):r,e.next=17,n.unlink(o);case 17:e.next=21;break;case 19:e.prev=19,e.t0=e.catch(12);case 21:e.next=25;break;case 23:e.prev=23,e.t1=e.catch(7);case 25:case"end":return e.stop()}}),e,null,[[7,23],[12,19]])}))),[y]);return n.useEffect((function(){return function(){y();try{var e;null===(e=C.current)||void 0===e||e.stop()}catch(e){}}}),[y]),{status:s,duration:c,isRecording:"recording"===s,isPaused:"paused"===s,startRecording:x,pauseRecording:b,resumeRecording:w,stopRecording:j,cancelRecording:k}}({maxDuration:null!==(a=null==Ae?void 0:Ae.maxDuration)&&void 0!==a?a:300,onRecordStart:j,onRecordEnd:je}),Ie=n.useRef(ke);Ie.current=ke;var Re,Me=n.useCallback((function(){Ie.current.startRecording()}),[]),_e=n.useCallback(u(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ie.current.stopRecording();case 2:(t=e.sent)&&x({audio:t.uri,senderId:Z});case 4:case"end":return e.stop()}}),e)}))),[x,Z]),Oe=n.useCallback((function(){Ie.current.cancelRecording()}),[]),Pe=n.useCallback((function(){Ie.current.pauseRecording()}),[]),Ge=n.useCallback((function(){Ie.current.resumeRecording()}),[]),Ve=null!==(s=null!==(l=null==ue?void 0:ue.recordingSendButtonBackground)&&void 0!==l?l:null==$||null===(A=$.inputStyles)||void 0===A||null===(A=A.sendButtonStyle)||void 0===A?void 0:A.backgroundColor)&&void 0!==s?s:"#16A34A",Te=null!==(c=null==ue?void 0:ue.recordingBackground)&&void 0!==c?c:"#0B141A",De=null!==(d=null==ue?void 0:ue.timerColor)&&void 0!==d?d:"#FFFFFF",Fe=null!==(C=null!==(f=null==ue?void 0:ue.longPressMicColor)&&void 0!==f?f:null==$||null===(h=$.colors)||void 0===h?void 0:h.sendIconsColor)&&void 0!==C?C:"#FFFFFF",Ke=null!==(v=null==ue?void 0:ue.waveformColor)&&void 0!==v?v:"#E9EDEF",Le={isRecording:ke.isRecording,isPaused:ke.isPaused,duration:ke.duration,isLocked:!1,slideOffset:{x:0,y:0},waveformData:[],startRecording:ke.startRecording,stopRecording:ke.stopRecording,pauseRecording:ke.pauseRecording,resumeRecording:ke.resumeRecording,cancelRecording:ke.cancelRecording},Be=de?de(Le):null,He=function(){var n,o,i,a,s,l;return e.jsxs(t.View,{style:[r(Wr||(Wr=M(["flex-1 flex-row bg-white overflow-hidden px-3.5"]))),{minHeight:Cn,borderRadius:me?9999:24,alignItems:me?"center":"flex-end"},null==$||null===(n=$.inputStyles)||void 0===n?void 0:n.inputContainerStyle],children:[ee&&e.jsx(t.View,{style:ge,children:e.jsx(t.Pressable,{children:I?e.jsx(I,{}):e.jsx(Jt,{style:ve,color:(null==$||null===(o=$.colors)||void 0===o?void 0:o.inputsIconsColor)||"rgba(0,0,0,0.7)"})})}),e.jsx(t.TextInput,{value:B,onChangeText:be,placeholder:oe||"Message",style:Q([r(zr||(zr=M(["bg-transparent flex-1 pl-2"]))),"ios"===t.Platform.OS?r(Qr||(Qr=M(["text-[17px]"]))):r(qr||(qr=M(["text-[16px]"]))),{minHeight:dn,maxHeight:118,paddingVertical:me?0:8,marginVertical:me?(Cn-dn)/2:4},{color:(null==$||null===(i=$.colors)||void 0===i?void 0:i.inputTextColor)||"rgba(0, 0, 0, 0.87)"}],null==$?void 0:$.fontFamily),placeholderTextColor:(null==$||null===(a=$.colors)||void 0===a?void 0:a.placeholderTextColor)||"rgba(0, 0, 0, 0.4)",multiline:!0,textAlignVertical:q.isMultiline&&B.length>0?"top":"center",onContentSizeChange:we},"chat-input-".concat(N)),e.jsxs(t.View,{style:[r(Jr||(Jr=M(["flex-row items-center gap-4"]))),ge],children:[te&&e.jsx(t.Pressable,{onPress:S,children:_?e.jsx(_,{}):e.jsx($t,{style:ve,color:(null==$||null===(s=$.colors)||void 0===s?void 0:s.inputsIconsColor)||"rgba(0,0,0,0.7)"})}),re&&!B.trim()&&e.jsx(t.Pressable,{onPress:E,children:P?e.jsx(P,{}):e.jsx(qt,{style:ve,color:(null==$||null===(l=$.colors)||void 0===l?void 0:l.inputsIconsColor)||"rgba(0,0,0,0.7)"})})]})]})},Ue=function(){var n,o;return e.jsx(t.Pressable,{onPress:Se,style:[r(Xr||(Xr=M(["rounded-full justify-center items-center"]))),y({height:Cn,width:Cn,backgroundColor:"#16a34a"},null==$||null===(n=$.inputStyles)||void 0===n?void 0:n.sendButtonStyle)],children:G?e.jsx(G,{}):e.jsx(Zt,{style:r.style("h-6 w-6"),color:(null==$||null===(o=$.colors)||void 0===o?void 0:o.sendIconsColor)||"rgba(255,255,255,0.7)"})})},Ne=!Ee&&ne&&!Be;return e.jsxs(t.View,{style:r($r||($r=M(["w-full px-2"]))),children:[fe&&e.jsx(un,{previews:Ce,closePreview:se,onRemoveItem:le,CustomFileIcon:T,CustomImagePreview:F,CustomVideoPreview:K,inputHeight:q.height}),e.jsx(t.View,{style:[r(Zr||(Zr=M(["w-full"]))),null==$||null===(p=$.inputStyles)||void 0===p?void 0:p.inputSectionContainerStyle],children:Ne?e.jsx(Fr,{inputBarHeight:Cn,primaryColor:Ve,backgroundColor:Te,timerColor:De,microphoneColor:Fe,waveformColor:Ke,cancelTextColor:null==ue?void 0:ue.cancelTextColor,chevronColor:null==ue?void 0:ue.chevronIconColor,lockColor:null==ue?void 0:ue.lockIconColor,lockPillBackground:null==ue?void 0:ue.lockPillBackground,iconSize:null==ue?void 0:ue.iconSize,lockSlideDistance:null==ue?void 0:ue.lockSlideDistance,waveCount:null==ue?void 0:ue.waveformBarCount,enableLockRecording:null==Ae?void 0:Ae.enableLockRecording,enableSlideToCancel:null==Ae?void 0:Ae.enableSlideToCancel,enableWaveform:null==Ae?void 0:Ae.enableWaveform,timerTextStyle:null!==(m=null==ue?void 0:ue.timerTextStyle)&&void 0!==m?m:null==ce?void 0:ce.timer,containerStyle:null==ce?void 0:ce.container,barStyle:null==ce?void 0:ce.bar,slideTextStyle:null==ce?void 0:ce.slideText,waveformStyle:null==ce?void 0:ce.waveform,lockPillStyle:null==ce?void 0:ce.lockPill,trashButtonStyle:null==ce?void 0:ce.trashButton,sendButtonStyle:null==ce?void 0:ce.sendButton,renderInputPill:He,renderSendIcon:G?function(){return e.jsx(G,{})}:void 0,renderMicIcon:V?function(){return e.jsx(V,{})}:void 0,onRecordingStart:Me,onSend:_e,onCancel:Oe,onDelete:Oe,onPauseRecording:Pe,onResumeRecording:Ge}):e.jsxs(t.View,{style:r(en||(en=M(["flex-row items-end gap-2"]))),children:[He(),Ee||!ne?Ue():Be?e.jsx(t.View,{style:{height:Cn,width:Cn,justifyContent:"center",alignItems:"center"},children:V?e.jsx(V,{}):e.jsx(Xt,{style:r.style("h-8 w-8"),color:(null==$||null===(Re=$.colors)||void 0===Re?void 0:Re.sendIconsColor)||"rgba(255,255,255,0.7)"})}):Ue()]})}),Be]})},hn=n.memo(fn);function vn(t){var n=t.style;return e.jsxs(o.Svg,{viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:r.style("h-6 w-6 text-black",n),children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18"})]})}var pn,mn,yn,gn,xn,bn,wn,Sn,En,jn,kn,In,Rn,Mn,_n,On,Pn,Gn,Vn,Tn=function(o){var i,a=o.gallery,s=o.onClose,l=D(),A=l.theme,c=l.setIsVideoPlaying,u=n.useRef(null),d=null!==(i=null==a?void 0:a.initialIndex)&&void 0!==i?i:0,C=R(n.useState(d),2),f=C[0],h=C[1],v=t.useWindowDimensions(),p=v.width,m=v.height;n.useEffect((function(){if(null!=a&&a.items.length){var e=a.initialIndex;h(e);var t=a.items[e];c("video"===(null==t?void 0:t.kind)),requestAnimationFrame((function(){try{var t;null===(t=u.current)||void 0===t||t.scrollToIndex({index:e,animated:!1})}catch(e){}}))}}),[null==a?void 0:a.initialIndex,null==a?void 0:a.items,c]);var y=n.useCallback((function(){c(!1),s()}),[s,c]),g=n.useCallback((function(e){var t=Math.round(e.nativeEvent.contentOffset.x/p);h(t);var r=null==a?void 0:a.items[t];c("video"===(null==r?void 0:r.kind))}),[null==a?void 0:a.items,p,c]);return a&&0!==a.items.length?e.jsx(t.Modal,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:y,statusBarTranslucent:!0,children:e.jsxs(t.View,{style:[r(tn||(tn=M(["flex-1 bg-black"]))),{width:p,height:m}],children:[e.jsx(t.Pressable,{onPress:y,style:r(rn||(rn=M(["absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70"]))),children:e.jsx(vn,{style:r(nn||(nn=M(["h-8 w-8"])))})}),a.items.length>1&&e.jsx(t.View,{style:r(on||(on=M(["absolute top-14 left-0 right-0 z-10 items-center"]))),children:e.jsxs(t.Text,{style:Q(r(an||(an=M(["text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full"]))),null==A?void 0:A.fontFamily),children:[f+1," / ",a.items.length]})}),e.jsx(t.FlatList,{ref:u,data:a.items,horizontal:!0,pagingEnabled:!0,showsHorizontalScrollIndicator:!1,keyExtractor:function(e,t){return"".concat(e.uri,"-").concat(t)},initialScrollIndex:a.initialIndex,extraData:f,getItemLayout:function(e,t){return{length:p,offset:p*t,index:t}},onMomentumScrollEnd:g,onScrollToIndexFailed:function(e){var t=e.index;setTimeout((function(){var e;null===(e=u.current)||void 0===e||e.scrollToIndex({index:t,animated:!1})}),100)},renderItem:function(t){var r=t.item,n=t.index;return e.jsx(Dn,{item:r,width:p,height:m,isActive:n===f,autoPlayVideo:n===d&&"video"===r.kind})}})]})}):null},Dn=function(o){var a=o.item,s=o.width,l=o.height,A=o.isActive,c=o.autoPlayVideo,u=D().theme,d=n.useRef(null),C=R(n.useState("video"===a.kind),2),f=C[0],h=C[1],v=R(n.useState(!1),2),p=v[0],m=v[1],y="video"===a.kind&&A&&c;return"image"===a.kind?e.jsx(t.View,{style:{width:s,height:l,justifyContent:"center"},children:e.jsx(t.Image,{source:{uri:a.uri},style:{width:s,height:l},resizeMode:"contain"})}):e.jsxs(t.View,{style:{width:s,height:l,justifyContent:"center",alignItems:"center",paddingHorizontal:16},children:[e.jsx(i,{source:{uri:a.uri},ref:d,controls:!0,paused:!y,shutterColor:"transparent",playInBackground:!1,playWhenInactive:!1,style:{width:s-32,height:.55*l,backgroundColor:"#000"},resizeMode:"contain",onLoadStart:function(){h(!0),m(!1)},onLoad:function(){return h(!1)},onBuffer:function(e){var t=e.isBuffering;return h(t)},onError:function(){m(!0),h(!1)}}),f&&e.jsx(t.View,{style:r(sn||(sn=M(["absolute inset-0 items-center justify-center"]))),pointerEvents:"none",children:e.jsx(lt,{style:r.style("h-14 w-14"),spinning:!0})}),p&&e.jsx(t.View,{style:r(ln||(ln=M(["absolute inset-0 items-center justify-center px-6"]))),children:e.jsx(t.Text,{style:Q(r(An||(An=M(["text-white font-semibold"]))),null==u?void 0:u.fontFamily),children:"Failed to load video"})})]})},Fn=n.memo(Tn),Kn=function(n){var o,i,a,s,l,A=n.typingUsers,c=n.currentUserId,u=D(),d=u.theme,C=u.showAvatars,f=u.renderCustomTyping,h=u.showBubbleTail,v=u.typingText,p=A.filter((function(e){return e.id!==c}));if(!p.length)return null;var m=p.slice(0,2),g=p.length-2,x=C?m.length+(g>0?1:0):0,b=x>0?24+14*Math.max(0,x-1):0,w=x>0?b+12:8,S=-(b+12);return e.jsxs(t.View,{style:[r(pn||(pn=M(["px-2 my-1 bg-white rounded-tl-none rounded-lg relative max-w-[75%] self-start"]))),{marginLeft:w},null==d||null===(o=d.bubbleStyle)||void 0===o?void 0:o.typingContainerStyle],children:[C&&x>0&&e.jsxs(t.View,{style:{position:"absolute",top:0,left:S,flexDirection:"row"},children:[m.map((function(n,o){var i,a,s;return e.jsx(t.View,{style:[r(mn||(mn=M(["bg-gray-400 w-6 h-6 rounded-full items-center"]))),{marginLeft:o>0?-10:0,zIndex:m.length+o}],children:n.avatar?e.jsx(t.Image,{source:{uri:n.avatar},style:[r(yn||(yn=M(["w-full h-full object-cover rounded-full"]))),null==d||null===(i=d.bubbleStyle)||void 0===i?void 0:i.avatarImageStyle]}):e.jsx(t.Text,{style:Q([r(gn||(gn=M(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==d||null===(a=d.bubbleStyle)||void 0===a?void 0:a.avatarTextStyle],null==d?void 0:d.fontFamily),children:null===(s=n.name)||void 0===s?void 0:s.charAt(0)})},n.id)})),g>0&&e.jsx(t.View,{style:[r(xn||(xn=M(["bg-gray-400 w-6 h-6 rounded-full items-center justify-center"]))),{marginLeft:-10,zIndex:3},y({},null==d||null===(i=d.bubbleStyle)||void 0===i?void 0:i.additionalTypingUsersContainerStyle)],children:e.jsxs(t.Text,{style:Q([r(bn||(bn=M(["text-white text-xs font-semibold"]))),null==d||null===(a=d.bubbleStyle)||void 0===a?void 0:a.additionalTypingUsersTextStyle],null==d?void 0:d.fontFamily),children:["+",g]})})]}),h&&e.jsx(P,{style:r.style("absolute -top-[3px] w-6 h-6 rotate-180 -left-3.5 mt-[1.5px]"),color:(null==d||null===(s=d.colors)||void 0===s?void 0:s.receivedMessageTailColor)||"white"}),f?f():e.jsx(t.View,{style:r(wn||(wn=M(["flex-row items-center py-3 px-2 justify-center"]))),children:e.jsx(t.Text,{style:Q([r(Sn||(Sn=M(["text-gray-600"]))),null==d||null===(l=d.bubbleStyle)||void 0===l?void 0:l.typingTextStyle],null==d?void 0:d.fontFamily),children:null!=v?v:"Typing..."})})]})};var Ln,Bn,Hn,Un,Nn,Yn,Wn,zn,Qn,qn={code:"function VoiceRecorderTsx1(){const{isPaused,pauseOpacity}=this.__closure;return{opacity:isPaused?1:pauseOpacity.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx1","isPaused","pauseOpacity","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAiCgD,SAAAA,kBAAA,QAAAC,QAAA,CAAAC,YAAA,OAAAC,SAAA,OAAO,CAC/CC,OAAO,CAAEH,QAAQ,CAAG,CAAC,CAAGC,YAAY,CAACG,KACzC,CAAC","ignoreList":[]}',version:"3.16.7"},Jn={code:"function VoiceRecorderTsx2(){const{recBlink}=this.__closure;return{opacity:recBlink.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx2","recBlink","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAoCyC,SAAAA,kBAAA,QAAAC,QAAA,OAAAC,SAAA,OAAO,CACxCC,OAAO,CAAEF,QAAQ,CAACG,KACtB,CAAC","ignoreList":[]}',version:"3.16.7"},Xn=function(o){var i=o.color,a=o.count,l=s.useSharedValue(0);return n.useEffect((function(){l.value=s.withRepeat(s.withTiming(1,{duration:4500,easing:s.Easing.linear}),-1,!1)}),[]),e.jsx(t.View,{style:r(Gn||(Gn=M(["flex-row items-center justify-between h-6"]))),children:Array.from({length:a}).map((function(t,r){return e.jsx(Zn,{index:r,total:a,tick:l,color:i},r)}))})},$n={code:'function VoiceRecorderTsx3(){const{tick,index,total}=this.__closure;const t=tick.value*Math.PI*2;const phase1=Math.sin(t*2+index*0.55);const phase2=Math.sin(t*4+index*1.3);const phase3=Math.sin(t*0.9+index*0.27);const combined=(phase1*0.55+phase2*0.3+phase3*0.4)*0.5+0.5;const edge=Math.sin(index/Math.max(1,total-1)*Math.PI);const amp=Math.max(0.18,Math.min(1,combined)*(0.35+0.65*edge));return{height:Math.round(amp*100)+"%"};}',location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx",sourceMap:'{"version":3,"names":["VoiceRecorderTsx3","tick","index","total","__closure","t","value","Math","PI","phase1","sin","phase2","phase3","combined","edge","max","amp","min","height","round"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorder.tsx"],"mappings":"AAuF2C,SAAAA,iBAAMA,CAAA,QAAAC,IAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEzC,KAAM,CAAAC,CAAC,CAAGJ,IAAI,CAACK,KAAK,CAAGC,IAAI,CAACC,EAAE,CAAG,CAAC,CAClC,KAAM,CAAAC,MAAM,CAAGF,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC7C,KAAM,CAAAS,MAAM,CAAGJ,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,CAAC,CAAGH,KAAK,CAAG,GAAG,CAAC,CAC5C,KAAM,CAAAU,MAAM,CAAGL,IAAI,CAACG,GAAG,CAACL,CAAC,CAAG,GAAG,CAAGH,KAAK,CAAG,IAAI,CAAC,CAC/C,KAAM,CAAAW,QAAQ,CAAG,CAACJ,MAAM,CAAG,IAAI,CAAGE,MAAM,CAAG,GAAG,CAAGC,MAAM,CAAG,GAAG,EAAI,GAAG,CAAG,GAAG,CAC1E,KAAM,CAAAE,IAAI,CAAGP,IAAI,CAACG,GAAG,CAAER,KAAK,CAAGK,IAAI,CAACQ,GAAG,CAAC,CAAC,CAAEZ,KAAK,CAAG,CAAC,CAAC,CAAII,IAAI,CAACC,EAAE,CAAC,CACjE,KAAM,CAAAQ,GAAG,CAAGT,IAAI,CAACQ,GAAG,CAAC,IAAI,CAAER,IAAI,CAACU,GAAG,CAAC,CAAC,CAAEJ,QAAQ,CAAC,EAAI,IAAI,CAAG,IAAI,CAAGC,IAAI,CAAC,CAAC,CACxE,MAAO,CAAEI,MAAM,CAAKX,IAAI,CAACY,KAAK,CAACH,GAAG,CAAG,GAAG,CAAC,IAAI,CAAC,CAClD","ignoreList":[]}',version:"3.16.7"},Zn=function(t){var n,o,i=t.index,a=t.total,l=t.tick,A=t.color,c=s.useAnimatedStyle((n=[new global.Error,-4,-27],(o=function(){var e=l.value*Math.PI*2,t=.5*(.55*Math.sin(2*e+.55*i)+.3*Math.sin(4*e+1.3*i)+.4*Math.sin(.9*e+.27*i))+.5,r=Math.sin(i/Math.max(1,a-1)*Math.PI),n=Math.max(.18,Math.min(1,t)*(.35+.65*r));return{height:"".concat(Math.round(100*n),"%")}}).__closure={tick:l,index:i,total:a},o.__workletHash=5267961911334,o.__initData=$n,o.__stackDetails=n,o));return e.jsx(s.View,{style:[r(Vn||(Vn=M(["mx-px rounded-full"]))),{width:2,backgroundColor:A},c]})};function eo(){t.Vibration.vibrate(15)}var to,ro,no,oo,io,ao={code:"function VoiceRecordingGestureTsx1(){const{cancelFired,lockFired,dragX,dragY}=this.__closure;cancelFired.value=0;lockFired.value=0;dragX.value=0;dragY.value=0;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx1","cancelFired","lockFired","dragX","dragY","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAoDiB,SAAAA,yBAAMA,CAAA,QAAAC,WAAA,CAAAC,SAAA,CAAAC,KAAA,CAAAC,KAAA,OAAAC,SAAA,CAEfJ,WAAW,CAACK,KAAK,CAAG,CAAC,CACrBJ,SAAS,CAACI,KAAK,CAAG,CAAC,CACnBH,KAAK,CAACG,KAAK,CAAG,CAAC,CACfF,KAAK,CAACE,KAAK,CAAG,CAAC,CACnB","ignoreList":[]}',version:"3.16.7"},so={code:"function VoiceRecordingGestureTsx2(e){const{dragX,dragY,lockFired,LOCK_THRESHOLD,runOnJS,fireLock,cancelFired,CANCEL_THRESHOLD,fireCancel}=this.__closure;const x=Math.min(0,e.translationX);const y=Math.min(0,e.translationY);dragX.value=x;dragY.value=y;if(lockFired.value===0&&y<=-LOCK_THRESHOLD){lockFired.value=1;runOnJS(fireLock)();}if(cancelFired.value===0&&x<=-CANCEL_THRESHOLD){cancelFired.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx2","e","dragX","dragY","lockFired","LOCK_THRESHOLD","runOnJS","fireLock","cancelFired","CANCEL_THRESHOLD","fireCancel","__closure","x","Math","min","translationX","y","translationY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA2DmB,QAAC,CAAAA,yBAAKA,CAAAC,CAAA,QAAAC,KAAA,CAAAC,KAAA,CAAAC,SAAA,CAAAC,cAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,WAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,CAAC,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAEb,CAAC,CAACc,YAAY,CAAC,CACrC,KAAM,CAAAC,CAAC,CAAGH,IAAI,CAACC,GAAG,CAAC,CAAC,CAAEb,CAAC,CAACgB,YAAY,CAAC,CACrCf,KAAK,CAACgB,KAAK,CAAGN,CAAC,CACfT,KAAK,CAACe,KAAK,CAAGF,CAAC,CACf,GAAIZ,SAAS,CAACc,KAAK,GAAK,CAAC,EAAIF,CAAC,EAAI,CAACX,cAAc,CAAE,CAC/CD,SAAS,CAACc,KAAK,CAAG,CAAC,CACnBZ,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACvB,CACA,GAAIC,WAAW,CAACU,KAAK,GAAK,CAAC,EAAIN,CAAC,EAAI,CAACH,gBAAgB,CAAE,CACnDD,WAAW,CAACU,KAAK,CAAG,CAAC,CACrBZ,OAAO,CAACI,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},lo={code:"function VoiceRecordingGestureTsx3(){const{lockFired,cancelFired,dragX,withSpring,dragY}=this.__closure;if(lockFired.value===0&&cancelFired.value===0){dragX.value=withSpring(0,{damping:18,stiffness:220});dragY.value=withSpring(0,{damping:18,stiffness:220});}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx3","lockFired","cancelFired","dragX","withSpring","dragY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA0EoB,SAAAA,yBAAMA,CAAA,QAAAC,SAAA,CAAAC,WAAA,CAAAC,KAAA,CAAAC,UAAA,CAAAC,KAAA,OAAAC,SAAA,CAElB,GAAIL,SAAS,CAACM,KAAK,GAAK,CAAC,EAAIL,WAAW,CAACK,KAAK,GAAK,CAAC,CAAE,CAClDJ,KAAK,CAACI,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAC5DJ,KAAK,CAACE,KAAK,CAAGH,UAAU,CAAC,CAAC,CAAE,CAAEI,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CAChE,CACJ","ignoreList":[]}',version:"3.16.7"},Ao={code:"function VoiceRecordingGestureTsx4(){const{dragX,CANCEL_THRESHOLD,arrowPulse}=this.__closure;const progress=Math.min(1,Math.abs(dragX.value)/CANCEL_THRESHOLD);return{transform:[{translateX:dragX.value*0.4+arrowPulse.value}],opacity:1-progress};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx4","dragX","CANCEL_THRESHOLD","arrowPulse","__closure","progress","Math","min","abs","value","transform","translateX","opacity"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAiF4C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,gBAAA,CAAAC,UAAA,OAAAC,SAAA,CAC1C,KAAM,CAAAC,QAAQ,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAACP,KAAK,CAACQ,KAAK,CAAC,CAAGP,gBAAgB,CAAC,CACtE,MAAO,CACHQ,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEV,KAAK,CAACQ,KAAK,CAAG,GAAG,CAAGN,UAAU,CAACM,KAAM,CAAC,CAAC,CACjEG,OAAO,CAAE,CAAC,CAAGP,QACjB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},co={code:"function VoiceRecordingGestureTsx5(){const{dragY,LOCK_THRESHOLD,interpolate}=this.__closure;const lockProgress=Math.min(1,Math.max(0,-dragY.value/LOCK_THRESHOLD));return{transform:[{translateY:interpolate(lockProgress,[0,1],[0,-22])}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx5","dragY","LOCK_THRESHOLD","interpolate","__closure","lockProgress","Math","min","max","value","transform","translateY"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAwF2C,SAAAA,yBAAMA,CAAA,QAAAC,KAAA,CAAAC,cAAA,CAAAC,WAAA,OAAAC,SAAA,CACzC,KAAM,CAAAC,YAAY,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAAC,CAAC,CAAE,CAACP,KAAK,CAACQ,KAAK,CAAGP,cAAc,CAAC,CAAC,CAC5E,MAAO,CACHQ,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAER,WAAW,CAACE,YAAY,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,CAAC,CAAE,CAAC,EAAE,CAAC,CAAE,CAAC,CAC3E,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},uo={code:"function VoiceRecordingGestureTsx6(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx6","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AA8F0C,SAAAA,0BAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACzCC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},Co={code:"function VoiceRecordingGestureTsx7(){const{dragX,dragY,micPulse}=this.__closure;return{transform:[{translateX:dragX.value},{translateY:dragY.value},{scale:micPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx",sourceMap:'{"version":3,"names":["VoiceRecordingGestureTsx7","dragX","dragY","micPulse","__closure","transform","translateX","value","translateY","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecordingGesture.tsx"],"mappings":"AAiGsC,SAAAA,0BAAA,QAAAC,KAAA,CAAAC,KAAA,CAAAC,QAAA,OAAAC,SAAA,OAAO,CACrCC,SAAS,CAAE,CACP,CAAEC,UAAU,CAAEL,KAAK,CAACM,KAAM,CAAC,CAC3B,CAAEC,UAAU,CAAEN,KAAK,CAACK,KAAM,CAAC,CAC3B,CAAEE,KAAK,CAAEN,QAAQ,CAACI,KAAM,CAAC,CAEjC,CAAC","ignoreList":[]}',version:"3.16.7"},fo=function(){var o=D(),i=o.messages,a=o.currentUserId,s=o.onMessageLongPress,l=o.mediaViewerGallery,A=o.clearMediaViewerGallery,c=o.typingUsers,u=o.onSendMessage,d=o.onTypingStart,C=o.onTypingEnd,f=o.onAttachmentPress,h=o.onAudioRecordEnd,v=o.onAudioRecordStart,p=o.onCameraPress,m=o.renderCustomInput,y=o.CustomEmojiIcon,g=o.CustomAttachmentIcon,x=o.CustomCameraIcon,b=o.CustomMicrophoneIcon,w=o.CustomSendIcon,S=o.CustomFileIcon,E=o.CustomImagePreview,j=o.CustomVideoPreview,k=o.keyboardVerticalOffset,I=void 0===k?0:k,_=o.disableKeyboardAvoiding,O=void 0!==_&&_,P=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=R(n.useState(0),2),o=r[0],i=r[1];return n.useEffect((function(){if(e){var r="ios"===t.Platform.OS?"keyboardWillShow":"keyboardDidShow",n="ios"===t.Platform.OS?"keyboardWillHide":"keyboardDidHide",o=t.Keyboard.addListener(r,(function(e){i(e.endCoordinates.height)})),a=t.Keyboard.addListener(n,(function(){return i(0)}));return function(){o.remove(),a.remove()}}i(0)}),[e]),e?o:0}(!O),G=m?m():e.jsx(hn,{onSendMessage:u,onTypingStart:d,onTypingEnd:C,onAttachmentPress:f,onAudioRecordEnd:h,onAudioRecordStart:v,onCameraPress:p,CustomEmojiIcon:y,CustomAttachmentIcon:g,CustomCameraIcon:x,CustomMicrophoneIcon:b,CustomSendIcon:w,CustomFileIcon:S,CustomImagePreview:E,CustomVideoPreview:j}),V=e.jsxs(t.View,{style:r(to||(to=M(["flex-1 px-2 pb-4 gap-2 relative"]))),children:[e.jsx(t.FlatList,{style:r(ro||(ro=M(["flex-1"]))),data:i,keyExtractor:function(e){return e.id},renderItem:function(t){var r,n=t.item,o=t.index;return e.jsx(Qt,{message:n,isCurrentUser:n.senderId===a,onLongPress:function(){return null==s?void 0:s(n)},isFirstInSequence:o===i.length-1||(null===(r=i[o+1])||void 0===r?void 0:r.senderId)!==n.senderId})},ListHeaderComponent:e.jsx(Kn,{typingUsers:c||[],currentUserId:a}),showsVerticalScrollIndicator:!1,inverted:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive"}),e.jsx(t.View,{style:!O&&P>0?{marginBottom:P}:void 0,children:G}),e.jsx(Fn,{gallery:l,onClose:A})]});return O?e.jsx(t.View,{style:r(no||(no=M(["flex-1"]))),children:V}):"android"===t.Platform.OS?e.jsx(t.View,{style:r(oo||(oo=M(["flex-1"]))),children:V}):e.jsx(t.KeyboardAvoidingView,{style:r(io||(io=M(["flex-1"]))),behavior:"padding",keyboardVerticalOffset:I,children:V})};exports.VoiceRecorder=function(o){var i=o.primaryColor,a=void 0===i?"#16A34A":i,l=o.backgroundColor,A=void 0===l?"#0B141A":l,c=o.waveformColor,u=void 0===c?"#E9EDEF":c,d=o.timerColor,C=void 0===d?"#FFFFFF":d,f=o.sendButtonColor,h=o.deleteIconColor,v=void 0===h?"#8696A0":h,p=o.pauseIconColor,m=void 0===p?"#F15C6D":p,y=o.borderRadius,g=void 0===y?16:y,x=o.sendButtonSize,b=void 0===x?50:x,w=o.waveCount,S=void 0===w?32:w,E=o.renderDeleteIcon,j=o.renderSendIcon,k=o.renderPauseIcon,I=o.renderPlayIcon,_=o.renderWaveform,O=o.onSend,P=o.onDelete,G=o.onPause,V=o.onResume,T=R(n.useState(0),2),D=T[0],F=T[1],K=R(n.useState(!1),2),L=K[0],B=K[1],H=n.useRef(Date.now()),U=n.useRef(0),N=n.useRef(0);n.useEffect((function(){H.current=Date.now()}),[]),n.useEffect((function(){if(!L){var e=setInterval((function(){F((Date.now()-H.current-U.current)/1e3)}),250);return function(){return clearInterval(e)}}}),[L]);var Y=s.useSharedValue(1),W=s.useSharedValue(1);n.useEffect((function(){Y.value=s.withRepeat(s.withSequence(s.withTiming(.5,{duration:600,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(1,{duration:600,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1),W.value=s.withRepeat(s.withSequence(s.withTiming(.3,{duration:600}),s.withTiming(1,{duration:600})),-1,!1)}),[]);var z,Q,q=s.useAnimatedStyle((z=[new global.Error,-3,-27],(Q=function(){return{opacity:L?1:Y.value}}).__closure={isPaused:L,pauseOpacity:Y},Q.__workletHash=0xf63a8f6d95,Q.__initData=qn,Q.__stackDetails=z,Q)),J=s.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:W.value}};return t.__closure={recBlink:W},t.__workletHash=6095431465582,t.__initData=Jn,t.__stackDetails=e,t}()),X={backgroundColor:A,borderTopLeftRadius:g,borderTopRightRadius:g},$=null!=f?f:a;return e.jsxs(t.View,{style:[r(En||(En=M(["w-full px-4 py-2.5"]))),X],children:[e.jsxs(t.View,{style:r(jn||(jn=M(["flex-row items-center gap-3 px-1 pt-1.5 pb-2"]))),children:[e.jsx(s.View,{style:[r(kn||(kn=M(["w-1.5 h-1.5 rounded-full"]))),{backgroundColor:m},J]}),e.jsx(t.Text,{style:[r(In||(In=M(["text-base font-semibold"]))),{color:C,minWidth:42}],numberOfLines:1,children:Qe(D)}),e.jsx(t.View,{style:r(Rn||(Rn=M(["flex-1"]))),children:_?_():e.jsx(Xn,{color:u,count:S})})]}),e.jsxs(t.View,{style:r(Mn||(Mn=M(["flex-row items-center justify-between mt-1"]))),children:[e.jsx(t.Pressable,{onPress:P,hitSlop:12,style:[r(_n||(_n=M(["items-center justify-center rounded-full"]))),{width:b,height:b}],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:E?E():e.jsx(Sr,{style:r.style("w-6 h-6"),color:v})}),e.jsx(t.Pressable,{onPress:function(){B((function(e){var t=!e;return t?(N.current=Date.now(),null==G||G()):(U.current+=Date.now()-N.current,N.current=0,null==V||V()),t}))},hitSlop:12,style:r(On||(On=M(["items-center justify-center px-4"]))),accessibilityRole:"button",accessibilityLabel:L?"Resume recording":"Pause recording",children:L?I?I():e.jsx(Ye,{style:r.style("w-7 h-7"),color:m}):e.jsx(s.View,{style:q,children:k?k():e.jsx(Ne,{style:r.style("w-7 h-7"),color:m})})}),e.jsx(t.Pressable,{onPress:O,hitSlop:6,accessibilityRole:"button",accessibilityLabel:"Send recording",style:[r(Pn||(Pn=M(["items-center justify-center rounded-full"]))),{width:b,height:b,backgroundColor:$}],children:j?j():e.jsx(Zt,{style:r.style("w-6 h-6"),color:"#FFFFFF"})})]})]})},exports.VoiceRecorderFlow=Fr,exports.VoiceRecordingGesture=function(o){var i=o.primaryColor,l=void 0===i?"#16A34A":i,A=o.backgroundColor,c=void 0===A?"#1F2C33":A,u=o.timerColor,d=void 0===u?"#FFFFFF":u,C=o.microphoneColor,f=void 0===C?"#FFFFFF":C,h=o.lockColor,v=void 0===h?"#E9EDEF":h,p=o.lockPillBackground,m=void 0===p?"#1F2C33":p,y=o.cancelTextColor,g=void 0===y?"rgba(255,255,255,0.6)":y,x=o.barHeight,b=void 0===x?48:x,w=o.micSize,S=o.renderMicIcon,E=o.renderLockIcon,j=o.renderArrowIcon,k=o.onCancel,I=o.onLock,_=null!=w?w:b,O=R(n.useState(0),2),P=O[0],G=O[1],V=n.useRef(Date.now());n.useEffect((function(){V.current=Date.now();var e=setInterval((function(){G((Date.now()-V.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var T=s.useSharedValue(0),D=s.useSharedValue(0),F=s.useSharedValue(0),K=s.useSharedValue(1),L=s.useSharedValue(0),B=s.useSharedValue(0),H=s.useSharedValue(0);n.useEffect((function(){F.value=s.withRepeat(s.withSequence(s.withTiming(-4,{duration:700,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(0,{duration:700,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1),K.value=s.withRepeat(s.withSequence(s.withTiming(1.18,{duration:700,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(1.12,{duration:700,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1),L.value=s.withRepeat(s.withSequence(s.withTiming(-4,{duration:600,easing:s.Easing.inOut(s.Easing.ease)}),s.withTiming(0,{duration:600,easing:s.Easing.inOut(s.Easing.ease)})),-1,!1)}),[]);var U=n.useRef(k);U.current=k;var N=n.useRef(I);N.current=I;var Y,W,z=function(){var e;eo(),null===(e=U.current)||void 0===e||e.call(U)},Q=function(){var e;eo(),null===(e=N.current)||void 0===e||e.call(N)},q=a.Gesture.Pan().minDistance(0).onBegin((Y=[new global.Error,-5,-27],W=function(){B.value=0,H.value=0,T.value=0,D.value=0},W.__closure={cancelFired:B,lockFired:H,dragX:T,dragY:D},W.__workletHash=9031413480896,W.__initData=ao,W.__stackDetails=Y,W)).onUpdate(function(){var e=[new global.Error,-10,-27],t=function(e){var t=Math.min(0,e.translationX),r=Math.min(0,e.translationY);T.value=t,D.value=r,0===H.value&&r<=-70&&(H.value=1,s.runOnJS(Q)()),0===B.value&&t<=-90&&(B.value=1,s.runOnJS(z)())};return t.__closure={dragX:T,dragY:D,lockFired:H,LOCK_THRESHOLD:70,runOnJS:s.runOnJS,fireLock:Q,cancelFired:B,CANCEL_THRESHOLD:90,fireCancel:z},t.__workletHash=0xac60b03bef6,t.__initData=so,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===H.value&&0===B.value&&(T.value=s.withSpring(0,{damping:18,stiffness:220}),D.value=s.withSpring(0,{damping:18,stiffness:220}))};return t.__closure={lockFired:H,cancelFired:B,dragX:T,withSpring:s.withSpring,dragY:D},t.__workletHash=0x962b8aa90f5,t.__initData=lo,t.__stackDetails=e,t}()),J=s.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.abs(T.value)/90);return{transform:[{translateX:.4*T.value+F.value}],opacity:1-e}};return t.__closure={dragX:T,CANCEL_THRESHOLD:90,arrowPulse:F},t.__workletHash=2609121094002,t.__initData=Ao,t.__stackDetails=e,t}()),X=s.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.max(0,-D.value/70));return{transform:[{translateY:s.interpolate(e,[0,1],[0,-22])}]}};return t.__closure={dragY:D,LOCK_THRESHOLD:70,interpolate:s.interpolate},t.__workletHash=2770335161610,t.__initData=co,t.__stackDetails=e,t}()),$=s.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:L.value}]}};return t.__closure={chevronPulse:L},t.__workletHash=0xe2617d14eaa,t.__initData=uo,t.__stackDetails=e,t}()),Z=s.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){return{transform:[{translateX:T.value},{translateY:D.value},{scale:K.value}]}};return t.__closure={dragX:T,dragY:D,micPulse:K},t.__workletHash=0xa3ed9ad56cd,t.__initData=Co,t.__stackDetails=e,t}());return e.jsxs(t.View,{style:r(Ln||(Ln=M(["w-full flex-row items-end gap-2 relative"]))),pointerEvents:"box-none",children:[e.jsxs(t.View,{style:[r(Bn||(Bn=M(["flex-1 flex-row items-center px-4 rounded-3xl"]))),{minHeight:b,backgroundColor:c}],children:[e.jsx(t.Text,{style:[r(Hn||(Hn=M(["text-base font-semibold"]))),{color:d,minWidth:42}],numberOfLines:1,children:Qe(P)}),e.jsxs(s.View,{style:[r(Un||(Un=M(["flex-1 flex-row items-center justify-center gap-1.5"]))),J],children:[j?j():e.jsx(t.Text,{style:[r(Nn||(Nn=M(["text-base leading-none"]))),{color:g,marginTop:-2}],children:"‹"}),e.jsx(t.Text,{style:[r(Yn||(Yn=M(["text-sm"]))),{color:g}],children:"Slide to cancel"})]})]}),e.jsxs(t.View,{style:[r(Wn||(Wn=M(["relative items-center justify-center"]))),{height:b,width:b}],children:[e.jsxs(s.View,{style:[r(zn||(zn=M(["absolute items-center justify-center rounded-2xl py-2.5"]))),{width:_-8,backgroundColor:m,bottom:_+6,gap:6},X],pointerEvents:"none",children:[E?E():e.jsx(wr,{style:{width:18,height:18},color:v}),e.jsx(s.View,{style:$,children:e.jsx(br,{style:{width:14,height:14},color:v})})]}),e.jsx(a.GestureDetector,{gesture:q,children:e.jsx(s.View,{style:[r(Qn||(Qn=M(["items-center justify-center rounded-full"]))),{width:_,height:_,backgroundColor:l},Z],accessibilityRole:"button",accessibilityLabel:"Hold to record. Slide left to cancel, slide up to lock.",children:S?S():e.jsx(Xt,{style:{width:26,height:26},color:f})})})]})]})},exports.default=function(t){return e.jsx(ze,{children:e.jsx(T,y(y({},t),{},{children:e.jsx(fo,{})}))})};
17
17
  //# sourceMappingURL=index.js.map