movius-chats 1.5.3 β†’ 1.5.5

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.
Files changed (38) hide show
  1. package/lib/commonjs/index.js +3 -3
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/module/index.js +4 -4
  4. package/lib/module/index.js.map +1 -1
  5. package/lib/typescript/assets/Icons/ClosePreviewIcon.d.ts +5 -0
  6. package/lib/typescript/assets/Icons/SelectIcon.d.ts +5 -0
  7. package/lib/typescript/components/AudioPlayer/types.d.ts +2 -0
  8. package/lib/typescript/components/ChatBubble/MediaGrid.d.ts +2 -0
  9. package/lib/typescript/components/ChatBubble/types.d.ts +7 -0
  10. package/lib/typescript/components/Reply/InlineReply.d.ts +1 -2
  11. package/lib/typescript/components/Reply/ReplyPreview.d.ts +0 -5
  12. package/lib/typescript/components/VoiceRecorder/VoiceRecorderFlow/InlineRow.d.ts +2 -0
  13. package/lib/typescript/components/VoiceRecorder/VoiceRecorderFlow/RecordingBar.d.ts +2 -0
  14. package/lib/typescript/components/VoiceRecorder/VoiceRecorderFlow/types.d.ts +1 -27
  15. package/lib/typescript/types/index.d.ts +0 -94
  16. package/package.json +1 -1
  17. package/src/assets/Icons/ClosePreviewIcon.tsx +33 -0
  18. package/src/assets/Icons/CopyIcon.tsx +8 -5
  19. package/src/assets/Icons/EditIcon.tsx +6 -5
  20. package/src/assets/Icons/ForwardIcon.tsx +11 -5
  21. package/src/assets/Icons/ReplyIcon.tsx +11 -5
  22. package/src/assets/Icons/SelectIcon.tsx +19 -0
  23. package/src/components/AudioPlayer/AudioPlayer.tsx +8 -1
  24. package/src/components/AudioPlayer/types.ts +2 -0
  25. package/src/components/ChatBubble/ChatBubble.tsx +50 -33
  26. package/src/components/ChatBubble/MediaGrid.tsx +15 -0
  27. package/src/components/ChatBubble/MessageContent.tsx +24 -11
  28. package/src/components/ChatBubble/types.ts +7 -0
  29. package/src/components/ChatInput/ChatInput.tsx +93 -80
  30. package/src/components/MessageActions/LongPressOverlay.tsx +20 -14
  31. package/src/components/MessageActions/MessageActionsPopover.tsx +3 -54
  32. package/src/components/Reply/InlineReply.tsx +7 -21
  33. package/src/components/Reply/ReplyPreview.tsx +2 -26
  34. package/src/components/VoiceRecorder/VoiceRecorderFlow/InlineRow.tsx +48 -40
  35. package/src/components/VoiceRecorder/VoiceRecorderFlow/RecordingBar.tsx +7 -0
  36. package/src/components/VoiceRecorder/VoiceRecorderFlow/index.tsx +3 -0
  37. package/src/components/VoiceRecorder/VoiceRecorderFlow/types.ts +2 -27
  38. package/src/types/index.ts +0 -94
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),r=require("react-native"),n=require("twrnc"),o=require("react-native-svg"),i=require("react-native-gesture-handler"),l=require("react-native-reanimated"),a=require("react-native-video");function s(e,t){this.v=e,this.k=t}function c(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 A(e,t,r,n,o,i,l){try{var a=e[i](l),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 l(e){A(i,n,o,l,a,"next",e)}function a(e){A(i,n,o,l,a,"throw",e)}l(void 0)}))}}function d(e,t,r){return t=f(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,m()?Reflect.construct(t,r||[],f(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,R(n.key),n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(e,t,r){return(t=R(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function p(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?p(Object(r),!0).forEach((function(t){v(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(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(){
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,c=Object.create(s.prototype);return k(c,"_invoke",function(r,n,o){var i,a,s,c=0,A=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,l}};function C(r,n){for(a=r,s=n,t=0;!u&&c&&!o&&t<A.length;t++){var o,i=A[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 l;throw u=!0,n}return function(o,A,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===A&&C(A,h),a=A,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(c=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))!==l)break}catch(t){i=e,a=1,s=t}finally{c=1}}return{value:t,done:u}}}(r,o,i),!0),c}var l={};function a(){}function s(){}function c(){}t=Object.getPrototypeOf;var A=[][n]?t(t([][n]())):(k(t={},n,(function(){return this})),t),u=c.prototype=a.prototype=Object.create(A);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,k(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,k(u,"constructor",c),k(c,"constructor",s),s.displayName="GeneratorFunction",k(c,o,"GeneratorFunction"),k(u),k(u,o,"Generator"),k(u,n,(function(){return this})),k(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,l){try{var a=e[n](o),c=a.value;return c instanceof s?t.resolve(c.v).then((function(e){r("next",e,i,l)}),(function(e){r("throw",e,i,l)})):t.resolve(c).then((function(e){a.value=e,i(a)}),(function(e){return r("throw",e,i,l)}))}catch(e){l(e)}}var n;this.next||(k(S.prototype),k(S.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),k(this,"_invoke",(function(e,o,i){function l(){return new t((function(t,n){r(e,i,t,n)}))}return n=n?n.then(l,l):l()}),!0)}function k(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}k=function(e,t,r,n){function i(t,r){k(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))},k(e,t,r,n)}function E(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 j(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 M(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,l,a=[],s=!0,c=!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){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}(e,t)||T(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 P(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function _(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(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 T(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}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,j(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 s(e,t)},AsyncIterator:S,async:function(e,t,r,o,l){return(n(t)?w:b)(i(e),t,r,o,l)},keys:E,values:j}})()}var G=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"})})},F=["children"],V=t.createContext(void 0),D=function(r){var n=r.children,o=y(r,F),i=M(t.useState(null),2),l=i[0],a=i[1],s=M(t.useState(!1),2),c=s[0],A=s[1],u=M(t.useState(null),2),d=u[0],C=u[1],h=M(t.useState(null),2),v=h[0],f=h[1],m=M(t.useState(null),2),p=m[0],x=m[1],b=M(t.useState(!1),2),w=b[0],S=b[1],k=M(t.useState([]),2),E=k[0],j=k[1],I=M(t.useState(null),2),P=I[0],R=I[1],T=M(t.useState(!1),2),O=T[0],G=T[1],D=t.useCallback((function(e,t){a({items:e,initialIndex:t});var r=e[t];A("video"===(null==r?void 0:r.kind))}),[]),K=t.useCallback((function(){a(null),A(!1)}),[]),B=o.onSelectionChange,L=t.useCallback((function(e){null==B||B(e)}),[B]),U=t.useCallback((function(e){var t;C(e),R(null),null===(t=o.onReplyMessage)||void 0===t||t.call(o,e)}),[o]),H=t.useCallback((function(){C(null)}),[]),z=t.useCallback((function(e,t){x(null!=t?t:null),f(e)}),[]),W=t.useCallback((function(){f(null),x(null)}),[]),N=t.useCallback((function(e){S(!0);var t=e?[e.id]:[];j(t),L(t)}),[L]),Q=t.useCallback((function(){S(!1),j([]),L([])}),[L]),Y=t.useCallback((function(e){j((function(t){var r=t.includes(e.id)?t.filter((function(t){return t!==e.id})):[].concat(_(t),[e.id]);return L(r),0===r.length&&S(!1),r}))}),[L]),q=t.useCallback((function(e){return E.includes(e)}),[E]),J=t.useCallback((function(e){R(e),C(null)}),[]),X=t.useCallback((function(){R(null)}),[]),$=t.useCallback((function(){return G(!0)}),[]),Z=t.useCallback((function(){return G(!1)}),[]);return e.jsx(V.Provider,{value:g(g({},o),{},{mediaViewerGallery:l,setMediaViewerGallery:D,clearMediaViewerGallery:K,isVideoPlaying:c,setIsVideoPlaying:A,replyTarget:d,startReply:U,cancelReply:H,actionSheetMessage:v,actionAnchor:p,openActionSheet:z,closeActionSheet:W,selectionMode:w,selectedIds:E,enterSelectionMode:N,exitSelectionMode:Q,toggleSelection:Y,isSelected:q,editingMessage:P,startEdit:J,cancelEdit:X,cameraVisible:O,openCamera:$,closeCamera:Z}),children:n})},K=function(){var e=t.useContext(V);if(!e)throw new Error("useChatContext must be used within a ChatProvider");return e};function B(e){return null==e?void 0:e.colors}function L(e,t){var r,n,o,i,l=B(e),a=t?null!==(r=null==l?void 0:l.sentMediaTimestampBackground)&&void 0!==r?r:"rgba(0,0,0,0.45)":null!==(n=null==l?void 0:l.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 U(e,t){var r,n,o=B(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 H(e,t){var r,n,o=B(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 z(e,t){var r,n,o=B(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 W(e,t){var r,n,o=B(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=B(e);return t?null==r?void 0:r.sentMessageTextColor:null==r?void 0:r.receivedMessageTextColor}function Q(e,t){var r=B(e);return t?null==r?void 0:r.sentBubbleBackgroundColor:null==r?void 0:r.receivedBubbleBackgroundColor}function Y(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 q="ios"===r.Platform.OS?"h-6 w-6":"w-6 h-6";function J(e,t){return t?[e,{fontFamily:t}]:e}var X,$,Z,ee=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:i,d:"M10 9V5l-7 7l7 7v-4.1c5 0 8.5 1.6 11 5.1c-1-5-4-10-11-11"})})},te={code:"function SwipeableMessageTsx1(e){const{isCurrentUser,swipeThreshold,translateX,direction,triggered,runOnJS,triggerReply}=this.__closure;const t=e.translationX;if(isCurrentUser&&t<0||!isCurrentUser&&t>0){const abs=Math.abs(t);const resisted=abs<=swipeThreshold?abs:swipeThreshold+(abs-swipeThreshold)*0.35;translateX.value=direction*resisted;if(abs>=swipeThreshold&&triggered.value===0){triggered.value=1;runOnJS(triggerReply)();}}else{translateX.value=0;}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx1","e","isCurrentUser","swipeThreshold","translateX","direction","triggered","runOnJS","triggerReply","__closure","t","translationX","abs","Math","resisted","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAmBmB,QAAC,CAAAA,oBAAKA,CAAAC,CAAA,QAAAC,aAAA,CAAAC,cAAA,CAAAC,UAAA,CAAAC,SAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,YAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,CAAC,CAAGT,CAAC,CAACU,YAAY,CAExB,GAAKT,aAAa,EAAIQ,CAAC,CAAG,CAAC,EAAM,CAACR,aAAa,EAAIQ,CAAC,CAAG,CAAE,CAAE,CAEvD,KAAM,CAAAE,GAAG,CAAGC,IAAI,CAACD,GAAG,CAACF,CAAC,CAAC,CACvB,KAAM,CAAAI,QAAQ,CAAGF,GAAG,EAAIT,cAAc,CAChCS,GAAG,CACHT,cAAc,CAAG,CAACS,GAAG,CAAGT,cAAc,EAAI,IAAI,CACpDC,UAAU,CAACW,KAAK,CAAGV,SAAS,CAAGS,QAAQ,CACvC,GAAIF,GAAG,EAAIT,cAAc,EAAIG,SAAS,CAACS,KAAK,GAAK,CAAC,CAAE,CAChDT,SAAS,CAACS,KAAK,CAAG,CAAC,CACnBR,OAAO,CAACC,YAAY,CAAC,CAAC,CAAC,CAC3B,CACJ,CAAC,IACI,CACDJ,UAAU,CAACW,KAAK,CAAG,CAAC,CACxB,CACJ","ignoreList":[]}',version:"3.16.7"},re={code:"function SwipeableMessageTsx2(){const{translateX,withSpring,triggered,withTiming}=this.__closure;translateX.value=withSpring(0,{damping:20,stiffness:220});triggered.value=withTiming(0,{duration:200});}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx2","translateX","withSpring","triggered","withTiming","__closure","value","damping","stiffness","duration"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAuCe,SAAAA,oBAAMA,CAAA,QAAAC,UAAA,CAAAC,UAAA,CAAAC,SAAA,CAAAC,UAAA,OAAAC,SAAA,CAEbJ,UAAU,CAACK,KAAK,CAAGJ,UAAU,CAAC,CAAC,CAAE,CAAEK,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEL,SAAS,CAACG,KAAK,CAAGF,UAAU,CAAC,CAAC,CAAE,CAAEK,QAAQ,CAAE,GAAI,CAAC,CAAC,CACtD","ignoreList":[]}',version:"3.16.7"},ne={code:"function SwipeableMessageTsx3(){const{translateX,withSpring,triggered,withTiming}=this.__closure;translateX.value=withSpring(0,{damping:20,stiffness:220});triggered.value=withTiming(0,{duration:200});}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx3","translateX","withSpring","triggered","withTiming","__closure","value","damping","stiffness","duration"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AA4CoB,SAAAA,oBAAMA,CAAA,QAAAC,UAAA,CAAAC,UAAA,CAAAC,SAAA,CAAAC,UAAA,OAAAC,SAAA,CAElBJ,UAAU,CAACK,KAAK,CAAGJ,UAAU,CAAC,CAAC,CAAE,CAAEK,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEL,SAAS,CAACG,KAAK,CAAGF,UAAU,CAAC,CAAC,CAAE,CAAEK,QAAQ,CAAE,GAAI,CAAC,CAAC,CACtD","ignoreList":[]}',version:"3.16.7"},oe={code:"function SwipeableMessageTsx4(){const{translateX}=this.__closure;return{transform:[{translateX:translateX.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx4","translateX","__closure","transform","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAiDyC,SAAAA,qBAAA,QAAAC,UAAA,OAAAC,SAAA,OAAO,CACxCC,SAAS,CAAE,CAAC,CAAEF,UAAU,CAAEA,UAAU,CAACG,KAAM,CAAC,CAChD,CAAC","ignoreList":[]}',version:"3.16.7"},ie={code:"function SwipeableMessageTsx5(){const{translateX,interpolate,swipeThreshold,Extrapolation}=this.__closure;const abs=Math.abs(translateX.value);const opacity=interpolate(abs,[0,swipeThreshold*0.4,swipeThreshold],[0,0.6,1],Extrapolation.CLAMP);const scale=interpolate(abs,[0,swipeThreshold],[0.6,1],Extrapolation.CLAMP);return{opacity:opacity,transform:[{scale:scale}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx5","translateX","interpolate","swipeThreshold","Extrapolation","__closure","abs","Math","value","opacity","CLAMP","scale","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAoDuC,SAAAA,oBAAMA,CAAA,QAAAC,UAAA,CAAAC,WAAA,CAAAC,cAAA,CAAAC,aAAA,OAAAC,SAAA,CACrC,KAAM,CAAAC,GAAG,CAAGC,IAAI,CAACD,GAAG,CAACL,UAAU,CAACO,KAAK,CAAC,CACtC,KAAM,CAAAC,OAAO,CAAGP,WAAW,CAACI,GAAG,CAAE,CAAC,CAAC,CAAEH,cAAc,CAAG,GAAG,CAAEA,cAAc,CAAC,CAAE,CAAC,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACM,KAAK,CAAC,CAC7G,KAAM,CAAAC,KAAK,CAAGT,WAAW,CAACI,GAAG,CAAE,CAAC,CAAC,CAAEH,cAAc,CAAC,CAAE,CAAC,GAAG,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACM,KAAK,CAAC,CAClF,MAAO,CACHD,OAAO,CAAPA,OAAO,CACPG,SAAS,CAAE,CAAC,CAAED,KAAA,CAAAA,KAAM,CAAC,CACzB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},le=function(t){var o,a,s=t.isCurrentUser,c=t.enabled,A=t.swipeThreshold,u=t.onReply,d=t.iconColor,C=void 0===d?"rgba(255,255,255,0.95)":d,h=t.iconBackground,v=void 0===h?"rgba(0,0,0,0.35)":h,f=t.children,m=l.useSharedValue(0),p=l.useSharedValue(0),g=s?-1:1,y=function(){u()},x=i.Gesture.Pan().enabled(c).activeOffsetX(s?[-12,9999]:[-9999,12]).failOffsetY([-12,12]).onUpdate((o=[new global.Error,-8,-27],a=function(e){var t=e.translationX;if(s&&t<0||!s&&t>0){var r=Math.abs(t),n=r<=A?r:A+.35*(r-A);m.value=g*n,r>=A&&0===p.value&&(p.value=1,l.runOnJS(y)())}else m.value=0},a.__closure={isCurrentUser:s,swipeThreshold:A,translateX:m,direction:g,triggered:p,runOnJS:l.runOnJS,triggerReply:y},a.__workletHash=0x92540fbdb51,a.__initData=te,a.__stackDetails=o,a)).onEnd(function(){var e=[new global.Error,-5,-27],t=function(){m.value=l.withSpring(0,{damping:20,stiffness:220}),p.value=l.withTiming(0,{duration:200})};return t.__closure={translateX:m,withSpring:l.withSpring,triggered:p,withTiming:l.withTiming},t.__workletHash=5306063376371,t.__initData=re,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-5,-27],t=function(){m.value=l.withSpring(0,{damping:20,stiffness:220}),p.value=l.withTiming(0,{duration:200})};return t.__closure={translateX:m,withSpring:l.withSpring,triggered:p,withTiming:l.withTiming},t.__workletHash=9186301204082,t.__initData=ne,t.__stackDetails=e,t}()),b=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateX:m.value}]}};return t.__closure={translateX:m},t.__workletHash=1792634838444,t.__initData=oe,t.__stackDetails=e,t}()),w=l.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=Math.abs(m.value);return{opacity:l.interpolate(e,[0,.4*A,A],[0,.6,1],l.Extrapolation.CLAMP),transform:[{scale:l.interpolate(e,[0,A],[.6,1],l.Extrapolation.CLAMP)}]}};return t.__closure={translateX:m,interpolate:l.interpolate,swipeThreshold:A,Extrapolation:l.Extrapolation},t.__workletHash=6245144246615,t.__initData=ie,t.__stackDetails=e,t}());return c?e.jsxs(r.View,{style:n(X||(X=P(["relative"]))),children:[e.jsx(l.View,{pointerEvents:"none",style:[n($||($=P(["absolute top-0 bottom-0 items-center justify-center"]))),s?{right:8}:{left:8},w],children:e.jsx(r.View,{style:[n(Z||(Z=P(["rounded-full items-center justify-center"]))),{width:36,height:36,backgroundColor:v}],children:e.jsx(ee,{style:{width:19.8,height:19.8},color:C})})}),e.jsx(i.GestureDetector,{gesture:x,children:e.jsx(l.View,{style:b,children:f})})]}):e.jsx(e.Fragment,{children:f})};function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var se,ce={exports:{}},Ae={exports:{}},ue={};var de,Ce,he,ve,fe,me,pe,ge,ye,xe,be,we,Se,ke,Ee,je={};
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,c=Object.create(s.prototype);return k(c,"_invoke",function(r,n,o){var i,a,s,c=0,A=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,l}};function C(r,n){for(a=r,s=n,t=0;!u&&c&&!o&&t<A.length;t++){var o,i=A[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 l;throw u=!0,n}return function(o,A,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===A&&C(A,h),a=A,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(c=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))!==l)break}catch(t){i=e,a=1,s=t}finally{c=1}}return{value:t,done:u}}}(r,o,i),!0),c}var l={};function a(){}function s(){}function c(){}t=Object.getPrototypeOf;var A=[][n]?t(t([][n]())):(k(t={},n,(function(){return this})),t),u=c.prototype=a.prototype=Object.create(A);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,k(e,o,"GeneratorFunction")),e.prototype=Object.create(u),e}return s.prototype=c,k(u,"constructor",c),k(c,"constructor",s),s.displayName="GeneratorFunction",k(c,o,"GeneratorFunction"),k(u),k(u,o,"Generator"),k(u,n,(function(){return this})),k(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,l){try{var a=e[n](o),c=a.value;return c instanceof s?t.resolve(c.v).then((function(e){r("next",e,i,l)}),(function(e){r("throw",e,i,l)})):t.resolve(c).then((function(e){a.value=e,i(a)}),(function(e){return r("throw",e,i,l)}))}catch(e){l(e)}}var n;this.next||(k(S.prototype),k(S.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",(function(){return this}))),k(this,"_invoke",(function(e,o,i){function l(){return new t((function(t,n){r(e,i,t,n)}))}return n=n?n.then(l,l):l()}),!0)}function k(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}k=function(e,t,r,n){function i(t,r){k(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))},k(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 E(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 P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function I(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,l,a=[],s=!0,c=!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){c=!0,o=e}finally{try{if(!s&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw o}}return a}}(e,t)||T(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){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(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 T(e,t){if(e){if("string"==typeof e)return c(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)?c(e,t):void 0}}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,E(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 s(e,t)},AsyncIterator:S,async:function(e,t,r,o,l){return(n(t)?w:b)(i(e),t,r,o,l)},keys:j,values:E}})()}var G=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"})})},F=["children"],V=t.createContext(void 0),D=function(r){var n=r.children,o=y(r,F),i=I(t.useState(null),2),l=i[0],a=i[1],s=I(t.useState(!1),2),c=s[0],A=s[1],u=I(t.useState(null),2),d=u[0],C=u[1],h=I(t.useState(null),2),v=h[0],f=h[1],m=I(t.useState(null),2),p=m[0],x=m[1],b=I(t.useState(!1),2),w=b[0],S=b[1],k=I(t.useState([]),2),j=k[0],E=k[1],P=I(t.useState(null),2),M=P[0],R=P[1],T=I(t.useState(!1),2),O=T[0],G=T[1],D=t.useCallback((function(e,t){a({items:e,initialIndex:t});var r=e[t];A("video"===(null==r?void 0:r.kind))}),[]),K=t.useCallback((function(){a(null),A(!1)}),[]),L=o.onSelectionChange,B=t.useCallback((function(e){null==L||L(e)}),[L]),U=t.useCallback((function(e){var t;C(e),R(null),null===(t=o.onReplyMessage)||void 0===t||t.call(o,e)}),[o]),H=t.useCallback((function(){C(null)}),[]),z=t.useCallback((function(e,t){x(null!=t?t:null),f(e)}),[]),W=t.useCallback((function(){f(null),x(null)}),[]),N=t.useCallback((function(e){S(!0);var t=e?[e.id]:[];E(t),B(t)}),[B]),Q=t.useCallback((function(){S(!1),E([]),B([])}),[B]),Y=t.useCallback((function(e){E((function(t){var r=t.includes(e.id)?t.filter((function(t){return t!==e.id})):[].concat(_(t),[e.id]);return B(r),0===r.length&&S(!1),r}))}),[B]),q=t.useCallback((function(e){return j.includes(e)}),[j]),J=t.useCallback((function(e){R(e),C(null)}),[]),X=t.useCallback((function(){R(null)}),[]),$=t.useCallback((function(){return G(!0)}),[]),Z=t.useCallback((function(){return G(!1)}),[]);return e.jsx(V.Provider,{value:g(g({},o),{},{mediaViewerGallery:l,setMediaViewerGallery:D,clearMediaViewerGallery:K,isVideoPlaying:c,setIsVideoPlaying:A,replyTarget:d,startReply:U,cancelReply:H,actionSheetMessage:v,actionAnchor:p,openActionSheet:z,closeActionSheet:W,selectionMode:w,selectedIds:j,enterSelectionMode:N,exitSelectionMode:Q,toggleSelection:Y,isSelected:q,editingMessage:M,startEdit:J,cancelEdit:X,cameraVisible:O,openCamera:$,closeCamera:Z}),children:n})},K=function(){var e=t.useContext(V);if(!e)throw new Error("useChatContext must be used within a ChatProvider");return e};function L(e){return null==e?void 0:e.colors}function B(e,t){var r,n,o,i,l=L(e),a=t?null!==(r=null==l?void 0:l.sentMediaTimestampBackground)&&void 0!==r?r:"rgba(0,0,0,0.45)":null!==(n=null==l?void 0:l.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 U(e,t){var r,n,o=L(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 H(e,t){var r,n,o=L(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 z(e,t){var r,n,o=L(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 W(e,t){var r,n,o=L(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=L(e);return t?null==r?void 0:r.sentMessageTextColor:null==r?void 0:r.receivedMessageTextColor}function Q(e,t){var r=L(e);return t?null==r?void 0:r.sentBubbleBackgroundColor:null==r?void 0:r.receivedBubbleBackgroundColor}function Y(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 q="ios"===r.Platform.OS?"h-6 w-6":"w-6 h-6";function J(e,t){return t?[e,{fontFamily:t}]:e}var X,$,Z,ee=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeLinecap:"round",strokeWidth:"1.5",children:[e.jsx(o.Path,{strokeLinejoin:"round",d:"m11.336 5.479l-3.973 3.53C5.795 10.405 5.011 11.102 5.011 12s.784 1.596 2.352 2.99l3.973 3.53c.716.637 1.074.956 1.369.823s.295-.611.295-1.57v-2.344c3.6 0 7.5 1.714 9 4.571c0-9.142-5.333-11.428-9-11.428V6.226c0-.958 0-1.437-.295-1.57c-.295-.132-.653.186-1.37.823"}),e.jsx(o.Path,{d:"M8.461 4.5L3.245 9.344a3.897 3.897 0 0 0 .126 5.823L8.46 19.5",opacity:".5"})]})})},te={code:"function SwipeableMessageTsx1(e){const{isCurrentUser,swipeThreshold,translateX,direction,triggered,runOnJS,triggerReply}=this.__closure;const t=e.translationX;if(isCurrentUser&&t<0||!isCurrentUser&&t>0){const abs=Math.abs(t);const resisted=abs<=swipeThreshold?abs:swipeThreshold+(abs-swipeThreshold)*0.35;translateX.value=direction*resisted;if(abs>=swipeThreshold&&triggered.value===0){triggered.value=1;runOnJS(triggerReply)();}}else{translateX.value=0;}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx1","e","isCurrentUser","swipeThreshold","translateX","direction","triggered","runOnJS","triggerReply","__closure","t","translationX","abs","Math","resisted","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAmBmB,QAAC,CAAAA,oBAAKA,CAAAC,CAAA,QAAAC,aAAA,CAAAC,cAAA,CAAAC,UAAA,CAAAC,SAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,YAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,CAAC,CAAGT,CAAC,CAACU,YAAY,CAExB,GAAKT,aAAa,EAAIQ,CAAC,CAAG,CAAC,EAAM,CAACR,aAAa,EAAIQ,CAAC,CAAG,CAAE,CAAE,CAEvD,KAAM,CAAAE,GAAG,CAAGC,IAAI,CAACD,GAAG,CAACF,CAAC,CAAC,CACvB,KAAM,CAAAI,QAAQ,CAAGF,GAAG,EAAIT,cAAc,CAChCS,GAAG,CACHT,cAAc,CAAG,CAACS,GAAG,CAAGT,cAAc,EAAI,IAAI,CACpDC,UAAU,CAACW,KAAK,CAAGV,SAAS,CAAGS,QAAQ,CACvC,GAAIF,GAAG,EAAIT,cAAc,EAAIG,SAAS,CAACS,KAAK,GAAK,CAAC,CAAE,CAChDT,SAAS,CAACS,KAAK,CAAG,CAAC,CACnBR,OAAO,CAACC,YAAY,CAAC,CAAC,CAAC,CAC3B,CACJ,CAAC,IACI,CACDJ,UAAU,CAACW,KAAK,CAAG,CAAC,CACxB,CACJ","ignoreList":[]}',version:"3.16.7"},re={code:"function SwipeableMessageTsx2(){const{translateX,withSpring,triggered,withTiming}=this.__closure;translateX.value=withSpring(0,{damping:20,stiffness:220});triggered.value=withTiming(0,{duration:200});}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx2","translateX","withSpring","triggered","withTiming","__closure","value","damping","stiffness","duration"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAuCe,SAAAA,oBAAMA,CAAA,QAAAC,UAAA,CAAAC,UAAA,CAAAC,SAAA,CAAAC,UAAA,OAAAC,SAAA,CAEbJ,UAAU,CAACK,KAAK,CAAGJ,UAAU,CAAC,CAAC,CAAE,CAAEK,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEL,SAAS,CAACG,KAAK,CAAGF,UAAU,CAAC,CAAC,CAAE,CAAEK,QAAQ,CAAE,GAAI,CAAC,CAAC,CACtD","ignoreList":[]}',version:"3.16.7"},ne={code:"function SwipeableMessageTsx3(){const{translateX,withSpring,triggered,withTiming}=this.__closure;translateX.value=withSpring(0,{damping:20,stiffness:220});triggered.value=withTiming(0,{duration:200});}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx3","translateX","withSpring","triggered","withTiming","__closure","value","damping","stiffness","duration"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AA4CoB,SAAAA,oBAAMA,CAAA,QAAAC,UAAA,CAAAC,UAAA,CAAAC,SAAA,CAAAC,UAAA,OAAAC,SAAA,CAElBJ,UAAU,CAACK,KAAK,CAAGJ,UAAU,CAAC,CAAC,CAAE,CAAEK,OAAO,CAAE,EAAE,CAAEC,SAAS,CAAE,GAAI,CAAC,CAAC,CACjEL,SAAS,CAACG,KAAK,CAAGF,UAAU,CAAC,CAAC,CAAE,CAAEK,QAAQ,CAAE,GAAI,CAAC,CAAC,CACtD","ignoreList":[]}',version:"3.16.7"},oe={code:"function SwipeableMessageTsx4(){const{translateX}=this.__closure;return{transform:[{translateX:translateX.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx4","translateX","__closure","transform","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAiDyC,SAAAA,qBAAA,QAAAC,UAAA,OAAAC,SAAA,OAAO,CACxCC,SAAS,CAAE,CAAC,CAAEF,UAAU,CAAEA,UAAU,CAACG,KAAM,CAAC,CAChD,CAAC","ignoreList":[]}',version:"3.16.7"},ie={code:"function SwipeableMessageTsx5(){const{translateX,interpolate,swipeThreshold,Extrapolation}=this.__closure;const abs=Math.abs(translateX.value);const opacity=interpolate(abs,[0,swipeThreshold*0.4,swipeThreshold],[0,0.6,1],Extrapolation.CLAMP);const scale=interpolate(abs,[0,swipeThreshold],[0.6,1],Extrapolation.CLAMP);return{opacity:opacity,transform:[{scale:scale}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx",sourceMap:'{"version":3,"names":["SwipeableMessageTsx5","translateX","interpolate","swipeThreshold","Extrapolation","__closure","abs","Math","value","opacity","CLAMP","scale","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/Reply/SwipeableMessage.tsx"],"mappings":"AAoDuC,SAAAA,oBAAMA,CAAA,QAAAC,UAAA,CAAAC,WAAA,CAAAC,cAAA,CAAAC,aAAA,OAAAC,SAAA,CACrC,KAAM,CAAAC,GAAG,CAAGC,IAAI,CAACD,GAAG,CAACL,UAAU,CAACO,KAAK,CAAC,CACtC,KAAM,CAAAC,OAAO,CAAGP,WAAW,CAACI,GAAG,CAAE,CAAC,CAAC,CAAEH,cAAc,CAAG,GAAG,CAAEA,cAAc,CAAC,CAAE,CAAC,CAAC,CAAE,GAAG,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACM,KAAK,CAAC,CAC7G,KAAM,CAAAC,KAAK,CAAGT,WAAW,CAACI,GAAG,CAAE,CAAC,CAAC,CAAEH,cAAc,CAAC,CAAE,CAAC,GAAG,CAAE,CAAC,CAAC,CAAEC,aAAa,CAACM,KAAK,CAAC,CAClF,MAAO,CACHD,OAAO,CAAPA,OAAO,CACPG,SAAS,CAAE,CAAC,CAAED,KAAA,CAAAA,KAAM,CAAC,CACzB,CAAC,CACL","ignoreList":[]}',version:"3.16.7"},le=function(t){var o,a,s=t.isCurrentUser,c=t.enabled,A=t.swipeThreshold,u=t.onReply,d=t.iconColor,C=void 0===d?"rgba(255,255,255,0.95)":d,h=t.iconBackground,v=void 0===h?"rgba(0,0,0,0.35)":h,f=t.children,m=l.useSharedValue(0),p=l.useSharedValue(0),g=s?-1:1,y=function(){u()},x=i.Gesture.Pan().enabled(c).activeOffsetX(s?[-12,9999]:[-9999,12]).failOffsetY([-12,12]).onUpdate((o=[new global.Error,-8,-27],a=function(e){var t=e.translationX;if(s&&t<0||!s&&t>0){var r=Math.abs(t),n=r<=A?r:A+.35*(r-A);m.value=g*n,r>=A&&0===p.value&&(p.value=1,l.runOnJS(y)())}else m.value=0},a.__closure={isCurrentUser:s,swipeThreshold:A,translateX:m,direction:g,triggered:p,runOnJS:l.runOnJS,triggerReply:y},a.__workletHash=0x92540fbdb51,a.__initData=te,a.__stackDetails=o,a)).onEnd(function(){var e=[new global.Error,-5,-27],t=function(){m.value=l.withSpring(0,{damping:20,stiffness:220}),p.value=l.withTiming(0,{duration:200})};return t.__closure={translateX:m,withSpring:l.withSpring,triggered:p,withTiming:l.withTiming},t.__workletHash=5306063376371,t.__initData=re,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-5,-27],t=function(){m.value=l.withSpring(0,{damping:20,stiffness:220}),p.value=l.withTiming(0,{duration:200})};return t.__closure={translateX:m,withSpring:l.withSpring,triggered:p,withTiming:l.withTiming},t.__workletHash=9186301204082,t.__initData=ne,t.__stackDetails=e,t}()),b=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateX:m.value}]}};return t.__closure={translateX:m},t.__workletHash=1792634838444,t.__initData=oe,t.__stackDetails=e,t}()),w=l.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=Math.abs(m.value);return{opacity:l.interpolate(e,[0,.4*A,A],[0,.6,1],l.Extrapolation.CLAMP),transform:[{scale:l.interpolate(e,[0,A],[.6,1],l.Extrapolation.CLAMP)}]}};return t.__closure={translateX:m,interpolate:l.interpolate,swipeThreshold:A,Extrapolation:l.Extrapolation},t.__workletHash=6245144246615,t.__initData=ie,t.__stackDetails=e,t}());return c?e.jsxs(r.View,{style:n(X||(X=M(["relative"]))),children:[e.jsx(l.View,{pointerEvents:"none",style:[n($||($=M(["absolute top-0 bottom-0 items-center justify-center"]))),s?{right:8}:{left:8},w],children:e.jsx(r.View,{style:[n(Z||(Z=M(["rounded-full items-center justify-center"]))),{width:36,height:36,backgroundColor:v}],children:e.jsx(ee,{style:{width:19.8,height:19.8},color:C})})}),e.jsx(i.GestureDetector,{gesture:x,children:e.jsx(l.View,{style:b,children:f})})]}):e.jsx(e.Fragment,{children:f})};function ae(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var se,ce={exports:{}},Ae={exports:{}},ue={};var de,Ce,he,ve,fe,me,pe,ge,ye,xe,be,we,Se,ke,je,Ee={};
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 Ie(){return Ce||(Ce=1,"production"===process.env.NODE_ENV?Ae.exports=function(){if(se)return ue;se=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,l=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,A=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,v=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,p=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 c:case n:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case A:case h:case C:case l:return e;default:return d}}case r:return d}}}function y(e){return g(e)===c}return ue.AsyncMode=s,ue.ConcurrentMode=c,ue.ContextConsumer=a,ue.ContextProvider=l,ue.Element=t,ue.ForwardRef=A,ue.Fragment=n,ue.Lazy=h,ue.Memo=C,ue.Portal=r,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=u,ue.isAsyncMode=function(e){return y(e)||g(e)===s},ue.isConcurrentMode=y,ue.isContextConsumer=function(e){return g(e)===a},ue.isContextProvider=function(e){return g(e)===l},ue.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ue.isForwardRef=function(e){return g(e)===A},ue.isFragment=function(e){return g(e)===n},ue.isLazy=function(e){return g(e)===h},ue.isMemo=function(e){return g(e)===C},ue.isPortal=function(e){return g(e)===r},ue.isProfiler=function(e){return g(e)===i},ue.isStrictMode=function(e){return g(e)===o},ue.isSuspense=function(e){return g(e)===u},ue.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===C||e.$$typeof===l||e.$$typeof===a||e.$$typeof===A||e.$$typeof===f||e.$$typeof===m||e.$$typeof===p||e.$$typeof===v)},ue.typeOf=g,ue}():Ae.exports=(de||(de=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,l=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,A=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,v=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,p=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var v=e.type;switch(v){case s:case c:case n:case i:case o:case u:return v;default:var f=v&&v.$$typeof;switch(f){case a:case A:case h:case C:case l:return f;default:return d}}case r:return d}}}var y=s,x=c,b=a,w=l,S=t,k=A,E=n,j=h,I=C,M=r,P=i,_=o,R=u,T=!1;function O(e){return g(e)===c}je.AsyncMode=y,je.ConcurrentMode=x,je.ContextConsumer=b,je.ContextProvider=w,je.Element=S,je.ForwardRef=k,je.Fragment=E,je.Lazy=j,je.Memo=I,je.Portal=M,je.Profiler=P,je.StrictMode=_,je.Suspense=R,je.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.")),O(e)||g(e)===s},je.isConcurrentMode=O,je.isContextConsumer=function(e){return g(e)===a},je.isContextProvider=function(e){return g(e)===l},je.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},je.isForwardRef=function(e){return g(e)===A},je.isFragment=function(e){return g(e)===n},je.isLazy=function(e){return g(e)===h},je.isMemo=function(e){return g(e)===C},je.isPortal=function(e){return g(e)===r},je.isProfiler=function(e){return g(e)===i},je.isStrictMode=function(e){return g(e)===o},je.isSuspense=function(e){return g(e)===u},je.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===C||e.$$typeof===l||e.$$typeof===a||e.$$typeof===A||e.$$typeof===f||e.$$typeof===m||e.$$typeof===p||e.$$typeof===v)},je.typeOf=g}()),je)),Ae.exports}
11
+ */function Pe(){return Ce||(Ce=1,"production"===process.env.NODE_ENV?Ae.exports=function(){if(se)return ue;se=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,l=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,A=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,v=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,p=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 c:case n:case i:case o:case u:return e;default:switch(e=e&&e.$$typeof){case a:case A:case h:case C:case l:return e;default:return d}}case r:return d}}}function y(e){return g(e)===c}return ue.AsyncMode=s,ue.ConcurrentMode=c,ue.ContextConsumer=a,ue.ContextProvider=l,ue.Element=t,ue.ForwardRef=A,ue.Fragment=n,ue.Lazy=h,ue.Memo=C,ue.Portal=r,ue.Profiler=i,ue.StrictMode=o,ue.Suspense=u,ue.isAsyncMode=function(e){return y(e)||g(e)===s},ue.isConcurrentMode=y,ue.isContextConsumer=function(e){return g(e)===a},ue.isContextProvider=function(e){return g(e)===l},ue.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},ue.isForwardRef=function(e){return g(e)===A},ue.isFragment=function(e){return g(e)===n},ue.isLazy=function(e){return g(e)===h},ue.isMemo=function(e){return g(e)===C},ue.isPortal=function(e){return g(e)===r},ue.isProfiler=function(e){return g(e)===i},ue.isStrictMode=function(e){return g(e)===o},ue.isSuspense=function(e){return g(e)===u},ue.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===C||e.$$typeof===l||e.$$typeof===a||e.$$typeof===A||e.$$typeof===f||e.$$typeof===m||e.$$typeof===p||e.$$typeof===v)},ue.typeOf=g,ue}():Ae.exports=(de||(de=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,l=e?Symbol.for("react.provider"):60109,a=e?Symbol.for("react.context"):60110,s=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,A=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,v=e?Symbol.for("react.block"):60121,f=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,p=e?Symbol.for("react.scope"):60119;function g(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var v=e.type;switch(v){case s:case c:case n:case i:case o:case u:return v;default:var f=v&&v.$$typeof;switch(f){case a:case A:case h:case C:case l:return f;default:return d}}case r:return d}}}var y=s,x=c,b=a,w=l,S=t,k=A,j=n,E=h,P=C,I=r,M=i,_=o,R=u,T=!1;function O(e){return g(e)===c}Ee.AsyncMode=y,Ee.ConcurrentMode=x,Ee.ContextConsumer=b,Ee.ContextProvider=w,Ee.Element=S,Ee.ForwardRef=k,Ee.Fragment=j,Ee.Lazy=E,Ee.Memo=P,Ee.Portal=I,Ee.Profiler=M,Ee.StrictMode=_,Ee.Suspense=R,Ee.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.")),O(e)||g(e)===s},Ee.isConcurrentMode=O,Ee.isContextConsumer=function(e){return g(e)===a},Ee.isContextProvider=function(e){return g(e)===l},Ee.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Ee.isForwardRef=function(e){return g(e)===A},Ee.isFragment=function(e){return g(e)===n},Ee.isLazy=function(e){return g(e)===h},Ee.isMemo=function(e){return g(e)===C},Ee.isPortal=function(e){return g(e)===r},Ee.isProfiler=function(e){return g(e)===i},Ee.isStrictMode=function(e){return g(e)===o},Ee.isSuspense=function(e){return g(e)===u},Ee.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===c||e===i||e===o||e===u||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===C||e.$$typeof===l||e.$$typeof===a||e.$$typeof===A||e.$$typeof===f||e.$$typeof===m||e.$$typeof===p||e.$$typeof===v)},Ee.typeOf=g}()),Ee)),Ae.exports}
12
12
  /*
13
13
  object-assign
14
14
  (c) Sindre Sorhus
15
15
  @license MIT
16
- */function Me(){if(ve)return he;ve=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return he=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,l,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 c in i=Object(arguments[s]))t.call(i,c)&&(a[c]=i[c]);if(e){l=e(i);for(var A=0;A<l.length;A++)r.call(i,l[A])&&(a[l[A]]=i[l[A]])}}return a},he}function Pe(){if(me)return fe;me=1;return fe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function _e(){return ge?pe:(ge=1,pe=Function.call.bind(Object.prototype.hasOwnProperty))}function Re(){if(xe)return ye;xe=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Pe(),r={},n=_e();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,l,a,s){if("production"!==process.env.NODE_ENV)for(var c in o)if(n(o,c)){var A;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+l+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}A=o[c](i,c,a,l,null,t)}catch(e){A=e}if(!A||A instanceof Error||e((a||"React class")+": type specification of "+l+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof A+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),A instanceof Error&&!(A.message in r)){r[A.message]=!0;var d=s?s():"";e("Failed "+l+" type: "+A.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},ye=o}function Te(){if(we)return be;we=1;var e=Ie(),t=Me(),r=Pe(),n=_e(),o=Re(),i=function(){};function l(){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){}}),be=function(a,s){var c="function"==typeof Symbol&&Symbol.iterator;var A="<<anonymous>>",u={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:h(l),arrayOf:function(e){return h((function(t,n,o,i,l){if("function"!=typeof e)return new C("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new C("Invalid "+i+" `"+l+"` of type `"+p(a)+"` supplied to `"+o+"`, expected an array.");for(var s=0;s<a.length;s++){var c=e(a,s,o,i,l+"["+s+"]",r);if(c instanceof Error)return c}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 `"+p(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:h((function(t,r,n,o,i){var l=t[r];return e.isValidElementType(l)?null:new C("Invalid "+o+" `"+i+"` of type `"+p(l)+"` 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 l=e.name||A;return new C("Invalid "+o+" `"+i+"` of type `"+(((a=t[r]).constructor&&a.constructor.name?a.constructor.name:A)+"` supplied to `")+n+"`, expected instance of `"+l+"`.")}var a;return null}))},node:h((function(e,t,r,n,o){return m(e[t])?null:new C("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,l,a){if("function"!=typeof e)return new C("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[o],c=p(s);if("object"!==c)return new C("Invalid "+l+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var A in s)if(n(s,A)){var u=e(s,A,i,l,a+"."+A,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."),l;return h((function(t,r,n,o,i){for(var l=t[r],a=0;a<e.length;a++)if(d(l,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(l)+"` 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."),l;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+"."),l}return h((function(t,o,i,l,a){for(var s=[],c=0;c<e.length;c++){var A=(0,e[c])(t,o,i,l,a,r);if(null==A)return null;A.data&&n(A.data,"expectedType")&&s.push(A.data.expectedType)}return new C("Invalid "+l+" `"+a+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,n,o,i,l){var a=t[n],s=p(a);if("object"!==s)return new C("Invalid "+i+" `"+l+"` of type `"+s+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var A=e[c];if("function"!=typeof A)return f(o,i,l,c,g(A));var u=A(a,c,o,i,l+"."+c,r);if(u)return u}return null}))},exact:function(e){return h((function(o,i,l,a,s){var c=o[i],A=p(c);if("object"!==A)return new C("Invalid "+a+" `"+s+"` of type `"+A+"` supplied to `"+l+"`, 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 f(l,a,s,d,g(h));if(!h)return new C("Invalid "+a+" `"+s+"` key `"+d+"` supplied to `"+l+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=h(c,d,l,a,s+"."+d,r);if(v)return v}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,l,a,c,u,d,h){if(c=c||A,d=d||a,h!==r){if(s){var v=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 v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var f=c+":"+a;!t[f]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. 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[f]=!0,n++)}}return null==l[a]?o?null===l[a]?new C("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`."):new C("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(l,a,c,u,d)}var l=o.bind(null,!1);return l.isRequired=o.bind(null,!0),l}function v(e){return h((function(t,r,n,o,i,l){var a=t[r];return p(a)!==e?new C("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function f(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 m(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(m);if(null===e||a(e))return!0;var t=function(e){var t=e&&(c&&e[c]||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(!m(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!m(o[1]))return!1}return!0;default:return!1}}function p(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=p(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},be}function Oe(){if(ke)return Se;ke=1;var e=Pe();function t(){}function r(){}return r.resetWarningCache=t,Se=function(){function n(t,r,n,o,i,l){if(l!==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 Ge(){if(Ee)return ce.exports;if(Ee=1,"production"!==process.env.NODE_ENV){var e=Ie();ce.exports=Te()(e.isElement,true)}else ce.exports=Oe()();return ce.exports}var Fe=ae(Ge()),Ve=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),l=0;t.forEach((function(t){if(t._matched)n.push(t);else{var o,a=[],s=t.children,c=0;for(r.pattern.lastIndex=0;s&&(o=r.pattern.exec(s));){var A=s.substr(0,o.index);if(c=o.index,++l>i)break;a.push({children:A}),a.push(e.getMatchedPart(r,o[0],o,c)),s=s.substr(o.index+o[0].length),c+=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})}}])}(),De=["type"],Ke=["style"],Be=["parse","childrenProps"],Le={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+/},Ue=Fe.shape(g(g({},r.Text.propTypes),{},{type:Fe.oneOf(Object.keys(Le)).isRequired,nonExhaustiveMaxMatchCount:Fe.number})),He=Fe.shape(g(g({},r.Text.propTypes),{},{pattern:Fe.oneOfType([Fe.string,Fe.instanceOf(RegExp)]).isRequired,nonExhaustiveMaxMatchCount:Fe.number})),ze=function(){function n(){return C(this,n),d(this,n,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)}(n,t.Component),h(n,[{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,De);if(t){if(!Le[t])throw new Error("".concat(e.type," is not a supported type"));r.pattern=Le[t]}return r}))}},{key:"getParsedText",value:function(){var t=this;return this.props.parse?"string"!=typeof this.props.children?this.props.children:new Ve(this.props.children,this.getPatterns()).parse().map((function(n,o){var i=t.props.style,l=n.style,a=y(n,Ke);return e.jsx(r.Text,g(g({style:[i,l]},t.props.childrenProps),a),"parsedText-".concat(o))})):this.props.children}},{key:"render",value:function(){var t=this,n=g({},this.props);n.parse,n.childrenProps;var o=y(n,Be);return e.jsx(r.Text,g(g({ref:function(e){return t._root=e}},o),{},{children:this.getParsedText()}))}}])}();ze.displayName="ParsedText",ze.propTypes=g(g({},r.Text.propTypes),{},{parse:Fe.arrayOf(Fe.oneOfType([Ue,He])),childrenProps:Fe.shape(r.Text.propTypes)}),ze.defaultProps={parse:null,childrenProps:{}};var We,Ne,Qe,Ye,qe,Je,Xe,$e,Ze,et,tt,rt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 12 12",children:e.jsx(o.Path,{fill:"none",stroke:n,strokeLinecap:"round",strokeWidth:"2",d:"M4 2v8m4-8v8"})})},nt=function(t){var r=t.style,n=t.color;return e.jsx(o,{viewBox:"0 0 24 24",style:r,children:e.jsxs(o.G,{fill:"none",fillRule:"evenodd",children:[e.jsx(o.Path,{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e.jsx(o.Path,{fill:n,d:"M5.669 4.76a1.47 1.47 0 0 1 2.04-1.177c1.062.454 3.442 1.533 6.462 3.276c3.021 1.744 5.146 3.267 6.069 3.958c.788.591.79 1.763.001 2.356c-.914.687-3.013 2.19-6.07 3.956c-3.06 1.766-5.412 2.832-6.464 3.28c-.906.387-1.92-.2-2.038-1.177c-.138-1.142-.396-3.735-.396-7.237c0-3.5.257-6.092.396-7.235"})]})})},ot=t.createContext(void 0),it=function(r){var n=r.children,o=M(t.useState(null),2),i=o[0],l=o[1];return e.jsx(ot.Provider,{value:{currentlyPlayingId:i,setCurrentlyPlayingId:l},children:n})},lt=function(e){var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r<10?"0":"").concat(r)},at=[1,1.5,2],st=42;function ct(t){var o,i,l,a,s,c=t.isPlaying,A=t.playbackRate,u=t.onCycleSpeed,d=t.senderAvatar,C=t.senderName,h=t.isCurrentUser,v=t.theme;return c?e.jsx(r.Pressable,{onPress:u,style:[n(We||(We=P(["rounded-full items-center justify-center"]))),{width:st,height:st,backgroundColor:h?"rgba(0,0,0,0.22)":"rgba(255,255,255,0.12)"},null==v||null===(o=v.messageStyle)||void 0===o?void 0:o.audioSpeedButtonStyle],children:e.jsx(r.Text,{style:J([n(Ne||(Ne=P(["text-xs font-semibold"]))),{color:W(v,h)},null==v||null===(i=v.messageStyle)||void 0===i?void 0:i.audioSpeedTextStyle],null==v?void 0:v.fontFamily),children:1===A?"1x":"".concat(A,"x")})}):d?e.jsx(r.Image,{source:{uri:d},style:[n(Qe||(Qe=P(["rounded-full"]))),{width:st,height:st},null==v||null===(l=v.bubbleStyle)||void 0===l?void 0:l.avatarImageStyle],resizeMode:"cover"}):e.jsx(r.View,{style:[n(Ye||(Ye=P(["rounded-full items-center justify-center"]))),{width:st,height:st,backgroundColor:h?"rgba(0,0,0,0.2)":"#9ca3af"}],children:e.jsx(r.Text,{style:J([n(qe||(qe=P(["text-base font-semibold capitalize"]))),{color:"#ffffff"}],null==v?void 0:v.fontFamily),children:(a=C,s=null==a?void 0:a.trim(),s?s.charAt(0).toUpperCase():"?")})})}var At,ut,dt,Ct,ht,vt,ft,mt,pt,gt,yt,xt,bt,wt,St,kt=function(o){var i,l,s=o.audioUrl,c=o.audioId,A=o.isVideoPlaying,u=o.isCurrentUser,d=o.senderAvatar,C=o.senderName,h=o.reserveStatusSpace,v=void 0===h||h,f=K(),m=f.theme,p=f.CustomPlayIcon,y=f.CustomPauseIcon,x=f.showMessageStatus,b=function(){var e=t.useContext(ot);if(!e)throw new Error("useAudio must be used within an AudioProvider");return e}(),w=b.currentlyPlayingId,S=b.setCurrentlyPlayingId,k=t.useRef(null),E=M(t.useState(!1),2),j=E[0],I=E[1],_=M(t.useState(0),2),R=_[0],T=_[1],O=M(t.useState(0),2),G=O[0],F=O[1],V=M(t.useState(!1),2),D=V[0],L=V[1],U=M(t.useState(1),2),H=U[0],z=U[1],W=M(t.useState(0),2),N=W[0],Q=W[1],Y=t.useRef(null),q=t.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,l=B(e);return t?{inactive:null!==(o=null==l?void 0:l.sentAudioWaveformColor)&&void 0!==o?o:"rgba(255,255,255,0.35)",active:null!==(i=null==l?void 0:l.sentAudioWaveformActiveColor)&&void 0!==i?i:"rgba(255,255,255,0.95)"}:{inactive:null!==(r=null==l?void 0:l.receivedAudioWaveformColor)&&void 0!==r?r:"rgba(0,0,0,0.20)",active:null!==(n=null==l?void 0:l.receivedAudioWaveformActiveColor)&&void 0!==n?n:"rgba(0,0,0,0.60)"}}(m,u),$=X.inactive,Z=X.active,ee=function(e,t){var r,n,o,i,l=B(e);return t?null!==(o=null!==(i=null==l?void 0:l.sentAudioTimestampColor)&&void 0!==i?i:null==l?void 0:l.sentTimestampColor)&&void 0!==o?o:"rgba(255,255,255,0.75)":null!==(r=null!==(n=null==l?void 0:l.receivedAudioTimestampColor)&&void 0!==n?n:null==l?void 0:l.receivedTimestampColor)&&void 0!==r?r:"rgba(0,0,0,0.45)"}(m,u),te=function(e,t){var r,n,o=B(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"}(m,u),re=function(e,t){var r,n,o=B(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"}(m,u),ne=j&&!(A||!!w&&w!==c),oe=G>0?R/G:0,ie=t.useCallback((function(e){var t;(F(e.duration),null!==Y.current)&&(null===(t=k.current)||void 0===t||t.seek(Y.current),Y.current=null)}),[]),le=t.useCallback((function(e){var t=e.currentTime;D||T(t)}),[D]),ae=t.useCallback((function(){var e;I(!1),T(0),null===(e=k.current)||void 0===e||e.seek(0),S(null)}),[S]),se=t.useCallback((function(){ne?(I(!1),S(null)):(S(c),I(!0))}),[ne,c,S]),ce=t.useCallback((function(){z((function(e){var t=at.indexOf(e),r=at[(t+1)%at.length];return null!=r?r:1}))}),[]),Ae=t.useCallback((function(e){var t=N;if(!(t<=0||G<=0)){var r,n=Math.max(0,Math.min(e/t,1))*G;if(T(n),G>0)null===(r=k.current)||void 0===r||r.seek(n);else Y.current=n}}),[G,N]),ue=t.useMemo((function(){return r.PanResponder.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return!0},onPanResponderGrant:function(e){L(!0),Ae(e.nativeEvent.locationX)},onPanResponderMove:function(e){return Ae(e.nativeEvent.locationX)},onPanResponderRelease:function(){return L(!1)},onPanResponderTerminate:function(){return L(!1)}})}),[Ae]),de=e.jsx(r.Pressable,{onPress:se,hitSlop:8,style:n(Je||(Je=P(["shrink-0 px-0.5"]))),children:ne?y?e.jsx(y,{}):e.jsx(rt,{style:n.style("h-6 w-6"),color:re}):p?e.jsx(p,{}):e.jsx(nt,{style:n.style("h-6 w-6"),color:te})}),Ce=e.jsx(ct,{isPlaying:ne,playbackRate:H,onCycleSpeed:ce,senderAvatar:d,senderName:C,isCurrentUser:u,theme:m}),he=e.jsx(r.View,{style:[n(Xe||(Xe=P(["flex-1 min-w-0"]))),{height:36}],onLayout:function(e){return Q(e.nativeEvent.layout.width)},children:e.jsx(r.View,g(g({style:[{flex:1,flexDirection:"row",alignItems:"center"},null==m||null===(i=m.messageStyle)||void 0===i?void 0:i.progressBarStyle]},ue.panHandlers),{},{children:q.map((function(t,n){var o,i=(n+.5)/50<=oe;return e.jsx(r.View,{style:[{flex:1,marginHorizontal:.5,height:Math.max(3,Math.round(36*t)),borderRadius:2,backgroundColor:i?Z:$},i?null==m||null===(o=m.messageStyle)||void 0===o?void 0:o.activeProgressBarStyle:void 0]},n)}))}))});return e.jsxs(r.View,{style:[n($e||($e=P(["min-w-[240px] max-w-[280px] py-1.5 px-1"]))),v&&x&&n(Ze||(Ze=P(["pb-4"])))],children:[e.jsx(a,{ref:k,source:{uri:s},paused:!ne,rate:H,playInBackground:!1,playWhenInactive:!1,onLoad:ie,onProgress:le,onEnd:ae,style:{width:0,height:0},progressUpdateInterval:80}),e.jsx(r.View,{style:n(et||(et=P(["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(r.Text,{style:J([n(tt||(tt=P(["text-[11px] mt-1"]))),{color:ee,paddingLeft:u?82:34},null==m||null===(l=m.messageStyle)||void 0===l?void 0:l.audioDurationStyle],null==m?void 0:m.fontFamily),children:lt(ne?R:G>0?G:R)})]})},Et=t.memo(kt),jt=function(t){var o=t.reply,i=t.isCurrentUser,l=t.isFirstInSequence,a=t.fontFamily,s=t.replyStyle,c=t.accentColor,A=t.backgroundColor,u=t.senderNameColor,d=t.previewTextColor,C=function(e){switch(e){case"image":return"πŸ“·";case"video":return"πŸŽ₯";case"audio":return"🎀";case"file":return"πŸ“Ž";default:return null}}(o.mediaKind),h=function(e){if(e.preview)return e.preview;switch(e.mediaKind){case"image":return"Photo";case"video":return"Video";case"audio":return"Audio message";case"file":return"File";default:return"Message"}}(o),v=!!o.thumbnailUri,f=l&&!i?0:8,m=l&&i?0:8;return e.jsxs(r.View,{style:[n(At||(At=P(["flex-row overflow-hidden"]))),{backgroundColor:A,minHeight:44,marginLeft:-8,marginRight:-8,marginTop:-2,marginBottom:4,borderTopLeftRadius:f,borderTopRightRadius:m,borderBottomLeftRadius:0,borderBottomRightRadius:0},null==s?void 0:s.container],children:[e.jsx(r.View,{style:[n(ut||(ut=P(["w-[3px] self-stretch"]))),{backgroundColor:c},null==s?void 0:s.replyBar]}),e.jsxs(r.View,{style:n(dt||(dt=P(["flex-1 flex-row items-center pl-2.5 pr-2.5 py-2"]))),children:[e.jsxs(r.View,{style:n(Ct||(Ct=P(["flex-1"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(ht||(ht=P(["text-[13px] font-semibold"]))),{color:u},null==s?void 0:s.senderName],a),children:o.senderName||"Reply"}),e.jsx(r.Text,{numberOfLines:2,style:J([n(vt||(vt=P(["text-[12.5px] mt-0.5"]))),{color:d},null==s?void 0:s.previewText],a),children:C&&!o.preview?"".concat(C," ").concat(h):h})]}),v&&e.jsx(r.Image,{source:{uri:o.thumbnailUri},style:[n(ft||(ft=P(["ml-2"]))),{width:40,height:40,borderRadius:4},null==s?void 0:s.thumbnail],resizeMode:"cover"})]})]})},It=function(n){var i=n.style,l=n.spinning,a=void 0!==l&&l,s=t.useRef(new r.Animated.Value(0)).current;t.useEffect((function(){a&&r.Animated.loop(r.Animated.timing(s,{toValue:1,duration:1e3,easing:r.Easing.linear,useNativeDriver:!0})).start()}),[a]);var c=s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return e.jsx(r.Animated.View,{style:a?{transform:[{rotate:c}]}: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"})})})},Mt=320,Pt=Mt,_t=Math.round(176),Rt=Mt-_t-2,Tt=Math.round(159),Ot=function(o){var i,l=o.uri,s=o.cellStyle,c=o.roundedStyle,A=K(),u=A.theme,d=A.CustomPlayIcon,C=t.useRef(null),h=M(t.useState(0),2),v=h[0],f=h[1],m=M(t.useState(!0),2),p=m[0],g=m[1],y=M(t.useState(!1),2),x=y[0],b=y[1];return e.jsxs(r.View,{style:[s,c],pointerEvents:"none",children:[e.jsx(a,{source:{uri:l},ref:C,paused:!0,muted:!0,playInBackground:!1,playWhenInactive:!1,pointerEvents:"none",style:[c,{width:"100%",height:"100%"}],resizeMode:"cover",onLoadStart:function(){g(!0),b(!1)},onLoad:function(e){f(e.duration),g(!1)},onError:function(){b(!0),g(!1)}}),p&&e.jsx(r.View,{style:[n(mt||(mt=P(["absolute inset-0 items-center justify-center bg-black/40"]))),c],children:e.jsx(It,{style:n.style("h-8 w-8"),spinning:!0})}),!p&&!x&&e.jsxs(e.Fragment,{children:[e.jsx(r.View,{style:n(pt||(pt=P(["pointer-events-none absolute inset-0 items-center justify-center"]))),children:d?e.jsx(d,{}):e.jsx(nt,{style:n.style("h-10 w-10"),color:(null==u||null===(i=u.colors)||void 0===i?void 0:i.videoPlayIconColor)||"white"})}),e.jsx(r.View,{style:n(gt||(gt=P(["pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded"]))),children:e.jsx(r.Text,{style:n(yt||(yt=P(["text-white text-[10px] font-semibold"]))),children:Gt(v)})})]}),x&&e.jsx(r.View,{style:[n(xt||(xt=P(["absolute inset-0 items-center justify-center bg-red-500/50"]))),c],children:e.jsx(r.Text,{style:J(n(bt||(bt=P(["text-white text-xs"]))),null==u?void 0:u.fontFamily),children:"Video"})})]})};function Gt(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 Ft,Vt,Dt,Kt,Bt,Lt,Ut,Ht,zt,Wt,Nt,Qt,Yt,qt,Jt,Xt,$t,Zt,er,tr,rr,nr,or,ir,lr,ar,sr=function(t){var o=t.items,i=t.onOpenGallery,l=r.useWindowDimensions().width,a=Math.min(240,.72*l);if(0===o.length)return null;var s={borderRadius:6,overflow:"hidden"};if(1===o.length){var c=o[0];return e.jsx(r.Pressable,{onPress:function(){return i(o,0)},style:{width:a,height:320,marginVertical:8},children:"image"===c.kind?e.jsx(r.Image,{source:{uri:c.uri},style:{width:"100%",height:"100%",borderRadius:8},resizeMode:"cover"}):e.jsx(Ot,{uri:c.uri,cellStyle:{width:a,height:320},roundedStyle:{borderRadius:8}})})}if(2===o.length){var A=(a-2)/2;return e.jsx(r.View,{style:{width:a,height:Pt,flexDirection:"row",gap:2,marginVertical:8},children:o.slice(0,2).map((function(t,n){return e.jsx(r.Pressable,{onPress:function(){return i(o,n)},style:{width:A,height:Pt},children:"image"===t.kind?e.jsx(r.Image,{source:{uri:t.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Ot,{uri:t.uri,cellStyle:{width:A,height:Pt},roundedStyle:s})},"".concat(t.uri,"-").concat(n))}))})}if(3===o.length){var u=o[0],d=o[1],C=o[2],h=(a-2)/2;return e.jsxs(r.View,{style:{width:a,height:Mt,marginVertical:8,gap:2},children:[e.jsx(r.Pressable,{onPress:function(){return i(o,0)},style:{width:a,height:_t},children:"image"===u.kind?e.jsx(r.Image,{source:{uri:u.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Ot,{uri:u.uri,cellStyle:{width:a,height:_t},roundedStyle:s})}),e.jsxs(r.View,{style:{flexDirection:"row",gap:2,height:Rt},children:[e.jsx(r.Pressable,{onPress:function(){return i(o,1)},style:{width:h,height:Rt},children:"image"===d.kind?e.jsx(r.Image,{source:{uri:d.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Ot,{uri:d.uri,cellStyle:{width:h,height:Rt},roundedStyle:s})},"".concat(d.uri,"-1")),e.jsx(r.Pressable,{onPress:function(){return i(o,2)},style:{width:h,height:Rt},children:"image"===C.kind?e.jsx(r.Image,{source:{uri:C.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Ot,{uri:C.uri,cellStyle:{width:h,height:Rt},roundedStyle:s})},"".concat(C.uri,"-2"))]})]})}var v=(a-2)/2,f=o.length-4,m=o.slice(0,4);return e.jsx(r.View,{style:{width:a,height:Mt,flexWrap:"wrap",flexDirection:"row",gap:2,marginVertical:8},children:m.map((function(t,l){return e.jsxs(r.Pressable,{onPress:function(){return i(o,l)},style:{width:v,height:Tt,position:"relative"},children:["image"===t.kind?e.jsx(r.Image,{source:{uri:t.uri},style:[s,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Ot,{uri:t.uri,cellStyle:{width:v,height:Tt},roundedStyle:s}),3===l&&f>0&&e.jsx(r.View,{style:n(wt||(wt=P(["absolute inset-0 bg-black/55 items-center justify-center"]))),children:e.jsxs(r.Text,{style:n(St||(St=P(["text-white text-lg font-bold"]))),children:["+",f]})})]},"".concat(t.uri,"-").concat(l))}))})},cr=function(o){var i,l,a,s,c=o.message,A=o.onGalleryOpen,u=o.isVideoPlaying,d=o.isCurrentUser,C=o.isFirstInSequence,h=K(),v=h.theme,f=h.showMessageStatus,m=h.onFileAttachmentPress,p=h.replyStyle,y=h.renderInlineReply,x=t.useMemo((function(){return Y(c)}),[c]),b=function(t,r,n,o,i){if(!c.replyTo)return null;if(y)return y(c.replyTo,d);var l=d?"rgba(0,0,0,0.18)":"rgba(0,0,0,0.06)",a=d?(null==v||null===(t=v.colors)||void 0===t?void 0:t.sentMessageTextColor)||"rgba(255,255,255,0.95)":(null==v||null===(r=v.colors)||void 0===r?void 0:r.sentBubbleBackgroundColor)||(null==v||null===(n=v.colors)||void 0===n?void 0:n.sentMessageTailColor)||"#22c55e",s=a,A=d?(null==v||null===(o=v.colors)||void 0===o?void 0:o.sentMessageTextColor)||"rgba(255,255,255,0.85)":(null==v||null===(i=v.colors)||void 0===i?void 0:i.receivedMessageTextColor)||"rgba(0,0,0,0.75)";return e.jsx(jt,{reply:c.replyTo,isCurrentUser:d,isFirstInSequence:C,fontFamily:null==v?void 0:v.fontFamily,replyStyle:p,accentColor:a,backgroundColor:l,senderNameColor:s,previewTextColor:A})}();return e.jsxs(r.View,{children:[b,x.length>0&&e.jsx(sr,{items:x,onOpenGallery:A}),(null!==(i=c.fileAttachments)&&void 0!==i?i:[]).map((function(t,o){var i,l,a,s,c,A;return e.jsxs(r.Pressable,{onPress:function(){m?m(t):r.Linking.openURL(t.uri.startsWith("http")||t.uri.startsWith("file:")?t.uri:"file://".concat(t.uri))},style:[n(Ft||(Ft=P(["my-1.5 py-2 px-3 rounded-lg max-w-[220px]"]))),{backgroundColor:U(v,d)},d?null==v||null===(i=v.messageStyle)||void 0===i?void 0:i.sentFileAttachmentStyle:null==v||null===(l=v.messageStyle)||void 0===l?void 0:l.receivedFileAttachmentStyle],children:[e.jsxs(r.Text,{style:J([n(Vt||(Vt=P(["text-xs font-semibold"]))),{color:H(v,d)},d?null==v||null===(a=v.messageStyle)||void 0===a?void 0:a.sentFileAttachmentTextStyle:null==v||null===(s=v.messageStyle)||void 0===s?void 0:s.receivedFileAttachmentTextStyle],null==v?void 0:v.fontFamily),numberOfLines:2,children:["πŸ“Ž ",t.name]}),e.jsx(r.Text,{style:J([n(Dt||(Dt=P(["text-[10px] mt-0.5"]))),{color:z(v,d)},d?null==v||null===(c=v.messageStyle)||void 0===c?void 0:c.sentFileAttachmentSubtitleStyle:null==v||null===(A=v.messageStyle)||void 0===A?void 0:A.receivedFileAttachmentSubtitleStyle],null==v?void 0:v.fontFamily),children:t.type})]},"".concat(t.uri,"-").concat(o))})),c.audio&&e.jsx(Et,{audioUrl:c.audio,audioId:c.id,isVideoPlaying:u,isCurrentUser:d,senderAvatar:c.senderAvatar,senderName:c.senderName,reserveStatusSpace:!c.text}),c.text&&e.jsx(ze,{style:J([n(Kt||(Kt=P(["pt-1"]))),n(f?Bt||(Bt=P(["pb-0"])):Lt||(Lt=P(["pb-2"]))),{wordBreak:"break-word",overflowWrap:"break-word"},d?null==v||null===(l=v.messageStyle)||void 0===l?void 0:l.sentTextStyle:null==v||null===(a=v.messageStyle)||void 0===a?void 0:a.receivedTextStyle,N(v,d)?{color:N(v,d)}:void 0],null==v?void 0:v.fontFamily),parse:[{type:"url",style:g({color:"blue",textDecorationLine:"underline"},(s=null==v?void 0:v.fontFamily,s?{fontFamily:s}:void 0)),onPress:function(e){return r.Linking.openURL(e.startsWith("http")?e:"https://".concat(e))}}],childrenProps:{allowFontScaling:!1},children:c.text})]})},Ar=t.memo(cr),ur=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"})})},dr=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})})},Cr=function(t){var o,i,l,a,s=t.time,c=t.status,A=t.isCurrentUser,u=t.hasText,d=t.hasAudio,C=t.hasGalleryMedia,h=t.hasFileAttachments,v=t.edited,f=K(),m=f.theme,p=f.showMessageStatus,g=f.editedLabel,y=f.editedTextStyle,x=C&&!u&&!d,b=(C||h)&&!u&&!d,w=x?"#ffffff":b?function(e,t){var r,n,o=B(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)"}(m,A):function(e,t){var r,n,o=B(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)"}(m,A),S=x||b?"rgba(255,255,255,0.85)":w;return e.jsx(e.Fragment,{children:p&&e.jsxs(r.View,{style:[n(Ut||(Ut=P(["flex-row items-center"]))),u?n(Ht||(Ht=P(["justify-end pb-1 ml-4"]))):d?n(zt||(zt=P(["absolute right-3 bottom-2"]))):b?[n(Wt||(Wt=P(["absolute right-3 bottom-4"]))),L(m,A)]:[n(Nt||(Nt=P(["absolute right-3 bottom-4"]))),L(m,A)]],children:[v&&e.jsx(r.Text,{style:J([n(Qt||(Qt=P(["text-[11px] mr-1.5"]))),{fontStyle:"italic",color:S,opacity:.85},null==m||null===(o=m.messageStyle)||void 0===o?void 0:o.editedTextStyle,y],null==m?void 0:m.fontFamily),children:null!=g?g:"edited"}),e.jsx(r.Text,{style:J([n(Yt||(Yt=P(["text-xs"]))),{color:w}],null==m?void 0:m.fontFamily),children:s}),A&&e.jsxs(r.View,{style:n(qt||(qt=P(["ml-1 flex-row items-center"]))),children:["sent"===c&&e.jsx(dr,{style:n.style("h-4 w-4",{opacity:.7}),fill:(null==m||null===(i=m.colors)||void 0===i?void 0:i.sentIconColor)||"#6B7280"}),"delivered"===c&&e.jsx(ur,{style:n.style("h-4 w-4",{opacity:.7}),fill:(null==m||null===(l=m.colors)||void 0===l?void 0:l.deliveredIconColor)||"#6B7280"}),"read"===c&&e.jsx(ur,{style:n.style("h-4 w-4",{opacity:.9}),fill:(null==m||null===(a=m.colors)||void 0===a?void 0:a.readIconColor)||"#3B82F6"})]})]})})},hr=t.memo(Cr),vr=function(o){var i,l,a,s,c,A,u,d,C,h,v,f,m,p,y=o.message,x=o.isCurrentUser,b=o.isFirstInSequence,w=o.onLongPress,S=o.staticMode,k=void 0!==S&&S,E=K(),j=E.theme,I=E.showAvatars,M=E.showUserNames,_=E.showBubbleTail,R=E.setMediaViewerGallery,T=E.isVideoPlaying,O=E.replyProps,F=E.startReply,V=E.selectionMode,D=E.isSelected,B=E.toggleSelection,L=E.selectionUI,U=t.useRef(null),H=(null===(i=null==O?void 0:O.enableReply)||void 0===i||i)&&!V&&!k,z=null!==(l=null==O?void 0:O.swipeThreshold)&&void 0!==l?l:60,W=Y(y),N=(null!==(a=null===(s=y.fileAttachments)||void 0===s?void 0:s.length)&&void 0!==a?a:0)>0&&0===W.length&&!y.text&&!y.audio,q=D(y.id),X=null==L?void 0:L.overlayColor,$=null==L?void 0:L.rowBackgroundColor,Z=(null==j||null===(c=j.colors)||void 0===c?void 0:c.sentBubbleBackgroundColor)||(null==j||null===(A=j.colors)||void 0===A?void 0:A.sentMessageTailColor)||"#22c55e",ee=X||fr(Z,.32),te=$||fr(Z,.12),re=[n(Jt||(Jt=P(["px-2 my-1 max-w-[75%] relative"]))),n(x?Xt||(Xt=P(["self-end mr-3"])):$t||($t=P(["self-start ml-9"]))),n(b?x?Zt||(Zt=P(["bg-green-500 rounded-tr-none"])):er||(er=P(["bg-white rounded-tl-none"])):x?tr||(tr=P(["bg-green-500"])):rr||(rr=P(["bg-white"]))),g(g({borderRadius:8},Q(j,x)?{backgroundColor:Q(j,x)}:{}),x?null==j||null===(u=j.bubbleStyle)||void 0===u?void 0:u.sent:null==j||null===(d=j.bubbleStyle)||void 0===d?void 0:d.received)],ne=e.jsxs(e.Fragment,{children:[!x&&b&&I&&e.jsxs(e.Fragment,{children:[e.jsx(r.View,{style:n(nr||(nr=P(["absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center"]))),children:y.senderAvatar?e.jsx(r.Image,{source:{uri:y.senderAvatar},style:[n(or||(or=P(["w-full h-full rounded-full"]))),null==j||null===(C=j.bubbleStyle)||void 0===C?void 0:C.avatarImageStyle],resizeMode:"cover"}):e.jsx(r.Text,{style:J([n(ir||(ir=P(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==j||null===(h=j.bubbleStyle)||void 0===h?void 0:h.avatarTextStyle],null==j?void 0:j.fontFamily),children:null===(v=y.senderName)||void 0===v?void 0:v.charAt(0)})}),M&&y.senderName&&e.jsx(r.Text,{style:J([n(lr||(lr=P(["text-sm text-black font-semibold mt-1 capitalize"]))),null==j||null===(f=j.bubbleStyle)||void 0===f?void 0:f.userNameStyle],null==j?void 0:j.fontFamily),children:y.senderName})]}),b&&_&&e.jsx(G,{style:n.style("absolute w-6 h-6",x?"rotate-90 -right-3.5 mt-[1.24px] -top-1":"rotate-180 -left-3.5 mt-[1.5px] -top-[3px]"),color:x?(null==j||null===(m=j.colors)||void 0===m?void 0:m.sentMessageTailColor)||"rgba(34, 197, 94, 1)":(null==j||null===(p=j.colors)||void 0===p?void 0:p.receivedMessageTailColor)||"white"}),e.jsx(Ar,{message:y,isCurrentUser:x,isFirstInSequence:b,onGalleryOpen:function(e,t){V?B(y):R(e,t)},isVideoPlaying:T}),e.jsx(hr,{time:y.time,edited:y.edited,status:x?y.status:void 0,isCurrentUser:x,hasText:!!y.text,hasAudio:!!y.audio,hasGalleryMedia:W.length>0&&!y.text,hasFileAttachments:N}),!k&&V&&q&&e.jsx(r.View,{pointerEvents:"none",style:[n(ar||(ar=P(["absolute inset-0"]))),{backgroundColor:ee,borderRadius:8}]})]});if(k)return e.jsx(r.View,{style:re,children:ne});var oe=e.jsx(r.Pressable,{ref:U,onLongPress:function(){var e;V?B(y):null===(e=U.current)||void 0===e||e.measureInWindow((function(e,t,r,n){null==w||w({x:e,y:t,width:r,height:n,isCurrentUser:x,isFirstInSequence:b})}))},onPress:function(){V&&B(y)},delayLongPress:250,style:re,children:ne}),ie=e.jsx(le,{isCurrentUser:x,enabled:H,swipeThreshold:z,onReply:function(){return F(y)},children:oe});return V&&q?e.jsx(r.View,{style:{backgroundColor:te},children:ie}):ie};function fr(e,t){if(e.startsWith("#")){var r=e.slice(1);if(3===r.length&&(r=r.split("").map((function(e){return e+e})).join("")),6===r.length){var n=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return"rgba(".concat(n,", ").concat(o,", ").concat(i,", ").concat(t,")")}}return e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", ".concat(t,")")):e}var mr=t.memo(vr),pr=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"})]})})},gr=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:i,d:"M5 19h1.4l8.625-8.625l-1.4-1.4L5 17.6zm-1 2q-.425 0-.712-.288T3 20v-2.825q0-.4.15-.762t.425-.638l10.3-10.3l4.25 4.275l-10.3 10.3q-.275.275-.638.425t-.762.15zM18.025 9.75l-4.25-4.25l1.4-1.4q.575-.575 1.413-.575t1.412.575l1.425 1.425q.575.575.575 1.413t-.575 1.412z"})})},yr=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"})]})})},xr=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"})]})})},br=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"})})},wr=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 Sr(){return kr.apply(this,arguments)}function kr(){return(kr=u(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("android"!==r.Platform.OS){e.next=11;break}return e.prev=1,e.next=4,r.PermissionsAndroid.request(r.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,{title:"Microphone Permission",message:"This app needs access to your microphone to record audio.",buttonPositive:"OK"});case 4:return t=e.sent,e.abrupt("return",t===r.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 Er,jr,Ir,Mr,Pr,_r,Rr,Tr,Or,Gr,Fr,Vr,Dr,Kr,Br,Lr,Ur,Hr,zr,Wr,Nr,Qr="ios"===r.Platform.OS?50:48,Yr="#FFFFFF",qr="#E9EDEF",Jr=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"})})},Xr=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",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeWidth:"1.5",children:[e.jsx(o.Path,{d:"M2 16c0-2.828 0-4.243.879-5.121C3.757 10 5.172 10 8 10h8c2.828 0 4.243 0 5.121.879C22 11.757 22 13.172 22 16s0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16Z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"M6 10V8a6 6 0 1 1 12 0v2",opacity:".5"})]})})},$r=function(t){var r=t.width,o=t.bottomOffset,i=t.background,a=t.lockColor,s=t.chevronColor,c=t.lockIconSize,A=t.pillAnimatedStyle,u=t.chevronAnimatedStyle,d=t.styleOverride,C=t.renderLockIcon;return e.jsxs(l.View,{style:[n(Er||(Er=P(["absolute items-center justify-center rounded-2xl py-2.5"]))),{width:r,backgroundColor:i,bottom:o,gap:6},d,A],pointerEvents:"none",children:[C?C():e.jsx(Xr,{style:{width:c,height:c},color:a}),e.jsx(l.View,{style:u,children:e.jsx(Jr,{style:{width:14,height:14},color:s})})]})},Zr=function(t){var o=t.isHold,a=t.duration,s=t.composedGesture,c=t.micWrapperStyle,A=t.slideTextAnimatedStyle,u=t.lockPillAnimatedStyle,d=t.chevronAnimatedStyle,C=t.primaryColor,h=t.microphoneColor,v=t.timerColor,f=t.cancelTextColor,m=t.holdPillBackground,p=t.lockPillBackground,g=t.lockColor,y=t.chevronColor,x=t.iconSize,b=t.lockIconSize,w=t.inputBarHeight,S=t.micSize,k=t.enableLockRecording,E=t.showSendButton,j=t.onSendPress,I=t.sendButtonBackgroundColor,M=t.sendButtonIconColor,_=t.renderInputPill,R=t.renderMicIcon,T=t.renderSendIcon,O=t.renderArrowIcon,G=t.renderLockIcon,F=t.containerStyleOverride,V=t.timerTextStyle,D=t.slideTextStyleOverride,K=t.lockPillStyleOverride,B=t.sendButtonStyle,L=t.fontFamily,U={minHeight:w,backgroundColor:m},H={height:S,width:S,backgroundColor:C};return e.jsxs(r.View,{style:[n(jr||(jr=P(["flex-row items-end gap-2 relative"]))),F],pointerEvents:"box-none",children:[o?e.jsxs(r.View,{style:[n(Ir||(Ir=P(["flex-1 flex-row items-center px-4 rounded-3xl"]))),U],children:[e.jsx(r.Text,{style:J([n(Mr||(Mr=P(["text-base font-semibold"]))),{color:v,minWidth:42},V],L),numberOfLines:1,children:lt(a)}),e.jsxs(l.View,{style:[n(Pr||(Pr=P(["flex-1 flex-row items-center justify-center gap-1.5"]))),A],children:[O?O():e.jsx(r.Text,{style:J([n(_r||(_r=P(["text-base leading-none"]))),{color:f,marginTop:-2}],L),children:"β€Ή"}),e.jsx(r.Text,{style:J([n(Rr||(Rr=P(["text-sm"]))),{color:f},D],L),children:"Slide to cancel"})]})]}):null==_?void 0:_(),e.jsxs(r.View,{style:[n(Tr||(Tr=P(["relative items-center justify-center"]))),{height:w,width:w}],children:[k&&o&&e.jsx($r,{width:S-8,bottomOffset:S+6,background:p,lockColor:g,chevronColor:y,lockIconSize:b,pillAnimatedStyle:u,chevronAnimatedStyle:d,styleOverride:K,renderLockIcon:G}),E&&!o?e.jsx(r.Pressable,{onPress:j,style:[n(Or||(Or=P(["items-center justify-center rounded-full"]))),{height:S,width:S,backgroundColor:null!=I?I:C},B],accessibilityRole:"button",accessibilityLabel:"Send",children:T?T():e.jsx(wr,{style:{width:x,height:x},color:null!=M?M:h})}):e.jsx(i.GestureDetector,{gesture:s,children:e.jsx(l.View,{style:[n(Gr||(Gr=P(["items-center justify-center rounded-full"]))),H,B,c],accessibilityRole:"button",accessibilityLabel:"Tap to record. Long-press and slide left to cancel or up to lock.",children:R?R():e.jsx(xr,{style:{width:x+6,height:x+6},color:h})})})]})]})},en=function(t){var r=t.style,n=t.color,i=void 0===n?"#ef4444":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeLinecap:"round",strokeWidth:"1.5",children:[e.jsx(o.Path,{d:"M9.17 4a3.001 3.001 0 0 1 5.66 0",opacity:".5"}),e.jsx(o.Path,{d:"M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.195.81-4.856.81h-.774c-2.66 0-3.99 0-4.856-.81c-.865-.809-.953-2.136-1.13-4.79l-.46-6.9"}),e.jsx(o.Path,{d:"m9.5 11l.5 5m4.5-5l-.5 5",opacity:".5"})]})})},tn=function(t){var o=t.color,i=t.tick,l=t.count;return e.jsx(r.View,{style:n(Fr||(Fr=P(["flex-row items-center justify-between h-6"]))),children:Array.from({length:l}).map((function(t,r){return e.jsx(nn,{index:r,total:l,color:o,tick:i},r)}))})},rn={code:'function WaveformTsx1(){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/Waveform.tsx",sourceMap:'{"version":3,"names":["WaveformTsx1","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/Waveform.tsx"],"mappings":"AAQ2C,SAAAA,YAAMA,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"},nn=function(t){var r,o,i=t.index,a=t.total,s=t.color,c=t.tick,A=l.useAnimatedStyle((r=[new global.Error,-4,-27],(o=function(){var e=c.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:c,index:i,total:a},o.__workletHash=4276075972187,o.__initData=rn,o.__stackDetails=r,o));return e.jsx(l.View,{style:[n(Vr||(Vr=P(["mx-px rounded-full"]))),{width:2,backgroundColor:s},A]})},on=function(t){var o=t.duration,a=t.isPaused,s=t.composedGesture,c=t.micWrapperStyle,A=t.pausePulseStyle,u=t.recDotStyle,d=t.waveTick,C=t.onCancelPress,h=t.onTogglePause,v=t.backgroundColor,f=t.timerColor,m=t.waveformColor,p=t.deleteIconColor,g=t.pauseIconColor,y=t.primaryColor,x=t.micSize,b=t.iconSize,w=t.inputBarHeight,S=t.waveCount,k=t.enableWaveform,E=t.renderDeleteIcon,j=t.renderPauseIcon,I=t.renderPlayIcon,M=t.renderSendIcon,_=t.renderWaveform,R=t.containerStyleOverride,T=t.barStyleOverride,O=t.timerTextStyle,G=t.waveformStyle,F=t.trashButtonStyle,V=t.sendButtonStyle,D=t.fontFamily,K={minHeight:w+50,backgroundColor:v},B={height:x,width:x,backgroundColor:y};return e.jsxs(r.View,{style:[n(Dr||(Dr=P(["w-full rounded-2xl px-4 py-2.5"]))),K,R,T],children:[e.jsxs(r.View,{style:n(Kr||(Kr=P(["flex-row items-center gap-3 px-1 pt-1.5 pb-2"]))),children:[e.jsx(l.View,{style:[n(Br||(Br=P(["w-1.5 h-1.5 rounded-full"]))),{backgroundColor:g},u]}),e.jsx(r.Text,{style:J([n(Lr||(Lr=P(["text-base font-semibold"]))),{color:f,minWidth:42},O],D),numberOfLines:1,children:lt(o)}),k&&e.jsx(r.View,{style:[n(Ur||(Ur=P(["flex-1"]))),G],children:_?_():e.jsx(tn,{color:m,tick:d,count:S})})]}),e.jsxs(r.View,{style:n(Hr||(Hr=P(["flex-row items-center justify-between mt-1"]))),children:[e.jsx(r.Pressable,{onPress:C,hitSlop:12,style:[n(zr||(zr=P(["items-center justify-center rounded-full"]))),{width:x,height:x},F],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:E?E():e.jsx(en,{style:n.style("w-6 h-6"),color:p})}),e.jsx(r.Pressable,{onPress:h,hitSlop:12,style:n(Wr||(Wr=P(["items-center justify-center px-4"]))),accessibilityRole:"button",accessibilityLabel:a?"Resume recording":"Pause recording",children:a?I?I():e.jsx(nt,{style:n.style("w-7 h-7"),color:g}):e.jsx(l.View,{style:A,children:j?j():e.jsx(rt,{style:n.style("w-7 h-7"),color:g})})}),e.jsx(i.GestureDetector,{gesture:s,children:e.jsx(l.View,{style:[n(Nr||(Nr=P(["items-center justify-center rounded-full"]))),B,V,c],accessibilityRole:"button",accessibilityLabel:"Send recording",children:M?M():e.jsx(wr,{style:{width:b,height:b},color:"#FFFFFF"})})})]})]})};function ln(){r.Vibration.vibrate(15)}var an={code:"function useFlowControllerTs1(_e,success){const{runOnJS,fireQuickTap}=this.__closure;if(success)runOnJS(fireQuickTap)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs1","_e","success","runOnJS","fireQuickTap","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA0OmB,QAAC,CAAAA,oBAAgBA,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"},sn={code:"function useFlowControllerTs2(){const{runOnJS,fireHoldStart}=this.__closure;runOnJS(fireHoldStart)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs2","runOnJS","fireHoldStart","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAiPqB,SAAAA,oBAAMA,CAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEfF,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B","ignoreList":[]}',version:"3.16.7"},cn={code:"function useFlowControllerTs3(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 rawTx=Math.max(maxLeftShared.value,Math.min(0,e.translationX));const rawTy=Math.max(maxUpShared.value,Math.min(0,e.translationY));const dominantY=Math.abs(rawTy)>Math.abs(rawTx);translateX.value=dominantY?0:rawTx;translateY.value=dominantY?rawTy:0;if(dominantY&&enableLockShared.value===1&&lockFiredShared.value===0&&rawTy<=lockThresholdShared.value){lockFiredShared.value=1;runOnJS(fireLock)();}if(!dominantY&&enableCancelShared.value===1&&cancelFiredShared.value===0&&rawTx<=cancelThresholdShared.value){cancelFiredShared.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs3","e","stateShared","STATE_HOLD","maxLeftShared","maxUpShared","translateX","translateY","enableLockShared","lockFiredShared","lockThresholdShared","runOnJS","fireLock","enableCancelShared","cancelFiredShared","cancelThresholdShared","fireCancel","__closure","value","rawTx","Math","max","min","translationX","rawTy","translationY","dominantY","abs"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAqPuB,QAAC,CAAAA,oBAAKA,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,KAAK,CAAGC,IAAI,CAACC,GAAG,CAACjB,aAAa,CAACc,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACsB,YAAY,CAAC,CAAC,CACxE,KAAM,CAAAC,KAAK,CAAGJ,IAAI,CAACC,GAAG,CAAChB,WAAW,CAACa,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACwB,YAAY,CAAC,CAAC,CACtE,KAAM,CAAAC,SAAS,CAAGN,IAAI,CAACO,GAAG,CAACH,KAAK,CAAC,CAAGJ,IAAI,CAACO,GAAG,CAACR,KAAK,CAAC,CAGnDb,UAAU,CAACY,KAAK,CAAGQ,SAAS,CAAG,CAAC,CAAGP,KAAK,CACxCZ,UAAU,CAACW,KAAK,CAAGQ,SAAS,CAAGF,KAAK,CAAG,CAAC,CACxC,GAAIE,SAAS,EACTlB,gBAAgB,CAACU,KAAK,GAAK,CAAC,EAC5BT,eAAe,CAACS,KAAK,GAAK,CAAC,EAC3BM,KAAK,EAAId,mBAAmB,CAACQ,KAAK,CAAE,CACpCT,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,KAAK,EAAIJ,qBAAqB,CAACG,KAAK,CAAE,CACtCJ,iBAAiB,CAACI,KAAK,CAAG,CAAC,CAC3BP,OAAO,CAACK,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},An={code:"function useFlowControllerTs4(){const{lockFiredShared,cancelFiredShared,enableLockShared,translateY,LOCK_ON_RELEASE_DELTA,runOnJS,fireLock,fireHoldEnd}=this.__closure;if(lockFiredShared.value===1||cancelFiredShared.value===1)return;if(enableLockShared.value===1&&translateY.value<-LOCK_ON_RELEASE_DELTA){lockFiredShared.value=1;runOnJS(fireLock)();return;}runOnJS(fireHoldEnd)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs4","lockFiredShared","cancelFiredShared","enableLockShared","translateY","LOCK_ON_RELEASE_DELTA","runOnJS","fireLock","fireHoldEnd","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA+QmB,SAAAA,oBAAMA,CAAA,QAAAC,eAAA,CAAAC,iBAAA,CAAAC,gBAAA,CAAAC,UAAA,CAAAC,qBAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,WAAA,OAAAC,SAAA,CAEb,GAAIR,eAAe,CAACS,KAAK,GAAK,CAAC,EAC3BR,iBAAiB,CAACQ,KAAK,GAAK,CAAC,CAC7B,OACJ,GAAIP,gBAAgB,CAACO,KAAK,GAAK,CAAC,EAC5BN,UAAU,CAACM,KAAK,CAAG,CAACL,qBAAqB,CAAE,CAC3CJ,eAAe,CAACS,KAAK,CAAG,CAAC,CACzBJ,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACnB,OACJ,CACAD,OAAO,CAACE,WAAW,CAAC,CAAC,CAAC,CAC1B","ignoreList":[]}',version:"3.16.7"},un={code:"function useFlowControllerTs5(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs5","lockFiredShared","cancelFiredShared","translateX","withSpring","translateY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA4RwB,SAAAA,oBAAMA,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"},dn={code:"function useFlowControllerTs6(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs6","stateShared","STATE_HOLD","translateX","translateY","micScale","__closure","isHold","value","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAsS6C,SAAAA,oBAAMA,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"},Cn={code:"function useFlowControllerTs7(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs7","interpolate","translateX","cancelThresholdShared","Extrapolation","arrowPulse","__closure","opacity","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAgToD,SAAAA,oBAAMA,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"},hn={code:"function useFlowControllerTs8(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs8","interpolate","translateY","lockThresholdShared","Extrapolation","__closure","lockProgress","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAuTmD,SAAAA,oBAAMA,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"},vn={code:"function useFlowControllerTs9(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs9","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA+TkD,SAAAA,qBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACjDC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},fn={code:"function useFlowControllerTs10(){const{isPaused,pausePulse}=this.__closure;return{opacity:isPaused?1:pausePulse.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs10","isPaused","pausePulse","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAkU6C,SAAAA,sBAAA,QAAAC,QAAA,CAAAC,UAAA,OAAAC,SAAA,OAAO,CAC5CC,OAAO,CAAEH,QAAQ,CAAG,CAAC,CAAGC,UAAU,CAACG,KACvC,CAAC","ignoreList":[]}',version:"3.16.7"},mn={code:"function useFlowControllerTs11(){const{recBlink}=this.__closure;return{opacity:recBlink.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs11","recBlink","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAqUyC,SAAAA,sBAAA,QAAAC,QAAA,OAAAC,SAAA,OAAO,CACxCC,OAAO,CAAEF,QAAQ,CAACG,KACtB,CAAC","ignoreList":[]}',version:"3.16.7"};var pn=function(r){var n=r.primaryColor,o=void 0===n?"#16A34A":n,a=r.backgroundColor,s=void 0===a?"#0B141A":a,c=r.holdPillBackground,A=void 0===c?"#1F2C33":c,u=r.timerColor,d=void 0===u?Yr:u,C=r.microphoneColor,h=void 0===C?Yr:C,v=r.lockColor,f=void 0===v?qr:v,m=r.waveformColor,p=void 0===m?qr:m,g=r.deleteIconColor,y=void 0===g?"#8696A0":g,x=r.cancelTextColor,b=void 0===x?"rgba(255,255,255,0.6)":x,w=r.chevronColor,S=r.pauseIconColor,k=void 0===S?"#F15C6D":S,E=r.lockPillBackground,j=void 0===E?"#1F2C33":E,I=r.inputBarHeight,P=void 0===I?Qr:I,_=r.micSize,R=r.holdMicScale,T=void 0===R?1.18:R,O=r.iconSize,G=void 0===O?22:O,F=r.lockIconSize,V=void 0===F?18:F,D=r.enableLockRecording,K=void 0===D||D,B=r.enableSlideToCancel,L=void 0===B||B,U=r.enableWaveform,H=void 0===U||U,z=r.lockSlideDistance,W=void 0===z?70:z,N=r.cancelSlideDistance,Q=void 0===N?90:N,Y=r.waveCount,q=void 0===Y?32:Y,J=r.showSendButton,X=r.onSendPress,$=r.sendButtonBackgroundColor,Z=r.sendButtonIconColor,ee=r.renderInputPill,te=r.renderMicIcon,re=r.renderSendIcon,ne=r.renderLockIcon,oe=r.renderArrowIcon,ie=r.renderDeleteIcon,le=r.renderPauseIcon,ae=r.renderPlayIcon,se=r.renderWaveform,ce=r.containerStyle,Ae=r.barStyle,ue=r.timerTextStyle,de=r.slideTextStyle,Ce=r.waveformStyle,he=r.lockPillStyle,ve=r.trashButtonStyle,fe=r.sendButtonStyle,me=r.fontFamily,pe=null!=_?_:P,ge=null!=w?w:f,ye=function(e){var r=e.cancelSlideDistance,n=e.lockSlideDistance,o=e.enableLockRecording,a=e.enableSlideToCancel,s=e.holdMicScale,c=e.onRecordingStart,A=e.onRecordingStop,u=e.onSend,d=e.onDelete,C=e.onLock,h=e.onCancel,v=e.onPauseRecording,f=e.onResumeRecording,m=e.onStateChange,p=-Math.abs(r),g=-Math.abs(n),y=p-30,x=g-20,b=M(t.useState("IDLE"),2),w=b[0],S=b[1],k=M(t.useState(0),2),E=k[0],j=k[1],I=M(t.useState(!1),2),P=I[0],_=I[1],R=t.useRef("IDLE"),T=t.useRef(!1);t.useEffect((function(){R.current=w}),[w]),t.useEffect((function(){T.current=P}),[P]);var O=t.useRef(m);O.current=m,t.useEffect((function(){var e;null===(e=O.current)||void 0===e||e.call(O,w)}),[w]);var G=l.useSharedValue(0);t.useEffect((function(){G.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}}(w)}),[w]);var F=l.useSharedValue(p),V=l.useSharedValue(g),D=l.useSharedValue(y),K=l.useSharedValue(x),B=l.useSharedValue(o?1:0),L=l.useSharedValue(a?1:0);t.useEffect((function(){F.value=p,V.value=g,D.value=y,K.value=x,B.value=o?1:0,L.value=a?1:0}),[p,g,y,x,o,a]);var U=t.useRef(0),H=t.useRef(0),z=t.useRef(0),W=l.useSharedValue(0),N=l.useSharedValue(0),Q=l.useSharedValue(1),Y=l.useSharedValue(0),q=l.useSharedValue(0),J=l.useSharedValue(1),X=l.useSharedValue(0),$=l.useSharedValue(1),Z=l.useSharedValue(0),ee=l.useSharedValue(0);t.useEffect((function(){Y.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:700,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:700,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),q.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),J.value=l.withRepeat(l.withSequence(l.withTiming(.5,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(1,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),X.value=l.withRepeat(l.withTiming(1,{duration:4500,easing:l.Easing.linear}),-1,!1),$.value=l.withRepeat(l.withSequence(l.withTiming(.3,{duration:600}),l.withTiming(1,{duration:600})),-1,!1)}),[]),t.useEffect((function(){Q.value="RECORDING_HOLD"===w?l.withSpring(s,{damping:14,stiffness:220}):l.withSpring(1,{damping:16,stiffness:220})}),[w,s]),t.useEffect((function(){if(("RECORDING_TAP"===w||"RECORDING_HOLD"===w||"LOCKED_RECORDING"===w)&&!P){var e=setInterval((function(){var e=Date.now()-U.current-H.current;j(e/1e3)}),250);return function(){return clearInterval(e)}}}),[w,P]);var te=t.useRef(c);te.current=c;var re=t.useRef(A);re.current=A;var ne=t.useRef(u);ne.current=u;var oe=t.useRef(d);oe.current=d;var ie=t.useRef(C);ie.current=C;var le=t.useRef(h);le.current=h;var ae=t.useRef(v);ae.current=v;var se=t.useRef(f);se.current=f;var ce=t.useCallback((function(){var e;U.current=Date.now(),H.current=0,z.current=0,_(!1),j(0),Z.value=0,ee.value=0,W.value=0,N.value=0,null===(e=te.current)||void 0===e||e.call(te)}),[]),Ae=t.useCallback((function(){j(0),_(!1),H.current=0,z.current=0,W.value=0,N.value=0,S("IDLE")}),[]),ue=t.useCallback((function(){var e,t,r=(Date.now()-U.current-H.current)/1e3;S("SENDING"),null===(e=re.current)||void 0===e||e.call(re),null===(t=ne.current)||void 0===t||t.call(ne,{duration:r}),Ae()}),[Ae]),de=t.useCallback((function(){var e=R.current;if("IDLE"===e)return S("RECORDING_TAP"),void ce();"RECORDING_TAP"!==e&&"LOCKED_RECORDING"!==e||ue()}),[ce,ue]),Ce=t.useCallback((function(){"IDLE"===R.current&&(S("RECORDING_HOLD"),ce())}),[ce]),he=t.useCallback((function(){var e;"RECORDING_HOLD"===R.current&&(ln(),S("LOCKED_RECORDING"),W.value=l.withSpring(0,{damping:18,stiffness:220}),N.value=l.withSpring(0,{damping:18,stiffness:220}),null===(e=ie.current)||void 0===e||e.call(ie))}),[]),ve=t.useCallback((function(){var e,t,r,n=R.current;"RECORDING_HOLD"!==n&&"RECORDING_TAP"!==n&&"LOCKED_RECORDING"!==n||(ln(),S("CANCELLED"),null===(e=re.current)||void 0===e||e.call(re),null===(t=le.current)||void 0===t||t.call(le),null===(r=oe.current)||void 0===r||r.call(oe),Ae())}),[Ae]),fe=t.useCallback((function(){"RECORDING_HOLD"===R.current&&ue()}),[ue]),me=t.useCallback((function(){var e,t,r=!T.current;r?(z.current=Date.now(),null===(e=ae.current)||void 0===e||e.call(ae)):(H.current+=Date.now()-z.current,z.current=0,null===(t=se.current)||void 0===t||t.call(se)),_(r)}),[]),pe=t.useRef(de);pe.current=de;var ge=t.useRef(Ce);ge.current=Ce;var ye=t.useRef(fe);ye.current=fe;var xe=t.useRef(he);xe.current=he;var be=t.useRef(ve);be.current=ve;var we,Se,ke=function(){return pe.current()},Ee=function(){return ge.current()},je=function(){return ye.current()},Ie=function(){return xe.current()},Me=function(){return be.current()},Pe=t.useMemo((function(){var e,t,r=i.Gesture.Tap().maxDuration(210).onEnd((e=[new global.Error,-3,-27],(t=function(e,t){t&&l.runOnJS(ke)()}).__closure={runOnJS:l.runOnJS,fireQuickTap:ke},t.__workletHash=0xb640de2a90a,t.__initData=an,t.__stackDetails=e,t)),n=i.Gesture.Pan().activateAfterLongPress(220).onStart(function(){var e=[new global.Error,-3,-27],t=function(){l.runOnJS(Ee)()};return t.__closure={runOnJS:l.runOnJS,fireHoldStart:Ee},t.__workletHash=3973713390129,t.__initData=sn,t.__stackDetails=e,t}()).onUpdate(function(){var e=[new global.Error,-16,-27],t=function(e){if(2===G.value){var t=Math.max(D.value,Math.min(0,e.translationX)),r=Math.max(K.value,Math.min(0,e.translationY)),n=Math.abs(r)>Math.abs(t);W.value=n?0:t,N.value=n?r:0,n&&1===B.value&&0===ee.value&&r<=V.value&&(ee.value=1,l.runOnJS(Ie)()),!n&&1===L.value&&0===Z.value&&t<=F.value&&(Z.value=1,l.runOnJS(Me)())}};return t.__closure={stateShared:G,STATE_HOLD:2,maxLeftShared:D,maxUpShared:K,translateX:W,translateY:N,enableLockShared:B,lockFiredShared:ee,lockThresholdShared:V,runOnJS:l.runOnJS,fireLock:Ie,enableCancelShared:L,cancelFiredShared:Z,cancelThresholdShared:F,fireCancel:Me},t.__workletHash=0xc932b7db4db,t.__initData=cn,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-9,-27],t=function(){if(1!==ee.value&&1!==Z.value)return 1===B.value&&N.value<-12?(ee.value=1,void l.runOnJS(Ie)()):void l.runOnJS(je)()};return t.__closure={lockFiredShared:ee,cancelFiredShared:Z,enableLockShared:B,translateY:N,LOCK_ON_RELEASE_DELTA:12,runOnJS:l.runOnJS,fireLock:Ie,fireHoldEnd:je},t.__workletHash=8222992215978,t.__initData=An,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===ee.value&&0===Z.value&&(W.value=l.withSpring(0,{damping:18,stiffness:220}),N.value=l.withSpring(0,{damping:18,stiffness:220}))};return t.__closure={lockFiredShared:ee,cancelFiredShared:Z,translateX:W,withSpring:l.withSpring,translateY:N},t.__workletHash=0xb56825c4eba,t.__initData=un,t.__stackDetails=e,t}());return i.Gesture.Race(r,n)}),[]),_e=l.useAnimatedStyle((we=[new global.Error,-6,-27],(Se=function(){var e=2===G.value;return{transform:[{translateX:e?W.value:0},{translateY:e?N.value:0},{scale:Q.value}]}}).__closure={stateShared:G,STATE_HOLD:2,translateX:W,translateY:N,micScale:Q},Se.__workletHash=0x92736c307cb,Se.__initData=dn,Se.__stackDetails=we,Se)),Re=l.useAnimatedStyle(function(){var e=[new global.Error,-6,-27],t=function(){return{opacity:l.interpolate(W.value,[0,F.value],[1,0],l.Extrapolation.CLAMP),transform:[{translateX:.4*W.value+Y.value}]}};return t.__closure={interpolate:l.interpolate,translateX:W,cancelThresholdShared:F,Extrapolation:l.Extrapolation,arrowPulse:Y},t.__workletHash=0xf2b5c2efb9e,t.__initData=Cn,t.__stackDetails=e,t}()),Te=l.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=l.interpolate(N.value,[0,V.value],[0,1],l.Extrapolation.CLAMP);return{transform:[{translateY:l.interpolate(e,[0,1],[0,-22])}]}};return t.__closure={interpolate:l.interpolate,translateY:N,lockThresholdShared:V,Extrapolation:l.Extrapolation},t.__workletHash=5669890750044,t.__initData=hn,t.__stackDetails=e,t}()),Oe=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:q.value}]}};return t.__closure={chevronPulse:q},t.__workletHash=0xd07d519242c,t.__initData=vn,t.__stackDetails=e,t}()),Ge=l.useAnimatedStyle(function(){var e=[new global.Error,-3,-27],t=function(){return{opacity:P?1:J.value}};return t.__closure={isPaused:P,pausePulse:J},t.__workletHash=0xea4d31d5a5c,t.__initData=fn,t.__stackDetails=e,t}()),Fe=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:$.value}};return t.__closure={recBlink:$},t.__workletHash=0xd511e0063a5,t.__initData=mn,t.__stackDetails=e,t}());return{state:w,duration:E,isPaused:P,composedGesture:Pe,waveTick:X,micWrapperStyle:_e,slideTextAnimatedStyle:Re,lockPillAnimatedStyle:Te,chevronAnimatedStyle:Oe,pausePulseStyle:Ge,recDotStyle:Fe,triggerCancel:ve,togglePause:me}}({cancelSlideDistance:Q,lockSlideDistance:W,enableLockRecording:K,enableSlideToCancel:L,holdMicScale:T,onRecordingStart:r.onRecordingStart,onRecordingStop:r.onRecordingStop,onSend:r.onSend,onDelete:r.onDelete,onLock:r.onLock,onCancel:r.onCancel,onPauseRecording:r.onPauseRecording,onResumeRecording:r.onResumeRecording,onStateChange:r.onStateChange});return"RECORDING_TAP"===ye.state||"LOCKED_RECORDING"===ye.state||"SENDING"===ye.state?e.jsx(on,{duration:ye.duration,isPaused:ye.isPaused,composedGesture:ye.composedGesture,micWrapperStyle:ye.micWrapperStyle,pausePulseStyle:ye.pausePulseStyle,recDotStyle:ye.recDotStyle,waveTick:ye.waveTick,onCancelPress:ye.triggerCancel,onTogglePause:ye.togglePause,backgroundColor:s,timerColor:d,waveformColor:p,deleteIconColor:y,pauseIconColor:k,primaryColor:o,micSize:pe,iconSize:G,inputBarHeight:P,waveCount:q,enableWaveform:H,renderDeleteIcon:ie,renderPauseIcon:le,renderPlayIcon:ae,renderSendIcon:re,renderWaveform:se,containerStyleOverride:ce,barStyleOverride:Ae,timerTextStyle:ue,waveformStyle:Ce,trashButtonStyle:ve,sendButtonStyle:fe,fontFamily:me}):e.jsx(Zr,{isHold:"RECORDING_HOLD"===ye.state,duration:ye.duration,composedGesture:ye.composedGesture,micWrapperStyle:ye.micWrapperStyle,slideTextAnimatedStyle:ye.slideTextAnimatedStyle,lockPillAnimatedStyle:ye.lockPillAnimatedStyle,chevronAnimatedStyle:ye.chevronAnimatedStyle,primaryColor:o,microphoneColor:h,timerColor:d,cancelTextColor:b,holdPillBackground:A,lockPillBackground:j,lockColor:f,chevronColor:ge,iconSize:G,lockIconSize:V,inputBarHeight:P,micSize:pe,enableLockRecording:K,showSendButton:J,onSendPress:X,sendButtonBackgroundColor:$,sendButtonIconColor:Z,renderInputPill:ee,renderMicIcon:te,renderSendIcon:re,renderArrowIcon:oe,renderLockIcon:ne,containerStyleOverride:ce,timerTextStyle:ue,slideTextStyleOverride:de,lockPillStyleOverride:he,sendButtonStyle:fe,fontFamily:me})},gn=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"})]})},yn=function(t){var n=t.fileName,o=t.style,i=K().theme;return e.jsx(r.Text,{numberOfLines:2,ellipsizeMode:"tail",style:J([{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)})},xn=t.memo(yn);function bn(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 wn,Sn,kn,En,jn,In,Mn,Pn,_n,Rn,Tn,On,Gn,Fn,Vn,Dn,Kn,Bn,Ln,Un,Hn,zn,Wn,Nn,Qn,Yn=function(t){var n,o=t.previews,i=t.closePreview,l=t.onRemoveItem,s=t.CustomFileIcon,c=t.CustomImagePreview,A=t.CustomVideoPreview,u=t.inputHeight,d=K(),C=d.theme,h=d.setMediaViewerGallery,v=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/"))})),f=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/"))})),m=bn(o);if(0===o.length)return null;var p=function(e){0!==m.length&&h(m,e)},g=function(t){var n,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:56,l=null===(n=t.type)||void 0===n?void 0:n.startsWith("image/"),s=null===(o=t.type)||void 0===o?void 0:o.startsWith("video/");return l&&c?e.jsx(c,{uri:t.uri}):s&&A?e.jsx(A,{uri:t.uri}):l?e.jsx(r.Image,{source:{uri:t.uri},style:{width:i,height:i,borderRadius:12},resizeMode:"cover"}):s?e.jsx(r.View,{style:{width:i,height:i,borderRadius:12,overflow:"hidden"},children:e.jsx(a,{source:{uri:t.uri},style:{width:"100%",height:"100%"},resizeMode:"cover",muted:!0,repeat:!0,paused:!1,pointerEvents:"none",playInBackground:!1,playWhenInactive:!1})}):null},y=function(t,n){return e.jsx(r.Pressable,{onPress:function(){return l?l(t):null==i?void 0:i()},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(r.Text,{style:J({fontSize:13,color:"white",fontWeight:"700",lineHeight:14},null==C?void 0:C.fontFamily),children:"Γ—"})})};return e.jsx(r.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(r.View,{style:{gap:8},children:[function(){if(0===v.length)return null;if(1===v.length){var t=v[0];return t?e.jsxs(r.Pressable,{onPress:function(){return p(0)},style:{position:"relative"},children:[g(t),y(t.uri)]}):null}var n=v.slice(0,3),o=v.length>3?v.length-3:0;return e.jsx(r.View,{style:{flexDirection:"row",alignItems:"center",minHeight:68},children:n.map((function(t,i){var l=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(r.Pressable,{onPress:function(){var e=bn(v).findIndex((function(e){return e.uri===t.uri}));p(e>=0?e:0)},style:{marginLeft:0===i?0:-18,zIndex:i+1,transform:[{rotate:l}],position:"relative"},children:e.jsxs(r.View,{style:{position:"relative"},children:[g(t),2===i&&o>0&&e.jsx(r.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(r.Text,{style:{color:"#fff",fontWeight:"700",fontSize:14},children:["+",o]})}),y(t.uri,a)]})},"".concat(t.uri,"-").concat(i))}))})}(),f.length>0&&e.jsx(r.ScrollView,{scrollEnabled:f.length>3,style:{maxHeight:232},showsVerticalScrollIndicator:f.length>3,contentContainerStyle:{gap:8},nestedScrollEnabled:!0,children:f.map((function(t,n){return function(t,n){var o,i,l,a;return e.jsxs(r.View,{style:{position:"relative"},children:[e.jsxs(r.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(r.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(gn,{style:{width:40,height:40},fill:"white"})}),e.jsx(r.View,{style:[{backgroundColor:"#f3f4f6",flex:1,borderRadius:8,justifyContent:"center",paddingHorizontal:12},null==C||null===(l=C.filePreviewStyle)||void 0===l?void 0:l.nameContainer],children:e.jsx(xn,{fileName:t.name||"File",style:null==C||null===(a=C.filePreviewStyle)||void 0===a?void 0:a.text})})]}),y(t.uri)]},"".concat(t.uri,"-").concat(n))}(t,n)}))})]})})},qn=t.memo(Yn),Jn="ios"===r.Platform.OS?32:30,Xn="ios"===r.Platform.OS?50:48,$n=function(i){var l,a,s,c,A,d,C,h,v,f,m,p,y,x,b,w,S=i.onSendMessage,k=i.onTypingStart,E=i.onTypingEnd,j=i.onAttachmentPress,I=i.onCameraPress,_=i.onAudioRecordStart,R=i.onAudioRecordEnd,T=i.CustomEmojiIcon,G=i.CustomAttachmentIcon,F=i.CustomCameraIcon,V=i.CustomSendIcon,D=i.CustomMicrophoneIcon,B=i.CustomFileIcon,L=i.CustomImagePreview,U=i.CustomVideoPreview,H=M(t.useState(""),2),z=H[0],W=H[1],N=M(t.useState({height:Jn,isMultiline:!1}),2),Q=N[0],Y=N[1],X=t.useRef(null),$=K(),Z=$.theme,ee=$.currentUserId,te=$.showEmojiButton,re=$.showAttachmentsButton,ne=$.showCameraButton,oe=$.showVoiceRecordButton,ie=$.placeholder,le=$.previewData,ae=$.previewItems,se=$.closePreview,ce=$.onRemovePreviewItem,Ae=$.CustomVoiceRecorder,ue=$.replyTarget,de=$.cancelReply,Ce=$.replyProps,he=$.replyStyle,ve=$.renderReplyPreview,fe=$.editingMessage,me=$.cancelEdit,pe=$.onEditMessage,ge=t.useRef(null);t.useEffect((function(){var e;fe&&fe.id!==ge.current?(ge.current=fe.id,W(null!==(e=fe.text)&&void 0!==e?e:""),Y({height:Jn,isMultiline:!1}),requestAnimationFrame((function(){var e;return null===(e=X.current)||void 0===e?void 0:e.focus()}))):fe||(ge.current=null)}),[fe]);var ye,xe=t.useMemo((function(){return null!=ae&&ae.length?ae:le?[le]:[]}),[ae,le]),be=xe.length>0,we=null==Z||null===(l=Z.sizes)||void 0===l?void 0:l.inputIconSize,Se=function(e){if("number"==typeof e&&e>0)return{width:e,height:e};var t="string"==typeof e&&e.trim().length>0?e.trim():q;return n.style(t)}(we),ke="number"==typeof(ye=we)&&ye>0?ye:24,Ee=0===z.trim().length&&!Q.isMultiline,je=Math.max(0,(Xn-ke)/2),Ie=Ee?{paddingTop:je,paddingBottom:je}:{paddingBottom:je},Me=!!fe,Pe=t.useCallback((function(){Y({height:Jn,isMultiline:!1})}),[]),_e=t.useCallback((function(e){W(e),0===e.length&&Pe()}),[Pe]),Re=t.useCallback((function(e){var t=Math.min(Math.max(e.nativeEvent.contentSize.height,Jn),118),r=t>Jn;Y({height:r?t:Jn,isMultiline:r})}),[]),Te=t.useCallback((function(){var e,t,r,n,o,i;if(ue){var l=null===(e=ue.mediaItems)||void 0===e?void 0:e[0];return{messageId:ue.id,senderName:ue.senderName,preview:null!==(t=ue.text)&&void 0!==t?t:ue.audio?"🎀 Audio message":ue.image?"πŸ“· Photo":ue.video?"πŸŽ₯ Video":null!==(r=ue.fileAttachments)&&void 0!==r&&null!==(r=r[0])&&void 0!==r&&r.name?"πŸ“Ž ".concat(ue.fileAttachments[0].name):"",mediaKind:ue.audio?"audio":ue.video?"video":ue.image||(null!==(n=ue.mediaItems)&&void 0!==n?n:[]).some((function(e){return"image"===e.kind}))?"image":(null!==(o=ue.fileAttachments)&&void 0!==o?o:[]).length?"file":void 0,thumbnailUri:null!==(i=ue.image)&&void 0!==i?i:"image"===(null==l?void 0:l.kind)||"video"===(null==l?void 0:l.kind)?l.uri:void 0}}}),[ue]),Oe=t.useCallback((function(){var e=z.trim();if(fe){if(!e)return;return null==pe||pe(fe,e),W(""),Pe(),void me()}(e||be)&&(S(g({text:e,senderId:ee},ue?{replyTo:Te()}:{})),W(""),Pe(),ue&&de())}),[z,S,ee,be,Pe,ue,Te,de,fe,pe,me]);t.useEffect((function(){z.trim()?null==k||k():null==E||E()}),[z,k,E]);var Ge=!!z.trim()||be||Me,Fe=null==Z?void 0:Z.voiceRecorder,Ve=null!==(a=null==Fe?void 0:Fe.ui)&&void 0!==a?a:{},De=null==Fe?void 0:Fe.styles,Ke=null==Fe?void 0:Fe.config,Be=t.useCallback((function(e){null==R||R(e)}),[R]),Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.maxDuration,n=void 0===r?300:r,o=e.onRecordStart,i=e.onRecordEnd,l=M(t.useState("idle"),2),a=l[0],s=l[1],c=M(t.useState(0),2),A=c[0],d=c[1],C=t.useRef(null),h=t.useRef(null),v=t.useRef(0),f=t.useRef(i);f.current=i;var m=t.useRef(o);m.current=o;var p=t.useRef(n);p.current=n;var g=t.useCallback((function(){h.current&&(clearInterval(h.current),h.current=null)}),[]),y=t.useCallback((function(e){g(),h.current=setInterval((function(){v.current+=1,d(v.current),v.current>=p.current&&e()}),1e3)}),[g]),x=t.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,Sr();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,v.current=0,d(0),s("recording"),y((function(){return k.current()})),null===(r=m.current)||void 0===r||r.call(m)}catch(e){console.warn("[movius-chats] Failed to start recording:",e)}case 15:case"end":return e.stop()}}),e,null,[[0,4]])}))),[y]),b=t.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(),s("paused"),g()}catch(e){console.warn("[movius-chats] Failed to pause:",e)}case 3:case"end":return e.stop()}}),e)}))),[g]),w=t.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(),s("recording"),y((function(){return k.current()}))}catch(e){console.warn("[movius-chats] Failed to resume:",e)}case 3:case"end":return e.stop()}}),e)}))),[y]),S=t.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 g(),C.current=null,r=v.current,v.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=f.current)||void 0===n||n.call(f,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]),k=t.useRef(S);k.current=S;var E=t.useCallback((function(){return k.current()}),[]),j=t.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,g(),C.current=null,v.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 t.useEffect((function(){return function(){g();try{var e;null===(e=C.current)||void 0===e||e.stop()}catch(e){}}}),[g]),{status:a,duration:A,isRecording:"recording"===a,isPaused:"paused"===a,startRecording:x,pauseRecording:b,resumeRecording:w,stopRecording:E,cancelRecording:j}}({maxDuration:null!==(s=null==Ke?void 0:Ke.maxDuration)&&void 0!==s?s:300,onRecordStart:_,onRecordEnd:Be}),Ue=t.useRef(Le);Ue.current=Le;var He=t.useCallback((function(){Ue.current.startRecording()}),[]),ze=t.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,Ue.current.stopRecording();case 2:(t=e.sent)&&(S(g({audio:t.uri,senderId:ee},ue?{replyTo:Te()}:{})),ue&&de());case 4:case"end":return e.stop()}}),e)}))),[S,ee,ue,Te,de]),We=t.useCallback((function(){Ue.current.cancelRecording()}),[]),Ne=t.useCallback((function(){Ue.current.pauseRecording()}),[]),Qe=t.useCallback((function(){Ue.current.resumeRecording()}),[]),Ye=(null==Z||null===(c=Z.inputStyles)||void 0===c||null===(c=c.sendButtonStyle)||void 0===c?void 0:c.backgroundColor)||(null==Z||null===(A=Z.colors)||void 0===A?void 0:A.sentBubbleBackgroundColor)||(null==Z||null===(d=Z.colors)||void 0===d?void 0:d.sentMessageTailColor)||"#22c55e",qe=(null==Z||null===(C=Z.colors)||void 0===C?void 0:C.sendIconsColor)||"rgba(255,255,255,0.95)",Je=null!==(h=Ve.recordingSendButtonBackground)&&void 0!==h?h:Ye,Xe=Ve.recordingBackground,$e=null!==(v=Ve.timerColor)&&void 0!==v?v:qe,Ze=null!==(f=Ve.longPressMicColor)&&void 0!==f?f:qe,et=null!==(m=Ve.waveformColor)&&void 0!==m?m:qe,tt={isRecording:Le.isRecording,isPaused:Le.isPaused,duration:Le.duration,isLocked:!1,slideOffset:{x:0,y:0},waveformData:[],startRecording:Le.startRecording,stopRecording:Le.stopRecording,pauseRecording:Le.pauseRecording,resumeRecording:Le.resumeRecording,cancelRecording:Le.cancelRecording},rt=Ae?Ae(tt):null,nt=null===(p=null==Ce?void 0:Ce.enableReply)||void 0===p||p,ot=!!ue&&nt&&!Me&&!ve,it=Me,lt=ot||it,at=t.useMemo((function(){var t,i,l,a,s,c,A,u;if(!ot||!ue)return null;var d=null===(t=ue.mediaItems)||void 0===t?void 0:t[0],C=null!==(i=ue.image)&&void 0!==i?i:"image"===(null==d?void 0:d.kind)||"video"===(null==d?void 0:d.kind)?d.uri:void 0,h="";return ue.text?h=ue.text:ue.audio?h="🎀 Audio message":ue.video||"video"===(null==d?void 0:d.kind)?h="πŸŽ₯ Video":ue.image||"image"===(null==d?void 0:d.kind)?h="πŸ“· Photo":(null!==(l=ue.fileAttachments)&&void 0!==l?l:[]).length&&(h="πŸ“Ž ".concat(null!==(a=null===(s=ue.fileAttachments)||void 0===s||null===(s=s[0])||void 0===s?void 0:s.name)&&void 0!==a?a:"File")),e.jsxs(r.View,{style:[n(wn||(wn=P(["flex-row items-center px-3.5 pt-2 pb-1.5"]))),{minHeight:40},null==he?void 0:he.container],children:[e.jsxs(r.View,{style:n(Sn||(Sn=P(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(kn||(kn=P(["text-[13px] font-semibold"]))),{color:Ye},null==he?void 0:he.senderName],null==Z?void 0:Z.fontFamily),children:ue.senderName||"You"}),e.jsx(r.Text,{numberOfLines:null!==(c=null==Ce?void 0:Ce.previewMaxLines)&&void 0!==c?c:1,style:J([n(En||(En=P(["text-[12.5px] mt-0.5"]))),{color:"rgba(0,0,0,0.55)"},null==he?void 0:he.previewText],null==Z?void 0:Z.fontFamily),children:h})]}),C&&e.jsx(r.Image,{source:{uri:C},style:[{width:32,height:32,borderRadius:4,marginRight:6},null==he?void 0:he.thumbnail],resizeMode:"cover"}),e.jsx(r.Pressable,{onPress:de,hitSlop:10,style:n(jn||(jn=P(["w-7 h-7 items-center justify-center"]))),children:e.jsxs(o,{width:14,height:14,viewBox:"0 0 24 24",children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18",stroke:(null==Z||null===(A=Z.colors)||void 0===A?void 0:A.inputsIconsColor)||"rgba(0,0,0,0.5)",strokeWidth:2.5,strokeLinecap:"round"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18",stroke:(null==Z||null===(u=Z.colors)||void 0===u?void 0:u.inputsIconsColor)||"rgba(0,0,0,0.5)",strokeWidth:2.5,strokeLinecap:"round"})]})})]})}),[ot,ue,null==Ce?void 0:Ce.previewMaxLines,he,null==Z?void 0:Z.fontFamily,null==Z||null===(y=Z.colors)||void 0===y?void 0:y.inputsIconsColor,Ye,de]),st=t.useMemo((function(){return it?e.jsxs(r.View,{style:[n(In||(In=P(["flex-row items-center px-3.5 pt-2 pb-1.5"]))),{minHeight:40}],children:[e.jsx(r.View,{style:n(Mn||(Mn=P(["mr-2.5"]))),children:e.jsx(gr,{style:{width:16,height:16},color:Ye})}),e.jsxs(r.View,{style:n(Pn||(Pn=P(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(_n||(_n=P(["text-[13px] font-semibold"]))),{color:Ye}],null==Z?void 0:Z.fontFamily),children:"Edit message"}),e.jsx(r.Text,{numberOfLines:1,style:J([n(Rn||(Rn=P(["text-[12.5px] mt-0.5"]))),{color:"rgba(0,0,0,0.55)"}],null==Z?void 0:Z.fontFamily),children:null==fe?void 0:fe.text})]}),e.jsx(r.Pressable,{onPress:function(){me(),W(""),Pe()},hitSlop:10,style:n(Tn||(Tn=P(["w-7 h-7 items-center justify-center"]))),children:e.jsxs(o,{width:14,height:14,viewBox:"0 0 24 24",children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18",stroke:"rgba(0,0,0,0.5)",strokeWidth:2.5,strokeLinecap:"round"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18",stroke:"rgba(0,0,0,0.5)",strokeWidth:2.5,strokeLinecap:"round"})]})})]}):null}),[it,null==fe?void 0:fe.text,Ye,null==Z?void 0:Z.fontFamily,me,Pe]),ct=Ee&&!lt,At=t.useCallback((function(){var t,o,i,l,a,s;return e.jsxs(r.View,{style:[n(On||(On=P(["flex-1 flex-col bg-white overflow-hidden"]))),{minHeight:Xn,borderRadius:ct?9999:24},null==Z||null===(t=Z.inputStyles)||void 0===t?void 0:t.inputContainerStyle],children:[at,st,e.jsxs(r.View,{style:[n(Gn||(Gn=P(["flex-row px-3.5"]))),{minHeight:Xn,alignItems:Ee?"center":"flex-end"}],children:[te&&e.jsx(r.View,{style:Ie,children:e.jsx(r.Pressable,{children:T?e.jsx(T,{}):e.jsx(yr,{style:Se,color:(null==Z||null===(o=Z.colors)||void 0===o?void 0:o.inputsIconsColor)||"rgba(0,0,0,0.7)"})})}),e.jsx(r.TextInput,{ref:X,value:z,onChangeText:_e,placeholder:ie||"Message",style:J([n(Fn||(Fn=P(["bg-transparent flex-1 pl-2"]))),"ios"===r.Platform.OS?n(Vn||(Vn=P(["text-[17px]"]))):n(Dn||(Dn=P(["text-[16px]"]))),{minHeight:Jn,maxHeight:118,paddingVertical:Ee?0:8,marginVertical:Ee?(Xn-Jn)/2:4},{color:(null==Z||null===(i=Z.colors)||void 0===i?void 0:i.inputTextColor)||"rgba(0, 0, 0, 0.87)"}],null==Z?void 0:Z.fontFamily),placeholderTextColor:(null==Z||null===(l=Z.colors)||void 0===l?void 0:l.placeholderTextColor)||"rgba(0, 0, 0, 0.4)",multiline:!0,textAlignVertical:Q.isMultiline&&z.length>0?"top":"center",onContentSizeChange:Re}),!Me&&e.jsxs(r.View,{style:[n(Kn||(Kn=P(["flex-row items-center gap-4"]))),Ie],children:[re&&e.jsx(r.Pressable,{onPress:j,children:G?e.jsx(G,{}):e.jsx(br,{style:Se,color:(null==Z||null===(a=Z.colors)||void 0===a?void 0:a.inputsIconsColor)||"rgba(0,0,0,0.7)"})}),ne&&!z.trim()&&e.jsx(r.Pressable,{onPress:I,children:F?e.jsx(F,{}):e.jsx(pr,{style:Se,color:(null==Z||null===(s=Z.colors)||void 0===s?void 0:s.inputsIconsColor)||"rgba(0,0,0,0.7)"})})]})]})]})}),[ct,Ee,Me,z,Q.isMultiline,Ie,_e,Re,ie,te,re,ne,j,I,T,G,F,Se,Z,at,st]),ut=t.useCallback((function(){var t;return e.jsx(r.Pressable,{onPress:Oe,style:[n(Bn||(Bn=P(["rounded-full justify-center items-center"]))),g({height:Xn,width:Xn,backgroundColor:Ye},null==Z||null===(t=Z.inputStyles)||void 0===t?void 0:t.sendButtonStyle)],children:V?e.jsx(V,{}):e.jsx(wr,{style:n.style("h-6 w-6"),color:qe})})}),[Oe,Ye,qe,null==Z||null===(x=Z.inputStyles)||void 0===x?void 0:x.sendButtonStyle,V]),dt=oe&&!rt&&!Me,Ct=ue&&nt&&!Me&&ve?ve(ue,de):null,ht={inputBarHeight:Xn,primaryColor:Je,backgroundColor:Xe,timerColor:$e,microphoneColor:Ze,waveformColor:et,holdPillBackground:Ve.holdPillBackground,cancelTextColor:Ve.cancelTextColor,chevronColor:Ve.chevronIconColor,lockColor:Ve.lockIconColor,lockPillBackground:Ve.lockPillBackground,deleteIconColor:Ve.deleteIconColor,pauseIconColor:Ve.pauseIconColor,iconSize:Ve.iconSize,lockSlideDistance:Ve.lockSlideDistance,waveCount:Ve.waveformBarCount,enableLockRecording:null==Ke?void 0:Ke.enableLockRecording,enableSlideToCancel:null==Ke?void 0:Ke.enableSlideToCancel,enableWaveform:null==Ke?void 0:Ke.enableWaveform,timerTextStyle:null!==(b=Ve.timerTextStyle)&&void 0!==b?b:null==De?void 0:De.timer,fontFamily:null==Z?void 0:Z.fontFamily,containerStyle:null==De?void 0:De.container,barStyle:null==De?void 0:De.bar,slideTextStyle:null==De?void 0:De.slideText,waveformStyle:null==De?void 0:De.waveform,lockPillStyle:null==De?void 0:De.lockPill,trashButtonStyle:null==De?void 0:De.trashButton,sendButtonStyle:null==De?void 0:De.sendButton,showSendButton:Ge,onSendPress:Oe,sendButtonBackgroundColor:Ye,sendButtonIconColor:qe,renderInputPill:At,renderSendIcon:V?function(){return e.jsx(V,{})}:void 0,renderMicIcon:D?function(){return e.jsx(D,{})}:void 0,onRecordingStart:He,onSend:ze,onCancel:We,onDelete:We,onPauseRecording:Ne,onResumeRecording:Qe};return e.jsxs(r.View,{style:n(Ln||(Ln=P(["w-full px-2"]))),children:[Ct,be&&e.jsx(qn,{previews:xe,closePreview:se,onRemoveItem:ce,CustomFileIcon:B,CustomImagePreview:L,CustomVideoPreview:U,inputHeight:Q.height}),e.jsx(r.View,{style:[n(Un||(Un=P(["w-full"]))),null==Z||null===(w=Z.inputStyles)||void 0===w?void 0:w.inputSectionContainerStyle],children:dt?e.jsx(pn,g({},ht)):e.jsxs(r.View,{style:n(Hn||(Hn=P(["flex-row items-end gap-2"]))),children:[At(),Ge||!oe?ut():rt?e.jsx(r.View,{style:{height:Xn,width:Xn,justifyContent:"center",alignItems:"center"},children:D?e.jsx(D,{}):e.jsx(xr,{style:n.style("h-8 w-8"),color:qe})}):ut()]})}),rt]})},Zn=t.memo($n),eo=function(e){var t,r,n,o=null!==(t=null!==(r=e.text)&&void 0!==r?r:null===(n=e.fileAttachments)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.name)&&void 0!==t?t:"";if(!o)return!1;try{var i,l=require("@react-native-clipboard/clipboard"),a=null!==(i=null==l?void 0:l.default)&&void 0!==i?i:l;if(null!=a&&a.setString)return a.setString(o),!0}catch(e){}try{var s,c=require("react-native");if(null!=c&&null!==(s=c.Clipboard)&&void 0!==s&&s.setString)return c.Clipboard.setString(o),!0}catch(e){}return!1},to=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:i,d:"M9 18q-.825 0-1.412-.587T7 16V4q0-.825.588-1.412T9 2h9q.825 0 1.413.588T20 4v12q0 .825-.587 1.413T18 18zm-4 4q-.825 0-1.412-.587T3 20V7q0-.425.288-.712T4 6t.713.288T5 7v13h10q.425 0 .713.288T16 21t-.288.713T15 22z"})})},ro=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:i,d:"M14 9V5l7 7l-7 7v-4.1c-5 0-8.5 1.6-11 5.1c1-5 4-10 11-11"})})},no=function(t){var n=t.style,o=t.color,i=void 0===o?"#111827":o;return e.jsx(r.View,{style:[{width:18,height:18,borderRadius:9,borderWidth:1.5,borderColor:i,alignItems:"center",justifyContent:"center"},n],children:e.jsx(r.View,{style:{width:4,height:4,borderRadius:2,backgroundColor:i}})})};var oo,io,lo,ao,so=function(o){var i,l,a,s,c,A,u,d=o.message,C=o.anchor,h=o.visible,v=o.onClose,f=o.flags,m=o.ui,p=o.fontFamily,g=o.onAction,y=t.useMemo((function(){return d?function(e,t){var r,n=!(null===(r=e.text)||void 0===r||!r.trim());return[{id:"reply",label:"Reply",Icon:ee},{id:"forward",label:"Forward",Icon:ro},{id:"copy",label:"Copy",Icon:to},{id:"edit",label:"Edit",Icon:gr},{id:"select",label:"Select",Icon:no},{id:"delete",label:"Delete",Icon:en,destructive:!0}].filter((function(e){switch(e.id){case"reply":return!1!==(null==t?void 0:t.enableReply);case"copy":return!1!==(null==t?void 0:t.enableCopy);case"edit":return!1!==(null==t?void 0:t.enableEdit)&&n;case"delete":return!1!==(null==t?void 0:t.enableDelete);case"forward":return!1!==(null==t?void 0:t.enableForward);case"select":return!1!==(null==t?void 0:t.enableSelect);default:return!0}}))}(d,f):[]}),[d,f]),x=null!==(i=null==m?void 0:m.width)&&void 0!==i?i:200,b=null!==(l=null==m?void 0:m.borderRadius)&&void 0!==l?l:12,w=null!==(a=null==m?void 0:m.backgroundColor)&&void 0!==a?a:"#FFFFFF",S=null!==(s=null==m?void 0:m.textColor)&&void 0!==s?s:"#111827",k=null!==(c=null==m?void 0:m.iconColor)&&void 0!==c?c:S,E=null!==(A=null==m?void 0:m.destructiveColor)&&void 0!==A?A:"#EF4444",j=null!==(u=null==m?void 0:m.scrimColor)&&void 0!==u?u:"rgba(0,0,0,0.4)",I=t.useMemo((function(){return C?function(e,t,n,o){var i,l=r.Dimensions.get("window"),a=n*o+12;return i=e.isCurrentUser?e.x+e.width-t:e.x,{left:i=Math.max(8,Math.min(i,l.width-t-8)),top:l.height-(e.y+e.height)>=a+8?e.y+e.height+8:Math.max(8,e.y-a-8)}}(C,x,48,y.length):null}),[C,x,y.length]);if(!d||!C)return null;var M=Math.max(0,C.y-4);return e.jsx(r.Modal,{visible:h,transparent:!0,animationType:"fade",onRequestClose:v,statusBarTranslucent:!0,children:e.jsxs(r.Pressable,{onPress:v,style:[n(zn||(zn=P(["flex-1"]))),{backgroundColor:j}],children:[e.jsx(r.View,{pointerEvents:"none",style:{position:"absolute",top:M,left:0,right:0},children:e.jsx(mr,{message:d,isCurrentUser:C.isCurrentUser,isFirstInSequence:C.isFirstInSequence,staticMode:!0})}),I&&e.jsx(r.Pressable,{onPress:function(){},style:[n(Wn||(Wn=P(["absolute overflow-hidden"]))),{width:x,borderRadius:b,backgroundColor:w,top:I.top,left:I.left,shadowColor:"#000",shadowOpacity:.18,shadowRadius:16,shadowOffset:{width:0,height:6},elevation:6}],children:y.map((function(t){var o=t.destructive?E:S,i=t.destructive?E:k;return e.jsxs(r.Pressable,{onPress:function(){return g(t.id,d)},android_ripple:{color:"rgba(0,0,0,0.06)"},style:[n(Nn||(Nn=P(["flex-row items-center px-4"]))),{height:48},null==m?void 0:m.rowStyle],children:[e.jsx(r.View,{style:{width:22,height:22,marginRight:14},children:e.jsx(t.Icon,{style:{width:22,height:22},color:i})}),e.jsx(r.Text,{style:J([n(Qn||(Qn=P(["text-[15px] font-medium"]))),{color:o},null==m?void 0:m.rowTextStyle],p),children:t.label})]},t.id)}))})]})})},co=function(t){var n=t.style,o=t.color,i=void 0===o?"#111827":o;return e.jsx(r.View,{style:[{width:18,height:18,borderRadius:9,borderWidth:1.5,borderColor:i,alignItems:"center",justifyContent:"center"},n],children:e.jsx(r.View,{style:{width:4,height:4,borderRadius:2,backgroundColor:i}})})};var Ao,uo,Co,ho,vo,fo,mo,po,go,yo,xo,bo,wo,So;function ko(t){var r=t.style;return e.jsxs(o.Svg,{viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:n.style("h-6 w-6 text-black",r),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 Eo,jo,Io,Mo,Po,_o,Ro,To,Oo,Go,Fo,Vo,Do=function(o){var i,l=o.gallery,a=o.onClose,s=K(),c=s.theme,A=s.setIsVideoPlaying,u=t.useRef(null),d=null!==(i=null==l?void 0:l.initialIndex)&&void 0!==i?i:0,C=M(t.useState(d),2),h=C[0],v=C[1],f=r.useWindowDimensions(),m=f.width,p=f.height;t.useEffect((function(){if(null!=l&&l.items.length){var e=l.initialIndex;v(e);var t=l.items[e];A("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==l?void 0:l.initialIndex,null==l?void 0:l.items,A]);var g=t.useCallback((function(){A(!1),a()}),[a,A]),y=t.useCallback((function(e){var t=Math.round(e.nativeEvent.contentOffset.x/m);v(t);var r=null==l?void 0:l.items[t];A("video"===(null==r?void 0:r.kind))}),[null==l?void 0:l.items,m,A]);return l&&0!==l.items.length?e.jsx(r.Modal,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:g,statusBarTranslucent:!0,children:e.jsxs(r.View,{style:[n(mo||(mo=P(["flex-1 bg-black"]))),{width:m,height:p}],children:[e.jsx(r.Pressable,{onPress:g,style:n(po||(po=P(["absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70"]))),children:e.jsx(ko,{style:n(go||(go=P(["h-8 w-8"])))})}),l.items.length>1&&e.jsx(r.View,{style:n(yo||(yo=P(["absolute top-14 left-0 right-0 z-10 items-center"]))),children:e.jsxs(r.Text,{style:J(n(xo||(xo=P(["text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full"]))),null==c?void 0:c.fontFamily),children:[h+1," / ",l.items.length]})}),e.jsx(r.FlatList,{ref:u,data:l.items,horizontal:!0,pagingEnabled:!0,showsHorizontalScrollIndicator:!1,keyExtractor:function(e,t){return"".concat(e.uri,"-").concat(t)},initialScrollIndex:l.initialIndex,extraData:h,getItemLayout:function(e,t){return{length:m,offset:m*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(Ko,{item:r,width:m,height:p,isActive:n===h,autoPlayVideo:n===d&&"video"===r.kind})}})]})}):null},Ko=function(o){var i=o.item,l=o.width,s=o.height,c=o.isActive,A=o.autoPlayVideo,u=K().theme,d=t.useRef(null),C=M(t.useState("video"===i.kind),2),h=C[0],v=C[1],f=M(t.useState(!1),2),m=f[0],p=f[1],g="video"===i.kind&&c&&A;return"image"===i.kind?e.jsx(r.View,{style:{width:l,height:s,justifyContent:"center"},children:e.jsx(r.Image,{source:{uri:i.uri},style:{width:l,height:s},resizeMode:"contain"})}):e.jsxs(r.View,{style:{width:l,height:s,justifyContent:"center",alignItems:"center",paddingHorizontal:16},children:[e.jsx(a,{source:{uri:i.uri},ref:d,controls:!0,paused:!g,shutterColor:"transparent",playInBackground:!1,playWhenInactive:!1,style:{width:l-32,height:.55*s,backgroundColor:"#000"},resizeMode:"contain",onLoadStart:function(){v(!0),p(!1)},onLoad:function(){return v(!1)},onBuffer:function(e){var t=e.isBuffering;return v(t)},onError:function(){p(!0),v(!1)}}),h&&e.jsx(r.View,{style:n(bo||(bo=P(["absolute inset-0 items-center justify-center"]))),pointerEvents:"none",children:e.jsx(It,{style:n.style("h-14 w-14"),spinning:!0})}),m&&e.jsx(r.View,{style:n(wo||(wo=P(["absolute inset-0 items-center justify-center px-6"]))),children:e.jsx(r.Text,{style:J(n(So||(So=P(["text-white font-semibold"]))),null==u?void 0:u.fontFamily),children:"Failed to load video"})})]})},Bo=t.memo(Do),Lo=function(t){var o,i,l,a,s,c=t.typingUsers,A=t.currentUserId,u=K(),d=u.theme,C=u.showAvatars,h=u.renderCustomTyping,v=u.showBubbleTail,f=u.typingText,m=c.filter((function(e){return e.id!==A}));if(!m.length)return null;var p=m.slice(0,2),y=m.length-2,x=C?p.length+(y>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(r.View,{style:[n(Eo||(Eo=P(["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(r.View,{style:{position:"absolute",top:0,left:S,flexDirection:"row"},children:[p.map((function(t,o){var i,l,a;return e.jsx(r.View,{style:[n(jo||(jo=P(["bg-gray-400 w-6 h-6 rounded-full items-center"]))),{marginLeft:o>0?-10:0,zIndex:p.length+o}],children:t.avatar?e.jsx(r.Image,{source:{uri:t.avatar},style:[n(Io||(Io=P(["w-full h-full object-cover rounded-full"]))),null==d||null===(i=d.bubbleStyle)||void 0===i?void 0:i.avatarImageStyle]}):e.jsx(r.Text,{style:J([n(Mo||(Mo=P(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==d||null===(l=d.bubbleStyle)||void 0===l?void 0:l.avatarTextStyle],null==d?void 0:d.fontFamily),children:null===(a=t.name)||void 0===a?void 0:a.charAt(0)})},t.id)})),y>0&&e.jsx(r.View,{style:[n(Po||(Po=P(["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(r.Text,{style:J([n(_o||(_o=P(["text-white text-xs font-semibold"]))),null==d||null===(l=d.bubbleStyle)||void 0===l?void 0:l.additionalTypingUsersTextStyle],null==d?void 0:d.fontFamily),children:["+",y]})})]}),v&&e.jsx(G,{style:n.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(r.View,{style:n(Ro||(Ro=P(["flex-row items-center py-3 px-2 justify-center"]))),children:e.jsx(r.Text,{style:J([n(To||(To=P(["text-gray-600"]))),null==d||null===(s=d.bubbleStyle)||void 0===s?void 0:s.typingTextStyle],null==d?void 0:d.fontFamily),children:null!=f?f:"Typing..."})})]})},Uo=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:i,d:"M8 17q-.825 0-1.412-.587T6 15V9q0-.825.588-1.412T8 7h1l1-1h4l1 1h1q.825 0 1.413.588T18 9v6q0 .825-.587 1.413T16 17zm4-3q.825 0 1.413-.587T14 12t-.587-1.412T12 10t-1.412.588T10 12t.588 1.413T12 14M8.55.5Q9.4.225 10.263.113T12 0q2.35 0 4.438.838t3.7 2.325t2.637 3.5T24 11h-2q-.175-1.8-.95-3.363t-1.988-2.762t-2.787-1.937T12.9 2.05l1.55 1.55l-1.4 1.4zm6.9 23q-.85.275-1.712.388T12 24q-2.35 0-4.437-.837t-3.7-2.325t-2.638-3.5T0 13h2q.2 1.8.963 3.363t1.975 2.762t2.787 1.938t3.375.887L9.55 20.4l1.4-1.4z"})})},Ho="#FFFFFF",zo="ios"===r.Platform.OS?50:28,Wo="ios"===r.Platform.OS?34:18,No=null;try{No=require("react-native-vision-camera")}catch(e){No=null}var Qo,Yo,qo,Jo,Xo,$o,Zo,ei,ti,ri,ni,oi,ii,li,ai,si,ci,Ai,ui,di,Ci,hi,vi=null!=No,fi=null===(Oo=No)||void 0===Oo?void 0:Oo.Camera,mi=null===(Go=No)||void 0===Go?void 0:Go.useCameraDevice,pi=null===(Fo=No)||void 0===Fo?void 0:Fo.useCameraPermission,gi=null===(Vo=No)||void 0===Vo?void 0:Vo.useMicrophonePermission;var yi,xi,bi,wi,Si,ki,Ei,ji,Ii,Mi,Pi,_i=function(o){var l=o.visible,a=o.onClose,s=o.onCapture,c=o.cameraProps,A=o.cameraUIProps,u=o.renderCameraScreen,d=o.themePrimary,C=o.fontFamily,h=t.useMemo((function(){return function(e){var t,r,n,o,i,l,a,s;return{enablePhoto:null===(t=null==e?void 0:e.enablePhoto)||void 0===t||t,enableVideo:null===(r=null==e?void 0:e.enableVideo)||void 0===r||r,enableZoom:null===(n=null==e?void 0:e.enableZoom)||void 0===n||n,enableSwitchCamera:null===(o=null==e?void 0:e.enableSwitchCamera)||void 0===o||o,enableAudio:null===(i=null==e?void 0:e.enableAudio)||void 0===i||i,maxVideoDuration:null!==(l=null==e?void 0:e.maxVideoDuration)&&void 0!==l?l:60,maxZoom:null!==(a=null==e?void 0:e.maxZoom)&&void 0!==a?a:8,photoQuality:null!==(s=null==e?void 0:e.photoQuality)&&void 0!==s?s:"balanced",videoQuality:null==e?void 0:e.videoQuality}}(c)}),[c]);return l?e.jsx(r.Modal,{visible:!0,animationType:"slide",transparent:!1,onRequestClose:a,statusBarTranslucent:!0,children:e.jsx(i.GestureHandlerRootView,{style:n(Qo||(Qo=P(["flex-1"]))),children:vi?e.jsx(Gi,{config:h,cameraUIProps:A,renderCameraScreen:u,onCapture:s,onClose:a,themePrimary:d,fontFamily:C}):e.jsx(Ui,{onClose:a,fontFamily:C})})}):null},Ri={code:"function CameraScreenTsx1(){const{zoomBaseShared,zoomShared}=this.__closure;zoomBaseShared.value=zoomShared.value;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx1","zoomBaseShared","zoomShared","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AAyDiB,SAAAA,gBAAMA,CAAA,QAAAC,cAAA,CAAAC,UAAA,OAAAC,SAAA,CAEfF,cAAc,CAACG,KAAK,CAAGF,UAAU,CAACE,KAAK,CAC3C","ignoreList":[]}',version:"3.16.7"},Ti={code:"function CameraScreenTsx2(e){const{config,zoomBaseShared,zoomShared}=this.__closure;const next=Math.max(1,Math.min(config.maxZoom,zoomBaseShared.value*e.scale));zoomShared.value=next;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx2","e","config","zoomBaseShared","zoomShared","__closure","next","Math","max","min","maxZoom","value","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AA6DmB,QAAC,CAAAA,gBAAKA,CAAAC,CAAA,QAAAC,MAAA,CAAAC,cAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,IAAI,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAACP,MAAM,CAACQ,OAAO,CAAEP,cAAc,CAACQ,KAAK,CAAGV,CAAC,CAACW,KAAK,CAAC,CAAC,CAClFR,UAAU,CAACO,KAAK,CAAGL,IAAI,CAC3B","ignoreList":[]}',version:"3.16.7"},Oi={code:"function CameraScreenTsx3(){const{runOnJS,ctrl,zoomShared}=this.__closure;runOnJS(ctrl.setZoom)(zoomShared.value);}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx3","runOnJS","ctrl","zoomShared","__closure","setZoom","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AAkEe,SAAAA,gBAAMA,CAAA,QAAAC,OAAA,CAAAC,IAAA,CAAAC,UAAA,OAAAC,SAAA,CAEbH,OAAO,CAACC,IAAI,CAACG,OAAO,CAAC,CAACF,UAAU,CAACG,KAAK,CAAC,CAC3C","ignoreList":[]}',version:"3.16.7"},Gi=function(o){var a,s,c,A,d,C,h,v,f,m,p,g,y,x,b,w=o.config,S=o.cameraUIProps,k=o.renderCameraScreen,E=o.onCapture,j=o.onClose,I=o.themePrimary,_=o.fontFamily,R=function(e){var r=e.config,n=e.onCapture,o=t.useRef(null),i=M(t.useState("back"),2),l=i[0],a=i[1],s=mi(l),c=pi(),A=gi(),d=M(t.useState(!1),2),C=d[0],h=d[1],v=M(t.useState(!1),2),f=v[0],m=v[1],p=M(t.useState(1),2),g=p[0],y=p[1],x=M(t.useState(0),2),b=x[0],w=x[1],S=t.useRef(null);t.useEffect((function(){u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null==c||!c.requestPermission||c.hasPermission){e.next=4;break}return e.next=4,c.requestPermission();case 4:if(!r.enableAudio||null==A||!A.requestPermission||A.hasPermission){e.next=7;break}return e.next=7,A.requestPermission();case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.warn("[movius-chats] camera permission error",e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))()}),[c,A,r.enableAudio]),t.useEffect((function(){if(f){w(0);var e=Date.now(),t=setInterval((function(){var t=Math.floor((Date.now()-e)/1e3);w(t),t>=r.maxVideoDuration&&j()}),250);return function(){return clearInterval(t)}}}),[f,r.maxVideoDuration]);var k=t.useCallback(u(O().mark((function e(){var t,i,l;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.current&&r.enablePhoto){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,o.current.takePhoto({qualityPrioritization:r.photoQuality});case 5:return t=e.sent,i=t.path.startsWith("file://")?t.path:"file://".concat(t.path),l={uri:i,type:"image",width:t.width,height:t.height},n(l),e.abrupt("return",l);case 12:return e.prev=12,e.t0=e.catch(2),console.warn("[movius-chats] capturePhoto failed",e.t0),e.abrupt("return",null);case 16:case"end":return e.stop()}}),e,null,[[2,12]])}))),[r.enablePhoto,r.photoQuality,n]),E=t.useCallback(u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.current&&r.enableVideo){e.next=2;break}return e.abrupt("return");case 2:m(!0);try{o.current.startRecording({fileType:"mp4",flash:"off",onRecordingFinished:function(e){var t,r={uri:e.path.startsWith("file://")?e.path:"file://".concat(e.path),type:"video",duration:e.duration,width:e.width,height:e.height};m(!1),w(0),n(r),null===(t=S.current)||void 0===t||t.resolve(r),S.current=null},onRecordingError:function(e){var t;console.warn("[movius-chats] recording error",e),m(!1),w(0),null===(t=S.current)||void 0===t||t.resolve(null),S.current=null}})}catch(e){console.warn("[movius-chats] startRecording failed",e),m(!1)}case 4:case"end":return e.stop()}}),e)}))),[r.enableVideo,n]),j=t.useCallback(u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.current){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise((function(e){S.current={resolve:e};try{o.current.stopRecording()}catch(t){console.warn("[movius-chats] stopRecording failed",t),S.current=null,e(null)}})));case 3:case"end":return e.stop()}}),e)}))),[]),I=t.useCallback((function(){r.enableSwitchCamera&&a((function(e){return"back"===e?"front":"back"}))}),[r.enableSwitchCamera]),P=t.useCallback((function(){h(!0)}),[]),_=t.useCallback((function(e){if(r.enableZoom){var t=Math.max(1,Math.min(r.maxZoom,e));y(t)}}),[r.enableZoom,r.maxZoom]);return{cameraRef:o,Camera:fi,device:s,cameraPerm:c,micPerm:A,facing:l,isCameraReady:C,isRecording:f,zoom:g,elapsed:b,onInitialized:P,capturePhoto:k,startRecording:E,stopRecording:j,switchCamera:I,setZoom:_}}({config:w,onCapture:E}),T=M(t.useState(w.enablePhoto?"photo":"video"),2),G=T[0],F=T[1],V=null!==(a=null==S?void 0:S.captureButtonSize)&&void 0!==a?a:72,D=null!==(s=null==S?void 0:S.controlButtonSize)&&void 0!==s?s:40,K=null!==(c=null==S?void 0:S.backgroundColor)&&void 0!==c?c:"#000",B=null!==(A=null==S?void 0:S.captureRingColor)&&void 0!==A?A:Ho,L=null!==(d=null==S?void 0:S.recordingRingColor)&&void 0!==d?d:"#EF4444",U=null!==(C=null==S?void 0:S.recordingIndicatorColor)&&void 0!==C?C:"#EF4444",H=null!==(h=null==S?void 0:S.captureDotColor)&&void 0!==h?h:Ho,z=null!==(v=null!==(f=null==S?void 0:S.activeModeTextColor)&&void 0!==f?f:I)&&void 0!==v?v:"#FFFFFF",W=null!==(m=null==S?void 0:S.inactiveModeTextColor)&&void 0!==m?m:"rgba(255,255,255,0.7)",N=null!==(p=null==S?void 0:S.iconColor)&&void 0!==p?p:"#FFFFFF",Q=l.useSharedValue(1),Y=l.useSharedValue(1);t.useEffect((function(){Q.value=R.zoom,Y.value=R.zoom}),[R.zoom,Q,Y]);var q,X,$,Z,ee,te=i.Gesture.Pinch().enabled(!!w.enableZoom).onStart((q=[new global.Error,-3,-27],X=function(){Y.value=Q.value},X.__closure={zoomBaseShared:Y,zoomShared:Q},X.__workletHash=0xcc3ab6fb08f,X.__initData=Ri,X.__stackDetails=q,X)).onUpdate(function(){var e=[new global.Error,-4,-27],t=function(e){var t=Math.max(1,Math.min(w.maxZoom,Y.value*e.scale));Q.value=t};return t.__closure={config:w,zoomBaseShared:Y,zoomShared:Q},t.__workletHash=0xc08a45e6a7d,t.__initData=Ti,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-4,-27],t=function(){l.runOnJS(R.setZoom)(Q.value)};return t.__closure={runOnJS:l.runOnJS,ctrl:R,zoomShared:Q},t.__workletHash=0x918aea49a82,t.__initData=Oi,t.__stackDetails=e,t}()),re=function(){var e=u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("photo"!==G){e.next=4;break}return e.next=3,R.capturePhoto();case 3:return e.abrupt("return");case 4:if(!R.isRecording){e.next=9;break}return e.next=7,R.stopRecording();case 7:e.next=11;break;case 9:return e.next=11,R.startRecording();case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=null!==(g=null===(y=R.cameraPerm)||void 0===y?void 0:y.hasPermission)&&void 0!==g&&g,oe=!(w.enableAudio&&"video"===G)||null!==(x=null===(b=R.micPerm)||void 0===b?void 0:b.hasPermission)&&void 0!==x&&x;if(k){var ie={isCameraReady:R.isCameraReady,isRecording:R.isRecording,facing:R.facing,zoom:R.zoom,elapsed:R.elapsed,capturePhoto:R.capturePhoto,startRecording:R.startRecording,stopRecording:R.stopRecording,switchCamera:R.switchCamera,setZoom:R.setZoom,close:j};return e.jsx(r.View,{style:[n(Yo||(Yo=P(["flex-1"]))),{backgroundColor:K}],children:k(ie)})}return e.jsxs(r.View,{style:[n(qo||(qo=P(["flex-1 relative"]))),{backgroundColor:K}],children:[e.jsx(i.GestureDetector,{gesture:te,children:e.jsx(r.View,{style:n(Jo||(Jo=P(["flex-1"]))),children:R.device&&ne?e.jsx(R.Camera,{ref:R.cameraRef,style:n(Xo||(Xo=P(["absolute inset-0"]))),device:R.device,isActive:!0,photo:w.enablePhoto,video:w.enableVideo,audio:w.enableAudio,zoom:R.zoom,onInitialized:R.onInitialized}):e.jsx(Li,{fontFamily:_,cameraGranted:ne,audioGranted:oe})})}),e.jsxs(r.View,{style:[n($o||($o=P(["absolute left-0 right-0 flex-row justify-between items-center px-4"]))),{top:zo}],pointerEvents:"box-none",children:[e.jsx(Fi,{size:D,onPress:j,bg:"rgba(0,0,0,0.5)",children:e.jsx(Bi,{size:.55*D,color:N})}),R.isRecording&&e.jsxs(r.View,{style:n(Zo||(Zo=P(["flex-row items-center gap-1.5 self-center"]))),children:[e.jsx(r.View,{style:[n(ei||(ei=P(["rounded-full"]))),{width:10,height:10,backgroundColor:U}]}),e.jsx(r.Text,{style:J([n(ti||(ti=P(["text-white font-semibold"]))),null==S?void 0:S.timerTextStyle],_),children:($=R.elapsed,Z=Math.floor($/60),ee=$%60,"".concat(Z.toString().padStart(2,"0"),":").concat(ee.toString().padStart(2,"0")))})]}),w.enableSwitchCamera&&!R.isRecording?e.jsx(Fi,{size:D,onPress:R.switchCamera,bg:"rgba(0,0,0,0.5)",children:e.jsx(Uo,{style:{width:.55*D,height:.55*D},color:N})}):e.jsx(r.View,{style:{width:D,height:D}})]}),e.jsxs(r.View,{style:[n(ri||(ri=P(["absolute left-0 right-0 items-center"]))),{bottom:Wo}],pointerEvents:"box-none",children:[!R.isRecording&&w.enablePhoto&&w.enableVideo&&e.jsxs(r.View,{style:n(ni||(ni=P(["flex-row mb-5 px-1.5 py-1.5 rounded-full bg-black/40"]))),children:[e.jsx(Vi,{label:"Photo",active:"photo"===G,activeBg:z,inactiveColor:W,fontFamily:_,onPress:function(){return F("photo")}}),e.jsx(Vi,{label:"Video",active:"video"===G,activeBg:z,inactiveColor:W,fontFamily:_,onPress:function(){return F("video")}})]}),e.jsx(Ki,{size:V,mode:G,isRecording:R.isRecording,ringColor:B,recRingColor:L,captureDotColor:H,recDotColor:U,onPress:re})]})]})},Fi=function(t){var o=t.size,i=t.onPress,l=t.bg,a=t.children,s=t.style;return e.jsx(r.Pressable,{onPress:i,style:[n(oi||(oi=P(["items-center justify-center"]))),{width:o,height:o,borderRadius:o/2,backgroundColor:l},s],children:a})},Vi=function(t){var o=t.label,i=t.active,l=t.activeBg,a=t.inactiveColor,s=t.fontFamily,c=t.onPress;return e.jsx(r.Pressable,{onPress:c,style:[n(ii||(ii=P(["px-4 py-1.5 rounded-full"]))),i?{backgroundColor:l}:n(li||(li=P(["bg-transparent"])))],children:e.jsx(r.Text,{style:J([n(ai||(ai=P(["text-sm font-medium"]))),{color:i?"#000000":a}],s),children:o})})},Di={code:"function CameraScreenTsx4(){const{scale}=this.__closure;return{transform:[{scale:scale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx4","scale","__closure","transform","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AAiJwC,SAAAA,iBAAA,QAAAC,KAAA,OAAAC,SAAA,OAAO,CACvCC,SAAS,CAAE,CAAC,CAAEF,KAAK,CAAEA,KAAK,CAACG,KAAM,CAAC,CACtC,CAAC","ignoreList":[]}',version:"3.16.7"},Ki=function(o){var i=o.size,a=o.mode,s=o.isRecording,c=o.ringColor,A=o.recRingColor,u=o.captureDotColor,d=o.onPress,C=l.useSharedValue(1);t.useEffect((function(){C.value=l.withTiming(s?.55:1,{duration:180})}),[s,C]);var h,v,f=l.useAnimatedStyle((h=[new global.Error,-2,-27],(v=function(){return{transform:[{scale:C.value}]}}).__closure={scale:C},v.__workletHash=1952157967078,v.__initData=Di,v.__stackDetails=h,v)),m=.78*i,p="video"===a&&s?A:u;return e.jsx(r.Pressable,{onPress:d,children:e.jsx(r.View,{style:[n(si||(si=P(["items-center justify-center"]))),{width:i,height:i,borderRadius:i/2,borderWidth:4,borderColor:s&&"video"===a?A:c}],children:e.jsx(l.View,{style:[f,{width:m,height:m,borderRadius:s&&"video"===a?8:m/2,backgroundColor:p}]})})})},Bi=function(t){var r=t.size,n=t.color;return e.jsxs(o,{width:r,height:r,viewBox:"0 0 24 24",children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18",stroke:n,strokeWidth:2,strokeLinecap:"round"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18",stroke:n,strokeWidth:2,strokeLinecap:"round"})]})},Li=function(t){var o=t.fontFamily,i=t.cameraGranted,l=t.audioGranted;return e.jsx(r.View,{style:n(ci||(ci=P(["flex-1 items-center justify-center px-8"]))),children:e.jsx(r.Text,{style:J([n(Ai||(Ai=P(["text-white text-base text-center"])))],o),children:i?l?"Initializing camera…":"Microphone permission is required to record video.":"Camera permission is required to use this feature."})})},Ui=function(t){var o=t.onClose,i=t.fontFamily;return e.jsxs(r.View,{style:n(ui||(ui=P(["flex-1 bg-black items-center justify-center px-8"]))),children:[e.jsx(r.Text,{style:J([n(di||(di=P(["text-white text-base text-center mb-4"])))],i),children:"`react-native-vision-camera` is not installed. Install version 4.7.3 and rebuild the app to use the built-in camera, or pass your own `renderCameraScreen` / `onCameraPress` instead."}),e.jsx(r.Pressable,{onPress:o,style:n(Ci||(Ci=P(["px-6 py-2.5 rounded-full bg-white/15"]))),children:e.jsx(r.Text,{style:J([n(hi||(hi=P(["text-white text-sm font-medium"])))],i),children:"Close"})})]})};var Hi,zi,Wi,Ni,Qi,Yi,qi,Ji,Xi,$i={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"},Zi={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"},el=function(o){var i=o.color,a=o.count,s=l.useSharedValue(0);return t.useEffect((function(){s.value=l.withRepeat(l.withTiming(1,{duration:4500,easing:l.Easing.linear}),-1,!1)}),[]),e.jsx(r.View,{style:n(Mi||(Mi=P(["flex-row items-center justify-between h-6"]))),children:Array.from({length:a}).map((function(t,r){return e.jsx(rl,{index:r,total:a,tick:s,color:i},r)}))})},tl={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"},rl=function(t){var r,o,i=t.index,a=t.total,s=t.tick,c=t.color,A=l.useAnimatedStyle((r=[new global.Error,-4,-27],(o=function(){var e=s.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:s,index:i,total:a},o.__workletHash=5267961911334,o.__initData=tl,o.__stackDetails=r,o));return e.jsx(l.View,{style:[n(Pi||(Pi=P(["mx-px rounded-full"]))),{width:2,backgroundColor:c},A]})};function nl(){r.Vibration.vibrate(15)}var ol,il,ll,al,sl,cl,Al,ul,dl,Cl,hl,vl,fl={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"},ml={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"},pl={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"},gl={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"},yl={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"},xl={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"},bl={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"},wl=function(){var o,i,l,a,s=K(),c=s.messages,A=s.currentUserId,u=s.onMessageLongPress,d=s.mediaViewerGallery,C=s.clearMediaViewerGallery,h=s.typingUsers,v=s.onSendMessage,f=s.onTypingStart,m=s.onTypingEnd,p=s.onAttachmentPress,g=s.onAudioRecordEnd,y=s.onAudioRecordStart,x=s.onCameraPress,b=s.renderCustomInput,w=s.CustomEmojiIcon,S=s.CustomAttachmentIcon,k=s.CustomCameraIcon,E=s.CustomMicrophoneIcon,j=s.CustomSendIcon,I=s.CustomFileIcon,_=s.CustomImagePreview,R=s.CustomVideoPreview,T=s.keyboardVerticalOffset,O=void 0===T?0:T,G=s.disableKeyboardAvoiding,F=void 0!==G&&G,V=s.startReply,D=s.actionSheetMessage,B=s.actionAnchor,L=s.openActionSheet,U=s.closeActionSheet,H=s.messageActionProps,z=s.messageActionUI,W=s.renderMessageActions,N=s.onCopyMessage,Q=s.onDeleteMessage,Y=s.onForwardMessage,q=s.startEdit,J=s.enterSelectionMode,X=s.cameraVisible,$=s.openCamera,Z=s.closeCamera,ee=s.enableBuiltInCamera,te=s.cameraProps,re=s.cameraUIProps,ne=s.renderCameraScreen,oe=s.onCameraCapture,ie=s.theme,le=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=M(t.useState(0),2),o=n[0],i=n[1];return t.useEffect((function(){if(e){var t="ios"===r.Platform.OS?"keyboardWillShow":"keyboardDidShow",n="ios"===r.Platform.OS?"keyboardWillHide":"keyboardDidHide",o=r.Keyboard.addListener(t,(function(e){i(e.endCoordinates.height)})),l=r.Keyboard.addListener(n,(function(){return i(0)}));return function(){o.remove(),l.remove()}}i(0)}),[e]),e?o:0}(!F),ae=t.useCallback((function(e,t){u?u(e):L(e,t)}),[u,L]),se=t.useCallback((function(e,t){switch(U(),e){case"reply":V(t);break;case"copy":N?N(t):eo(t);break;case"edit":q(t);break;case"delete":null==Q||Q(t);break;case"forward":null==Y||Y(t);break;case"select":J(t)}}),[U,V,N,Q,Y,q,J]),ce=t.useCallback((function(){x?x():ee&&$()}),[x,ee,$]),Ae=b?b():e.jsx(Zn,{onSendMessage:v,onTypingStart:f,onTypingEnd:m,onAttachmentPress:p,onAudioRecordEnd:g,onAudioRecordStart:y,onCameraPress:ce,CustomEmojiIcon:w,CustomAttachmentIcon:S,CustomCameraIcon:k,CustomMicrophoneIcon:E,CustomSendIcon:j,CustomFileIcon:I,CustomImagePreview:_,CustomVideoPreview:R}),ue=null!==(o=null!==(i=null==ie||null===(l=ie.inputStyles)||void 0===l||null===(l=l.sendButtonStyle)||void 0===l?void 0:l.backgroundColor)&&void 0!==i?i:null==ie||null===(a=ie.colors)||void 0===a?void 0:a.sentBubbleBackgroundColor)&&void 0!==o?o:void 0,de=D?W?W(D,U,null!=B?B:void 0):e.jsx(so,{message:D,anchor:B,visible:!0,onClose:U,flags:H,ui:z,fontFamily:null==ie?void 0:ie.fontFamily,onAction:se}):null,Ce=e.jsxs(r.View,{style:n(ul||(ul=P(["flex-1 px-2 pb-4 gap-2 relative"]))),children:[e.jsx(r.FlatList,{style:n(dl||(dl=P(["flex-1"]))),data:c,keyExtractor:function(e){return e.id},renderItem:function(t){var r,n=t.item,o=t.index;return e.jsx(mr,{message:n,isCurrentUser:n.senderId===A,onLongPress:function(e){return ae(n,e)},isFirstInSequence:o===c.length-1||(null===(r=c[o+1])||void 0===r?void 0:r.senderId)!==n.senderId})},ListHeaderComponent:e.jsx(Lo,{typingUsers:h||[],currentUserId:A}),showsVerticalScrollIndicator:!1,inverted:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive"}),e.jsx(r.View,{style:!F&&le>0?{marginBottom:le}:void 0,children:Ae}),e.jsx(Bo,{gallery:d,onClose:C}),de,ee&&e.jsx(_i,{visible:X,onClose:Z,onCapture:function(e){Z(),null==oe||oe(e)},cameraProps:te,cameraUIProps:re,renderCameraScreen:ne,themePrimary:ue,fontFamily:null==ie?void 0:ie.fontFamily})]});return F?e.jsx(r.View,{style:n(Cl||(Cl=P(["flex-1"]))),children:Ce}):"android"===r.Platform.OS?e.jsx(r.View,{style:n(hl||(hl=P(["flex-1"]))),children:Ce}):e.jsx(r.KeyboardAvoidingView,{style:n(vl||(vl=P(["flex-1"]))),behavior:"padding",keyboardVerticalOffset:O,children:Ce})};exports.CameraScreen=_i,exports.InlineReply=jt,exports.LongPressOverlay=so,exports.MessageActionsPopover=function(o){var i,l,a,s,c,A,u,d=o.message,C=o.anchor,h=o.visible,v=o.onClose,f=o.flags,m=o.ui,p=o.fontFamily,g=o.onAction,y=t.useMemo((function(){return d?function(e,t){var r,n=!(null===(r=e.text)||void 0===r||!r.trim());return[{id:"reply",label:"Reply",Icon:ee},{id:"forward",label:"Forward",Icon:ro},{id:"copy",label:"Copy",Icon:to},{id:"edit",label:"Edit",Icon:gr},{id:"select",label:"Select",Icon:co},{id:"delete",label:"Delete",Icon:en,destructive:!0}].filter((function(e){switch(e.id){case"reply":return!1!==(null==t?void 0:t.enableReply);case"copy":return!1!==(null==t?void 0:t.enableCopy);case"edit":return!1!==(null==t?void 0:t.enableEdit)&&n;case"delete":return!1!==(null==t?void 0:t.enableDelete);case"forward":return!1!==(null==t?void 0:t.enableForward);case"select":return!1!==(null==t?void 0:t.enableSelect);default:return!0}}))}(d,f):[]}),[d,f]),x=null!==(i=null==m?void 0:m.width)&&void 0!==i?i:200,b=null!==(l=null==m?void 0:m.borderRadius)&&void 0!==l?l:12,w=null!==(a=null==m?void 0:m.backgroundColor)&&void 0!==a?a:"#FFFFFF",S=null!==(s=null==m?void 0:m.textColor)&&void 0!==s?s:"#111827",k=null!==(c=null==m?void 0:m.iconColor)&&void 0!==c?c:S,E=null!==(A=null==m?void 0:m.destructiveColor)&&void 0!==A?A:"#EF4444",j=null!==(u=null==m?void 0:m.backdropColor)&&void 0!==u?u:"rgba(0,0,0,0.18)",I=t.useMemo((function(){return function(e,t,n,o){var i=r.Dimensions.get("window");if(!e)return{top:i.height/2-n*o/2,left:i.width/2-t/2};var l,a=n*o+12;return l=e.isCurrentUser?e.x+e.width-t:e.x,l=Math.max(8,Math.min(l,i.width-t-8)),{top:i.height-(e.y+e.height)>=a+8?e.y+e.height+6:Math.max(8,e.y-a-6),left:l}}(C,x,48,y.length)}),[C,x,y.length]);return d?e.jsx(r.Modal,{visible:h,transparent:!0,animationType:"fade",onRequestClose:v,statusBarTranslucent:!0,children:e.jsx(r.Pressable,{onPress:v,style:[n(oo||(oo=P(["flex-1"]))),{backgroundColor:j}],children:e.jsx(r.Pressable,{onPress:function(){},style:[n(io||(io=P(["absolute overflow-hidden"]))),{width:x,borderRadius:b,backgroundColor:w,top:I.top,left:I.left,shadowColor:"#000",shadowOpacity:.16,shadowRadius:16,shadowOffset:{width:0,height:6},elevation:6}],children:y.map((function(t){var o=t.destructive?E:S,i=t.destructive?E:k;return e.jsxs(r.Pressable,{onPress:function(){return g(t.id,d)},android_ripple:{color:"rgba(0,0,0,0.06)"},style:[n(lo||(lo=P(["flex-row items-center px-4"]))),{height:48},null==m?void 0:m.rowStyle],children:[e.jsx(r.View,{style:{width:22,height:22,marginRight:14},children:e.jsx(t.Icon,{style:{width:22,height:22},color:i})}),e.jsx(r.Text,{style:J([n(ao||(ao=P(["text-[15px] font-medium"]))),{color:o},null==m?void 0:m.rowTextStyle],p),children:t.label})]},t.id)}))})})}):null},exports.MessageActionsSheet=function(t){var o=t.message,i=t.visible,l=t.onClose,a=t.flags,s=t.fontFamily,c=t.backgroundColor,A=void 0===c?"#1f2937":c,u=t.textColor,d=void 0===u?"#FFFFFF":u,C=t.iconColor,h=void 0===C?"#FFFFFF":C,v=t.destructiveColor,f=void 0===v?"#ef4444":v,m=t.rowStyle,p=t.rowTextStyle,g=t.onAction;if(!o)return null;var y=function(e){return[{id:"reply",label:"Reply",Icon:ee},{id:"copy",label:"Copy",Icon:to},{id:"edit",label:"Edit",Icon:gr},{id:"forward",label:"Forward",Icon:ro},{id:"delete",label:"Delete",Icon:en,destructive:!0}].filter((function(t){switch(t.id){case"reply":return!1!==(null==e?void 0:e.enableReply);case"copy":return!1!==(null==e?void 0:e.enableCopy);case"edit":return!1!==(null==e?void 0:e.enableEdit);case"delete":return!1!==(null==e?void 0:e.enableDelete);case"forward":return!1!==(null==e?void 0:e.enableForward);default:return!0}}))}(a);return e.jsx(r.Modal,{visible:i,transparent:!0,animationType:"fade",onRequestClose:l,statusBarTranslucent:!0,children:e.jsxs(r.Pressable,{onPress:l,style:n(Ao||(Ao=P(["flex-1 bg-black/50 justify-end"]))),children:[e.jsx(r.Pressable,{onPress:function(){},style:[n(uo||(uo=P(["mx-3 mb-6 rounded-2xl overflow-hidden"]))),{backgroundColor:A}],children:y.map((function(t,i){var l=t.destructive?f:d,a=t.destructive?f:h;return e.jsxs(r.Pressable,{onPress:function(){g(t.id,o)},style:[n(Co||(Co=P(["flex-row items-center justify-between px-5 py-4"]))),0!==i?{borderTopWidth:.5,borderTopColor:"rgba(255,255,255,0.08)"}:null,m],children:[e.jsx(r.Text,{style:J([n(ho||(ho=P(["text-[16px] font-medium"]))),{color:l},p],s),children:t.label}),e.jsx(r.View,{style:{width:22,height:22},children:e.jsx(t.Icon,{style:{width:22,height:22},color:a})})]},t.id)}))}),e.jsx(r.Pressable,{onPress:l,style:[n(vo||(vo=P(["mx-3 mb-3 rounded-2xl py-4 items-center"]))),{backgroundColor:A}],children:e.jsx(r.Text,{style:J([n(fo||(fo=P(["text-[16px] font-semibold"]))),{color:d}],s),children:"Cancel"})})]})})},exports.ReplyPreview=function(t){var i=t.message,l=t.onCancel,a=t.previewMaxLines,s=void 0===a?1:a,c=t.replyStyle,A=t.fontFamily,u=t.accentColor,d=void 0===u?"#22c55e":u,C=t.closeIconColor,h=void 0===C?"rgba(0,0,0,0.5)":C,v=t.backgroundColor,f=void 0===v?"#FFFFFF":v,m=t.senderNameColor,p=t.previewTextColor,g=i.senderName||"You",y=function(e){var t,r,n,o,i,l,a=null===(t=e.mediaItems)||void 0===t?void 0:t[0];return e.text?{text:e.text,thumbnail:null!==(n=e.image)&&void 0!==n?n:"image"===(null==a?void 0:a.kind)||"video"===(null==a?void 0:a.kind)?a.uri:void 0}:e.audio?{text:"🎀 Audio message"}:e.video?{text:"πŸŽ₯ Video",thumbnail:e.video}:"video"===(null==a?void 0:a.kind)?{text:"πŸŽ₯ Video",thumbnail:a.uri}:e.image||"image"===(null==a?void 0:a.kind)?{text:"πŸ“· Photo",thumbnail:null!==(o=e.image)&&void 0!==o?o:null==a?void 0:a.uri}:(null!==(r=e.fileAttachments)&&void 0!==r?r:[]).length?{text:"πŸ“Ž ".concat(null!==(i=null===(l=e.fileAttachments)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.name)&&void 0!==i?i:"File")}:{text:"Message"}}(i),x=y.text,b=y.thumbnail;return e.jsxs(r.View,{style:[n(ol||(ol=P(["flex-row items-stretch mx-2 mb-1 rounded-xl overflow-hidden"]))),{backgroundColor:f,minHeight:56,shadowColor:"#000",shadowOpacity:.06,shadowRadius:4,shadowOffset:{width:0,height:1},elevation:1},null==c?void 0:c.container],children:[e.jsx(r.View,{style:[n(il||(il=P(["w-[3px] self-stretch"]))),{backgroundColor:d},null==c?void 0:c.replyBar]}),e.jsxs(r.View,{style:n(ll||(ll=P(["flex-1 flex-row items-center pl-3 pr-2 py-2"]))),children:[e.jsxs(r.View,{style:n(al||(al=P(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(sl||(sl=P(["text-[14px] font-semibold"]))),{color:null!=m?m:d},null==c?void 0:c.senderName],A),children:g}),e.jsx(r.Text,{numberOfLines:s,style:J([n(cl||(cl=P(["text-[13px] mt-0.5"]))),{color:null!=p?p:"rgba(0,0,0,0.55)"},null==c?void 0:c.previewText],A),children:x})]}),b&&e.jsx(r.Image,{source:{uri:b},style:[{width:36,height:36,borderRadius:4,marginRight:6},null==c?void 0:c.thumbnail],resizeMode:"cover"}),e.jsx(r.Pressable,{onPress:l,hitSlop:10,style:n(Al||(Al=P(["w-7 h-7 items-center justify-center"]))),children:e.jsxs(o,{width:14,height:14,viewBox:"0 0 24 24",children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18",stroke:h,strokeWidth:2.5,strokeLinecap:"round"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18",stroke:h,strokeWidth:2.5,strokeLinecap:"round"})]})})]})]})},exports.SwipeableMessage=le,exports.VoiceRecorder=function(o){var i=o.primaryColor,a=void 0===i?"#16A34A":i,s=o.backgroundColor,c=void 0===s?"#0B141A":s,A=o.waveformColor,u=void 0===A?"#E9EDEF":A,d=o.timerColor,C=void 0===d?"#FFFFFF":d,h=o.sendButtonColor,v=o.deleteIconColor,f=void 0===v?"#8696A0":v,m=o.pauseIconColor,p=void 0===m?"#F15C6D":m,g=o.borderRadius,y=void 0===g?16:g,x=o.sendButtonSize,b=void 0===x?50:x,w=o.waveCount,S=void 0===w?32:w,k=o.renderDeleteIcon,E=o.renderSendIcon,j=o.renderPauseIcon,I=o.renderPlayIcon,_=o.renderWaveform,R=o.onSend,T=o.onDelete,O=o.onPause,G=o.onResume,F=M(t.useState(0),2),V=F[0],D=F[1],K=M(t.useState(!1),2),B=K[0],L=K[1],U=t.useRef(Date.now()),H=t.useRef(0),z=t.useRef(0);t.useEffect((function(){U.current=Date.now()}),[]),t.useEffect((function(){if(!B){var e=setInterval((function(){D((Date.now()-U.current-H.current)/1e3)}),250);return function(){return clearInterval(e)}}}),[B]);var W=l.useSharedValue(1),N=l.useSharedValue(1);t.useEffect((function(){W.value=l.withRepeat(l.withSequence(l.withTiming(.5,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(1,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),N.value=l.withRepeat(l.withSequence(l.withTiming(.3,{duration:600}),l.withTiming(1,{duration:600})),-1,!1)}),[]);var Q,Y,q=l.useAnimatedStyle((Q=[new global.Error,-3,-27],(Y=function(){return{opacity:B?1:W.value}}).__closure={isPaused:B,pauseOpacity:W},Y.__workletHash=0xf63a8f6d95,Y.__initData=$i,Y.__stackDetails=Q,Y)),J=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:N.value}};return t.__closure={recBlink:N},t.__workletHash=6095431465582,t.__initData=Zi,t.__stackDetails=e,t}()),X={backgroundColor:c,borderTopLeftRadius:y,borderTopRightRadius:y},$=null!=h?h:a;return e.jsxs(r.View,{style:[n(yi||(yi=P(["w-full px-4 py-2.5"]))),X],children:[e.jsxs(r.View,{style:n(xi||(xi=P(["flex-row items-center gap-3 px-1 pt-1.5 pb-2"]))),children:[e.jsx(l.View,{style:[n(bi||(bi=P(["w-1.5 h-1.5 rounded-full"]))),{backgroundColor:p},J]}),e.jsx(r.Text,{style:[n(wi||(wi=P(["text-base font-semibold"]))),{color:C,minWidth:42}],numberOfLines:1,children:lt(V)}),e.jsx(r.View,{style:n(Si||(Si=P(["flex-1"]))),children:_?_():e.jsx(el,{color:u,count:S})})]}),e.jsxs(r.View,{style:n(ki||(ki=P(["flex-row items-center justify-between mt-1"]))),children:[e.jsx(r.Pressable,{onPress:T,hitSlop:12,style:[n(Ei||(Ei=P(["items-center justify-center rounded-full"]))),{width:b,height:b}],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:k?k():e.jsx(en,{style:n.style("w-6 h-6"),color:f})}),e.jsx(r.Pressable,{onPress:function(){L((function(e){var t=!e;return t?(z.current=Date.now(),null==O||O()):(H.current+=Date.now()-z.current,z.current=0,null==G||G()),t}))},hitSlop:12,style:n(ji||(ji=P(["items-center justify-center px-4"]))),accessibilityRole:"button",accessibilityLabel:B?"Resume recording":"Pause recording",children:B?I?I():e.jsx(nt,{style:n.style("w-7 h-7"),color:p}):e.jsx(l.View,{style:q,children:j?j():e.jsx(rt,{style:n.style("w-7 h-7"),color:p})})}),e.jsx(r.Pressable,{onPress:R,hitSlop:6,accessibilityRole:"button",accessibilityLabel:"Send recording",style:[n(Ii||(Ii=P(["items-center justify-center rounded-full"]))),{width:b,height:b,backgroundColor:$}],children:E?E():e.jsx(wr,{style:n.style("w-6 h-6"),color:"#FFFFFF"})})]})]})},exports.VoiceRecorderFlow=pn,exports.VoiceRecordingGesture=function(o){var a=o.primaryColor,s=void 0===a?"#16A34A":a,c=o.backgroundColor,A=void 0===c?"#1F2C33":c,u=o.timerColor,d=void 0===u?"#FFFFFF":u,C=o.microphoneColor,h=void 0===C?"#FFFFFF":C,v=o.lockColor,f=void 0===v?"#E9EDEF":v,m=o.lockPillBackground,p=void 0===m?"#1F2C33":m,g=o.cancelTextColor,y=void 0===g?"rgba(255,255,255,0.6)":g,x=o.barHeight,b=void 0===x?48:x,w=o.micSize,S=o.renderMicIcon,k=o.renderLockIcon,E=o.renderArrowIcon,j=o.onCancel,I=o.onLock,_=null!=w?w:b,R=M(t.useState(0),2),T=R[0],O=R[1],G=t.useRef(Date.now());t.useEffect((function(){G.current=Date.now();var e=setInterval((function(){O((Date.now()-G.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var F=l.useSharedValue(0),V=l.useSharedValue(0),D=l.useSharedValue(0),K=l.useSharedValue(1),B=l.useSharedValue(0),L=l.useSharedValue(0),U=l.useSharedValue(0);t.useEffect((function(){D.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:700,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:700,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),K.value=l.withRepeat(l.withSequence(l.withTiming(1.18,{duration:700,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(1.12,{duration:700,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),B.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1)}),[]);var H=t.useRef(j);H.current=j;var z=t.useRef(I);z.current=I;var W,N,Q=function(){var e;nl(),null===(e=H.current)||void 0===e||e.call(H)},Y=function(){var e;nl(),null===(e=z.current)||void 0===e||e.call(z)},q=i.Gesture.Pan().minDistance(0).onBegin((W=[new global.Error,-5,-27],N=function(){L.value=0,U.value=0,F.value=0,V.value=0},N.__closure={cancelFired:L,lockFired:U,dragX:F,dragY:V},N.__workletHash=9031413480896,N.__initData=fl,N.__stackDetails=W,N)).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);F.value=t,V.value=r,0===U.value&&r<=-70&&(U.value=1,l.runOnJS(Y)()),0===L.value&&t<=-90&&(L.value=1,l.runOnJS(Q)())};return t.__closure={dragX:F,dragY:V,lockFired:U,LOCK_THRESHOLD:70,runOnJS:l.runOnJS,fireLock:Y,cancelFired:L,CANCEL_THRESHOLD:90,fireCancel:Q},t.__workletHash=0xac60b03bef6,t.__initData=ml,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===U.value&&0===L.value&&(F.value=l.withSpring(0,{damping:18,stiffness:220}),V.value=l.withSpring(0,{damping:18,stiffness:220}))};return t.__closure={lockFired:U,cancelFired:L,dragX:F,withSpring:l.withSpring,dragY:V},t.__workletHash=0x962b8aa90f5,t.__initData=pl,t.__stackDetails=e,t}()),J=l.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.abs(F.value)/90);return{transform:[{translateX:.4*F.value+D.value}],opacity:1-e}};return t.__closure={dragX:F,CANCEL_THRESHOLD:90,arrowPulse:D},t.__workletHash=2609121094002,t.__initData=gl,t.__stackDetails=e,t}()),X=l.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.max(0,-V.value/70));return{transform:[{translateY:l.interpolate(e,[0,1],[0,-22])}]}};return t.__closure={dragY:V,LOCK_THRESHOLD:70,interpolate:l.interpolate},t.__workletHash=2770335161610,t.__initData=yl,t.__stackDetails=e,t}()),$=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:B.value}]}};return t.__closure={chevronPulse:B},t.__workletHash=0xe2617d14eaa,t.__initData=xl,t.__stackDetails=e,t}()),Z=l.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){return{transform:[{translateX:F.value},{translateY:V.value},{scale:K.value}]}};return t.__closure={dragX:F,dragY:V,micPulse:K},t.__workletHash=0xa3ed9ad56cd,t.__initData=bl,t.__stackDetails=e,t}());return e.jsxs(r.View,{style:n(Hi||(Hi=P(["w-full flex-row items-end gap-2 relative"]))),pointerEvents:"box-none",children:[e.jsxs(r.View,{style:[n(zi||(zi=P(["flex-1 flex-row items-center px-4 rounded-3xl"]))),{minHeight:b,backgroundColor:A}],children:[e.jsx(r.Text,{style:[n(Wi||(Wi=P(["text-base font-semibold"]))),{color:d,minWidth:42}],numberOfLines:1,children:lt(T)}),e.jsxs(l.View,{style:[n(Ni||(Ni=P(["flex-1 flex-row items-center justify-center gap-1.5"]))),J],children:[E?E():e.jsx(r.Text,{style:[n(Qi||(Qi=P(["text-base leading-none"]))),{color:y,marginTop:-2}],children:"β€Ή"}),e.jsx(r.Text,{style:[n(Yi||(Yi=P(["text-sm"]))),{color:y}],children:"Slide to cancel"})]})]}),e.jsxs(r.View,{style:[n(qi||(qi=P(["relative items-center justify-center"]))),{height:b,width:b}],children:[e.jsxs(l.View,{style:[n(Ji||(Ji=P(["absolute items-center justify-center rounded-2xl py-2.5"]))),{width:_-8,backgroundColor:p,bottom:_+6,gap:6},X],pointerEvents:"none",children:[k?k():e.jsx(Xr,{style:{width:18,height:18},color:f}),e.jsx(l.View,{style:$,children:e.jsx(Jr,{style:{width:14,height:14},color:f})})]}),e.jsx(i.GestureDetector,{gesture:q,children:e.jsx(l.View,{style:[n(Xi||(Xi=P(["items-center justify-center rounded-full"]))),{width:_,height:_,backgroundColor:s},Z],accessibilityRole:"button",accessibilityLabel:"Hold to record. Slide left to cancel, slide up to lock.",children:S?S():e.jsx(xr,{style:{width:26,height:26},color:h})})})]})]})},exports.default=function(t){return e.jsx(it,{children:e.jsx(D,g(g({},t),{},{children:e.jsx(wl,{})}))})},exports.tryCopyMessage=eo;
16
+ */function Ie(){if(ve)return he;ve=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return he=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,l,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 c in i=Object(arguments[s]))t.call(i,c)&&(a[c]=i[c]);if(e){l=e(i);for(var A=0;A<l.length;A++)r.call(i,l[A])&&(a[l[A]]=i[l[A]])}}return a},he}function Me(){if(me)return fe;me=1;return fe="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function _e(){return ge?pe:(ge=1,pe=Function.call.bind(Object.prototype.hasOwnProperty))}function Re(){if(xe)return ye;xe=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=Me(),r={},n=_e();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function o(o,i,l,a,s){if("production"!==process.env.NODE_ENV)for(var c in o)if(n(o,c)){var A;try{if("function"!=typeof o[c]){var u=Error((a||"React class")+": "+l+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}A=o[c](i,c,a,l,null,t)}catch(e){A=e}if(!A||A instanceof Error||e((a||"React class")+": type specification of "+l+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof A+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),A instanceof Error&&!(A.message in r)){r[A.message]=!0;var d=s?s():"";e("Failed "+l+" type: "+A.message+(null!=d?d:""))}}}return o.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},ye=o}function Te(){if(we)return be;we=1;var e=Pe(),t=Ie(),r=Me(),n=_e(),o=Re(),i=function(){};function l(){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){}}),be=function(a,s){var c="function"==typeof Symbol&&Symbol.iterator;var A="<<anonymous>>",u={array:v("array"),bigint:v("bigint"),bool:v("boolean"),func:v("function"),number:v("number"),object:v("object"),string:v("string"),symbol:v("symbol"),any:h(l),arrayOf:function(e){return h((function(t,n,o,i,l){if("function"!=typeof e)return new C("Property `"+l+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new C("Invalid "+i+" `"+l+"` of type `"+p(a)+"` supplied to `"+o+"`, expected an array.");for(var s=0;s<a.length;s++){var c=e(a,s,o,i,l+"["+s+"]",r);if(c instanceof Error)return c}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 `"+p(i)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:h((function(t,r,n,o,i){var l=t[r];return e.isValidElementType(l)?null:new C("Invalid "+o+" `"+i+"` of type `"+p(l)+"` 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 l=e.name||A;return new C("Invalid "+o+" `"+i+"` of type `"+(((a=t[r]).constructor&&a.constructor.name?a.constructor.name:A)+"` supplied to `")+n+"`, expected instance of `"+l+"`.")}var a;return null}))},node:h((function(e,t,r,n,o){return m(e[t])?null:new C("Invalid "+n+" `"+o+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return h((function(t,o,i,l,a){if("function"!=typeof e)return new C("Property `"+a+"` of component `"+i+"` has invalid PropType notation inside objectOf.");var s=t[o],c=p(s);if("object"!==c)return new C("Invalid "+l+" `"+a+"` of type `"+c+"` supplied to `"+i+"`, expected an object.");for(var A in s)if(n(s,A)){var u=e(s,A,i,l,a+"."+A,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."),l;return h((function(t,r,n,o,i){for(var l=t[r],a=0;a<e.length;a++)if(d(l,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(l)+"` 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."),l;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+"."),l}return h((function(t,o,i,l,a){for(var s=[],c=0;c<e.length;c++){var A=(0,e[c])(t,o,i,l,a,r);if(null==A)return null;A.data&&n(A.data,"expectedType")&&s.push(A.data.expectedType)}return new C("Invalid "+l+" `"+a+"` supplied to `"+i+"`"+(s.length>0?", expected one of type ["+s.join(", ")+"]":"")+".")}))},shape:function(e){return h((function(t,n,o,i,l){var a=t[n],s=p(a);if("object"!==s)return new C("Invalid "+i+" `"+l+"` of type `"+s+"` supplied to `"+o+"`, expected `object`.");for(var c in e){var A=e[c];if("function"!=typeof A)return f(o,i,l,c,g(A));var u=A(a,c,o,i,l+"."+c,r);if(u)return u}return null}))},exact:function(e){return h((function(o,i,l,a,s){var c=o[i],A=p(c);if("object"!==A)return new C("Invalid "+a+" `"+s+"` of type `"+A+"` supplied to `"+l+"`, 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 f(l,a,s,d,g(h));if(!h)return new C("Invalid "+a+" `"+s+"` key `"+d+"` supplied to `"+l+"`.\nBad object: "+JSON.stringify(o[i],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var v=h(c,d,l,a,s+"."+d,r);if(v)return v}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,l,a,c,u,d,h){if(c=c||A,d=d||a,h!==r){if(s){var v=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 v.name="Invariant Violation",v}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var f=c+":"+a;!t[f]&&n<3&&(i("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. 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[f]=!0,n++)}}return null==l[a]?o?null===l[a]?new C("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`."):new C("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(l,a,c,u,d)}var l=o.bind(null,!1);return l.isRequired=o.bind(null,!0),l}function v(e){return h((function(t,r,n,o,i,l){var a=t[r];return p(a)!==e?new C("Invalid "+o+" `"+i+"` of type `"+g(a)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function f(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 m(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(m);if(null===e||a(e))return!0;var t=function(e){var t=e&&(c&&e[c]||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(!m(r.value))return!1}else for(;!(r=n.next()).done;){var o=r.value;if(o&&!m(o[1]))return!1}return!0;default:return!1}}function p(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=p(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},be}function Oe(){if(ke)return Se;ke=1;var e=Me();function t(){}function r(){}return r.resetWarningCache=t,Se=function(){function n(t,r,n,o,i,l){if(l!==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 Ge(){if(je)return ce.exports;if(je=1,"production"!==process.env.NODE_ENV){var e=Pe();ce.exports=Te()(e.isElement,true)}else ce.exports=Oe()();return ce.exports}var Fe=ae(Ge()),Ve=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),l=0;t.forEach((function(t){if(t._matched)n.push(t);else{var o,a=[],s=t.children,c=0;for(r.pattern.lastIndex=0;s&&(o=r.pattern.exec(s));){var A=s.substr(0,o.index);if(c=o.index,++l>i)break;a.push({children:A}),a.push(e.getMatchedPart(r,o[0],o,c)),s=s.substr(o.index+o[0].length),c+=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})}}])}(),De=["type"],Ke=["style"],Le=["parse","childrenProps"],Be={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+/},Ue=Fe.shape(g(g({},r.Text.propTypes),{},{type:Fe.oneOf(Object.keys(Be)).isRequired,nonExhaustiveMaxMatchCount:Fe.number})),He=Fe.shape(g(g({},r.Text.propTypes),{},{pattern:Fe.oneOfType([Fe.string,Fe.instanceOf(RegExp)]).isRequired,nonExhaustiveMaxMatchCount:Fe.number})),ze=function(){function n(){return C(this,n),d(this,n,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&&P(e,t)}(n,t.Component),h(n,[{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,De);if(t){if(!Be[t])throw new Error("".concat(e.type," is not a supported type"));r.pattern=Be[t]}return r}))}},{key:"getParsedText",value:function(){var t=this;return this.props.parse?"string"!=typeof this.props.children?this.props.children:new Ve(this.props.children,this.getPatterns()).parse().map((function(n,o){var i=t.props.style,l=n.style,a=y(n,Ke);return e.jsx(r.Text,g(g({style:[i,l]},t.props.childrenProps),a),"parsedText-".concat(o))})):this.props.children}},{key:"render",value:function(){var t=this,n=g({},this.props);n.parse,n.childrenProps;var o=y(n,Le);return e.jsx(r.Text,g(g({ref:function(e){return t._root=e}},o),{},{children:this.getParsedText()}))}}])}();ze.displayName="ParsedText",ze.propTypes=g(g({},r.Text.propTypes),{},{parse:Fe.arrayOf(Fe.oneOfType([Ue,He])),childrenProps:Fe.shape(r.Text.propTypes)}),ze.defaultProps={parse:null,childrenProps:{}};var We,Ne,Qe,Ye,qe,Je,Xe,$e,Ze,et,tt,rt=function(t){var r=t.style,n=t.color;return e.jsx(o,{style:r,viewBox:"0 0 12 12",children:e.jsx(o.Path,{fill:"none",stroke:n,strokeLinecap:"round",strokeWidth:"2",d:"M4 2v8m4-8v8"})})},nt=function(t){var r=t.style,n=t.color;return e.jsx(o,{viewBox:"0 0 24 24",style:r,children:e.jsxs(o.G,{fill:"none",fillRule:"evenodd",children:[e.jsx(o.Path,{d:"m12.593 23.258l-.011.002l-.071.035l-.02.004l-.014-.004l-.071-.035q-.016-.005-.024.005l-.004.01l-.017.428l.005.02l.01.013l.104.074l.015.004l.012-.004l.104-.074l.012-.016l.004-.017l-.017-.427q-.004-.016-.017-.018m.265-.113l-.013.002l-.185.093l-.01.01l-.003.011l.018.43l.005.012l.008.007l.201.093q.019.005.029-.008l.004-.014l-.034-.614q-.005-.018-.02-.022m-.715.002a.02.02 0 0 0-.027.006l-.006.014l-.034.614q.001.018.017.024l.015-.002l.201-.093l.01-.008l.004-.011l.017-.43l-.003-.012l-.01-.01z"}),e.jsx(o.Path,{fill:n,d:"M5.669 4.76a1.47 1.47 0 0 1 2.04-1.177c1.062.454 3.442 1.533 6.462 3.276c3.021 1.744 5.146 3.267 6.069 3.958c.788.591.79 1.763.001 2.356c-.914.687-3.013 2.19-6.07 3.956c-3.06 1.766-5.412 2.832-6.464 3.28c-.906.387-1.92-.2-2.038-1.177c-.138-1.142-.396-3.735-.396-7.237c0-3.5.257-6.092.396-7.235"})]})})},ot=t.createContext(void 0),it=function(r){var n=r.children,o=I(t.useState(null),2),i=o[0],l=o[1];return e.jsx(ot.Provider,{value:{currentlyPlayingId:i,setCurrentlyPlayingId:l},children:n})},lt=function(e){var t=Math.floor(e/60),r=Math.floor(e%60);return"".concat(t,":").concat(r<10?"0":"").concat(r)},at=[1,1.5,2],st=42;function ct(t){var o,i,l,a,s,c=t.isPlaying,A=t.playbackRate,u=t.onCycleSpeed,d=t.senderAvatar,C=t.senderName,h=t.isCurrentUser,v=t.theme;return c?e.jsx(r.Pressable,{onPress:u,style:[n(We||(We=M(["rounded-full items-center justify-center"]))),{width:st,height:st,backgroundColor:h?"rgba(0,0,0,0.22)":"rgba(255,255,255,0.12)"},null==v||null===(o=v.messageStyle)||void 0===o?void 0:o.audioSpeedButtonStyle],children:e.jsx(r.Text,{style:J([n(Ne||(Ne=M(["text-xs font-semibold"]))),{color:W(v,h)},null==v||null===(i=v.messageStyle)||void 0===i?void 0:i.audioSpeedTextStyle],null==v?void 0:v.fontFamily),children:1===A?"1x":"".concat(A,"x")})}):d?e.jsx(r.Image,{source:{uri:d},style:[n(Qe||(Qe=M(["rounded-full"]))),{width:st,height:st},null==v||null===(l=v.bubbleStyle)||void 0===l?void 0:l.avatarImageStyle],resizeMode:"cover"}):e.jsx(r.View,{style:[n(Ye||(Ye=M(["rounded-full items-center justify-center"]))),{width:st,height:st,backgroundColor:h?"rgba(0,0,0,0.2)":"#9ca3af"}],children:e.jsx(r.Text,{style:J([n(qe||(qe=M(["text-base font-semibold capitalize"]))),{color:"#ffffff"}],null==v?void 0:v.fontFamily),children:(a=C,s=null==a?void 0:a.trim(),s?s.charAt(0).toUpperCase():"?")})})}var At,ut,dt,Ct,ht,vt,ft,mt,pt,gt,yt,xt,bt,wt,St=function(o){var i,l,s=o.audioUrl,c=o.audioId,A=o.isVideoPlaying,u=o.isCurrentUser,d=o.senderAvatar,C=o.senderName,h=o.reserveStatusSpace,v=void 0===h||h,f=o.onLongPress,m=K(),p=m.theme,y=m.CustomPlayIcon,x=m.CustomPauseIcon,b=m.showMessageStatus,w=function(){var e=t.useContext(ot);if(!e)throw new Error("useAudio must be used within an AudioProvider");return e}(),S=w.currentlyPlayingId,k=w.setCurrentlyPlayingId,j=t.useRef(null),E=I(t.useState(!1),2),P=E[0],_=E[1],R=I(t.useState(0),2),T=R[0],O=R[1],G=I(t.useState(0),2),F=G[0],V=G[1],D=I(t.useState(!1),2),B=D[0],U=D[1],H=I(t.useState(1),2),z=H[0],W=H[1],N=I(t.useState(0),2),Q=N[0],Y=N[1],q=t.useRef(null),X=t.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]),$=function(e,t){var r,n,o,i,l=L(e);return t?{inactive:null!==(o=null==l?void 0:l.sentAudioWaveformColor)&&void 0!==o?o:"rgba(255,255,255,0.35)",active:null!==(i=null==l?void 0:l.sentAudioWaveformActiveColor)&&void 0!==i?i:"rgba(255,255,255,0.95)"}:{inactive:null!==(r=null==l?void 0:l.receivedAudioWaveformColor)&&void 0!==r?r:"rgba(0,0,0,0.20)",active:null!==(n=null==l?void 0:l.receivedAudioWaveformActiveColor)&&void 0!==n?n:"rgba(0,0,0,0.60)"}}(p,u),Z=$.inactive,ee=$.active,te=function(e,t){var r,n,o,i,l=L(e);return t?null!==(o=null!==(i=null==l?void 0:l.sentAudioTimestampColor)&&void 0!==i?i:null==l?void 0:l.sentTimestampColor)&&void 0!==o?o:"rgba(255,255,255,0.75)":null!==(r=null!==(n=null==l?void 0:l.receivedAudioTimestampColor)&&void 0!==n?n:null==l?void 0:l.receivedTimestampColor)&&void 0!==r?r:"rgba(0,0,0,0.45)"}(p,u),re=function(e,t){var r,n,o=L(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),ne=function(e,t){var r,n,o=L(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),oe=P&&!(A||!!S&&S!==c),ie=F>0?T/F:0,le=t.useCallback((function(e){var t;(V(e.duration),null!==q.current)&&(null===(t=j.current)||void 0===t||t.seek(q.current),q.current=null)}),[]),ae=t.useCallback((function(e){var t=e.currentTime;B||O(t)}),[B]),se=t.useCallback((function(){var e;_(!1),O(0),null===(e=j.current)||void 0===e||e.seek(0),k(null)}),[k]),ce=t.useCallback((function(){oe?(_(!1),k(null)):(k(c),_(!0))}),[oe,c,k]),Ae=t.useCallback((function(){W((function(e){var t=at.indexOf(e),r=at[(t+1)%at.length];return null!=r?r:1}))}),[]),ue=t.useCallback((function(e){var t=Q;if(!(t<=0||F<=0)){var r,n=Math.max(0,Math.min(e/t,1))*F;if(O(n),F>0)null===(r=j.current)||void 0===r||r.seek(n);else q.current=n}}),[F,Q]),de=t.useMemo((function(){return r.PanResponder.create({onStartShouldSetPanResponder:function(){return!0},onMoveShouldSetPanResponder:function(){return!0},onPanResponderGrant:function(e){U(!0),ue(e.nativeEvent.locationX)},onPanResponderMove:function(e){return ue(e.nativeEvent.locationX)},onPanResponderRelease:function(){return U(!1)},onPanResponderTerminate:function(){return U(!1)}})}),[ue]),Ce=e.jsx(r.Pressable,{onPress:ce,onLongPress:f,delayLongPress:250,hitSlop:8,style:n(Je||(Je=M(["shrink-0 px-0.5"]))),children:oe?x?e.jsx(x,{}):e.jsx(rt,{style:n.style("h-6 w-6"),color:ne}):y?e.jsx(y,{}):e.jsx(nt,{style:n.style("h-6 w-6"),color:re})}),he=e.jsx(ct,{isPlaying:oe,playbackRate:z,onCycleSpeed:Ae,senderAvatar:d,senderName:C,isCurrentUser:u,theme:p}),ve=e.jsx(r.View,{style:[n(Xe||(Xe=M(["flex-1 min-w-0"]))),{height:36}],onLayout:function(e){return Y(e.nativeEvent.layout.width)},children:e.jsx(r.View,g(g({style:[{flex:1,flexDirection:"row",alignItems:"center"},null==p||null===(i=p.messageStyle)||void 0===i?void 0:i.progressBarStyle]},de.panHandlers),{},{children:X.map((function(t,n){var o,i=(n+.5)/50<=ie;return e.jsx(r.View,{style:[{flex:1,marginHorizontal:.5,height:Math.max(3,Math.round(36*t)),borderRadius:2,backgroundColor:i?ee:Z},i?null==p||null===(o=p.messageStyle)||void 0===o?void 0:o.activeProgressBarStyle:void 0]},n)}))}))});return e.jsxs(r.View,{style:[n($e||($e=M(["min-w-[240px] max-w-[280px] py-1.5 px-1"]))),v&&b&&n(Ze||(Ze=M(["pb-4"])))],children:[e.jsx(a,{ref:j,source:{uri:s},paused:!oe,rate:z,playInBackground:!1,playWhenInactive:!1,onLoad:le,onProgress:ae,onEnd:se,style:{width:0,height:0},progressUpdateInterval:80}),e.jsx(r.View,{style:n(et||(et=M(["flex-row items-center gap-1.5"]))),children:u?e.jsxs(e.Fragment,{children:[he,Ce,ve]}):e.jsxs(e.Fragment,{children:[Ce,ve,he]})}),e.jsx(r.Text,{style:J([n(tt||(tt=M(["text-[11px] mt-1"]))),{color:te,paddingLeft:u?82:34},null==p||null===(l=p.messageStyle)||void 0===l?void 0:l.audioDurationStyle],null==p?void 0:p.fontFamily),children:lt(oe?T:F>0?F:T)})]})},kt=t.memo(St),jt=function(t){var o=t.reply,i=t.isCurrentUser,l=t.isFirstInSequence,a=t.fontFamily,s=t.replyStyle,c=t.backgroundColor,A=t.senderNameColor,u=t.previewTextColor,d=function(e){switch(e){case"image":return"πŸ“·";case"video":return"πŸŽ₯";case"audio":return"🎀";case"file":return"πŸ“Ž";default:return null}}(o.mediaKind),C=function(e){if(e.preview)return e.preview;switch(e.mediaKind){case"image":return"Photo";case"video":return"Video";case"audio":return"Audio message";case"file":return"File";default:return"Message"}}(o),h=!!o.thumbnailUri,v=l&&!i?0:8,f=l&&i?0:8;return e.jsx(r.View,{style:[n(At||(At=M(["flex-row overflow-hidden"]))),{backgroundColor:c,minHeight:48,marginLeft:-8,marginRight:-8,marginTop:-2,marginBottom:4,borderTopLeftRadius:v,borderTopRightRadius:f,borderBottomLeftRadius:0,borderBottomRightRadius:0},null==s?void 0:s.container],children:e.jsxs(r.View,{style:n(ut||(ut=M(["flex-1 flex-row items-center px-3 py-2"]))),children:[e.jsxs(r.View,{style:n(dt||(dt=M(["flex-1"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(Ct||(Ct=M(["text-[13px] font-semibold"]))),{color:A},null==s?void 0:s.senderName],a),children:o.senderName||"Reply"}),e.jsx(r.Text,{numberOfLines:2,style:J([n(ht||(ht=M(["text-[12.5px] mt-0.5"]))),{color:u},null==s?void 0:s.previewText],a),children:d&&!o.preview?"".concat(d," ").concat(C):C})]}),h&&e.jsx(r.Image,{source:{uri:o.thumbnailUri},style:[n(vt||(vt=M(["ml-2"]))),{width:40,height:40,borderRadius:4},null==s?void 0:s.thumbnail],resizeMode:"cover"})]})})},Et=function(n){var i=n.style,l=n.spinning,a=void 0!==l&&l,s=t.useRef(new r.Animated.Value(0)).current;t.useEffect((function(){a&&r.Animated.loop(r.Animated.timing(s,{toValue:1,duration:1e3,easing:r.Easing.linear,useNativeDriver:!0})).start()}),[a]);var c=s.interpolate({inputRange:[0,1],outputRange:["0deg","360deg"]});return e.jsx(r.Animated.View,{style:a?{transform:[{rotate:c}]}: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"})})})},Pt=320,It=Pt,Mt=Math.round(176),_t=Pt-Mt-2,Rt=Math.round(159),Tt=function(o){var i,l=o.uri,s=o.cellStyle,c=o.roundedStyle,A=K(),u=A.theme,d=A.CustomPlayIcon,C=t.useRef(null),h=I(t.useState(0),2),v=h[0],f=h[1],m=I(t.useState(!0),2),p=m[0],g=m[1],y=I(t.useState(!1),2),x=y[0],b=y[1];return e.jsxs(r.View,{style:[s,c],pointerEvents:"none",children:[e.jsx(a,{source:{uri:l},ref:C,paused:!0,muted:!0,playInBackground:!1,playWhenInactive:!1,pointerEvents:"none",style:[c,{width:"100%",height:"100%"}],resizeMode:"cover",onLoadStart:function(){g(!0),b(!1)},onLoad:function(e){f(e.duration),g(!1)},onError:function(){b(!0),g(!1)}}),p&&e.jsx(r.View,{style:[n(ft||(ft=M(["absolute inset-0 items-center justify-center bg-black/40"]))),c],children:e.jsx(Et,{style:n.style("h-8 w-8"),spinning:!0})}),!p&&!x&&e.jsxs(e.Fragment,{children:[e.jsx(r.View,{style:n(mt||(mt=M(["pointer-events-none absolute inset-0 items-center justify-center"]))),children:d?e.jsx(d,{}):e.jsx(nt,{style:n.style("h-10 w-10"),color:(null==u||null===(i=u.colors)||void 0===i?void 0:i.videoPlayIconColor)||"white"})}),e.jsx(r.View,{style:n(pt||(pt=M(["pointer-events-none absolute bottom-1 left-1 bg-black/50 px-1.5 py-0.5 rounded"]))),children:e.jsx(r.Text,{style:n(gt||(gt=M(["text-white text-[10px] font-semibold"]))),children:Ot(v)})})]}),x&&e.jsx(r.View,{style:[n(yt||(yt=M(["absolute inset-0 items-center justify-center bg-red-500/50"]))),c],children:e.jsx(r.Text,{style:J(n(xt||(xt=M(["text-white text-xs"]))),null==u?void 0:u.fontFamily),children:"Video"})})]})};function Ot(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 Gt,Ft,Vt,Dt,Kt,Lt,Bt,Ut,Ht,zt,Wt,Nt,Qt,Yt,qt,Jt,Xt,$t,Zt,er,tr,rr,nr,or,ir,lr,ar,sr,cr=function(t){var o=t.items,i=t.onOpenGallery,l=t.onLongPress,a=r.useWindowDimensions().width,s=Math.min(240,.72*a);if(0===o.length)return null;var c={borderRadius:6,overflow:"hidden"};if(1===o.length){var A=o[0];return e.jsx(r.Pressable,{onPress:function(){return i(o,0)},onLongPress:l,delayLongPress:250,style:{width:s,height:320,marginVertical:8},children:"image"===A.kind?e.jsx(r.Image,{source:{uri:A.uri},style:{width:"100%",height:"100%",borderRadius:8},resizeMode:"cover"}):e.jsx(Tt,{uri:A.uri,cellStyle:{width:s,height:320},roundedStyle:{borderRadius:8}})})}if(2===o.length){var u=(s-2)/2;return e.jsx(r.View,{style:{width:s,height:It,flexDirection:"row",gap:2,marginVertical:8},children:o.slice(0,2).map((function(t,n){return e.jsx(r.Pressable,{onPress:function(){return i(o,n)},onLongPress:l,delayLongPress:250,style:{width:u,height:It},children:"image"===t.kind?e.jsx(r.Image,{source:{uri:t.uri},style:[c,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Tt,{uri:t.uri,cellStyle:{width:u,height:It},roundedStyle:c})},"".concat(t.uri,"-").concat(n))}))})}if(3===o.length){var d=o[0],C=o[1],h=o[2],v=(s-2)/2;return e.jsxs(r.View,{style:{width:s,height:Pt,marginVertical:8,gap:2},children:[e.jsx(r.Pressable,{onPress:function(){return i(o,0)},onLongPress:l,delayLongPress:250,style:{width:s,height:Mt},children:"image"===d.kind?e.jsx(r.Image,{source:{uri:d.uri},style:[c,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Tt,{uri:d.uri,cellStyle:{width:s,height:Mt},roundedStyle:c})}),e.jsxs(r.View,{style:{flexDirection:"row",gap:2,height:_t},children:[e.jsx(r.Pressable,{onPress:function(){return i(o,1)},onLongPress:l,delayLongPress:250,style:{width:v,height:_t},children:"image"===C.kind?e.jsx(r.Image,{source:{uri:C.uri},style:[c,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Tt,{uri:C.uri,cellStyle:{width:v,height:_t},roundedStyle:c})},"".concat(C.uri,"-1")),e.jsx(r.Pressable,{onPress:function(){return i(o,2)},onLongPress:l,delayLongPress:250,style:{width:v,height:_t},children:"image"===h.kind?e.jsx(r.Image,{source:{uri:h.uri},style:[c,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Tt,{uri:h.uri,cellStyle:{width:v,height:_t},roundedStyle:c})},"".concat(h.uri,"-2"))]})]})}var f=(s-2)/2,m=o.length-4,p=o.slice(0,4);return e.jsx(r.View,{style:{width:s,height:Pt,flexWrap:"wrap",flexDirection:"row",gap:2,marginVertical:8},children:p.map((function(t,a){return e.jsxs(r.Pressable,{onPress:function(){return i(o,a)},onLongPress:l,delayLongPress:250,style:{width:f,height:Rt,position:"relative"},children:["image"===t.kind?e.jsx(r.Image,{source:{uri:t.uri},style:[c,{width:"100%",height:"100%"}],resizeMode:"cover"}):e.jsx(Tt,{uri:t.uri,cellStyle:{width:f,height:Rt},roundedStyle:c}),3===a&&m>0&&e.jsx(r.View,{style:n(bt||(bt=M(["absolute inset-0 bg-black/55 items-center justify-center"]))),children:e.jsxs(r.Text,{style:n(wt||(wt=M(["text-white text-lg font-bold"]))),children:["+",m]})})]},"".concat(t.uri,"-").concat(a))}))})},Ar=function(o){var i,l,a,s,c=o.message,A=o.onGalleryOpen,u=o.isVideoPlaying,d=o.isCurrentUser,C=o.isFirstInSequence,h=o.onLongPress,v=K(),f=v.theme,m=v.showMessageStatus,p=v.onFileAttachmentPress,y=v.replyStyle,x=v.renderInlineReply,b=v.selectionMode,w=v.toggleSelection,S=t.useMemo((function(){return Y(c)}),[c]),k=function(t,r,n,o,i){if(!c.replyTo)return null;if(x)return x(c.replyTo,d);var l=U(f,d),a=d?(null==f||null===(t=f.colors)||void 0===t?void 0:t.sentMessageTextColor)||"rgba(255,255,255,0.95)":(null==f||null===(r=f.colors)||void 0===r?void 0:r.sentBubbleBackgroundColor)||(null==f||null===(n=f.colors)||void 0===n?void 0:n.sentMessageTailColor)||"#22c55e",s=d?(null==f||null===(o=f.colors)||void 0===o?void 0:o.sentMessageTextColor)||"rgba(255,255,255,0.85)":(null==f||null===(i=f.colors)||void 0===i?void 0:i.receivedMessageTextColor)||"rgba(0,0,0,0.75)";return e.jsx(jt,{reply:c.replyTo,isCurrentUser:d,isFirstInSequence:C,fontFamily:null==f?void 0:f.fontFamily,replyStyle:y,backgroundColor:l,senderNameColor:a,previewTextColor:s})}();return e.jsxs(r.View,{children:[k,S.length>0&&e.jsx(cr,{items:S,onOpenGallery:A,onLongPress:h}),(null!==(i=c.fileAttachments)&&void 0!==i?i:[]).map((function(t,o){var i,l,a,s,A,u;return e.jsxs(r.Pressable,{onPress:function(){b?w(c):p?p(t):r.Linking.openURL(t.uri.startsWith("http")||t.uri.startsWith("file:")?t.uri:"file://".concat(t.uri))},onLongPress:h,delayLongPress:250,style:[n(Gt||(Gt=M(["my-1.5 py-2 px-3 rounded-lg max-w-[220px]"]))),{backgroundColor:U(f,d)},d?null==f||null===(i=f.messageStyle)||void 0===i?void 0:i.sentFileAttachmentStyle:null==f||null===(l=f.messageStyle)||void 0===l?void 0:l.receivedFileAttachmentStyle],children:[e.jsxs(r.Text,{style:J([n(Ft||(Ft=M(["text-xs font-semibold"]))),{color:H(f,d)},d?null==f||null===(a=f.messageStyle)||void 0===a?void 0:a.sentFileAttachmentTextStyle:null==f||null===(s=f.messageStyle)||void 0===s?void 0:s.receivedFileAttachmentTextStyle],null==f?void 0:f.fontFamily),numberOfLines:2,children:["πŸ“Ž ",t.name]}),e.jsx(r.Text,{style:J([n(Vt||(Vt=M(["text-[10px] mt-0.5"]))),{color:z(f,d)},d?null==f||null===(A=f.messageStyle)||void 0===A?void 0:A.sentFileAttachmentSubtitleStyle:null==f||null===(u=f.messageStyle)||void 0===u?void 0:u.receivedFileAttachmentSubtitleStyle],null==f?void 0:f.fontFamily),children:t.type})]},"".concat(t.uri,"-").concat(o))})),c.audio&&e.jsx(kt,{audioUrl:c.audio,audioId:c.id,isVideoPlaying:u,isCurrentUser:d,senderAvatar:c.senderAvatar,senderName:c.senderName,reserveStatusSpace:!c.text,onLongPress:h}),c.text&&e.jsx(ze,{style:J([n(Dt||(Dt=M(["pt-1"]))),n(m?Kt||(Kt=M(["pb-0"])):Lt||(Lt=M(["pb-2"]))),{wordBreak:"break-word",overflowWrap:"break-word"},d?null==f||null===(l=f.messageStyle)||void 0===l?void 0:l.sentTextStyle:null==f||null===(a=f.messageStyle)||void 0===a?void 0:a.receivedTextStyle,N(f,d)?{color:N(f,d)}:void 0],null==f?void 0:f.fontFamily),parse:[{type:"url",style:g({color:"blue",textDecorationLine:"underline"},(s=null==f?void 0:f.fontFamily,s?{fontFamily:s}:void 0)),onPress:function(e){return r.Linking.openURL(e.startsWith("http")?e:"https://".concat(e))}}],childrenProps:{allowFontScaling:!1},children:c.text})]})},ur=t.memo(Ar),dr=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"})})},Cr=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})})},hr=function(t){var o,i,l,a,s=t.time,c=t.status,A=t.isCurrentUser,u=t.hasText,d=t.hasAudio,C=t.hasGalleryMedia,h=t.hasFileAttachments,v=t.edited,f=K(),m=f.theme,p=f.showMessageStatus,g=f.editedLabel,y=f.editedTextStyle,x=C&&!u&&!d,b=(C||h)&&!u&&!d,w=x?"#ffffff":b?function(e,t){var r,n,o=L(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)"}(m,A):function(e,t){var r,n,o=L(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)"}(m,A),S=x||b?"rgba(255,255,255,0.85)":w;return e.jsx(e.Fragment,{children:p&&e.jsxs(r.View,{style:[n(Bt||(Bt=M(["flex-row items-center"]))),u?n(Ut||(Ut=M(["justify-end pb-1 ml-4"]))):d?n(Ht||(Ht=M(["absolute right-3 bottom-2"]))):b?[n(zt||(zt=M(["absolute right-3 bottom-4"]))),B(m,A)]:[n(Wt||(Wt=M(["absolute right-3 bottom-4"]))),B(m,A)]],children:[v&&e.jsx(r.Text,{style:J([n(Nt||(Nt=M(["text-[11px] mr-1.5"]))),{fontStyle:"italic",color:S,opacity:.85},null==m||null===(o=m.messageStyle)||void 0===o?void 0:o.editedTextStyle,y],null==m?void 0:m.fontFamily),children:null!=g?g:"edited"}),e.jsx(r.Text,{style:J([n(Qt||(Qt=M(["text-xs"]))),{color:w}],null==m?void 0:m.fontFamily),children:s}),A&&e.jsxs(r.View,{style:n(Yt||(Yt=M(["ml-1 flex-row items-center"]))),children:["sent"===c&&e.jsx(Cr,{style:n.style("h-4 w-4",{opacity:.7}),fill:(null==m||null===(i=m.colors)||void 0===i?void 0:i.sentIconColor)||"#6B7280"}),"delivered"===c&&e.jsx(dr,{style:n.style("h-4 w-4",{opacity:.7}),fill:(null==m||null===(l=m.colors)||void 0===l?void 0:l.deliveredIconColor)||"#6B7280"}),"read"===c&&e.jsx(dr,{style:n.style("h-4 w-4",{opacity:.9}),fill:(null==m||null===(a=m.colors)||void 0===a?void 0:a.readIconColor)||"#3B82F6"})]})]})})},vr=t.memo(hr),fr=function(o){var i,l,a,s,c,A,u,d,C,h,v,f,m,p,y=o.message,x=o.isCurrentUser,b=o.isFirstInSequence,w=o.onLongPress,S=o.staticMode,k=void 0!==S&&S,j=K(),E=j.theme,P=j.showAvatars,I=j.showUserNames,_=j.showBubbleTail,R=j.setMediaViewerGallery,T=j.isVideoPlaying,O=j.replyProps,F=j.startReply,V=j.selectionMode,D=j.isSelected,L=j.toggleSelection,B=j.selectionUI,U=t.useRef(null),H=(null===(i=null==O?void 0:O.enableReply)||void 0===i||i)&&!V&&!k,z=null!==(l=null==O?void 0:O.swipeThreshold)&&void 0!==l?l:60,W=Y(y),N=(null!==(a=null===(s=y.fileAttachments)||void 0===s?void 0:s.length)&&void 0!==a?a:0)>0&&0===W.length&&!y.text&&!y.audio,q=D(y.id),X=t.useCallback((function(){var e;k||(V?L(y):null===(e=U.current)||void 0===e||e.measureInWindow((function(e,t,r,n){null==w||w({x:e,y:t,width:r,height:n,isCurrentUser:x,isFirstInSequence:b})})))}),[k,V,L,y,w,x,b]),$=t.useCallback((function(){V&&L(y)}),[V,L,y]),Z=t.useCallback((function(e,t){V?L(y):R(e,t)}),[V,L,y,R]),ee=null==B?void 0:B.rowBackgroundColor,te=null==B?void 0:B.overlayColor,re=(null==E||null===(c=E.colors)||void 0===c?void 0:c.sentBubbleBackgroundColor)||(null==E||null===(A=E.colors)||void 0===A?void 0:A.sentMessageTailColor)||"#22c55e",ne=te||mr(re,.32),oe=ee||mr(re,.12),ie=[n(qt||(qt=M(["px-2 my-1 max-w-[75%] relative"]))),y.replyTo?n(Jt||(Jt=M(["w-[75%]"]))):null,n(x?Xt||(Xt=M(["self-end mr-3"])):$t||($t=M(["self-start ml-9"]))),n(b?x?Zt||(Zt=M(["bg-green-500 rounded-tr-none"])):er||(er=M(["bg-white rounded-tl-none"])):x?tr||(tr=M(["bg-green-500"])):rr||(rr=M(["bg-white"]))),g(g({borderRadius:8},Q(E,x)?{backgroundColor:Q(E,x)}:{}),x?null==E||null===(u=E.bubbleStyle)||void 0===u?void 0:u.sent:null==E||null===(d=E.bubbleStyle)||void 0===d?void 0:d.received)],ae=e.jsxs(e.Fragment,{children:[!x&&b&&P&&e.jsxs(e.Fragment,{children:[e.jsx(r.View,{style:n(nr||(nr=M(["absolute w-6 h-6 rounded-full top-0 -left-9 flex-row items-center"]))),children:y.senderAvatar?e.jsx(r.Image,{source:{uri:y.senderAvatar},style:[n(or||(or=M(["w-full h-full rounded-full"]))),null==E||null===(C=E.bubbleStyle)||void 0===C?void 0:C.avatarImageStyle],resizeMode:"cover"}):e.jsx(r.Text,{style:J([n(ir||(ir=M(["text-sm text-black font-semibold capitalize rounded-full bg-zinc-300 w-full h-full text-center pt-0.5"]))),null==E||null===(h=E.bubbleStyle)||void 0===h?void 0:h.avatarTextStyle],null==E?void 0:E.fontFamily),children:null===(v=y.senderName)||void 0===v?void 0:v.charAt(0)})}),I&&y.senderName&&e.jsx(r.Text,{style:J([n(lr||(lr=M(["text-sm text-black font-semibold mt-1 capitalize"]))),null==E||null===(f=E.bubbleStyle)||void 0===f?void 0:f.userNameStyle],null==E?void 0:E.fontFamily),children:y.senderName})]}),b&&_&&e.jsx(G,{style:n.style("absolute w-6 h-6",x?"rotate-90 -right-3.5 mt-[1.24px] -top-1":"rotate-180 -left-3.5 mt-[1.5px] -top-[3px]"),color:x?(null==E||null===(m=E.colors)||void 0===m?void 0:m.sentMessageTailColor)||"rgba(34, 197, 94, 1)":(null==E||null===(p=E.colors)||void 0===p?void 0:p.receivedMessageTailColor)||"white"}),e.jsx(ur,{message:y,isCurrentUser:x,isFirstInSequence:b,onGalleryOpen:Z,isVideoPlaying:T,onLongPress:k?void 0:X}),e.jsx(vr,{time:y.time,edited:y.edited,status:x?y.status:void 0,isCurrentUser:x,hasText:!!y.text,hasAudio:!!y.audio,hasGalleryMedia:W.length>0&&!y.text,hasFileAttachments:N}),!k&&V&&q&&e.jsx(r.View,{pointerEvents:"none",style:[n(ar||(ar=M(["absolute inset-0"]))),{backgroundColor:ne,borderRadius:8}]})]});if(k)return e.jsx(r.View,{style:ie,children:ae});var se=e.jsx(r.Pressable,{ref:U,onLongPress:X,onPress:$,delayLongPress:250,style:ie,children:ae}),ce=e.jsx(le,{isCurrentUser:x,enabled:H,swipeThreshold:z,onReply:function(){return F(y)},children:se});return e.jsx(r.Pressable,{onPress:$,onLongPress:X,delayLongPress:250,style:[n(sr||(sr=M(["w-full"]))),V&&q?{backgroundColor:oe}:null],children:ce})};function mr(e,t){if(e.startsWith("#")){var r=e.slice(1);if(3===r.length&&(r=r.split("").map((function(e){return e+e})).join("")),6===r.length){var n=parseInt(r.slice(0,2),16),o=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return"rgba(".concat(n,", ").concat(o,", ").concat(i,", ").concat(t,")")}}return e.startsWith("rgb(")?e.replace("rgb(","rgba(").replace(")",", ".concat(t,")")):e}var pr=t.memo(fr),gr=function(t){var r=t.style,n=t.color;return e.jsxs(o,{width:14,height:14,viewBox:"0 0 24 24",style:r,children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18",stroke:n,strokeWidth:2.5,strokeLinecap:"round"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18",stroke:n,strokeWidth:2.5,strokeLinecap:"round"})]})},yr=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"})]})})},xr=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeWidth:"1.5",children:[e.jsx(o.Path,{d:"m15.287 3.152l-.927.927l-8.521 8.52c-.577.578-.866.867-1.114 1.185a6.6 6.6 0 0 0-.749 1.211c-.173.364-.302.752-.56 1.526l-1.094 3.281l-.268.802a1.06 1.06 0 0 0 1.342 1.342l.802-.268l3.281-1.094c.775-.258 1.162-.387 1.526-.56q.647-.308 1.211-.749c.318-.248.607-.537 1.184-1.114l8.521-8.521l.927-.927a3.932 3.932 0 0 0-5.561-5.561Z"}),e.jsx(o.Path,{d:"M14.36 4.078s.116 1.97 1.854 3.708s3.707 1.853 3.707 1.853M4.198 21.678l-1.876-1.876",opacity:".5"})]})})},br=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"})]})})},wr=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"})]})})},Sr=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"})})},kr=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 jr(){return Er.apply(this,arguments)}function Er(){return(Er=u(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("android"!==r.Platform.OS){e.next=11;break}return e.prev=1,e.next=4,r.PermissionsAndroid.request(r.PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,{title:"Microphone Permission",message:"This app needs access to your microphone to record audio.",buttonPositive:"OK"});case 4:return t=e.sent,e.abrupt("return",t===r.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 Pr,Ir,Mr,_r,Rr,Tr,Or,Gr,Fr,Vr,Dr,Kr,Lr,Br,Ur,Hr,zr,Wr,Nr,Qr,Yr,qr,Jr="ios"===r.Platform.OS?50:48,Xr="#FFFFFF",$r="#E9EDEF",Zr=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"})})},en=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",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeWidth:"1.5",children:[e.jsx(o.Path,{d:"M2 16c0-2.828 0-4.243.879-5.121C3.757 10 5.172 10 8 10h8c2.828 0 4.243 0 5.121.879C22 11.757 22 13.172 22 16s0 4.243-.879 5.121C20.243 22 18.828 22 16 22H8c-2.828 0-4.243 0-5.121-.879C2 20.243 2 18.828 2 16Z"}),e.jsx(o.Path,{strokeLinecap:"round",d:"M6 10V8a6 6 0 1 1 12 0v2",opacity:".5"})]})})},tn=function(t){var r=t.width,o=t.bottomOffset,i=t.background,a=t.lockColor,s=t.chevronColor,c=t.lockIconSize,A=t.pillAnimatedStyle,u=t.chevronAnimatedStyle,d=t.styleOverride,C=t.renderLockIcon;return e.jsxs(l.View,{style:[n(Pr||(Pr=M(["absolute items-center justify-center rounded-2xl py-2.5"]))),{width:r,backgroundColor:i,bottom:o,gap:6},d,A],pointerEvents:"none",children:[C?C():e.jsx(en,{style:{width:c,height:c},color:a}),e.jsx(l.View,{style:u,children:e.jsx(Zr,{style:{width:14,height:14},color:s})})]})},rn=function(t){var o=t.isHold,a=t.duration,s=t.composedGesture,c=t.micWrapperStyle,A=t.slideTextAnimatedStyle,u=t.lockPillAnimatedStyle,d=t.chevronAnimatedStyle,C=t.primaryColor,h=t.microphoneColor,v=t.timerColor,f=t.cancelTextColor,m=t.holdPillBackground,p=t.lockPillBackground,g=t.lockColor,y=t.chevronColor,x=t.iconSize,b=t.lockIconSize,w=t.inputBarHeight,S=t.micSize,k=t.enableLockRecording,j=t.showSendButton,E=t.onSendPress,P=t.sendButtonBackgroundColor,I=t.sendButtonIconColor,_=t.headerSlot,R=t.renderInputPill,T=t.renderMicIcon,O=t.renderSendIcon,G=t.renderArrowIcon,F=t.renderLockIcon,V=t.containerStyleOverride,D=t.timerTextStyle,K=t.slideTextStyleOverride,L=t.lockPillStyleOverride,B=t.sendButtonStyle,U=t.fontFamily,H={minHeight:w,backgroundColor:m},z={height:S,width:S,backgroundColor:C};return e.jsxs(r.View,{style:[n(Ir||(Ir=M(["flex-row items-end gap-2 relative"]))),V],pointerEvents:"box-none",children:[o?e.jsxs(r.View,{style:[n(Mr||(Mr=M(["flex-1 rounded-3xl overflow-hidden"]))),H],children:[_,e.jsxs(r.View,{style:n(_r||(_r=M(["flex-row items-center px-4 flex-1 min-h-[48px]"]))),children:[e.jsx(r.Text,{style:J([n(Rr||(Rr=M(["text-base font-semibold"]))),{color:v,minWidth:42},D],U),numberOfLines:1,children:lt(a)}),e.jsxs(l.View,{style:[n(Tr||(Tr=M(["flex-1 flex-row items-center justify-center gap-1.5"]))),A],children:[G?G():e.jsx(r.Text,{style:J([n(Or||(Or=M(["text-base leading-none"]))),{color:f,marginTop:-2}],U),children:"β€Ή"}),e.jsx(r.Text,{style:J([n(Gr||(Gr=M(["text-sm"]))),{color:f},K],U),children:"Slide to cancel"})]})]})]}):null==R?void 0:R(),e.jsxs(r.View,{style:[n(Fr||(Fr=M(["relative items-center justify-center"]))),{height:w,width:w}],children:[k&&o&&e.jsx(tn,{width:S-8,bottomOffset:S+6,background:p,lockColor:g,chevronColor:y,lockIconSize:b,pillAnimatedStyle:u,chevronAnimatedStyle:d,styleOverride:L,renderLockIcon:F}),j&&!o?e.jsx(r.Pressable,{onPress:E,style:[n(Vr||(Vr=M(["items-center justify-center rounded-full"]))),{height:S,width:S,backgroundColor:null!=P?P:C},B],accessibilityRole:"button",accessibilityLabel:"Send",children:O?O():e.jsx(kr,{style:{width:x,height:x},color:null!=I?I:h})}):e.jsx(i.GestureDetector,{gesture:s,children:e.jsx(l.View,{style:[n(Dr||(Dr=M(["items-center justify-center rounded-full"]))),z,B,c],accessibilityRole:"button",accessibilityLabel:"Tap to record. Long-press and slide left to cancel or up to lock.",children:T?T():e.jsx(wr,{style:{width:x+6,height:x+6},color:h})})})]})]})},nn=function(t){var r=t.style,n=t.color,i=void 0===n?"#ef4444":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeLinecap:"round",strokeWidth:"1.5",children:[e.jsx(o.Path,{d:"M9.17 4a3.001 3.001 0 0 1 5.66 0",opacity:".5"}),e.jsx(o.Path,{d:"M20.5 6h-17m15.333 2.5l-.46 6.9c-.177 2.654-.265 3.981-1.13 4.79s-2.195.81-4.856.81h-.774c-2.66 0-3.99 0-4.856-.81c-.865-.809-.953-2.136-1.13-4.79l-.46-6.9"}),e.jsx(o.Path,{d:"m9.5 11l.5 5m4.5-5l-.5 5",opacity:".5"})]})})},on=function(t){var o=t.color,i=t.tick,l=t.count;return e.jsx(r.View,{style:n(Kr||(Kr=M(["flex-row items-center justify-between h-6"]))),children:Array.from({length:l}).map((function(t,r){return e.jsx(an,{index:r,total:l,color:o,tick:i},r)}))})},ln={code:'function WaveformTsx1(){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/Waveform.tsx",sourceMap:'{"version":3,"names":["WaveformTsx1","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/Waveform.tsx"],"mappings":"AAQ2C,SAAAA,YAAMA,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"},an=function(t){var r,o,i=t.index,a=t.total,s=t.color,c=t.tick,A=l.useAnimatedStyle((r=[new global.Error,-4,-27],(o=function(){var e=c.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:c,index:i,total:a},o.__workletHash=4276075972187,o.__initData=ln,o.__stackDetails=r,o));return e.jsx(l.View,{style:[n(Lr||(Lr=M(["mx-px rounded-full"]))),{width:2,backgroundColor:s},A]})},sn=function(t){var o=t.duration,a=t.isPaused,s=t.composedGesture,c=t.micWrapperStyle,A=t.pausePulseStyle,u=t.recDotStyle,d=t.waveTick,C=t.onCancelPress,h=t.onTogglePause,v=t.backgroundColor,f=t.timerColor,m=t.waveformColor,p=t.deleteIconColor,g=t.pauseIconColor,y=t.primaryColor,x=t.micSize,b=t.iconSize,w=t.inputBarHeight,S=t.waveCount,k=t.enableWaveform,j=t.headerSlot,E=t.renderDeleteIcon,P=t.renderPauseIcon,I=t.renderPlayIcon,_=t.renderSendIcon,R=t.renderWaveform,T=t.containerStyleOverride,O=t.barStyleOverride,G=t.timerTextStyle,F=t.waveformStyle,V=t.trashButtonStyle,D=t.sendButtonStyle,K=t.fontFamily,L={minHeight:w+50,backgroundColor:v},B={height:x,width:x,backgroundColor:y};return e.jsxs(r.View,{style:[n(Br||(Br=M(["w-full rounded-2xl px-4 py-2.5"]))),L,T,O],children:[j,e.jsxs(r.View,{style:n(Ur||(Ur=M(["flex-row items-center gap-3 px-1 pt-1.5 pb-2"]))),children:[e.jsx(l.View,{style:[n(Hr||(Hr=M(["w-1.5 h-1.5 rounded-full"]))),{backgroundColor:g},u]}),e.jsx(r.Text,{style:J([n(zr||(zr=M(["text-base font-semibold"]))),{color:f,minWidth:42},G],K),numberOfLines:1,children:lt(o)}),k&&e.jsx(r.View,{style:[n(Wr||(Wr=M(["flex-1"]))),F],children:R?R():e.jsx(on,{color:m,tick:d,count:S})})]}),e.jsxs(r.View,{style:n(Nr||(Nr=M(["flex-row items-center justify-between mt-1"]))),children:[e.jsx(r.Pressable,{onPress:C,hitSlop:12,style:[n(Qr||(Qr=M(["items-center justify-center rounded-full"]))),{width:x,height:x},V],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:E?E():e.jsx(nn,{style:n.style("w-6 h-6"),color:p})}),e.jsx(r.Pressable,{onPress:h,hitSlop:12,style:n(Yr||(Yr=M(["items-center justify-center px-4"]))),accessibilityRole:"button",accessibilityLabel:a?"Resume recording":"Pause recording",children:a?I?I():e.jsx(nt,{style:n.style("w-7 h-7"),color:g}):e.jsx(l.View,{style:A,children:P?P():e.jsx(rt,{style:n.style("w-7 h-7"),color:g})})}),e.jsx(i.GestureDetector,{gesture:s,children:e.jsx(l.View,{style:[n(qr||(qr=M(["items-center justify-center rounded-full"]))),B,D,c],accessibilityRole:"button",accessibilityLabel:"Send recording",children:_?_():e.jsx(kr,{style:{width:b,height:b},color:"#FFFFFF"})})})]})]})};function cn(){r.Vibration.vibrate(15)}var An={code:"function useFlowControllerTs1(_e,success){const{runOnJS,fireQuickTap}=this.__closure;if(success)runOnJS(fireQuickTap)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs1","_e","success","runOnJS","fireQuickTap","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA0OmB,QAAC,CAAAA,oBAAgBA,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"},un={code:"function useFlowControllerTs2(){const{runOnJS,fireHoldStart}=this.__closure;runOnJS(fireHoldStart)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs2","runOnJS","fireHoldStart","__closure"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAiPqB,SAAAA,oBAAMA,CAAA,QAAAC,OAAA,CAAAC,aAAA,OAAAC,SAAA,CAEfF,OAAO,CAACC,aAAa,CAAC,CAAC,CAAC,CAC5B","ignoreList":[]}',version:"3.16.7"},dn={code:"function useFlowControllerTs3(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 rawTx=Math.max(maxLeftShared.value,Math.min(0,e.translationX));const rawTy=Math.max(maxUpShared.value,Math.min(0,e.translationY));const dominantY=Math.abs(rawTy)>Math.abs(rawTx);translateX.value=dominantY?0:rawTx;translateY.value=dominantY?rawTy:0;if(dominantY&&enableLockShared.value===1&&lockFiredShared.value===0&&rawTy<=lockThresholdShared.value){lockFiredShared.value=1;runOnJS(fireLock)();}if(!dominantY&&enableCancelShared.value===1&&cancelFiredShared.value===0&&rawTx<=cancelThresholdShared.value){cancelFiredShared.value=1;runOnJS(fireCancel)();}}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs3","e","stateShared","STATE_HOLD","maxLeftShared","maxUpShared","translateX","translateY","enableLockShared","lockFiredShared","lockThresholdShared","runOnJS","fireLock","enableCancelShared","cancelFiredShared","cancelThresholdShared","fireCancel","__closure","value","rawTx","Math","max","min","translationX","rawTy","translationY","dominantY","abs"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAqPuB,QAAC,CAAAA,oBAAKA,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,KAAK,CAAGC,IAAI,CAACC,GAAG,CAACjB,aAAa,CAACc,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACsB,YAAY,CAAC,CAAC,CACxE,KAAM,CAAAC,KAAK,CAAGJ,IAAI,CAACC,GAAG,CAAChB,WAAW,CAACa,KAAK,CAAEE,IAAI,CAACE,GAAG,CAAC,CAAC,CAAErB,CAAC,CAACwB,YAAY,CAAC,CAAC,CACtE,KAAM,CAAAC,SAAS,CAAGN,IAAI,CAACO,GAAG,CAACH,KAAK,CAAC,CAAGJ,IAAI,CAACO,GAAG,CAACR,KAAK,CAAC,CAGnDb,UAAU,CAACY,KAAK,CAAGQ,SAAS,CAAG,CAAC,CAAGP,KAAK,CACxCZ,UAAU,CAACW,KAAK,CAAGQ,SAAS,CAAGF,KAAK,CAAG,CAAC,CACxC,GAAIE,SAAS,EACTlB,gBAAgB,CAACU,KAAK,GAAK,CAAC,EAC5BT,eAAe,CAACS,KAAK,GAAK,CAAC,EAC3BM,KAAK,EAAId,mBAAmB,CAACQ,KAAK,CAAE,CACpCT,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,KAAK,EAAIJ,qBAAqB,CAACG,KAAK,CAAE,CACtCJ,iBAAiB,CAACI,KAAK,CAAG,CAAC,CAC3BP,OAAO,CAACK,UAAU,CAAC,CAAC,CAAC,CACzB,CACJ","ignoreList":[]}',version:"3.16.7"},Cn={code:"function useFlowControllerTs4(){const{lockFiredShared,cancelFiredShared,enableLockShared,translateY,LOCK_ON_RELEASE_DELTA,runOnJS,fireLock,fireHoldEnd}=this.__closure;if(lockFiredShared.value===1||cancelFiredShared.value===1)return;if(enableLockShared.value===1&&translateY.value<-LOCK_ON_RELEASE_DELTA){lockFiredShared.value=1;runOnJS(fireLock)();return;}runOnJS(fireHoldEnd)();}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs4","lockFiredShared","cancelFiredShared","enableLockShared","translateY","LOCK_ON_RELEASE_DELTA","runOnJS","fireLock","fireHoldEnd","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA+QmB,SAAAA,oBAAMA,CAAA,QAAAC,eAAA,CAAAC,iBAAA,CAAAC,gBAAA,CAAAC,UAAA,CAAAC,qBAAA,CAAAC,OAAA,CAAAC,QAAA,CAAAC,WAAA,OAAAC,SAAA,CAEb,GAAIR,eAAe,CAACS,KAAK,GAAK,CAAC,EAC3BR,iBAAiB,CAACQ,KAAK,GAAK,CAAC,CAC7B,OACJ,GAAIP,gBAAgB,CAACO,KAAK,GAAK,CAAC,EAC5BN,UAAU,CAACM,KAAK,CAAG,CAACL,qBAAqB,CAAE,CAC3CJ,eAAe,CAACS,KAAK,CAAG,CAAC,CACzBJ,OAAO,CAACC,QAAQ,CAAC,CAAC,CAAC,CACnB,OACJ,CACAD,OAAO,CAACE,WAAW,CAAC,CAAC,CAAC,CAC1B","ignoreList":[]}',version:"3.16.7"},hn={code:"function useFlowControllerTs5(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs5","lockFiredShared","cancelFiredShared","translateX","withSpring","translateY","__closure","value","damping","stiffness"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA4RwB,SAAAA,oBAAMA,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"},vn={code:"function useFlowControllerTs6(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs6","stateShared","STATE_HOLD","translateX","translateY","micScale","__closure","isHold","value","transform","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAsS6C,SAAAA,oBAAMA,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"},fn={code:"function useFlowControllerTs7(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs7","interpolate","translateX","cancelThresholdShared","Extrapolation","arrowPulse","__closure","opacity","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAgToD,SAAAA,oBAAMA,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"},mn={code:"function useFlowControllerTs8(){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/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs8","interpolate","translateY","lockThresholdShared","Extrapolation","__closure","lockProgress","value","CLAMP","transform"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAuTmD,SAAAA,oBAAMA,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"},pn={code:"function useFlowControllerTs9(){const{chevronPulse}=this.__closure;return{transform:[{translateY:chevronPulse.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs9","chevronPulse","__closure","transform","translateY","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AA+TkD,SAAAA,qBAAA,QAAAC,YAAA,OAAAC,SAAA,OAAO,CACjDC,SAAS,CAAE,CAAC,CAAEC,UAAU,CAAEH,YAAY,CAACI,KAAM,CAAC,CAClD,CAAC","ignoreList":[]}',version:"3.16.7"},gn={code:"function useFlowControllerTs10(){const{isPaused,pausePulse}=this.__closure;return{opacity:isPaused?1:pausePulse.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs10","isPaused","pausePulse","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAkU6C,SAAAA,sBAAA,QAAAC,QAAA,CAAAC,UAAA,OAAAC,SAAA,OAAO,CAC5CC,OAAO,CAAEH,QAAQ,CAAG,CAAC,CAAGC,UAAU,CAACG,KACvC,CAAC","ignoreList":[]}',version:"3.16.7"},yn={code:"function useFlowControllerTs11(){const{recBlink}=this.__closure;return{opacity:recBlink.value};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts",sourceMap:'{"version":3,"names":["useFlowControllerTs11","recBlink","__closure","opacity","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/VoiceRecorder/VoiceRecorderFlow/useFlowController.ts"],"mappings":"AAqUyC,SAAAA,sBAAA,QAAAC,QAAA,OAAAC,SAAA,OAAO,CACxCC,OAAO,CAAEF,QAAQ,CAACG,KACtB,CAAC","ignoreList":[]}',version:"3.16.7"};var xn=function(r){var n=r.primaryColor,o=void 0===n?"#16A34A":n,a=r.backgroundColor,s=void 0===a?"#0B141A":a,c=r.holdPillBackground,A=void 0===c?"#1F2C33":c,u=r.timerColor,d=void 0===u?Xr:u,C=r.microphoneColor,h=void 0===C?Xr:C,v=r.lockColor,f=void 0===v?$r:v,m=r.waveformColor,p=void 0===m?$r:m,g=r.deleteIconColor,y=void 0===g?"#8696A0":g,x=r.cancelTextColor,b=void 0===x?"rgba(255,255,255,0.6)":x,w=r.chevronColor,S=r.pauseIconColor,k=void 0===S?"#F15C6D":S,j=r.lockPillBackground,E=void 0===j?"#1F2C33":j,P=r.inputBarHeight,M=void 0===P?Jr:P,_=r.micSize,R=r.holdMicScale,T=void 0===R?1.18:R,O=r.iconSize,G=void 0===O?22:O,F=r.lockIconSize,V=void 0===F?18:F,D=r.enableLockRecording,K=void 0===D||D,L=r.enableSlideToCancel,B=void 0===L||L,U=r.enableWaveform,H=void 0===U||U,z=r.lockSlideDistance,W=void 0===z?70:z,N=r.cancelSlideDistance,Q=void 0===N?90:N,Y=r.waveCount,q=void 0===Y?32:Y,J=r.headerSlot,X=r.showSendButton,$=r.onSendPress,Z=r.sendButtonBackgroundColor,ee=r.sendButtonIconColor,te=r.renderInputPill,re=r.renderMicIcon,ne=r.renderSendIcon,oe=r.renderLockIcon,ie=r.renderArrowIcon,le=r.renderDeleteIcon,ae=r.renderPauseIcon,se=r.renderPlayIcon,ce=r.renderWaveform,Ae=r.containerStyle,ue=r.barStyle,de=r.timerTextStyle,Ce=r.slideTextStyle,he=r.waveformStyle,ve=r.lockPillStyle,fe=r.trashButtonStyle,me=r.sendButtonStyle,pe=r.fontFamily,ge=null!=_?_:M,ye=null!=w?w:f,xe=function(e){var r=e.cancelSlideDistance,n=e.lockSlideDistance,o=e.enableLockRecording,a=e.enableSlideToCancel,s=e.holdMicScale,c=e.onRecordingStart,A=e.onRecordingStop,u=e.onSend,d=e.onDelete,C=e.onLock,h=e.onCancel,v=e.onPauseRecording,f=e.onResumeRecording,m=e.onStateChange,p=-Math.abs(r),g=-Math.abs(n),y=p-30,x=g-20,b=I(t.useState("IDLE"),2),w=b[0],S=b[1],k=I(t.useState(0),2),j=k[0],E=k[1],P=I(t.useState(!1),2),M=P[0],_=P[1],R=t.useRef("IDLE"),T=t.useRef(!1);t.useEffect((function(){R.current=w}),[w]),t.useEffect((function(){T.current=M}),[M]);var O=t.useRef(m);O.current=m,t.useEffect((function(){var e;null===(e=O.current)||void 0===e||e.call(O,w)}),[w]);var G=l.useSharedValue(0);t.useEffect((function(){G.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}}(w)}),[w]);var F=l.useSharedValue(p),V=l.useSharedValue(g),D=l.useSharedValue(y),K=l.useSharedValue(x),L=l.useSharedValue(o?1:0),B=l.useSharedValue(a?1:0);t.useEffect((function(){F.value=p,V.value=g,D.value=y,K.value=x,L.value=o?1:0,B.value=a?1:0}),[p,g,y,x,o,a]);var U=t.useRef(0),H=t.useRef(0),z=t.useRef(0),W=l.useSharedValue(0),N=l.useSharedValue(0),Q=l.useSharedValue(1),Y=l.useSharedValue(0),q=l.useSharedValue(0),J=l.useSharedValue(1),X=l.useSharedValue(0),$=l.useSharedValue(1),Z=l.useSharedValue(0),ee=l.useSharedValue(0);t.useEffect((function(){Y.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:700,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:700,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),q.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),J.value=l.withRepeat(l.withSequence(l.withTiming(.5,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(1,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),X.value=l.withRepeat(l.withTiming(1,{duration:4500,easing:l.Easing.linear}),-1,!1),$.value=l.withRepeat(l.withSequence(l.withTiming(.3,{duration:600}),l.withTiming(1,{duration:600})),-1,!1)}),[]),t.useEffect((function(){Q.value="RECORDING_HOLD"===w?l.withSpring(s,{damping:14,stiffness:220}):l.withSpring(1,{damping:16,stiffness:220})}),[w,s]),t.useEffect((function(){if(("RECORDING_TAP"===w||"RECORDING_HOLD"===w||"LOCKED_RECORDING"===w)&&!M){var e=setInterval((function(){var e=Date.now()-U.current-H.current;E(e/1e3)}),250);return function(){return clearInterval(e)}}}),[w,M]);var te=t.useRef(c);te.current=c;var re=t.useRef(A);re.current=A;var ne=t.useRef(u);ne.current=u;var oe=t.useRef(d);oe.current=d;var ie=t.useRef(C);ie.current=C;var le=t.useRef(h);le.current=h;var ae=t.useRef(v);ae.current=v;var se=t.useRef(f);se.current=f;var ce=t.useCallback((function(){var e;U.current=Date.now(),H.current=0,z.current=0,_(!1),E(0),Z.value=0,ee.value=0,W.value=0,N.value=0,null===(e=te.current)||void 0===e||e.call(te)}),[]),Ae=t.useCallback((function(){E(0),_(!1),H.current=0,z.current=0,W.value=0,N.value=0,S("IDLE")}),[]),ue=t.useCallback((function(){var e,t,r=(Date.now()-U.current-H.current)/1e3;S("SENDING"),null===(e=re.current)||void 0===e||e.call(re),null===(t=ne.current)||void 0===t||t.call(ne,{duration:r}),Ae()}),[Ae]),de=t.useCallback((function(){var e=R.current;if("IDLE"===e)return S("RECORDING_TAP"),void ce();"RECORDING_TAP"!==e&&"LOCKED_RECORDING"!==e||ue()}),[ce,ue]),Ce=t.useCallback((function(){"IDLE"===R.current&&(S("RECORDING_HOLD"),ce())}),[ce]),he=t.useCallback((function(){var e;"RECORDING_HOLD"===R.current&&(cn(),S("LOCKED_RECORDING"),W.value=l.withSpring(0,{damping:18,stiffness:220}),N.value=l.withSpring(0,{damping:18,stiffness:220}),null===(e=ie.current)||void 0===e||e.call(ie))}),[]),ve=t.useCallback((function(){var e,t,r,n=R.current;"RECORDING_HOLD"!==n&&"RECORDING_TAP"!==n&&"LOCKED_RECORDING"!==n||(cn(),S("CANCELLED"),null===(e=re.current)||void 0===e||e.call(re),null===(t=le.current)||void 0===t||t.call(le),null===(r=oe.current)||void 0===r||r.call(oe),Ae())}),[Ae]),fe=t.useCallback((function(){"RECORDING_HOLD"===R.current&&ue()}),[ue]),me=t.useCallback((function(){var e,t,r=!T.current;r?(z.current=Date.now(),null===(e=ae.current)||void 0===e||e.call(ae)):(H.current+=Date.now()-z.current,z.current=0,null===(t=se.current)||void 0===t||t.call(se)),_(r)}),[]),pe=t.useRef(de);pe.current=de;var ge=t.useRef(Ce);ge.current=Ce;var ye=t.useRef(fe);ye.current=fe;var xe=t.useRef(he);xe.current=he;var be=t.useRef(ve);be.current=ve;var we,Se,ke=function(){return pe.current()},je=function(){return ge.current()},Ee=function(){return ye.current()},Pe=function(){return xe.current()},Ie=function(){return be.current()},Me=t.useMemo((function(){var e,t,r=i.Gesture.Tap().maxDuration(210).onEnd((e=[new global.Error,-3,-27],(t=function(e,t){t&&l.runOnJS(ke)()}).__closure={runOnJS:l.runOnJS,fireQuickTap:ke},t.__workletHash=0xb640de2a90a,t.__initData=An,t.__stackDetails=e,t)),n=i.Gesture.Pan().activateAfterLongPress(220).onStart(function(){var e=[new global.Error,-3,-27],t=function(){l.runOnJS(je)()};return t.__closure={runOnJS:l.runOnJS,fireHoldStart:je},t.__workletHash=3973713390129,t.__initData=un,t.__stackDetails=e,t}()).onUpdate(function(){var e=[new global.Error,-16,-27],t=function(e){if(2===G.value){var t=Math.max(D.value,Math.min(0,e.translationX)),r=Math.max(K.value,Math.min(0,e.translationY)),n=Math.abs(r)>Math.abs(t);W.value=n?0:t,N.value=n?r:0,n&&1===L.value&&0===ee.value&&r<=V.value&&(ee.value=1,l.runOnJS(Pe)()),!n&&1===B.value&&0===Z.value&&t<=F.value&&(Z.value=1,l.runOnJS(Ie)())}};return t.__closure={stateShared:G,STATE_HOLD:2,maxLeftShared:D,maxUpShared:K,translateX:W,translateY:N,enableLockShared:L,lockFiredShared:ee,lockThresholdShared:V,runOnJS:l.runOnJS,fireLock:Pe,enableCancelShared:B,cancelFiredShared:Z,cancelThresholdShared:F,fireCancel:Ie},t.__workletHash=0xc932b7db4db,t.__initData=dn,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-9,-27],t=function(){if(1!==ee.value&&1!==Z.value)return 1===L.value&&N.value<-12?(ee.value=1,void l.runOnJS(Pe)()):void l.runOnJS(Ee)()};return t.__closure={lockFiredShared:ee,cancelFiredShared:Z,enableLockShared:L,translateY:N,LOCK_ON_RELEASE_DELTA:12,runOnJS:l.runOnJS,fireLock:Pe,fireHoldEnd:Ee},t.__workletHash=8222992215978,t.__initData=Cn,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===ee.value&&0===Z.value&&(W.value=l.withSpring(0,{damping:18,stiffness:220}),N.value=l.withSpring(0,{damping:18,stiffness:220}))};return t.__closure={lockFiredShared:ee,cancelFiredShared:Z,translateX:W,withSpring:l.withSpring,translateY:N},t.__workletHash=0xb56825c4eba,t.__initData=hn,t.__stackDetails=e,t}());return i.Gesture.Race(r,n)}),[]),_e=l.useAnimatedStyle((we=[new global.Error,-6,-27],(Se=function(){var e=2===G.value;return{transform:[{translateX:e?W.value:0},{translateY:e?N.value:0},{scale:Q.value}]}}).__closure={stateShared:G,STATE_HOLD:2,translateX:W,translateY:N,micScale:Q},Se.__workletHash=0x92736c307cb,Se.__initData=vn,Se.__stackDetails=we,Se)),Re=l.useAnimatedStyle(function(){var e=[new global.Error,-6,-27],t=function(){return{opacity:l.interpolate(W.value,[0,F.value],[1,0],l.Extrapolation.CLAMP),transform:[{translateX:.4*W.value+Y.value}]}};return t.__closure={interpolate:l.interpolate,translateX:W,cancelThresholdShared:F,Extrapolation:l.Extrapolation,arrowPulse:Y},t.__workletHash=0xf2b5c2efb9e,t.__initData=fn,t.__stackDetails=e,t}()),Te=l.useAnimatedStyle(function(){var e=[new global.Error,-5,-27],t=function(){var e=l.interpolate(N.value,[0,V.value],[0,1],l.Extrapolation.CLAMP);return{transform:[{translateY:l.interpolate(e,[0,1],[0,-22])}]}};return t.__closure={interpolate:l.interpolate,translateY:N,lockThresholdShared:V,Extrapolation:l.Extrapolation},t.__workletHash=5669890750044,t.__initData=mn,t.__stackDetails=e,t}()),Oe=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{transform:[{translateY:q.value}]}};return t.__closure={chevronPulse:q},t.__workletHash=0xd07d519242c,t.__initData=pn,t.__stackDetails=e,t}()),Ge=l.useAnimatedStyle(function(){var e=[new global.Error,-3,-27],t=function(){return{opacity:M?1:J.value}};return t.__closure={isPaused:M,pausePulse:J},t.__workletHash=0xea4d31d5a5c,t.__initData=gn,t.__stackDetails=e,t}()),Fe=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:$.value}};return t.__closure={recBlink:$},t.__workletHash=0xd511e0063a5,t.__initData=yn,t.__stackDetails=e,t}());return{state:w,duration:j,isPaused:M,composedGesture:Me,waveTick:X,micWrapperStyle:_e,slideTextAnimatedStyle:Re,lockPillAnimatedStyle:Te,chevronAnimatedStyle:Oe,pausePulseStyle:Ge,recDotStyle:Fe,triggerCancel:ve,togglePause:me}}({cancelSlideDistance:Q,lockSlideDistance:W,enableLockRecording:K,enableSlideToCancel:B,holdMicScale:T,onRecordingStart:r.onRecordingStart,onRecordingStop:r.onRecordingStop,onSend:r.onSend,onDelete:r.onDelete,onLock:r.onLock,onCancel:r.onCancel,onPauseRecording:r.onPauseRecording,onResumeRecording:r.onResumeRecording,onStateChange:r.onStateChange});return"RECORDING_TAP"===xe.state||"LOCKED_RECORDING"===xe.state||"SENDING"===xe.state?e.jsx(sn,{duration:xe.duration,isPaused:xe.isPaused,composedGesture:xe.composedGesture,micWrapperStyle:xe.micWrapperStyle,pausePulseStyle:xe.pausePulseStyle,recDotStyle:xe.recDotStyle,waveTick:xe.waveTick,onCancelPress:xe.triggerCancel,onTogglePause:xe.togglePause,backgroundColor:s,timerColor:d,waveformColor:p,deleteIconColor:y,pauseIconColor:k,primaryColor:o,micSize:ge,iconSize:G,inputBarHeight:M,waveCount:q,enableWaveform:H,headerSlot:J,renderDeleteIcon:le,renderPauseIcon:ae,renderPlayIcon:se,renderSendIcon:ne,renderWaveform:ce,containerStyleOverride:Ae,barStyleOverride:ue,timerTextStyle:de,waveformStyle:he,trashButtonStyle:fe,sendButtonStyle:me,fontFamily:pe}):e.jsx(rn,{isHold:"RECORDING_HOLD"===xe.state,duration:xe.duration,composedGesture:xe.composedGesture,micWrapperStyle:xe.micWrapperStyle,slideTextAnimatedStyle:xe.slideTextAnimatedStyle,lockPillAnimatedStyle:xe.lockPillAnimatedStyle,chevronAnimatedStyle:xe.chevronAnimatedStyle,primaryColor:o,microphoneColor:h,timerColor:d,cancelTextColor:b,holdPillBackground:A,lockPillBackground:E,lockColor:f,chevronColor:ye,iconSize:G,lockIconSize:V,inputBarHeight:M,micSize:ge,enableLockRecording:K,headerSlot:J,showSendButton:X,onSendPress:$,sendButtonBackgroundColor:Z,sendButtonIconColor:ee,renderInputPill:te,renderMicIcon:re,renderSendIcon:ne,renderArrowIcon:ie,renderLockIcon:oe,containerStyleOverride:Ae,timerTextStyle:de,slideTextStyleOverride:Ce,lockPillStyleOverride:ve,sendButtonStyle:me,fontFamily:pe})},bn=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"})]})},wn=function(t){var n=t.fileName,o=t.style,i=K().theme;return e.jsx(r.Text,{numberOfLines:2,ellipsizeMode:"tail",style:J([{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)})},Sn=t.memo(wn);function kn(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 jn,En,Pn,In,Mn,_n,Rn,Tn,On,Gn,Fn,Vn,Dn,Kn,Ln,Bn,Un,Hn,zn,Wn,Nn,Qn,Yn,qn,Jn,Xn,$n,Zn,eo,to,ro,no=function(t){var n,o=t.previews,i=t.closePreview,l=t.onRemoveItem,s=t.CustomFileIcon,c=t.CustomImagePreview,A=t.CustomVideoPreview,u=t.inputHeight,d=K(),C=d.theme,h=d.setMediaViewerGallery,v=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/"))})),f=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/"))})),m=kn(o);if(0===o.length)return null;var p=function(e){0!==m.length&&h(m,e)},g=function(t){var n,o,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:56,l=null===(n=t.type)||void 0===n?void 0:n.startsWith("image/"),s=null===(o=t.type)||void 0===o?void 0:o.startsWith("video/");return l&&c?e.jsx(c,{uri:t.uri}):s&&A?e.jsx(A,{uri:t.uri}):l?e.jsx(r.Image,{source:{uri:t.uri},style:{width:i,height:i,borderRadius:12},resizeMode:"cover"}):s?e.jsx(r.View,{style:{width:i,height:i,borderRadius:12,overflow:"hidden"},children:e.jsx(a,{source:{uri:t.uri},style:{width:"100%",height:"100%"},resizeMode:"cover",muted:!0,repeat:!0,paused:!1,pointerEvents:"none",playInBackground:!1,playWhenInactive:!1})}):null},y=function(t,n){return e.jsx(r.Pressable,{onPress:function(){return l?l(t):null==i?void 0:i()},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(r.Text,{style:J({fontSize:13,color:"white",fontWeight:"700",lineHeight:14},null==C?void 0:C.fontFamily),children:"Γ—"})})};return e.jsx(r.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(r.View,{style:{gap:8},children:[function(){if(0===v.length)return null;if(1===v.length){var t=v[0];return t?e.jsxs(r.Pressable,{onPress:function(){return p(0)},style:{position:"relative"},children:[g(t),y(t.uri)]}):null}var n=v.slice(0,3),o=v.length>3?v.length-3:0;return e.jsx(r.View,{style:{flexDirection:"row",alignItems:"center",minHeight:68},children:n.map((function(t,i){var l=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(r.Pressable,{onPress:function(){var e=kn(v).findIndex((function(e){return e.uri===t.uri}));p(e>=0?e:0)},style:{marginLeft:0===i?0:-18,zIndex:i+1,transform:[{rotate:l}],position:"relative"},children:e.jsxs(r.View,{style:{position:"relative"},children:[g(t),2===i&&o>0&&e.jsx(r.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(r.Text,{style:{color:"#fff",fontWeight:"700",fontSize:14},children:["+",o]})}),y(t.uri,a)]})},"".concat(t.uri,"-").concat(i))}))})}(),f.length>0&&e.jsx(r.ScrollView,{scrollEnabled:f.length>3,style:{maxHeight:232},showsVerticalScrollIndicator:f.length>3,contentContainerStyle:{gap:8},nestedScrollEnabled:!0,children:f.map((function(t,n){return function(t,n){var o,i,l,a;return e.jsxs(r.View,{style:{position:"relative"},children:[e.jsxs(r.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(r.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(bn,{style:{width:40,height:40},fill:"white"})}),e.jsx(r.View,{style:[{backgroundColor:"#f3f4f6",flex:1,borderRadius:8,justifyContent:"center",paddingHorizontal:12},null==C||null===(l=C.filePreviewStyle)||void 0===l?void 0:l.nameContainer],children:e.jsx(Sn,{fileName:t.name||"File",style:null==C||null===(a=C.filePreviewStyle)||void 0===a?void 0:a.text})})]}),y(t.uri)]},"".concat(t.uri,"-").concat(n))}(t,n)}))})]})})},oo=t.memo(no),io="ios"===r.Platform.OS?32:30,lo="ios"===r.Platform.OS?50:48,ao=function(o){var i,l,a,s,c,A,d,C,h,v,f,m,p,y,x,b,w=o.onSendMessage,S=o.onTypingStart,k=o.onTypingEnd,j=o.onAttachmentPress,E=o.onCameraPress,P=o.onAudioRecordStart,_=o.onAudioRecordEnd,R=o.CustomEmojiIcon,T=o.CustomAttachmentIcon,G=o.CustomCameraIcon,F=o.CustomSendIcon,V=o.CustomMicrophoneIcon,D=o.CustomFileIcon,L=o.CustomImagePreview,B=o.CustomVideoPreview,U=I(t.useState(""),2),H=U[0],z=U[1],W=I(t.useState({height:io,isMultiline:!1}),2),N=W[0],Q=W[1],Y=t.useRef(null),X=K(),$=X.theme,Z=X.currentUserId,ee=X.showEmojiButton,te=X.showAttachmentsButton,re=X.showCameraButton,ne=X.showVoiceRecordButton,oe=X.placeholder,ie=X.previewData,le=X.previewItems,ae=X.closePreview,se=X.onRemovePreviewItem,ce=X.CustomVoiceRecorder,Ae=X.replyTarget,ue=X.cancelReply,de=X.replyProps,Ce=X.replyStyle,he=X.renderReplyPreview,ve=X.editingMessage,fe=X.cancelEdit,me=X.onEditMessage,pe=t.useRef(null);t.useEffect((function(){var e;ve&&ve.id!==pe.current?(pe.current=ve.id,z(null!==(e=ve.text)&&void 0!==e?e:""),Q({height:io,isMultiline:!1}),requestAnimationFrame((function(){var e;return null===(e=Y.current)||void 0===e?void 0:e.focus()}))):ve||(pe.current=null)}),[ve]);var ge,ye=t.useMemo((function(){return null!=le&&le.length?le:ie?[ie]:[]}),[le,ie]),xe=ye.length>0,be=null==$||null===(i=$.sizes)||void 0===i?void 0:i.inputIconSize,we=function(e){if("number"==typeof e&&e>0)return{width:e,height:e};var t="string"==typeof e&&e.trim().length>0?e.trim():q;return n.style(t)}(be),Se="number"==typeof(ge=be)&&ge>0?ge:24,ke=0===H.trim().length&&!N.isMultiline,je=Math.max(0,(lo-Se)/2),Ee=ke?{paddingTop:je,paddingBottom:je}:{paddingBottom:je},Pe=!!ve,Ie=t.useCallback((function(){Q({height:io,isMultiline:!1})}),[]),Me=t.useCallback((function(e){z(e),0===e.length&&Ie()}),[Ie]),_e=t.useCallback((function(e){var t=Math.min(Math.max(e.nativeEvent.contentSize.height,io),118),r=t>io;Q({height:r?t:io,isMultiline:r})}),[]),Re=t.useCallback((function(){var e,t,r,n,o,i;if(Ae){var l=null===(e=Ae.mediaItems)||void 0===e?void 0:e[0];return{messageId:Ae.id,senderName:Ae.senderName,preview:null!==(t=Ae.text)&&void 0!==t?t:Ae.audio?"🎀 Audio message":Ae.image?"πŸ“· Photo":Ae.video?"πŸŽ₯ Video":null!==(r=Ae.fileAttachments)&&void 0!==r&&null!==(r=r[0])&&void 0!==r&&r.name?"πŸ“Ž ".concat(Ae.fileAttachments[0].name):"",mediaKind:Ae.audio?"audio":Ae.video?"video":Ae.image||(null!==(n=Ae.mediaItems)&&void 0!==n?n:[]).some((function(e){return"image"===e.kind}))?"image":(null!==(o=Ae.fileAttachments)&&void 0!==o?o:[]).length?"file":void 0,thumbnailUri:null!==(i=Ae.image)&&void 0!==i?i:"image"===(null==l?void 0:l.kind)||"video"===(null==l?void 0:l.kind)?l.uri:void 0}}}),[Ae]),Te=t.useCallback((function(){var e=H.trim();if(ve){if(!e)return;return null==me||me(ve,e),z(""),Ie(),void fe()}(e||xe)&&(w(g({text:e,senderId:Z},Ae?{replyTo:Re()}:{})),z(""),Ie(),Ae&&ue())}),[H,w,Z,xe,Ie,Ae,Re,ue,ve,me,fe]);t.useEffect((function(){H.trim()?null==S||S():null==k||k()}),[H,S,k]);var Oe=!!H.trim()||xe||Pe,Ge=null==$?void 0:$.voiceRecorder,Fe=null!==(l=null==Ge?void 0:Ge.ui)&&void 0!==l?l:{},Ve=null==Ge?void 0:Ge.styles,De=null==Ge?void 0:Ge.config,Ke=t.useCallback((function(e){null==_||_(e)}),[_]),Le=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.maxDuration,n=void 0===r?300:r,o=e.onRecordStart,i=e.onRecordEnd,l=I(t.useState("idle"),2),a=l[0],s=l[1],c=I(t.useState(0),2),A=c[0],d=c[1],C=t.useRef(null),h=t.useRef(null),v=t.useRef(0),f=t.useRef(i);f.current=i;var m=t.useRef(o);m.current=o;var p=t.useRef(n);p.current=n;var g=t.useCallback((function(){h.current&&(clearInterval(h.current),h.current=null)}),[]),y=t.useCallback((function(e){g(),h.current=setInterval((function(){v.current+=1,d(v.current),v.current>=p.current&&e()}),1e3)}),[g]),x=t.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,jr();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,v.current=0,d(0),s("recording"),y((function(){return k.current()})),null===(r=m.current)||void 0===r||r.call(m)}catch(e){console.warn("[movius-chats] Failed to start recording:",e)}case 15:case"end":return e.stop()}}),e,null,[[0,4]])}))),[y]),b=t.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(),s("paused"),g()}catch(e){console.warn("[movius-chats] Failed to pause:",e)}case 3:case"end":return e.stop()}}),e)}))),[g]),w=t.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(),s("recording"),y((function(){return k.current()}))}catch(e){console.warn("[movius-chats] Failed to resume:",e)}case 3:case"end":return e.stop()}}),e)}))),[y]),S=t.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 g(),C.current=null,r=v.current,v.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=f.current)||void 0===n||n.call(f,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]),k=t.useRef(S);k.current=S;var j=t.useCallback((function(){return k.current()}),[]),E=t.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,g(),C.current=null,v.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 t.useEffect((function(){return function(){g();try{var e;null===(e=C.current)||void 0===e||e.stop()}catch(e){}}}),[g]),{status:a,duration:A,isRecording:"recording"===a,isPaused:"paused"===a,startRecording:x,pauseRecording:b,resumeRecording:w,stopRecording:j,cancelRecording:E}}({maxDuration:null!==(a=null==De?void 0:De.maxDuration)&&void 0!==a?a:300,onRecordStart:P,onRecordEnd:Ke}),Be=t.useRef(Le);Be.current=Le;var Ue=t.useCallback((function(){Be.current.startRecording()}),[]),He=t.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,Be.current.stopRecording();case 2:(t=e.sent)&&(w(g({audio:t.uri,senderId:Z},Ae?{replyTo:Re()}:{})),Ae&&ue());case 4:case"end":return e.stop()}}),e)}))),[w,Z,Ae,Re,ue]),ze=t.useCallback((function(){Be.current.cancelRecording()}),[]),We=t.useCallback((function(){Be.current.pauseRecording()}),[]),Ne=t.useCallback((function(){Be.current.resumeRecording()}),[]),Qe=(null==$||null===(s=$.inputStyles)||void 0===s||null===(s=s.sendButtonStyle)||void 0===s?void 0:s.backgroundColor)||(null==$||null===(c=$.colors)||void 0===c?void 0:c.sentBubbleBackgroundColor)||(null==$||null===(A=$.colors)||void 0===A?void 0:A.sentMessageTailColor)||"#22c55e",Ye=(null==$||null===(d=$.colors)||void 0===d?void 0:d.sendIconsColor)||"rgba(255,255,255,0.95)",qe=null!==(C=Fe.recordingSendButtonBackground)&&void 0!==C?C:Qe,Je=Fe.recordingBackground,Xe=null!==(h=Fe.timerColor)&&void 0!==h?h:Ye,$e=null!==(v=Fe.longPressMicColor)&&void 0!==v?v:Ye,Ze=null!==(f=Fe.waveformColor)&&void 0!==f?f:Ye,et={isRecording:Le.isRecording,isPaused:Le.isPaused,duration:Le.duration,isLocked:!1,slideOffset:{x:0,y:0},waveformData:[],startRecording:Le.startRecording,stopRecording:Le.stopRecording,pauseRecording:Le.pauseRecording,resumeRecording:Le.resumeRecording,cancelRecording:Le.cancelRecording},tt=ce?ce(et):null,rt=null===(m=null==de?void 0:de.enableReply)||void 0===m||m,nt=!!Ae&&rt&&!Pe&&!he,ot=Pe,it=nt||ot,lt=t.useMemo((function(){var t,o,i,l,a,s,c;if(!nt||!Ae)return null;var A=null===(t=Ae.mediaItems)||void 0===t?void 0:t[0],u=null!==(o=Ae.image)&&void 0!==o?o:"image"===(null==A?void 0:A.kind)||"video"===(null==A?void 0:A.kind)?A.uri:void 0,d="";return Ae.text?d=Ae.text:Ae.audio?d="🎀 Audio message":Ae.video||"video"===(null==A?void 0:A.kind)?d="πŸŽ₯ Video":Ae.image||"image"===(null==A?void 0:A.kind)?d="πŸ“· Photo":(null!==(i=Ae.fileAttachments)&&void 0!==i?i:[]).length&&(d="πŸ“Ž ".concat(null!==(l=null===(a=Ae.fileAttachments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.name)&&void 0!==l?l:"File")),e.jsxs(r.View,{style:[n(jn||(jn=M(["flex-row items-center px-3.5 pt-2 pb-1.5"]))),{backgroundColor:"rgba(0, 0, 0, 0.08)",minHeight:40},null==Ce?void 0:Ce.container],children:[e.jsxs(r.View,{style:n(En||(En=M(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(Pn||(Pn=M(["text-[13px] font-semibold"]))),{color:Qe},null==Ce?void 0:Ce.senderName],null==$?void 0:$.fontFamily),children:Ae.senderName||"You"}),e.jsx(r.Text,{numberOfLines:null!==(s=null==de?void 0:de.previewMaxLines)&&void 0!==s?s:1,style:J([n(In||(In=M(["text-[12.5px] mt-0.5"]))),{color:"rgba(0,0,0,0.55)"},null==Ce?void 0:Ce.previewText],null==$?void 0:$.fontFamily),children:d})]}),u&&e.jsx(r.Image,{source:{uri:u},style:[{width:32,height:32,borderRadius:4,marginRight:6},null==Ce?void 0:Ce.thumbnail],resizeMode:"cover"}),e.jsx(r.Pressable,{onPress:ue,hitSlop:10,style:n(Mn||(Mn=M(["w-7 h-7 items-center justify-center"]))),children:e.jsx(gr,{color:(null==$||null===(c=$.colors)||void 0===c?void 0:c.inputsIconsColor)||"rgba(0,0,0,0.5)"})})]})}),[nt,Ae,null==de?void 0:de.previewMaxLines,Ce,null==$?void 0:$.fontFamily,null==$||null===(p=$.colors)||void 0===p?void 0:p.inputsIconsColor,Qe,ue]),at=t.useMemo((function(){var t,o,i,l,a,s;if(!nt||!Ae)return null;var c=null===(t=Ae.mediaItems)||void 0===t?void 0:t[0],A=null!==(o=Ae.image)&&void 0!==o?o:"image"===(null==c?void 0:c.kind)||"video"===(null==c?void 0:c.kind)?c.uri:void 0,u="";return Ae.text?u=Ae.text:Ae.audio?u="🎀 Audio message":Ae.video||"video"===(null==c?void 0:c.kind)?u="πŸŽ₯ Video":Ae.image||"image"===(null==c?void 0:c.kind)?u="πŸ“· Photo":(null!==(i=Ae.fileAttachments)&&void 0!==i?i:[]).length&&(u="πŸ“Ž ".concat(null!==(l=null===(a=Ae.fileAttachments)||void 0===a||null===(a=a[0])||void 0===a?void 0:a.name)&&void 0!==l?l:"File")),e.jsxs(r.View,{style:[n(_n||(_n=M(["flex-row items-center px-2.5 py-1.5 mb-1 rounded-md"]))),{backgroundColor:"rgba(0, 0, 0, 0.08)",minHeight:40}],children:[e.jsxs(r.View,{style:n(Rn||(Rn=M(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(Tn||(Tn=M(["text-[13px] font-semibold"]))),{color:Qe}],null==$?void 0:$.fontFamily),children:Ae.senderName||"You"}),e.jsx(r.Text,{numberOfLines:1,style:J([n(On||(On=M(["text-[12.5px] mt-0.5"]))),{color:"rgba(0,0,0,0.55))"}],null==$?void 0:$.fontFamily),children:u})]}),A&&e.jsx(r.Image,{source:{uri:A},style:[{width:30,height:30,borderRadius:4,marginRight:6}],resizeMode:"cover"}),e.jsx(r.Pressable,{onPress:ue,hitSlop:10,style:n(Gn||(Gn=M(["w-7 h-7 items-center justify-center"]))),children:e.jsx(gr,{color:(null==$||null===(s=$.colors)||void 0===s?void 0:s.inputsIconsColor)||"rgba(0,0,0,0.5)"})})]})}),[nt,Ae,Qe,null==$?void 0:$.fontFamily,ue]),st=t.useMemo((function(){var t;return ot?e.jsxs(r.View,{style:[n(Fn||(Fn=M(["flex-row items-center px-3.5 pt-2 pb-1.5"]))),{backgroundColor:"rgba(0, 0, 0, 0.08)",minHeight:40}],children:[e.jsx(r.View,{style:n(Vn||(Vn=M(["mr-2.5"]))),children:e.jsx(xr,{style:{width:16,height:16},color:Qe})}),e.jsxs(r.View,{style:n(Dn||(Dn=M(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(Kn||(Kn=M(["text-[13px] font-semibold"]))),{color:Qe}],null==$?void 0:$.fontFamily),children:"Edit message"}),e.jsx(r.Text,{numberOfLines:1,style:J([n(Ln||(Ln=M(["text-[12.5px] mt-0.5"]))),{color:"rgba(0,0,0,0.55)"}],null==$?void 0:$.fontFamily),children:null==ve?void 0:ve.text})]}),e.jsx(r.Pressable,{onPress:function(){fe(),z(""),Ie()},hitSlop:10,style:n(Bn||(Bn=M(["w-7 h-7 items-center justify-center"]))),children:e.jsx(gr,{color:(null==$||null===(t=$.colors)||void 0===t?void 0:t.inputsIconsColor)||"rgba(0,0,0,0.5)"})})]}):null}),[ot,null==ve?void 0:ve.text,Qe,null==$?void 0:$.fontFamily,fe,Ie]),ct=ke&&!it,At=t.useCallback((function(){var t,o,i,l,a,s;return e.jsxs(r.View,{style:[n(Un||(Un=M(["flex-1 flex-col bg-white overflow-hidden"]))),{minHeight:lo,borderRadius:ct?9999:24},null==$||null===(t=$.inputStyles)||void 0===t?void 0:t.inputContainerStyle],children:[lt,st,e.jsxs(r.View,{style:[n(Hn||(Hn=M(["flex-row px-3.5"]))),{minHeight:lo,alignItems:ke?"center":"flex-end"}],children:[ee&&e.jsx(r.View,{style:Ee,children:e.jsx(r.Pressable,{children:R?e.jsx(R,{}):e.jsx(br,{style:we,color:(null==$||null===(o=$.colors)||void 0===o?void 0:o.inputsIconsColor)||"rgba(0,0,0,0.7)"})})}),e.jsx(r.TextInput,{ref:Y,value:H,onChangeText:Me,placeholder:oe||"Message",style:J([n(zn||(zn=M(["bg-transparent flex-1 pl-2"]))),"ios"===r.Platform.OS?n(Wn||(Wn=M(["text-[17px]"]))):n(Nn||(Nn=M(["text-[16px]"]))),{minHeight:io,maxHeight:118,paddingVertical:ke?0:8,marginVertical:ke?(lo-io)/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===(l=$.colors)||void 0===l?void 0:l.placeholderTextColor)||"rgba(0, 0, 0, 0.4)",multiline:!0,textAlignVertical:N.isMultiline&&H.length>0?"top":"center",onContentSizeChange:_e}),!Pe&&e.jsxs(r.View,{style:[n(Qn||(Qn=M(["flex-row items-center gap-4"]))),Ee],children:[te&&e.jsx(r.Pressable,{onPress:j,children:T?e.jsx(T,{}):e.jsx(Sr,{style:we,color:(null==$||null===(a=$.colors)||void 0===a?void 0:a.inputsIconsColor)||"rgba(0,0,0,0.7)"})}),re&&!H.trim()&&e.jsx(r.Pressable,{onPress:E,children:G?e.jsx(G,{}):e.jsx(yr,{style:we,color:(null==$||null===(s=$.colors)||void 0===s?void 0:s.inputsIconsColor)||"rgba(0,0,0,0.7)"})})]})]})]})}),[ct,ke,Pe,H,N.isMultiline,Ee,Me,_e,oe,ee,te,re,j,E,R,T,G,we,$,lt,st]),ut=t.useCallback((function(){var t;return e.jsx(r.Pressable,{onPress:Te,style:[n(Yn||(Yn=M(["rounded-full justify-center items-center"]))),g({height:lo,width:lo,backgroundColor:Qe},null==$||null===(t=$.inputStyles)||void 0===t?void 0:t.sendButtonStyle)],children:F?e.jsx(F,{}):e.jsx(kr,{style:n.style("h-6 w-6"),color:Ye})})}),[Te,Qe,Ye,null==$||null===(y=$.inputStyles)||void 0===y?void 0:y.sendButtonStyle,F]),dt=ne&&!tt&&!Pe,Ct=Ae&&rt&&!Pe&&he?he(Ae,ue):null,ht={inputBarHeight:lo,primaryColor:qe,backgroundColor:Je,timerColor:Xe,microphoneColor:$e,waveformColor:Ze,holdPillBackground:Fe.holdPillBackground,cancelTextColor:Fe.cancelTextColor,chevronColor:Fe.chevronIconColor,lockColor:Fe.lockIconColor,lockPillBackground:Fe.lockPillBackground,deleteIconColor:Fe.deleteIconColor,pauseIconColor:Fe.pauseIconColor,iconSize:Fe.iconSize,lockSlideDistance:Fe.lockSlideDistance,waveCount:Fe.waveformBarCount,enableLockRecording:null==De?void 0:De.enableLockRecording,enableSlideToCancel:null==De?void 0:De.enableSlideToCancel,enableWaveform:null==De?void 0:De.enableWaveform,timerTextStyle:null!==(x=Fe.timerTextStyle)&&void 0!==x?x:null==Ve?void 0:Ve.timer,fontFamily:null==$?void 0:$.fontFamily,containerStyle:null==Ve?void 0:Ve.container,barStyle:null==Ve?void 0:Ve.bar,slideTextStyle:null==Ve?void 0:Ve.slideText,waveformStyle:null==Ve?void 0:Ve.waveform,lockPillStyle:null==Ve?void 0:Ve.lockPill,trashButtonStyle:null==Ve?void 0:Ve.trashButton,sendButtonStyle:null==Ve?void 0:Ve.sendButton,headerSlot:at,showSendButton:Oe,onSendPress:Te,sendButtonBackgroundColor:Qe,sendButtonIconColor:Ye,renderInputPill:At,renderSendIcon:F?function(){return e.jsx(F,{})}:void 0,renderMicIcon:V?function(){return e.jsx(V,{})}:void 0,onRecordingStart:Ue,onSend:He,onCancel:ze,onDelete:ze,onPauseRecording:We,onResumeRecording:Ne};return e.jsxs(r.View,{style:n(qn||(qn=M(["w-full px-2"]))),children:[Ct,xe&&e.jsx(oo,{previews:ye,closePreview:ae,onRemoveItem:se,CustomFileIcon:D,CustomImagePreview:L,CustomVideoPreview:B,inputHeight:N.height}),e.jsx(r.View,{style:[n(Jn||(Jn=M(["w-full"]))),null==$||null===(b=$.inputStyles)||void 0===b?void 0:b.inputSectionContainerStyle],children:dt?e.jsx(xn,g({},ht)):e.jsxs(r.View,{style:n(Xn||(Xn=M(["flex-row items-end gap-2"]))),children:[At(),Oe||!ne?ut():tt?e.jsx(r.View,{style:{height:lo,width:lo,justifyContent:"center",alignItems:"center"},children:V?e.jsx(V,{}):e.jsx(wr,{style:n.style("h-8 w-8"),color:Ye})}):ut()]})}),tt]})},so=t.memo(ao),co=function(e){var t,r,n,o=null!==(t=null!==(r=e.text)&&void 0!==r?r:null===(n=e.fileAttachments)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.name)&&void 0!==t?t:"";if(!o)return!1;try{var i,l=require("@react-native-clipboard/clipboard"),a=null!==(i=null==l?void 0:l.default)&&void 0!==i?i:l;if(null!=a&&a.setString)return a.setString(o),!0}catch(e){}try{var s,c=require("react-native");if(null!=c&&null!==(s=c.Clipboard)&&void 0!==s&&s.setString)return c.Clipboard.setString(o),!0}catch(e){}return!1},Ao=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeWidth:"1.5",children:[e.jsx(o.Path,{d:"M6 11c0-2.828 0-4.243.879-5.121C7.757 5 9.172 5 12 5h3c2.828 0 4.243 0 5.121.879C21 6.757 21 8.172 21 11v5c0 2.828 0 4.243-.879 5.121C19.243 22 17.828 22 15 22h-3c-2.828 0-4.243 0-5.121-.879C6 20.243 6 18.828 6 16z"}),e.jsx(o.Path,{d:"M6 19a3 3 0 0 1-3-3v-6c0-3.771 0-5.657 1.172-6.828S7.229 2 11 2h4a3 3 0 0 1 3 3",opacity:".5"})]})})},uo=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeLinecap:"round",strokeWidth:"1.5",children:[e.jsx(o.Path,{strokeLinejoin:"round",d:"m12.664 5.479l3.973 3.53c1.568 1.395 2.353 2.092 2.353 2.99s-.785 1.596-2.353 2.99l-3.973 3.53c-.716.637-1.074.956-1.369.823S11 18.731 11 17.772v-2.344c-3.6 0-7.5 1.714-9 4.571c0-9.142 5.333-11.428 9-11.428V6.226c0-.958 0-1.437.295-1.57c.295-.132.653.186 1.37.823"}),e.jsx(o.Path,{d:"m15.539 4.5l5.216 4.844a3.897 3.897 0 0 1-.126 5.823l-5.09 4.333",opacity:".5"})]})})},Co=function(t){var n=t.style,o=t.color,i=void 0===o?"#111827":o;return e.jsx(r.View,{style:[{width:18,height:18,borderRadius:9,borderWidth:1.5,borderColor:i,alignItems:"center",justifyContent:"center"},n],children:e.jsx(r.View,{style:{width:4,height:4,borderRadius:2,backgroundColor:i}})})};var ho,vo,fo,mo,po=function(o){var i,l,a,s,c,A,u,d=o.message,C=o.anchor,h=o.visible,v=o.onClose,f=o.flags,m=o.ui,p=o.fontFamily,g=o.onAction,y=t.useMemo((function(){return d?function(e,t){var r,n=!(null===(r=e.text)||void 0===r||!r.trim());return[{id:"reply",label:"Reply",Icon:ee},{id:"forward",label:"Forward",Icon:uo},{id:"copy",label:"Copy",Icon:Ao},{id:"edit",label:"Edit",Icon:xr},{id:"select",label:"Select",Icon:Co},{id:"delete",label:"Delete",Icon:nn,destructive:!0}].filter((function(e){switch(e.id){case"reply":return!1!==(null==t?void 0:t.enableReply);case"copy":return!1!==(null==t?void 0:t.enableCopy);case"edit":return!1!==(null==t?void 0:t.enableEdit)&&n;case"delete":return!1!==(null==t?void 0:t.enableDelete);case"forward":return!1!==(null==t?void 0:t.enableForward);case"select":return!1!==(null==t?void 0:t.enableSelect);default:return!0}}))}(d,f):[]}),[d,f]),x=null!==(i=null==m?void 0:m.width)&&void 0!==i?i:200,b=null!==(l=null==m?void 0:m.borderRadius)&&void 0!==l?l:12,w=null!==(a=null==m?void 0:m.backgroundColor)&&void 0!==a?a:"#FFFFFF",S=null!==(s=null==m?void 0:m.textColor)&&void 0!==s?s:"#111827",k=null!==(c=null==m?void 0:m.iconColor)&&void 0!==c?c:S,j=null!==(A=null==m?void 0:m.destructiveColor)&&void 0!==A?A:"#EF4444",E=null!==(u=null==m?void 0:m.scrimColor)&&void 0!==u?u:"rgba(0,0,0,0.55)",P=t.useMemo((function(){return C?function(e,t,n,o){var i,l=r.Dimensions.get("window"),a=n*o+12;return i=e.isCurrentUser?e.x+e.width-t:e.x,{left:i=Math.max(8,Math.min(i,l.width-t-8)),top:l.height-(e.y+e.height)>=a+8?e.y+e.height+8:Math.max(8,e.y-a-8)}}(C,x,36,y.length):null}),[C,x,y.length]);if(!d||!C)return null;var I=Math.max(0,C.y-4);return e.jsx(r.Modal,{visible:h,transparent:!0,animationType:"fade",onRequestClose:v,statusBarTranslucent:!0,children:e.jsxs(r.Pressable,{onPress:v,style:[n($n||($n=M(["flex-1"]))),{backgroundColor:E}],children:[e.jsx(r.View,{pointerEvents:"none",style:[n(Zn||(Zn=M(["px-2"]))),{position:"absolute",top:I,left:0,right:0}],children:e.jsx(pr,{message:d,isCurrentUser:C.isCurrentUser,isFirstInSequence:C.isFirstInSequence,staticMode:!0})}),P&&e.jsx(r.Pressable,{onPress:function(){},style:[n(eo||(eo=M(["absolute overflow-hidden"]))),{width:x,borderRadius:b,backgroundColor:w,top:P.top,left:P.left,shadowColor:"#000",shadowOpacity:.18,shadowRadius:16,shadowOffset:{width:0,height:6},elevation:6}],children:y.map((function(t){var o=t.destructive?j:S,i=t.destructive?j:k;return e.jsxs(r.Pressable,{onPress:function(){return g(t.id,d)},android_ripple:{color:"rgba(0,0,0,0.06)"},style:[n(to||(to=M(["flex-row items-center px-3"]))),{height:36},null==m?void 0:m.rowStyle],children:[e.jsx(r.View,{style:{width:16,height:16,marginRight:10},children:e.jsx(t.Icon,{style:{width:16,height:16},color:i})}),e.jsx(r.Text,{style:J([n(ro||(ro=M(["text-[13px] font-medium"]))),{color:o},null==m?void 0:m.rowTextStyle],p),children:t.label})]},t.id)}))})]})})},go=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsxs(o.G,{fill:"none",stroke:i,strokeLinecap:"round",strokeWidth:"1.5",children:[e.jsx(o.Path,{strokeLinejoin:"round",d:"m14 16l2.1 2.5l3.9-5"}),e.jsx(o.Path,{d:"M21 6H3m18 4H3m7 4H3m7 4H3",opacity:".5"})]})})};var yo,xo,bo,wo,So,ko,jo,Eo,Po,Io,Mo,_o,Ro,To;function Oo(t){var r=t.style;return e.jsxs(o.Svg,{viewBox:"0 0 24 24",fill:"none",stroke:"black",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:n.style("h-6 w-6 text-black",r),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 Go,Fo,Vo,Do,Ko,Lo,Bo,Uo,Ho,zo,Wo,No,Qo=function(o){var i,l=o.gallery,a=o.onClose,s=K(),c=s.theme,A=s.setIsVideoPlaying,u=t.useRef(null),d=null!==(i=null==l?void 0:l.initialIndex)&&void 0!==i?i:0,C=I(t.useState(d),2),h=C[0],v=C[1],f=r.useWindowDimensions(),m=f.width,p=f.height;t.useEffect((function(){if(null!=l&&l.items.length){var e=l.initialIndex;v(e);var t=l.items[e];A("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==l?void 0:l.initialIndex,null==l?void 0:l.items,A]);var g=t.useCallback((function(){A(!1),a()}),[a,A]),y=t.useCallback((function(e){var t=Math.round(e.nativeEvent.contentOffset.x/m);v(t);var r=null==l?void 0:l.items[t];A("video"===(null==r?void 0:r.kind))}),[null==l?void 0:l.items,m,A]);return l&&0!==l.items.length?e.jsx(r.Modal,{visible:!0,transparent:!0,animationType:"fade",onRequestClose:g,statusBarTranslucent:!0,children:e.jsxs(r.View,{style:[n(jo||(jo=M(["flex-1 bg-black"]))),{width:m,height:p}],children:[e.jsx(r.Pressable,{onPress:g,style:n(Eo||(Eo=M(["absolute right-4 top-12 z-20 p-2 rounded-full bg-slate-100/70"]))),children:e.jsx(Oo,{style:n(Po||(Po=M(["h-8 w-8"])))})}),l.items.length>1&&e.jsx(r.View,{style:n(Io||(Io=M(["absolute top-14 left-0 right-0 z-10 items-center"]))),children:e.jsxs(r.Text,{style:J(n(Mo||(Mo=M(["text-white/90 text-sm bg-black/40 px-3 py-1 rounded-full"]))),null==c?void 0:c.fontFamily),children:[h+1," / ",l.items.length]})}),e.jsx(r.FlatList,{ref:u,data:l.items,horizontal:!0,pagingEnabled:!0,showsHorizontalScrollIndicator:!1,keyExtractor:function(e,t){return"".concat(e.uri,"-").concat(t)},initialScrollIndex:l.initialIndex,extraData:h,getItemLayout:function(e,t){return{length:m,offset:m*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(Yo,{item:r,width:m,height:p,isActive:n===h,autoPlayVideo:n===d&&"video"===r.kind})}})]})}):null},Yo=function(o){var i=o.item,l=o.width,s=o.height,c=o.isActive,A=o.autoPlayVideo,u=K().theme,d=t.useRef(null),C=I(t.useState("video"===i.kind),2),h=C[0],v=C[1],f=I(t.useState(!1),2),m=f[0],p=f[1],g="video"===i.kind&&c&&A;return"image"===i.kind?e.jsx(r.View,{style:{width:l,height:s,justifyContent:"center"},children:e.jsx(r.Image,{source:{uri:i.uri},style:{width:l,height:s},resizeMode:"contain"})}):e.jsxs(r.View,{style:{width:l,height:s,justifyContent:"center",alignItems:"center",paddingHorizontal:16},children:[e.jsx(a,{source:{uri:i.uri},ref:d,controls:!0,paused:!g,shutterColor:"transparent",playInBackground:!1,playWhenInactive:!1,style:{width:l-32,height:.55*s,backgroundColor:"#000"},resizeMode:"contain",onLoadStart:function(){v(!0),p(!1)},onLoad:function(){return v(!1)},onBuffer:function(e){var t=e.isBuffering;return v(t)},onError:function(){p(!0),v(!1)}}),h&&e.jsx(r.View,{style:n(_o||(_o=M(["absolute inset-0 items-center justify-center"]))),pointerEvents:"none",children:e.jsx(Et,{style:n.style("h-14 w-14"),spinning:!0})}),m&&e.jsx(r.View,{style:n(Ro||(Ro=M(["absolute inset-0 items-center justify-center px-6"]))),children:e.jsx(r.Text,{style:J(n(To||(To=M(["text-white font-semibold"]))),null==u?void 0:u.fontFamily),children:"Failed to load video"})})]})},qo=t.memo(Qo),Jo=function(t){var o,i,l,a,s,c=t.typingUsers,A=t.currentUserId,u=K(),d=u.theme,C=u.showAvatars,h=u.renderCustomTyping,v=u.showBubbleTail,f=u.typingText,m=c.filter((function(e){return e.id!==A}));if(!m.length)return null;var p=m.slice(0,2),y=m.length-2,x=C?p.length+(y>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(r.View,{style:[n(Go||(Go=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(r.View,{style:{position:"absolute",top:0,left:S,flexDirection:"row"},children:[p.map((function(t,o){var i,l,a;return e.jsx(r.View,{style:[n(Fo||(Fo=M(["bg-gray-400 w-6 h-6 rounded-full items-center"]))),{marginLeft:o>0?-10:0,zIndex:p.length+o}],children:t.avatar?e.jsx(r.Image,{source:{uri:t.avatar},style:[n(Vo||(Vo=M(["w-full h-full object-cover rounded-full"]))),null==d||null===(i=d.bubbleStyle)||void 0===i?void 0:i.avatarImageStyle]}):e.jsx(r.Text,{style:J([n(Do||(Do=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===(l=d.bubbleStyle)||void 0===l?void 0:l.avatarTextStyle],null==d?void 0:d.fontFamily),children:null===(a=t.name)||void 0===a?void 0:a.charAt(0)})},t.id)})),y>0&&e.jsx(r.View,{style:[n(Ko||(Ko=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(r.Text,{style:J([n(Lo||(Lo=M(["text-white text-xs font-semibold"]))),null==d||null===(l=d.bubbleStyle)||void 0===l?void 0:l.additionalTypingUsersTextStyle],null==d?void 0:d.fontFamily),children:["+",y]})})]}),v&&e.jsx(G,{style:n.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(r.View,{style:n(Bo||(Bo=M(["flex-row items-center py-3 px-2 justify-center"]))),children:e.jsx(r.Text,{style:J([n(Uo||(Uo=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!=f?f:"Typing..."})})]})},Xo=function(t){var r=t.style,n=t.color,i=void 0===n?"#FFFFFF":n;return e.jsx(o,{style:r,viewBox:"0 0 24 24",children:e.jsx(o.Path,{fill:i,d:"M8 17q-.825 0-1.412-.587T6 15V9q0-.825.588-1.412T8 7h1l1-1h4l1 1h1q.825 0 1.413.588T18 9v6q0 .825-.587 1.413T16 17zm4-3q.825 0 1.413-.587T14 12t-.587-1.412T12 10t-1.412.588T10 12t.588 1.413T12 14M8.55.5Q9.4.225 10.263.113T12 0q2.35 0 4.438.838t3.7 2.325t2.637 3.5T24 11h-2q-.175-1.8-.95-3.363t-1.988-2.762t-2.787-1.937T12.9 2.05l1.55 1.55l-1.4 1.4zm6.9 23q-.85.275-1.712.388T12 24q-2.35 0-4.437-.837t-3.7-2.325t-2.638-3.5T0 13h2q.2 1.8.963 3.363t1.975 2.762t2.787 1.938t3.375.887L9.55 20.4l1.4-1.4z"})})},$o="#FFFFFF",Zo="ios"===r.Platform.OS?50:28,ei="ios"===r.Platform.OS?34:18,ti=null;try{ti=require("react-native-vision-camera")}catch(e){ti=null}var ri,ni,oi,ii,li,ai,si,ci,Ai,ui,di,Ci,hi,vi,fi,mi,pi,gi,yi,xi,bi,wi,Si=null!=ti,ki=null===(Ho=ti)||void 0===Ho?void 0:Ho.Camera,ji=null===(zo=ti)||void 0===zo?void 0:zo.useCameraDevice,Ei=null===(Wo=ti)||void 0===Wo?void 0:Wo.useCameraPermission,Pi=null===(No=ti)||void 0===No?void 0:No.useMicrophonePermission;var Ii,Mi,_i,Ri,Ti,Oi,Gi,Fi,Vi,Di,Ki,Li=function(o){var l=o.visible,a=o.onClose,s=o.onCapture,c=o.cameraProps,A=o.cameraUIProps,u=o.renderCameraScreen,d=o.themePrimary,C=o.fontFamily,h=t.useMemo((function(){return function(e){var t,r,n,o,i,l,a,s;return{enablePhoto:null===(t=null==e?void 0:e.enablePhoto)||void 0===t||t,enableVideo:null===(r=null==e?void 0:e.enableVideo)||void 0===r||r,enableZoom:null===(n=null==e?void 0:e.enableZoom)||void 0===n||n,enableSwitchCamera:null===(o=null==e?void 0:e.enableSwitchCamera)||void 0===o||o,enableAudio:null===(i=null==e?void 0:e.enableAudio)||void 0===i||i,maxVideoDuration:null!==(l=null==e?void 0:e.maxVideoDuration)&&void 0!==l?l:60,maxZoom:null!==(a=null==e?void 0:e.maxZoom)&&void 0!==a?a:8,photoQuality:null!==(s=null==e?void 0:e.photoQuality)&&void 0!==s?s:"balanced",videoQuality:null==e?void 0:e.videoQuality}}(c)}),[c]);return l?e.jsx(r.Modal,{visible:!0,animationType:"slide",transparent:!1,onRequestClose:a,statusBarTranslucent:!0,children:e.jsx(i.GestureHandlerRootView,{style:n(ri||(ri=M(["flex-1"]))),children:Si?e.jsx(zi,{config:h,cameraUIProps:A,renderCameraScreen:u,onCapture:s,onClose:a,themePrimary:d,fontFamily:C}):e.jsx(Xi,{onClose:a,fontFamily:C})})}):null},Bi={code:"function CameraScreenTsx1(){const{zoomBaseShared,zoomShared}=this.__closure;zoomBaseShared.value=zoomShared.value;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx1","zoomBaseShared","zoomShared","__closure","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AAyDiB,SAAAA,gBAAMA,CAAA,QAAAC,cAAA,CAAAC,UAAA,OAAAC,SAAA,CAEfF,cAAc,CAACG,KAAK,CAAGF,UAAU,CAACE,KAAK,CAC3C","ignoreList":[]}',version:"3.16.7"},Ui={code:"function CameraScreenTsx2(e){const{config,zoomBaseShared,zoomShared}=this.__closure;const next=Math.max(1,Math.min(config.maxZoom,zoomBaseShared.value*e.scale));zoomShared.value=next;}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx2","e","config","zoomBaseShared","zoomShared","__closure","next","Math","max","min","maxZoom","value","scale"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AA6DmB,QAAC,CAAAA,gBAAKA,CAAAC,CAAA,QAAAC,MAAA,CAAAC,cAAA,CAAAC,UAAA,OAAAC,SAAA,CAEjB,KAAM,CAAAC,IAAI,CAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,CAAED,IAAI,CAACE,GAAG,CAACP,MAAM,CAACQ,OAAO,CAAEP,cAAc,CAACQ,KAAK,CAAGV,CAAC,CAACW,KAAK,CAAC,CAAC,CAClFR,UAAU,CAACO,KAAK,CAAGL,IAAI,CAC3B","ignoreList":[]}',version:"3.16.7"},Hi={code:"function CameraScreenTsx3(){const{runOnJS,ctrl,zoomShared}=this.__closure;runOnJS(ctrl.setZoom)(zoomShared.value);}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx3","runOnJS","ctrl","zoomShared","__closure","setZoom","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AAkEe,SAAAA,gBAAMA,CAAA,QAAAC,OAAA,CAAAC,IAAA,CAAAC,UAAA,OAAAC,SAAA,CAEbH,OAAO,CAACC,IAAI,CAACG,OAAO,CAAC,CAACF,UAAU,CAACG,KAAK,CAAC,CAC3C","ignoreList":[]}',version:"3.16.7"},zi=function(o){var a,s,c,A,d,C,h,v,f,m,p,g,y,x,b,w=o.config,S=o.cameraUIProps,k=o.renderCameraScreen,j=o.onCapture,E=o.onClose,P=o.themePrimary,_=o.fontFamily,R=function(e){var r=e.config,n=e.onCapture,o=t.useRef(null),i=I(t.useState("back"),2),l=i[0],a=i[1],s=ji(l),c=Ei(),A=Pi(),d=I(t.useState(!1),2),C=d[0],h=d[1],v=I(t.useState(!1),2),f=v[0],m=v[1],p=I(t.useState(1),2),g=p[0],y=p[1],x=I(t.useState(0),2),b=x[0],w=x[1],S=t.useRef(null);t.useEffect((function(){u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,null==c||!c.requestPermission||c.hasPermission){e.next=4;break}return e.next=4,c.requestPermission();case 4:if(!r.enableAudio||null==A||!A.requestPermission||A.hasPermission){e.next=7;break}return e.next=7,A.requestPermission();case 7:e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.warn("[movius-chats] camera permission error",e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))()}),[c,A,r.enableAudio]),t.useEffect((function(){if(f){w(0);var e=Date.now(),t=setInterval((function(){var t=Math.floor((Date.now()-e)/1e3);w(t),t>=r.maxVideoDuration&&E()}),250);return function(){return clearInterval(t)}}}),[f,r.maxVideoDuration]);var k=t.useCallback(u(O().mark((function e(){var t,i,l;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.current&&r.enablePhoto){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,o.current.takePhoto({qualityPrioritization:r.photoQuality});case 5:return t=e.sent,i=t.path.startsWith("file://")?t.path:"file://".concat(t.path),l={uri:i,type:"image",width:t.width,height:t.height},n(l),e.abrupt("return",l);case 12:return e.prev=12,e.t0=e.catch(2),console.warn("[movius-chats] capturePhoto failed",e.t0),e.abrupt("return",null);case 16:case"end":return e.stop()}}),e,null,[[2,12]])}))),[r.enablePhoto,r.photoQuality,n]),j=t.useCallback(u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.current&&r.enableVideo){e.next=2;break}return e.abrupt("return");case 2:m(!0);try{o.current.startRecording({fileType:"mp4",flash:"off",onRecordingFinished:function(e){var t,r={uri:e.path.startsWith("file://")?e.path:"file://".concat(e.path),type:"video",duration:e.duration,width:e.width,height:e.height};m(!1),w(0),n(r),null===(t=S.current)||void 0===t||t.resolve(r),S.current=null},onRecordingError:function(e){var t;console.warn("[movius-chats] recording error",e),m(!1),w(0),null===(t=S.current)||void 0===t||t.resolve(null),S.current=null}})}catch(e){console.warn("[movius-chats] startRecording failed",e),m(!1)}case 4:case"end":return e.stop()}}),e)}))),[r.enableVideo,n]),E=t.useCallback(u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o.current){e.next=2;break}return e.abrupt("return",null);case 2:return e.abrupt("return",new Promise((function(e){S.current={resolve:e};try{o.current.stopRecording()}catch(t){console.warn("[movius-chats] stopRecording failed",t),S.current=null,e(null)}})));case 3:case"end":return e.stop()}}),e)}))),[]),P=t.useCallback((function(){r.enableSwitchCamera&&a((function(e){return"back"===e?"front":"back"}))}),[r.enableSwitchCamera]),M=t.useCallback((function(){h(!0)}),[]),_=t.useCallback((function(e){if(r.enableZoom){var t=Math.max(1,Math.min(r.maxZoom,e));y(t)}}),[r.enableZoom,r.maxZoom]);return{cameraRef:o,Camera:ki,device:s,cameraPerm:c,micPerm:A,facing:l,isCameraReady:C,isRecording:f,zoom:g,elapsed:b,onInitialized:M,capturePhoto:k,startRecording:j,stopRecording:E,switchCamera:P,setZoom:_}}({config:w,onCapture:j}),T=I(t.useState(w.enablePhoto?"photo":"video"),2),G=T[0],F=T[1],V=null!==(a=null==S?void 0:S.captureButtonSize)&&void 0!==a?a:72,D=null!==(s=null==S?void 0:S.controlButtonSize)&&void 0!==s?s:40,K=null!==(c=null==S?void 0:S.backgroundColor)&&void 0!==c?c:"#000",L=null!==(A=null==S?void 0:S.captureRingColor)&&void 0!==A?A:$o,B=null!==(d=null==S?void 0:S.recordingRingColor)&&void 0!==d?d:"#EF4444",U=null!==(C=null==S?void 0:S.recordingIndicatorColor)&&void 0!==C?C:"#EF4444",H=null!==(h=null==S?void 0:S.captureDotColor)&&void 0!==h?h:$o,z=null!==(v=null!==(f=null==S?void 0:S.activeModeTextColor)&&void 0!==f?f:P)&&void 0!==v?v:"#FFFFFF",W=null!==(m=null==S?void 0:S.inactiveModeTextColor)&&void 0!==m?m:"rgba(255,255,255,0.7)",N=null!==(p=null==S?void 0:S.iconColor)&&void 0!==p?p:"#FFFFFF",Q=l.useSharedValue(1),Y=l.useSharedValue(1);t.useEffect((function(){Q.value=R.zoom,Y.value=R.zoom}),[R.zoom,Q,Y]);var q,X,$,Z,ee,te=i.Gesture.Pinch().enabled(!!w.enableZoom).onStart((q=[new global.Error,-3,-27],X=function(){Y.value=Q.value},X.__closure={zoomBaseShared:Y,zoomShared:Q},X.__workletHash=0xcc3ab6fb08f,X.__initData=Bi,X.__stackDetails=q,X)).onUpdate(function(){var e=[new global.Error,-4,-27],t=function(e){var t=Math.max(1,Math.min(w.maxZoom,Y.value*e.scale));Q.value=t};return t.__closure={config:w,zoomBaseShared:Y,zoomShared:Q},t.__workletHash=0xc08a45e6a7d,t.__initData=Ui,t.__stackDetails=e,t}()).onEnd(function(){var e=[new global.Error,-4,-27],t=function(){l.runOnJS(R.setZoom)(Q.value)};return t.__closure={runOnJS:l.runOnJS,ctrl:R,zoomShared:Q},t.__workletHash=0x918aea49a82,t.__initData=Hi,t.__stackDetails=e,t}()),re=function(){var e=u(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("photo"!==G){e.next=4;break}return e.next=3,R.capturePhoto();case 3:return e.abrupt("return");case 4:if(!R.isRecording){e.next=9;break}return e.next=7,R.stopRecording();case 7:e.next=11;break;case 9:return e.next=11,R.startRecording();case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=null!==(g=null===(y=R.cameraPerm)||void 0===y?void 0:y.hasPermission)&&void 0!==g&&g,oe=!(w.enableAudio&&"video"===G)||null!==(x=null===(b=R.micPerm)||void 0===b?void 0:b.hasPermission)&&void 0!==x&&x;if(k){var ie={isCameraReady:R.isCameraReady,isRecording:R.isRecording,facing:R.facing,zoom:R.zoom,elapsed:R.elapsed,capturePhoto:R.capturePhoto,startRecording:R.startRecording,stopRecording:R.stopRecording,switchCamera:R.switchCamera,setZoom:R.setZoom,close:E};return e.jsx(r.View,{style:[n(ni||(ni=M(["flex-1"]))),{backgroundColor:K}],children:k(ie)})}return e.jsxs(r.View,{style:[n(oi||(oi=M(["flex-1 relative"]))),{backgroundColor:K}],children:[e.jsx(i.GestureDetector,{gesture:te,children:e.jsx(r.View,{style:n(ii||(ii=M(["flex-1"]))),children:R.device&&ne?e.jsx(R.Camera,{ref:R.cameraRef,style:n(li||(li=M(["absolute inset-0"]))),device:R.device,isActive:!0,photo:w.enablePhoto,video:w.enableVideo,audio:w.enableAudio,zoom:R.zoom,onInitialized:R.onInitialized}):e.jsx(Ji,{fontFamily:_,cameraGranted:ne,audioGranted:oe})})}),e.jsxs(r.View,{style:[n(ai||(ai=M(["absolute left-0 right-0 flex-row justify-between items-center px-4"]))),{top:Zo}],pointerEvents:"box-none",children:[e.jsx(Wi,{size:D,onPress:E,bg:"rgba(0,0,0,0.5)",children:e.jsx(qi,{size:.55*D,color:N})}),R.isRecording&&e.jsxs(r.View,{style:n(si||(si=M(["flex-row items-center gap-1.5 self-center"]))),children:[e.jsx(r.View,{style:[n(ci||(ci=M(["rounded-full"]))),{width:10,height:10,backgroundColor:U}]}),e.jsx(r.Text,{style:J([n(Ai||(Ai=M(["text-white font-semibold"]))),null==S?void 0:S.timerTextStyle],_),children:($=R.elapsed,Z=Math.floor($/60),ee=$%60,"".concat(Z.toString().padStart(2,"0"),":").concat(ee.toString().padStart(2,"0")))})]}),w.enableSwitchCamera&&!R.isRecording?e.jsx(Wi,{size:D,onPress:R.switchCamera,bg:"rgba(0,0,0,0.5)",children:e.jsx(Xo,{style:{width:.55*D,height:.55*D},color:N})}):e.jsx(r.View,{style:{width:D,height:D}})]}),e.jsxs(r.View,{style:[n(ui||(ui=M(["absolute left-0 right-0 items-center"]))),{bottom:ei}],pointerEvents:"box-none",children:[!R.isRecording&&w.enablePhoto&&w.enableVideo&&e.jsxs(r.View,{style:n(di||(di=M(["flex-row mb-5 px-1.5 py-1.5 rounded-full bg-black/40"]))),children:[e.jsx(Ni,{label:"Photo",active:"photo"===G,activeBg:z,inactiveColor:W,fontFamily:_,onPress:function(){return F("photo")}}),e.jsx(Ni,{label:"Video",active:"video"===G,activeBg:z,inactiveColor:W,fontFamily:_,onPress:function(){return F("video")}})]}),e.jsx(Yi,{size:V,mode:G,isRecording:R.isRecording,ringColor:L,recRingColor:B,captureDotColor:H,recDotColor:U,onPress:re})]})]})},Wi=function(t){var o=t.size,i=t.onPress,l=t.bg,a=t.children,s=t.style;return e.jsx(r.Pressable,{onPress:i,style:[n(Ci||(Ci=M(["items-center justify-center"]))),{width:o,height:o,borderRadius:o/2,backgroundColor:l},s],children:a})},Ni=function(t){var o=t.label,i=t.active,l=t.activeBg,a=t.inactiveColor,s=t.fontFamily,c=t.onPress;return e.jsx(r.Pressable,{onPress:c,style:[n(hi||(hi=M(["px-4 py-1.5 rounded-full"]))),i?{backgroundColor:l}:n(vi||(vi=M(["bg-transparent"])))],children:e.jsx(r.Text,{style:J([n(fi||(fi=M(["text-sm font-medium"]))),{color:i?"#000000":a}],s),children:o})})},Qi={code:"function CameraScreenTsx4(){const{scale}=this.__closure;return{transform:[{scale:scale.value}]};}",location:"/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx",sourceMap:'{"version":3,"names":["CameraScreenTsx4","scale","__closure","transform","value"],"sources":["/home/eadav/Documents/packages/Movius-Chats/src/components/CameraScreen/CameraScreen.tsx"],"mappings":"AAiJwC,SAAAA,iBAAA,QAAAC,KAAA,OAAAC,SAAA,OAAO,CACvCC,SAAS,CAAE,CAAC,CAAEF,KAAK,CAAEA,KAAK,CAACG,KAAM,CAAC,CACtC,CAAC","ignoreList":[]}',version:"3.16.7"},Yi=function(o){var i=o.size,a=o.mode,s=o.isRecording,c=o.ringColor,A=o.recRingColor,u=o.captureDotColor,d=o.onPress,C=l.useSharedValue(1);t.useEffect((function(){C.value=l.withTiming(s?.55:1,{duration:180})}),[s,C]);var h,v,f=l.useAnimatedStyle((h=[new global.Error,-2,-27],(v=function(){return{transform:[{scale:C.value}]}}).__closure={scale:C},v.__workletHash=1952157967078,v.__initData=Qi,v.__stackDetails=h,v)),m=.78*i,p="video"===a&&s?A:u;return e.jsx(r.Pressable,{onPress:d,children:e.jsx(r.View,{style:[n(mi||(mi=M(["items-center justify-center"]))),{width:i,height:i,borderRadius:i/2,borderWidth:4,borderColor:s&&"video"===a?A:c}],children:e.jsx(l.View,{style:[f,{width:m,height:m,borderRadius:s&&"video"===a?8:m/2,backgroundColor:p}]})})})},qi=function(t){var r=t.size,n=t.color;return e.jsxs(o,{width:r,height:r,viewBox:"0 0 24 24",children:[e.jsx(o.Line,{x1:"18",y1:"6",x2:"6",y2:"18",stroke:n,strokeWidth:2,strokeLinecap:"round"}),e.jsx(o.Line,{x1:"6",y1:"6",x2:"18",y2:"18",stroke:n,strokeWidth:2,strokeLinecap:"round"})]})},Ji=function(t){var o=t.fontFamily,i=t.cameraGranted,l=t.audioGranted;return e.jsx(r.View,{style:n(pi||(pi=M(["flex-1 items-center justify-center px-8"]))),children:e.jsx(r.Text,{style:J([n(gi||(gi=M(["text-white text-base text-center"])))],o),children:i?l?"Initializing camera…":"Microphone permission is required to record video.":"Camera permission is required to use this feature."})})},Xi=function(t){var o=t.onClose,i=t.fontFamily;return e.jsxs(r.View,{style:n(yi||(yi=M(["flex-1 bg-black items-center justify-center px-8"]))),children:[e.jsx(r.Text,{style:J([n(xi||(xi=M(["text-white text-base text-center mb-4"])))],i),children:"`react-native-vision-camera` is not installed. Install version 4.7.3 and rebuild the app to use the built-in camera, or pass your own `renderCameraScreen` / `onCameraPress` instead."}),e.jsx(r.Pressable,{onPress:o,style:n(bi||(bi=M(["px-6 py-2.5 rounded-full bg-white/15"]))),children:e.jsx(r.Text,{style:J([n(wi||(wi=M(["text-white text-sm font-medium"])))],i),children:"Close"})})]})};var $i,Zi,el,tl,rl,nl,ol,il,ll,al={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"},sl={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"},cl=function(o){var i=o.color,a=o.count,s=l.useSharedValue(0);return t.useEffect((function(){s.value=l.withRepeat(l.withTiming(1,{duration:4500,easing:l.Easing.linear}),-1,!1)}),[]),e.jsx(r.View,{style:n(Di||(Di=M(["flex-row items-center justify-between h-6"]))),children:Array.from({length:a}).map((function(t,r){return e.jsx(ul,{index:r,total:a,tick:s,color:i},r)}))})},Al={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"},ul=function(t){var r,o,i=t.index,a=t.total,s=t.tick,c=t.color,A=l.useAnimatedStyle((r=[new global.Error,-4,-27],(o=function(){var e=s.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:s,index:i,total:a},o.__workletHash=5267961911334,o.__initData=Al,o.__stackDetails=r,o));return e.jsx(l.View,{style:[n(Ki||(Ki=M(["mx-px rounded-full"]))),{width:2,backgroundColor:c},A]})};function dl(){r.Vibration.vibrate(15)}var Cl,hl,vl,fl,ml,pl,gl,yl,xl,bl,wl,Sl,kl={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"},jl={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"},El={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"},Pl={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"},Il={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"},Ml={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"},_l={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"},Rl=function(){var o,i,l,a,s=K(),c=s.messages,A=s.currentUserId,u=s.onMessageLongPress,d=s.mediaViewerGallery,C=s.clearMediaViewerGallery,h=s.typingUsers,v=s.onSendMessage,f=s.onTypingStart,m=s.onTypingEnd,p=s.onAttachmentPress,g=s.onAudioRecordEnd,y=s.onAudioRecordStart,x=s.onCameraPress,b=s.renderCustomInput,w=s.CustomEmojiIcon,S=s.CustomAttachmentIcon,k=s.CustomCameraIcon,j=s.CustomMicrophoneIcon,E=s.CustomSendIcon,P=s.CustomFileIcon,_=s.CustomImagePreview,R=s.CustomVideoPreview,T=s.keyboardVerticalOffset,O=void 0===T?0:T,G=s.disableKeyboardAvoiding,F=void 0!==G&&G,V=s.startReply,D=s.actionSheetMessage,L=s.actionAnchor,B=s.openActionSheet,U=s.closeActionSheet,H=s.messageActionProps,z=s.messageActionUI,W=s.renderMessageActions,N=s.onCopyMessage,Q=s.onDeleteMessage,Y=s.onForwardMessage,q=s.startEdit,J=s.enterSelectionMode,X=s.cameraVisible,$=s.openCamera,Z=s.closeCamera,ee=s.enableBuiltInCamera,te=s.cameraProps,re=s.cameraUIProps,ne=s.renderCameraScreen,oe=s.onCameraCapture,ie=s.theme,le=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=I(t.useState(0),2),o=n[0],i=n[1];return t.useEffect((function(){if(e){var t="ios"===r.Platform.OS?"keyboardWillShow":"keyboardDidShow",n="ios"===r.Platform.OS?"keyboardWillHide":"keyboardDidHide",o=r.Keyboard.addListener(t,(function(e){i(e.endCoordinates.height)})),l=r.Keyboard.addListener(n,(function(){return i(0)}));return function(){o.remove(),l.remove()}}i(0)}),[e]),e?o:0}(!F),ae=t.useCallback((function(e,t){u?u(e):B(e,t)}),[u,B]),se=t.useCallback((function(e,t){switch(U(),e){case"reply":V(t);break;case"copy":N?N(t):co(t);break;case"edit":q(t);break;case"delete":null==Q||Q(t);break;case"forward":null==Y||Y(t);break;case"select":J(t)}}),[U,V,N,Q,Y,q,J]),ce=t.useCallback((function(){x?x():ee&&$()}),[x,ee,$]),Ae=b?b():e.jsx(so,{onSendMessage:v,onTypingStart:f,onTypingEnd:m,onAttachmentPress:p,onAudioRecordEnd:g,onAudioRecordStart:y,onCameraPress:ce,CustomEmojiIcon:w,CustomAttachmentIcon:S,CustomCameraIcon:k,CustomMicrophoneIcon:j,CustomSendIcon:E,CustomFileIcon:P,CustomImagePreview:_,CustomVideoPreview:R}),ue=null!==(o=null!==(i=null==ie||null===(l=ie.inputStyles)||void 0===l||null===(l=l.sendButtonStyle)||void 0===l?void 0:l.backgroundColor)&&void 0!==i?i:null==ie||null===(a=ie.colors)||void 0===a?void 0:a.sentBubbleBackgroundColor)&&void 0!==o?o:void 0,de=D?W?W(D,U,null!=L?L:void 0):e.jsx(po,{message:D,anchor:L,visible:!0,onClose:U,flags:H,ui:z,fontFamily:null==ie?void 0:ie.fontFamily,onAction:se}):null,Ce=e.jsxs(r.View,{style:n(yl||(yl=M(["flex-1 px-2 pb-4 gap-2 relative"]))),children:[e.jsx(r.FlatList,{style:n(xl||(xl=M(["flex-1"]))),data:c,keyExtractor:function(e){return e.id},renderItem:function(t){var r,n=t.item,o=t.index;return e.jsx(pr,{message:n,isCurrentUser:n.senderId===A,onLongPress:function(e){return ae(n,e)},isFirstInSequence:o===c.length-1||(null===(r=c[o+1])||void 0===r?void 0:r.senderId)!==n.senderId})},ListHeaderComponent:e.jsx(Jo,{typingUsers:h||[],currentUserId:A}),showsVerticalScrollIndicator:!1,inverted:!0,keyboardShouldPersistTaps:"handled",keyboardDismissMode:"interactive"}),e.jsx(r.View,{style:!F&&le>0?{marginBottom:le}:void 0,children:Ae}),e.jsx(qo,{gallery:d,onClose:C}),de,ee&&e.jsx(Li,{visible:X,onClose:Z,onCapture:function(e){Z(),null==oe||oe(e)},cameraProps:te,cameraUIProps:re,renderCameraScreen:ne,themePrimary:ue,fontFamily:null==ie?void 0:ie.fontFamily})]});return F?e.jsx(r.View,{style:n(bl||(bl=M(["flex-1"]))),children:Ce}):"android"===r.Platform.OS?e.jsx(r.View,{style:n(wl||(wl=M(["flex-1"]))),children:Ce}):e.jsx(r.KeyboardAvoidingView,{style:n(Sl||(Sl=M(["flex-1"]))),behavior:"padding",keyboardVerticalOffset:O,children:Ce})};exports.CameraScreen=Li,exports.InlineReply=jt,exports.LongPressOverlay=po,exports.MessageActionsPopover=function(o){var i,l,a,s,c,A,u,d=o.message,C=o.anchor,h=o.visible,v=o.onClose,f=o.flags,m=o.ui,p=o.fontFamily,g=o.onAction,y=t.useMemo((function(){return d?function(e,t){var r,n=!(null===(r=e.text)||void 0===r||!r.trim());return[{id:"reply",label:"Reply",Icon:ee},{id:"forward",label:"Forward",Icon:uo},{id:"copy",label:"Copy",Icon:Ao},{id:"edit",label:"Edit",Icon:xr},{id:"select",label:"Select",Icon:go},{id:"delete",label:"Delete",Icon:nn,destructive:!0}].filter((function(e){switch(e.id){case"reply":return!1!==(null==t?void 0:t.enableReply);case"copy":return!1!==(null==t?void 0:t.enableCopy);case"edit":return!1!==(null==t?void 0:t.enableEdit)&&n;case"delete":return!1!==(null==t?void 0:t.enableDelete);case"forward":return!1!==(null==t?void 0:t.enableForward);case"select":return!1!==(null==t?void 0:t.enableSelect);default:return!0}}))}(d,f):[]}),[d,f]),x=null!==(i=null==m?void 0:m.width)&&void 0!==i?i:200,b=null!==(l=null==m?void 0:m.borderRadius)&&void 0!==l?l:12,w=null!==(a=null==m?void 0:m.backgroundColor)&&void 0!==a?a:"#FFFFFF",S=null!==(s=null==m?void 0:m.textColor)&&void 0!==s?s:"#111827",k=null!==(c=null==m?void 0:m.iconColor)&&void 0!==c?c:S,j=null!==(A=null==m?void 0:m.destructiveColor)&&void 0!==A?A:"#EF4444",E=null!==(u=null==m?void 0:m.backdropColor)&&void 0!==u?u:"rgba(0,0,0,0.18)",P=t.useMemo((function(){return function(e,t,n,o){var i=r.Dimensions.get("window");if(!e)return{top:i.height/2-n*o/2,left:i.width/2-t/2};var l,a=n*o+12;return l=e.isCurrentUser?e.x+e.width-t:e.x,l=Math.max(8,Math.min(l,i.width-t-8)),{top:i.height-(e.y+e.height)>=a+8?e.y+e.height+6:Math.max(8,e.y-a-6),left:l}}(C,x,48,y.length)}),[C,x,y.length]);return d?e.jsx(r.Modal,{visible:h,transparent:!0,animationType:"fade",onRequestClose:v,statusBarTranslucent:!0,children:e.jsx(r.Pressable,{onPress:v,style:[n(ho||(ho=M(["flex-1"]))),{backgroundColor:E}],children:e.jsx(r.Pressable,{onPress:function(){},style:[n(vo||(vo=M(["absolute overflow-hidden"]))),{width:x,borderRadius:b,backgroundColor:w,top:P.top,left:P.left,shadowColor:"#000",shadowOpacity:.16,shadowRadius:16,shadowOffset:{width:0,height:6},elevation:6}],children:y.map((function(t){var o=t.destructive?j:S,i=t.destructive?j:k;return e.jsxs(r.Pressable,{onPress:function(){return g(t.id,d)},android_ripple:{color:"rgba(0,0,0,0.06)"},style:[n(fo||(fo=M(["flex-row items-center px-4"]))),{height:48},null==m?void 0:m.rowStyle],children:[e.jsx(r.View,{style:{width:22,height:22,marginRight:14},children:e.jsx(t.Icon,{style:{width:22,height:22},color:i})}),e.jsx(r.Text,{style:J([n(mo||(mo=M(["text-[15px] font-medium"]))),{color:o},null==m?void 0:m.rowTextStyle],p),children:t.label})]},t.id)}))})})}):null},exports.MessageActionsSheet=function(t){var o=t.message,i=t.visible,l=t.onClose,a=t.flags,s=t.fontFamily,c=t.backgroundColor,A=void 0===c?"#1f2937":c,u=t.textColor,d=void 0===u?"#FFFFFF":u,C=t.iconColor,h=void 0===C?"#FFFFFF":C,v=t.destructiveColor,f=void 0===v?"#ef4444":v,m=t.rowStyle,p=t.rowTextStyle,g=t.onAction;if(!o)return null;var y=function(e){return[{id:"reply",label:"Reply",Icon:ee},{id:"copy",label:"Copy",Icon:Ao},{id:"edit",label:"Edit",Icon:xr},{id:"forward",label:"Forward",Icon:uo},{id:"delete",label:"Delete",Icon:nn,destructive:!0}].filter((function(t){switch(t.id){case"reply":return!1!==(null==e?void 0:e.enableReply);case"copy":return!1!==(null==e?void 0:e.enableCopy);case"edit":return!1!==(null==e?void 0:e.enableEdit);case"delete":return!1!==(null==e?void 0:e.enableDelete);case"forward":return!1!==(null==e?void 0:e.enableForward);default:return!0}}))}(a);return e.jsx(r.Modal,{visible:i,transparent:!0,animationType:"fade",onRequestClose:l,statusBarTranslucent:!0,children:e.jsxs(r.Pressable,{onPress:l,style:n(yo||(yo=M(["flex-1 bg-black/50 justify-end"]))),children:[e.jsx(r.Pressable,{onPress:function(){},style:[n(xo||(xo=M(["mx-3 mb-6 rounded-2xl overflow-hidden"]))),{backgroundColor:A}],children:y.map((function(t,i){var l=t.destructive?f:d,a=t.destructive?f:h;return e.jsxs(r.Pressable,{onPress:function(){g(t.id,o)},style:[n(bo||(bo=M(["flex-row items-center justify-between px-5 py-4"]))),0!==i?{borderTopWidth:.5,borderTopColor:"rgba(255,255,255,0.08)"}:null,m],children:[e.jsx(r.Text,{style:J([n(wo||(wo=M(["text-[16px] font-medium"]))),{color:l},p],s),children:t.label}),e.jsx(r.View,{style:{width:22,height:22},children:e.jsx(t.Icon,{style:{width:22,height:22},color:a})})]},t.id)}))}),e.jsx(r.Pressable,{onPress:l,style:[n(So||(So=M(["mx-3 mb-3 rounded-2xl py-4 items-center"]))),{backgroundColor:A}],children:e.jsx(r.Text,{style:J([n(ko||(ko=M(["text-[16px] font-semibold"]))),{color:d}],s),children:"Cancel"})})]})})},exports.ReplyPreview=function(t){var o=t.message,i=t.onCancel,l=t.previewMaxLines,a=void 0===l?1:l,s=t.replyStyle,c=t.fontFamily,A=t.accentColor,u=void 0===A?"#22c55e":A,d=t.closeIconColor,C=void 0===d?"rgba(0,0,0,0.5)":d,h=t.backgroundColor,v=void 0===h?"#FFFFFF":h,f=t.senderNameColor,m=t.previewTextColor,p=o.senderName||"You",g=function(e){var t,r,n,o,i,l,a=null===(t=e.mediaItems)||void 0===t?void 0:t[0];return e.text?{text:e.text,thumbnail:null!==(n=e.image)&&void 0!==n?n:"image"===(null==a?void 0:a.kind)||"video"===(null==a?void 0:a.kind)?a.uri:void 0}:e.audio?{text:"🎀 Audio message"}:e.video?{text:"πŸŽ₯ Video",thumbnail:e.video}:"video"===(null==a?void 0:a.kind)?{text:"πŸŽ₯ Video",thumbnail:a.uri}:e.image||"image"===(null==a?void 0:a.kind)?{text:"πŸ“· Photo",thumbnail:null!==(o=e.image)&&void 0!==o?o:null==a?void 0:a.uri}:(null!==(r=e.fileAttachments)&&void 0!==r?r:[]).length?{text:"πŸ“Ž ".concat(null!==(i=null===(l=e.fileAttachments)||void 0===l||null===(l=l[0])||void 0===l?void 0:l.name)&&void 0!==i?i:"File")}:{text:"Message"}}(o),y=g.text,x=g.thumbnail;return e.jsxs(r.View,{style:[n(Cl||(Cl=M(["flex-row items-stretch mx-2 mb-1 rounded-xl overflow-hidden"]))),{backgroundColor:v,minHeight:56,shadowColor:"#000",shadowOpacity:.06,shadowRadius:4,shadowOffset:{width:0,height:1},elevation:1},null==s?void 0:s.container],children:[e.jsx(r.View,{style:[n(hl||(hl=M(["w-[3px] self-stretch"]))),{backgroundColor:u},null==s?void 0:s.replyBar]}),e.jsxs(r.View,{style:n(vl||(vl=M(["flex-1 flex-row items-center pl-3 pr-2 py-2"]))),children:[e.jsxs(r.View,{style:n(fl||(fl=M(["flex-1 mr-2"]))),children:[e.jsx(r.Text,{numberOfLines:1,style:J([n(ml||(ml=M(["text-[14px] font-semibold"]))),{color:null!=f?f:u},null==s?void 0:s.senderName],c),children:p}),e.jsx(r.Text,{numberOfLines:a,style:J([n(pl||(pl=M(["text-[13px] mt-0.5"]))),{color:null!=m?m:"rgba(0,0,0,0.55)"},null==s?void 0:s.previewText],c),children:y})]}),x&&e.jsx(r.Image,{source:{uri:x},style:[{width:36,height:36,borderRadius:4,marginRight:6},null==s?void 0:s.thumbnail],resizeMode:"cover"}),e.jsx(r.Pressable,{onPress:i,hitSlop:10,style:n(gl||(gl=M(["w-7 h-7 items-center justify-center"]))),children:e.jsx(gr,{color:C})})]})]})},exports.SwipeableMessage=le,exports.VoiceRecorder=function(o){var i=o.primaryColor,a=void 0===i?"#16A34A":i,s=o.backgroundColor,c=void 0===s?"#0B141A":s,A=o.waveformColor,u=void 0===A?"#E9EDEF":A,d=o.timerColor,C=void 0===d?"#FFFFFF":d,h=o.sendButtonColor,v=o.deleteIconColor,f=void 0===v?"#8696A0":v,m=o.pauseIconColor,p=void 0===m?"#F15C6D":m,g=o.borderRadius,y=void 0===g?16:g,x=o.sendButtonSize,b=void 0===x?50:x,w=o.waveCount,S=void 0===w?32:w,k=o.renderDeleteIcon,j=o.renderSendIcon,E=o.renderPauseIcon,P=o.renderPlayIcon,_=o.renderWaveform,R=o.onSend,T=o.onDelete,O=o.onPause,G=o.onResume,F=I(t.useState(0),2),V=F[0],D=F[1],K=I(t.useState(!1),2),L=K[0],B=K[1],U=t.useRef(Date.now()),H=t.useRef(0),z=t.useRef(0);t.useEffect((function(){U.current=Date.now()}),[]),t.useEffect((function(){if(!L){var e=setInterval((function(){D((Date.now()-U.current-H.current)/1e3)}),250);return function(){return clearInterval(e)}}}),[L]);var W=l.useSharedValue(1),N=l.useSharedValue(1);t.useEffect((function(){W.value=l.withRepeat(l.withSequence(l.withTiming(.5,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(1,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),N.value=l.withRepeat(l.withSequence(l.withTiming(.3,{duration:600}),l.withTiming(1,{duration:600})),-1,!1)}),[]);var Q,Y,q=l.useAnimatedStyle((Q=[new global.Error,-3,-27],(Y=function(){return{opacity:L?1:W.value}}).__closure={isPaused:L,pauseOpacity:W},Y.__workletHash=0xf63a8f6d95,Y.__initData=al,Y.__stackDetails=Q,Y)),J=l.useAnimatedStyle(function(){var e=[new global.Error,-2,-27],t=function(){return{opacity:N.value}};return t.__closure={recBlink:N},t.__workletHash=6095431465582,t.__initData=sl,t.__stackDetails=e,t}()),X={backgroundColor:c,borderTopLeftRadius:y,borderTopRightRadius:y},$=null!=h?h:a;return e.jsxs(r.View,{style:[n(Ii||(Ii=M(["w-full px-4 py-2.5"]))),X],children:[e.jsxs(r.View,{style:n(Mi||(Mi=M(["flex-row items-center gap-3 px-1 pt-1.5 pb-2"]))),children:[e.jsx(l.View,{style:[n(_i||(_i=M(["w-1.5 h-1.5 rounded-full"]))),{backgroundColor:p},J]}),e.jsx(r.Text,{style:[n(Ri||(Ri=M(["text-base font-semibold"]))),{color:C,minWidth:42}],numberOfLines:1,children:lt(V)}),e.jsx(r.View,{style:n(Ti||(Ti=M(["flex-1"]))),children:_?_():e.jsx(cl,{color:u,count:S})})]}),e.jsxs(r.View,{style:n(Oi||(Oi=M(["flex-row items-center justify-between mt-1"]))),children:[e.jsx(r.Pressable,{onPress:T,hitSlop:12,style:[n(Gi||(Gi=M(["items-center justify-center rounded-full"]))),{width:b,height:b}],accessibilityRole:"button",accessibilityLabel:"Delete recording",children:k?k():e.jsx(nn,{style:n.style("w-6 h-6"),color:f})}),e.jsx(r.Pressable,{onPress:function(){B((function(e){var t=!e;return t?(z.current=Date.now(),null==O||O()):(H.current+=Date.now()-z.current,z.current=0,null==G||G()),t}))},hitSlop:12,style:n(Fi||(Fi=M(["items-center justify-center px-4"]))),accessibilityRole:"button",accessibilityLabel:L?"Resume recording":"Pause recording",children:L?P?P():e.jsx(nt,{style:n.style("w-7 h-7"),color:p}):e.jsx(l.View,{style:q,children:E?E():e.jsx(rt,{style:n.style("w-7 h-7"),color:p})})}),e.jsx(r.Pressable,{onPress:R,hitSlop:6,accessibilityRole:"button",accessibilityLabel:"Send recording",style:[n(Vi||(Vi=M(["items-center justify-center rounded-full"]))),{width:b,height:b,backgroundColor:$}],children:j?j():e.jsx(kr,{style:n.style("w-6 h-6"),color:"#FFFFFF"})})]})]})},exports.VoiceRecorderFlow=xn,exports.VoiceRecordingGesture=function(o){var a=o.primaryColor,s=void 0===a?"#16A34A":a,c=o.backgroundColor,A=void 0===c?"#1F2C33":c,u=o.timerColor,d=void 0===u?"#FFFFFF":u,C=o.microphoneColor,h=void 0===C?"#FFFFFF":C,v=o.lockColor,f=void 0===v?"#E9EDEF":v,m=o.lockPillBackground,p=void 0===m?"#1F2C33":m,g=o.cancelTextColor,y=void 0===g?"rgba(255,255,255,0.6)":g,x=o.barHeight,b=void 0===x?48:x,w=o.micSize,S=o.renderMicIcon,k=o.renderLockIcon,j=o.renderArrowIcon,E=o.onCancel,P=o.onLock,_=null!=w?w:b,R=I(t.useState(0),2),T=R[0],O=R[1],G=t.useRef(Date.now());t.useEffect((function(){G.current=Date.now();var e=setInterval((function(){O((Date.now()-G.current)/1e3)}),250);return function(){return clearInterval(e)}}),[]);var F=l.useSharedValue(0),V=l.useSharedValue(0),D=l.useSharedValue(0),K=l.useSharedValue(1),L=l.useSharedValue(0),B=l.useSharedValue(0),U=l.useSharedValue(0);t.useEffect((function(){D.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:700,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:700,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),K.value=l.withRepeat(l.withSequence(l.withTiming(1.18,{duration:700,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(1.12,{duration:700,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1),L.value=l.withRepeat(l.withSequence(l.withTiming(-4,{duration:600,easing:l.Easing.inOut(l.Easing.ease)}),l.withTiming(0,{duration:600,easing:l.Easing.inOut(l.Easing.ease)})),-1,!1)}),[]);var H=t.useRef(E);H.current=E;var z=t.useRef(P);z.current=P;var W,N,Q=function(){var e;dl(),null===(e=H.current)||void 0===e||e.call(H)},Y=function(){var e;dl(),null===(e=z.current)||void 0===e||e.call(z)},q=i.Gesture.Pan().minDistance(0).onBegin((W=[new global.Error,-5,-27],N=function(){B.value=0,U.value=0,F.value=0,V.value=0},N.__closure={cancelFired:B,lockFired:U,dragX:F,dragY:V},N.__workletHash=9031413480896,N.__initData=kl,N.__stackDetails=W,N)).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);F.value=t,V.value=r,0===U.value&&r<=-70&&(U.value=1,l.runOnJS(Y)()),0===B.value&&t<=-90&&(B.value=1,l.runOnJS(Q)())};return t.__closure={dragX:F,dragY:V,lockFired:U,LOCK_THRESHOLD:70,runOnJS:l.runOnJS,fireLock:Y,cancelFired:B,CANCEL_THRESHOLD:90,fireCancel:Q},t.__workletHash=0xac60b03bef6,t.__initData=jl,t.__stackDetails=e,t}()).onFinalize(function(){var e=[new global.Error,-6,-27],t=function(){0===U.value&&0===B.value&&(F.value=l.withSpring(0,{damping:18,stiffness:220}),V.value=l.withSpring(0,{damping:18,stiffness:220}))};return t.__closure={lockFired:U,cancelFired:B,dragX:F,withSpring:l.withSpring,dragY:V},t.__workletHash=0x962b8aa90f5,t.__initData=El,t.__stackDetails=e,t}()),J=l.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.abs(F.value)/90);return{transform:[{translateX:.4*F.value+D.value}],opacity:1-e}};return t.__closure={dragX:F,CANCEL_THRESHOLD:90,arrowPulse:D},t.__workletHash=2609121094002,t.__initData=Pl,t.__stackDetails=e,t}()),X=l.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){var e=Math.min(1,Math.max(0,-V.value/70));return{transform:[{translateY:l.interpolate(e,[0,1],[0,-22])}]}};return t.__closure={dragY:V,LOCK_THRESHOLD:70,interpolate:l.interpolate},t.__workletHash=2770335161610,t.__initData=Il,t.__stackDetails=e,t}()),$=l.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=Ml,t.__stackDetails=e,t}()),Z=l.useAnimatedStyle(function(){var e=[new global.Error,-4,-27],t=function(){return{transform:[{translateX:F.value},{translateY:V.value},{scale:K.value}]}};return t.__closure={dragX:F,dragY:V,micPulse:K},t.__workletHash=0xa3ed9ad56cd,t.__initData=_l,t.__stackDetails=e,t}());return e.jsxs(r.View,{style:n($i||($i=M(["w-full flex-row items-end gap-2 relative"]))),pointerEvents:"box-none",children:[e.jsxs(r.View,{style:[n(Zi||(Zi=M(["flex-1 flex-row items-center px-4 rounded-3xl"]))),{minHeight:b,backgroundColor:A}],children:[e.jsx(r.Text,{style:[n(el||(el=M(["text-base font-semibold"]))),{color:d,minWidth:42}],numberOfLines:1,children:lt(T)}),e.jsxs(l.View,{style:[n(tl||(tl=M(["flex-1 flex-row items-center justify-center gap-1.5"]))),J],children:[j?j():e.jsx(r.Text,{style:[n(rl||(rl=M(["text-base leading-none"]))),{color:y,marginTop:-2}],children:"β€Ή"}),e.jsx(r.Text,{style:[n(nl||(nl=M(["text-sm"]))),{color:y}],children:"Slide to cancel"})]})]}),e.jsxs(r.View,{style:[n(ol||(ol=M(["relative items-center justify-center"]))),{height:b,width:b}],children:[e.jsxs(l.View,{style:[n(il||(il=M(["absolute items-center justify-center rounded-2xl py-2.5"]))),{width:_-8,backgroundColor:p,bottom:_+6,gap:6},X],pointerEvents:"none",children:[k?k():e.jsx(en,{style:{width:18,height:18},color:f}),e.jsx(l.View,{style:$,children:e.jsx(Zr,{style:{width:14,height:14},color:f})})]}),e.jsx(i.GestureDetector,{gesture:q,children:e.jsx(l.View,{style:[n(ll||(ll=M(["items-center justify-center rounded-full"]))),{width:_,height:_,backgroundColor:s},Z],accessibilityRole:"button",accessibilityLabel:"Hold to record. Slide left to cancel, slide up to lock.",children:S?S():e.jsx(wr,{style:{width:26,height:26},color:h})})})]})]})},exports.default=function(t){return e.jsx(it,{children:e.jsx(D,g(g({},t),{},{children:e.jsx(Rl,{})}))})},exports.tryCopyMessage=co;
17
17
  //# sourceMappingURL=index.js.map