@maebgch/rcs-emulator 0.1.4 → 0.1.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.
@@ -205,7 +205,7 @@ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix
205
205
  `}),t[57]=oe):oe=t[57];let ie;return t[58]!==N||t[59]!==ne||t[60]!==M||t[61]!==z||t[62]!==I||t[63]!==v?(ie=s.jsxs("div",{className:M,role:"dialog","aria-modal":"true","aria-label":z,"data-postback":N,"data-view-mode":v,children:[I,ne,oe]}),t[58]=N,t[59]=ne,t[60]=M,t[61]=z,t[62]=I,t[63]=v,t[64]=ie):ie=t[64],ie});function jt(c){try{return new URL(c).hostname}catch{return"Web Page"}}const vt=S.memo(function(t){const e=D.c(39),{onUnlock:n,messagePreview:l}=t,i=l===void 0?"New message":l,{theme:x,businessInfo:r}=Z();let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=new Date,e[0]=o):o=e[0];const[a,f]=S.useState(o),h=x==="dark";let d,u;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=()=>{const F=setInterval(()=>{f(new Date)},1e3);return()=>clearInterval(F)},u=[],e[1]=d,e[2]=u):(d=e[1],u=e[2]),S.useEffect(d,u);let m;e[3]!==a?(m=a.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),e[3]=a,e[4]=m):m=e[4];const g=m;let p;e[5]!==a?(p=a.toLocaleDateString([],{weekday:"short",month:"long",day:"numeric"}),e[5]=a,e[6]=p):p=e[6];const y=p,j=`
206
206
  lock-screen flex flex-col h-full w-full select-none
207
207
  ${h?"bg-zinc-900":"bg-zinc-800"}
208
- `;let b;e[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"h-6"}),e[7]=b):b=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex justify-center mt-4",children:s.jsx("div",{className:"w-8 h-8 rounded-full bg-zinc-700 flex items-center justify-center",children:s.jsx("svg",{className:"w-4 h-4 text-zinc-400",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})})}),e[8]=w):w=e[8];let v;e[9]!==g?(v=s.jsx("div",{className:"mt-6 text-center",children:s.jsx("h1",{className:"text-5xl font-light text-white tracking-tight",children:g})}),e[9]=g,e[10]=v):v=e[10];let k;e[11]!==y?(k=s.jsx("p",{className:"text-zinc-400 text-sm",children:y}),e[11]=y,e[12]=k):k=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs("div",{className:"flex items-center justify-center gap-1 mt-1 text-zinc-500 text-xs",children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{d:"M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z"})}),s.jsx("span",{children:"19°C"})]}),e[13]=N):N=e[13];let L;e[14]!==k?(L=s.jsxs("div",{className:"mt-2 text-center",children:[k,N]}),e[14]=k,e[15]=L):L=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"h-24"}),e[16]=C):C=e[16];let R;e[17]!==r.logo||e[18]!==r.name?(R=s.jsx("div",{className:"w-12 h-12 rounded-xl bg-zinc-900 flex items-center justify-center flex-shrink-0 overflow-hidden",children:r.logo?s.jsx("img",{src:r.logo,alt:r.name,className:"w-full h-full object-cover"}):s.jsx("div",{className:"text-white",children:s.jsxs("svg",{className:"w-7 h-7",viewBox:"0 0 24 24",fill:"currentColor",children:[s.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),s.jsx("circle",{cx:"12",cy:"6",r:"1"}),s.jsx("circle",{cx:"12",cy:"18",r:"1"}),s.jsx("circle",{cx:"6",cy:"12",r:"1"}),s.jsx("circle",{cx:"18",cy:"12",r:"1"}),s.jsx("circle",{cx:"8",cy:"8",r:"0.8"}),s.jsx("circle",{cx:"16",cy:"8",r:"0.8"}),s.jsx("circle",{cx:"8",cy:"16",r:"0.8"}),s.jsx("circle",{cx:"16",cy:"16",r:"0.8"}),s.jsx("circle",{cx:"6",cy:"6",r:"0.5"}),s.jsx("circle",{cx:"18",cy:"6",r:"0.5"}),s.jsx("circle",{cx:"6",cy:"18",r:"0.5"}),s.jsx("circle",{cx:"18",cy:"18",r:"0.5"})]})})}),e[17]=r.logo,e[18]=r.name,e[19]=R):R=e[19];let $;e[20]!==r.name?($=s.jsx("p",{className:"text-sm font-semibold text-gray-900 truncate",children:r.name}),e[20]=r.name,e[21]=$):$=e[21];let _;e[22]!==i?(_=s.jsx("p",{className:"text-sm text-gray-500 truncate",children:i}),e[22]=i,e[23]=_):_=e[23];let M;e[24]!==$||e[25]!==_?(M=s.jsxs("div",{className:"flex-1 text-left min-w-0",children:[$,_]}),e[24]=$,e[25]=_,e[26]=M):M=e[26];let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:"now"}),e[27]=z):z=e[27];let I;e[28]!==n||e[29]!==R||e[30]!==M?(I=s.jsx("div",{className:"px-4 pb-8",children:s.jsxs("button",{onClick:n,className:`w-full bg-white rounded-2xl p-3 flex items-center gap-3 shadow-lg \r
208
+ `;let b;e[7]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx("div",{className:"h-6"}),e[7]=b):b=e[7];let w;e[8]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx("div",{className:"flex justify-center mt-4",children:s.jsx("div",{className:"w-8 h-8 rounded-full bg-zinc-700 flex items-center justify-center",children:s.jsx("svg",{className:"w-4 h-4 text-zinc-400",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})})}),e[8]=w):w=e[8];let v;e[9]!==g?(v=s.jsx("div",{className:"mt-6 text-center",children:s.jsx("h1",{className:"text-5xl font-light text-white tracking-tight",children:g})}),e[9]=g,e[10]=v):v=e[10];let k;e[11]!==y?(k=s.jsx("p",{className:"text-zinc-400 text-sm",children:y}),e[11]=y,e[12]=k):k=e[12];let N;e[13]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsxs("div",{className:"flex items-center justify-center gap-1 mt-1 text-zinc-500 text-xs",children:[s.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 20 20",children:s.jsx("path",{d:"M5.5 16a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 16h-8z"})}),s.jsx("span",{children:"19°C"})]}),e[13]=N):N=e[13];let L;e[14]!==k?(L=s.jsxs("div",{className:"mt-2 text-center",children:[k,N]}),e[14]=k,e[15]=L):L=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx("div",{className:"h-24"}),e[16]=C):C=e[16];let R;e[17]!==r.logo||e[18]!==r.name?(R=s.jsx("div",{className:"w-12 h-12 rounded-xl bg-zinc-900 flex items-center justify-center flex-shrink-0 overflow-hidden",children:r.logo?s.jsx("img",{src:r.logo,alt:r.name,className:"w-full h-full object-cover"}):s.jsx("div",{className:"text-white",children:s.jsxs("svg",{className:"w-7 h-7",viewBox:"0 0 24 24",fill:"currentColor",children:[s.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),s.jsx("circle",{cx:"12",cy:"6",r:"1"}),s.jsx("circle",{cx:"12",cy:"18",r:"1"}),s.jsx("circle",{cx:"6",cy:"12",r:"1"}),s.jsx("circle",{cx:"18",cy:"12",r:"1"}),s.jsx("circle",{cx:"8",cy:"8",r:"0.8"}),s.jsx("circle",{cx:"16",cy:"8",r:"0.8"}),s.jsx("circle",{cx:"8",cy:"16",r:"0.8"}),s.jsx("circle",{cx:"16",cy:"16",r:"0.8"}),s.jsx("circle",{cx:"6",cy:"6",r:"0.5"}),s.jsx("circle",{cx:"18",cy:"6",r:"0.5"}),s.jsx("circle",{cx:"6",cy:"18",r:"0.5"}),s.jsx("circle",{cx:"18",cy:"18",r:"0.5"})]})})}),e[17]=r.logo,e[18]=r.name,e[19]=R):R=e[19];let $;e[20]!==r.name?($=s.jsx("p",{className:"text-sm font-semibold text-gray-900 truncate",children:r.name}),e[20]=r.name,e[21]=$):$=e[21];let _;e[22]!==i?(_=s.jsx("p",{className:"text-sm text-gray-500 truncate",children:i}),e[22]=i,e[23]=_):_=e[23];let M;e[24]!==$||e[25]!==_?(M=s.jsxs("div",{className:"flex-1 text-left min-w-0",children:[$,_]}),e[24]=$,e[25]=_,e[26]=M):M=e[26];let z;e[27]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx("span",{className:"text-xs text-gray-400 flex-shrink-0",children:"now"}),e[27]=z):z=e[27];let I;e[28]!==n||e[29]!==R||e[30]!==M?(I=s.jsx("div",{className:"px-4 pb-8",children:s.jsxs("button",{onClick:n,className:`w-full bg-white rounded-2xl p-3 flex items-center gap-3 shadow-lg
209
209
  transition-transform active:scale-[0.98] hover:shadow-xl`,children:[R,M,z]})}),e[28]=n,e[29]=R,e[30]=M,e[31]=I):I=e[31];let B;e[32]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx("div",{className:"flex-1"}),e[32]=B):B=e[32];let A;e[33]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("div",{className:"flex justify-center pb-2",children:s.jsx("div",{className:"w-32 h-1 rounded-full bg-zinc-600"})}),e[33]=A):A=e[33];let O;return e[34]!==v||e[35]!==L||e[36]!==I||e[37]!==j?(O=s.jsxs("div",{className:j,children:[b,w,v,L,C,I,B,A]}),e[34]=v,e[35]=L,e[36]=I,e[37]=j,e[38]=O):O=e[38],O}),Ce={name:"Business",verified:!1},wt=S.memo(function(t){const e=D.c(24),{flow:n,onUserReply:l,theme:i,device:x,businessInfo:r,showSuggestions:o}=t;let a;e[0]!==n||e[1]!==l?(a={flow:n,onUserReply:l,typingDelay:800},e[0]=n,e[1]=l,e[2]=a):a=e[2];const{state:f,handleReply:h,handleAction:d}=qe(a),[u,m]=S.useState(!1);let g;e[3]===Symbol.for("react.memo_cache_sentinel")?(g=()=>{m(kt)},e[3]=g):g=e[3];const p=g,[y,j]=S.useState(null);let b;e[4]===Symbol.for("react.memo_cache_sentinel")?(b=M=>{j({...M,isOpen:!0})},e[4]=b):b=e[4];const w=b;let v;e[5]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{j(null)},e[5]=v):v=e[5];const k=v;let N;e[6]!==d||e[7]!==l?(N=M=>{if(!se(M))return;const z=_e(M);if(z){w({url:z.url,viewMode:z.webviewViewMode||"TALL",title:z.description||"",postbackData:M.action.postback.data}),l({type:"action",postbackData:M.action.postback.data,displayText:M.action.displayText,timestamp:Date.now(),actionData:{type:"webview",url:z.url,viewMode:z.webviewViewMode||"TALL",description:z.description}});return}d(M)},e[6]=d,e[7]=l,e[8]=N):N=e[8];const L=N;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(gt,{}),e[9]=C):C=e[9];let R;e[10]!==u?(R=u&&s.jsx(pt,{}),e[10]=u,e[11]=R):R=e[11];let $;e[12]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(Ae,{}),e[12]=$):$=e[12];let _;return e[13]!==r||e[14]!==x||e[15]!==L||e[16]!==h||e[17]!==u||e[18]!==o||e[19]!==f||e[20]!==R||e[21]!==i||e[22]!==y?(_=s.jsxs(Se,{theme:i,device:x,businessInfo:r,state:f,showSuggestions:o,isProfileOpen:u,toggleProfile:p,onReply:h,onAction:L,webView:y,openWebView:w,closeWebView:k,children:[C,R,$]}),e[13]=r,e[14]=x,e[15]=L,e[16]=h,e[17]=u,e[18]=o,e[19]=f,e[20]=R,e[21]=i,e[22]=y,e[23]=_):_=e[23],_}),Te=S.memo(function(t){const e=D.c(84),{messages:n,jsonUrl:l,onUserReply:i,theme:x,device:r,businessInfo:o,className:a,width:f,height:h,showSuggestions:d,showLockScreen:u}=t,m=x===void 0?"light":x,g=r===void 0?"android":r,p=a===void 0?"":a,y=f===void 0?375:f,j=h===void 0?667:h,b=d===void 0?!0:d,w=u===void 0?!1:u,[v,k]=S.useState(w);let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=()=>{k(!1)},e[0]=N):N=e[0];const L=N,{data:C,isLoading:R,error:$}=Ie(l),_=l?C:n;let M;e[1]!==_?(M=_?$e(_):!1,e[1]=_,e[2]=M):M=e[2];const z=M;let I;e[3]!==o||e[4]!==_?.name?(I=()=>({...Ce,...o,name:o?.name||_?.name||Ce.name}),e[3]=o,e[4]=_?.name,e[5]=I):I=e[5],_?.name;let B;e[6]!==I?(B=I(),e[6]=I,e[7]=B):B=e[7];const A=B;let O;e[8]!==_||e[9]!==z?(O=_&&z?ze(_):"New message",e[8]=_,e[9]=z,e[10]=O):O=e[10];const F=O,V=m==="dark";let J;e[11]!==p||e[12]!==g||e[13]!==j||e[14]!==V||e[15]!==m||e[16]!==y?(J=T=>{const{children:G}=T;return s.jsx("div",{className:`
210
210
  rcs-emulator relative overflow-hidden
211
211
  rounded-2xl shadow-2xl