@mirantes-micro/foundation-design-system 1.2.253 → 1.2.256

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 (2) hide show
  1. package/dist/index.js +20 -16
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -179,17 +179,16 @@
179
179
  data {
180
180
  id
181
181
  name
182
- email
183
182
  avatar
184
- status
185
- slug
186
- isContact
187
- conversations {
188
- id
189
- participants {
190
- userId
183
+ status
184
+ slug
185
+ isContact
186
+ conversations {
187
+ id
188
+ participants {
189
+ userId
190
+ }
191
191
  }
192
- }
193
192
  }
194
193
  meta {
195
194
  currentPage
@@ -379,7 +378,6 @@
379
378
  name
380
379
  avatar
381
380
  slug
382
- email
383
381
  }
384
382
  page {
385
383
  id
@@ -1154,8 +1152,6 @@
1154
1152
  name
1155
1153
  avatar
1156
1154
  slug
1157
- email
1158
- phone
1159
1155
  status
1160
1156
  isContact
1161
1157
  createdAt
@@ -1268,7 +1264,9 @@
1268
1264
  }
1269
1265
  }
1270
1266
  `;c7.gql`
1271
- mutation CreateConversationFromPage($input: CreateConversationFromPageInput!) {
1267
+ mutation CreateConversationFromPage(
1268
+ $input: CreateConversationFromPageInput!
1269
+ ) {
1272
1270
  createConversationFromPage(input: $input) {
1273
1271
  id
1274
1272
  name
@@ -1276,8 +1274,14 @@
1276
1274
  }
1277
1275
  }
1278
1276
  `;c7.gql`
1279
- query CheckExistingConversationFromPage($pageId: String!, $receiverId: String!) {
1280
- checkExistingConversationFromPage(pageId: $pageId, receiverId: $receiverId) {
1277
+ query CheckExistingConversationFromPage(
1278
+ $pageId: String!
1279
+ $receiverId: String!
1280
+ ) {
1281
+ checkExistingConversationFromPage(
1282
+ pageId: $pageId
1283
+ receiverId: $receiverId
1284
+ ) {
1281
1285
  conversationId
1282
1286
  }
1283
1287
  }
@@ -2914,7 +2918,7 @@ query UserArticlesPosts($userId: String!) {
2914
2918
  foundedYear: ${_??""}
2915
2919
  organizationSize: ${W??""}
2916
2920
  IMPORTANT: Limit your response to a maximum of 140 characters.
2917
- `;i(R,{onSuccess(le){F("description",le);}});};return Q__namespace.default.createElement("form",{onSubmit:z,className:"flex flex-col gap-[1rem] overflow-y-auto"},Q__namespace.default.createElement("span",{className:"text-body-md font-bold md:text-[1.25rem] text-[#111827]"},m),Q__namespace.default.createElement(uI,{initialUrl:B("slug"),onChange:N=>{F("slug",N);}}),Q__namespace.default.createElement("div",{className:"flex flex-col md:flex-row gap-[1rem]"},Q__namespace.default.createElement(et,{disabled:G,onChange:N=>{let U=N.target.value,q=Mte__default.default(U,{lower:true,trim:false,replacement:"-"});F("name",U),F("slug",q);},error:T?.name?.message?.length?ve(r,`${T?.name?.message}`):"",value:B("name"),className:"w-full bg-white h-12",placeholder:C}),Q__namespace.default.createElement(et,{disabled:G,onChange:N=>F("site",N.target.value),error:T?.site?.message?.length?ve(r,`${T?.site?.message}`):"",value:B("site")??"",className:" bg-white h-12",placeholder:"Website"})),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2 md:flex-row items-start md:items-center justify-between"},Q__namespace.default.createElement("span",{className:"text-body-sm md:text-[0.875rem] font-normal text-[#111827]"},g,Q__namespace.default.createElement("span",{className:"text-red-600"},"*")),Q__namespace.default.createElement("div",{className:"flex items-center gap-x-[1rem]"},Q__namespace.default.createElement(y4,{isSelected:B("isAcademic")===true,onSelect:()=>F("isAcademic",true),label:H}),Q__namespace.default.createElement(y4,{label:v,onSelect:()=>F("isAcademic",false),isSelected:B("isAcademic")===false}))),T?.isAcademic?.message?.length&&Q__namespace.default.createElement("p",{className:"text-red-shade6 text-body-sm"},ve(r,`${T?.isAcademic?.message}`)),Q__namespace.default.createElement("div",{className:"flex flex-col md:flex-row items-stretch gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(et,{type:"number",min:1800,disabled:G,error:T?.foundedYear?.message?.length?ve(r,`${T?.foundedYear?.message}`):"",onChange:N=>F("foundedYear",parseInt(N.target.value)),value:B("foundedYear")?.toString(),className:"bg-white h-12",placeholder:f})),Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(_p,{options:L,className:"h-12",placeholder:A,disabled:G,isLoading:k,onSearch:N=>{a(N);},onChange:N=>{F("sector.id",N?.id??"");},error:T?.sector?.message?.length?ve(r,`${T?.sector?.message}`):"",value:B("sector.id"),required:true,enableSearch:true,floattable:true}))),Q__namespace.default.createElement("div",{className:"flex flex-col md:flex-row items-stretch gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(_p,{disabled:G,options:[{id:"MICRO",label:"1\u201310",value:"1-10"},{id:"SMALL",label:"11\u201350",value:"11\u201350"},{id:"MEDIUM",label:"51\u2013200",value:"51\u2013200"},{id:"LARGE",label:"201\u2013500",value:"201\u2013500"},{id:"ENTERPRISE",label:"500\u20131000",value:"500\u20131000"},{id:"HUGE",label:"+1000",value:"+1000"}],error:T?.organizationSize?.message?.length?ve(r,`${T?.organizationSize?.message}`):"",className:"h-12",placeholder:y,required:true,onChange:N=>F("organizationSize",N?.id??""),value:B("organizationSize"),enableSearch:false,floattable:true})),Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(_p,{disabled:G,options:x,className:"h-12",placeholder:b,onChange:N=>F("organizationType",N?.id??""),error:T?.organizationType?.message?.length?ve(r,`${T?.organizationType?.message}`):"",value:B("organizationType"),required:true,enableSearch:true,floattable:true}))),Q__namespace.default.createElement(fI,{disabled:G||l,className:E("!p-2 w-full",d),placeholder:I,renderButton:Q__namespace.default.createElement(hI,{onClick:D,disabled:G||l}),maxLength:140,onChange:N=>F("description",N),value:B("description")??"",error:T?.description?.message?.length?ve(r,`${T?.description?.message}`):""}),Q__namespace.default.createElement("div",{className:"w-full flex items-start gap-x-2"},Q__namespace.default.createElement(Zo,{disabled:G,isChecked:B("termsAccepted"),onClick:()=>F("termsAccepted",!B("termsAccepted"))}),Q__namespace.default.createElement("span",{className:"flex flex-col text-body-sm md:text-[0.875rem]"},Q__namespace.default.createElement("span",null,u+" ",M+" ",P+" ",Q__namespace.default.createElement("a",{target:"_blank",href:"/terms-companies",className:"text-primary cursor-pointer hover:underline"},S+" "),h))),!o&&Q__namespace.default.createElement("div",{className:"w-full flex gap-x-4 justify-between"},Q__namespace.default.createElement(X,{type:"button",disabled:G,className:"w-full p-3 bg-white border border-primary !text-primary font-bold text-body-sm md:text-[1rem]",onClick:t,label:c}),Q__namespace.default.createElement(X,{type:"submit",isLoading:G,disabled:!B("termsAccepted")||G,className:"w-full p-3 bg-primary !text-white font-bold text-body-sm md:text-[1rem]",label:p})))}function Ste(e){return Q__namespace.createElement("svg",{width:266,height:167,fill:"none",...e},Q__namespace.createElement("path",{d:"M92.068 10.15c0 4.177 6.696 7.564 2.037 7.564-4.66 0-8.437-3.387-8.437-7.564 0-4.178 3.777-7.564 8.436-7.564 4.66 0-2.036 3.386-2.036 7.564zM158.23 6.5l1.132 3.484h3.664l-2.964 2.154 1.132 3.484-2.964-2.153-2.964 2.153 1.132-3.484-2.964-2.154h3.664L158.23 6.5z",fill:"#FE964A"}),Q__namespace.createElement("path",{d:"M34.378 80.156s10.748-5.353 13.186-2.547c1.34 1.541 2.351 3.409 1.152 4.925-.925 1.17-2.26 1.319-3.825 1.044-3.312-.582-3.262-5.182-1.932-8.031 1.836-3.934 11.582-1.612 11.582-1.612",stroke:"#0BA259",strokeWidth:2.017}),Q__namespace.createElement("circle",{cx:229.219,cy:74.789,r:5.883,fill:"#FFEDEC"}),Q__namespace.createElement("path",{d:"M56.047 136.492l.837-7.22 5.835 3.7.666-6.057 5.322 3.667 1.658-6.548",stroke:"#2F78EE",strokeWidth:1.681}),Q__namespace.createElement("path",{d:"M193.302 22.43s-.818-4.862 1.53-5.83c1.973-.814 3.683 2.785 5.304 1.48 1.642-1.322-2.457-3.416-1.122-4.997 1.405-1.664 5.916 0 5.916 0",stroke:"#2F78EE",strokeWidth:2.017}),Q__namespace.createElement("path",{d:"M32.956 15.136l21.606 10.757-5.4 7.364-16.206-18.12z",fill:"#2F78EE"}),Q__namespace.createElement("circle",{cx:224.346,cy:94.81,r:2.521,fill:"#FFEDEC"}),Q__namespace.createElement("path",{d:"M200.116 128.002c2.771.279 5.465-3.937 5.154-.846-.311 3.091-2.81 5.37-5.581 5.091-2.771-.279-4.765-3.01-4.454-6.101.311-3.091 2.11 1.577 4.881 1.856z",fill:"#2F78EE"}),Q__namespace.createElement("path",{d:"M209.108 39.492l1.886 5.808h6.107l-4.94 3.589 1.887 5.807-4.94-3.59-4.94 3.59 1.886-5.807-4.94-3.59h6.107l1.887-5.807z",fill:"#0BA259"}),Q__namespace.createElement("rect",{x:82.801,y:26.328,width:100,height:100,rx:50,fill:"#0B89CE"}),Q__namespace.createElement("g",{filter:"url(#prefix__filter0_d_60588_61009)"},Q__namespace.createElement("rect",{x:102.801,y:46.328,width:60,height:60,rx:30,fill:"#fff",shapeRendering:"crispEdges"}),Q__namespace.createElement("path",{d:"M127.34 88.328l-4.073-2.905 5.85-7.407-9.144-2.723 1.555-4.684 8.995 3.123-.222-9.404h5.035l-.222 9.404 8.959-3.123 1.555 4.684-9.107 2.723 5.775 7.407-4.072 2.905-5.405-7.697-5.479 7.697z",fill:"#0B89CE"})),Q__namespace.createElement("defs",null,Q__namespace.createElement("filter",{id:"prefix__filter0_d_60588_61009",x:62.801,y:26.328,width:140,height:140,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Q__namespace.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Q__namespace.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),Q__namespace.createElement("feOffset",{dy:20}),Q__namespace.createElement("feGaussianBlur",{stdDeviation:20}),Q__namespace.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),Q__namespace.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),Q__namespace.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_60588_61009"}),Q__namespace.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_60588_61009",result:"shape"}))))}var Nte=Q__namespace.memo(Ste),PI=Nte;function SI({companyId:e,handleCreatePage:t}){let{locale:o}=w(),r=ve(o,"congratulations.title"),n=ve(o,"congratulations.description"),a=ve(o,"congratulations.button");return Q__namespace.default.createElement("div",{className:"flex flex-col items-center justify-center gap-[1rem]"},Q__namespace.default.createElement(PI,null),Q__namespace.default.createElement("span",{className:"font-bold text-body-sm md:text-[2rem] text-[#111827]"},r),Q__namespace.default.createElement("span",{className:"text-center font-normal text-body-sm md:text-[0.875rem] text-[#687588]"},n),Q__namespace.default.createElement(Xr,{onClick:()=>{if(t?.(),e?.length){be(),window.location.href=`/company/${o}/${e}`;return}},className:"w-full p-2 md:p-3 font-bold text-body-sm md:text-[1rem]"},Q__namespace.default.createElement("span",{className:"text-white"},a)))}function II({onClose:e}){let[t,o]=Q.useState("create-company-page"),[r,n]=Q.useState("");return {actualStepComponent:[{id:"create-company-page",component:Q__namespace.default.createElement(e6,{onCancel:()=>{o("create-company-page"),e?.();},onNextStep:i=>{n(i??""),o("congratulations");}}),className:"bg-[linear-gradient(180deg,_#DEF3FF_0%,_#FCFEFF_100%)] max-h-full"},{id:"congratulations",component:Q__namespace.default.createElement(SI,{companyId:r,handleCreatePage:()=>{o("create-company-page"),e?.();}}),className:""}]?.find(i=>i.id===t)}}function EI({isOpen:e,onClose:t}){let{isMobile:o}=ft(),{actualStepComponent:r}=II({onClose:t});return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,o?Q__namespace.default.createElement(qn,{onClose:t,isOpen:e,className:"bg-[linear-gradient(180deg,_#DEF3FF_0%,_#FCFEFF_100%)]"},Q__namespace.default.createElement(e6,{onCancel:t})):Q__namespace.default.createElement(_e,{hideCloseButton:true,isOpen:e,onClose:t,closeOnClickOutside:false,disableFullScreen:true,className:E("w-[20.938rem] md:w-[31.25rem] mt-4 !rounded-[1rem] p-[1.5rem] md:p-[2rem]",r?.className)},r?.component))}function Ate(e){return Q__namespace.createElement("svg",{width:18,height:18,fill:"none",...e},Q__namespace.createElement("path",{d:"M16.031 9a.843.843 0 01-.843.844H9.843v5.344a.844.844 0 11-1.688 0V9.843H2.812a.844.844 0 010-1.688h5.344V2.812a.844.844 0 111.688 0v5.344h5.344A.844.844 0 0116.03 9z",fill:"#0B89CE"}))}var Ite=Q__namespace.memo(Ate),kI=Ite;function TI(){let{locale:e,user:t}=w(),[o,r]=usehooks.useToggle(false),n=ve(e,"my-pages.title"),a=ve(e,"create-button-label");return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement("div",{className:"w-full flex items-center justify-between"},Q__namespace.default.createElement("span",{className:"font-bold w-full text-[1.25rem] text-[#050910]"},n),Q__namespace.default.createElement(X,{onClick:()=>{if(t&&!t.isActive){r(true);return}setTimeout(()=>{window.dispatchEvent(new CustomEvent("openCreateCompanyModal"));},800);},rightElement:Q__namespace.default.createElement(kI,null),className:"bg-[#0B89CE1A] flex gap-x-[1.5rem] text-primary !w-[8.875rem] p-[0.5rem] rounded-full",label:a})),Q__namespace.default.createElement(Ao,{isOpen:o,onClose:()=>r(false)}))}function DI(){let{locale:e}=w(),t=ve(e,"my-pages.recruit-now"),o=ve(e,"my-pages.recruit-now-description"),r=ve(e,"my-pages.recruit-now-publish-job");return Q__namespace.default.createElement("div",{className:"w-full rounded-[0.5rem] border border-[#E4EBF1] overflow-hidden"},Q__namespace.default.createElement("div",{className:"w-full h-[4.5rem] rounded-t-[0.5rem] bg-cover bg-center",style:{backgroundImage:"url('https://iili.io/FPF7K1R.png')",backgroundColor:"#eee"}}),Q__namespace.default.createElement("div",{className:"w-full p-4 flex flex-col gap-[0.625rem]"},Q__namespace.default.createElement("img",{src:"https://iili.io/FPFeWG4.png",loading:"lazy",className:"w-8 -mt-8 rounded-full h-8"}),Q__namespace.default.createElement("span",{className:"text-[0.875rem] font-medium"},t),Q__namespace.default.createElement("span",{className:"text-body-sm font-normal text-[#A0AEC0]"},o),Q__namespace.default.createElement(X,{disabled:true,label:r,className:"w-full rounded-[0.5rem] p-[0.5rem] bg-[#0B89CE0D] text-body-sm font-bold text-primary "})))}var LI=()=>{let{user:e,locale:t}=w(),o=`/profile/${t}`,{meta:r,isGettingContacts:n}=da({sort:"created_at",sortDir:"desc",perPage:1}),{meta:a,isGettingFollowers:s}=Cc({sort:"created_at",sortDir:"desc",perPage:1}),{meta:i,isGettingFollowing:l}=Mc({sort:"created_at",sortDir:"desc",perPage:1}),d=c=>{c.preventDefault(),be(),window.location.href=o;};return Q__namespace.default.createElement("div",{className:"w-full h-[364px] border rounded-[1rem] border-[#E4EBF1] bg-white shadow-sm p-4 flex flex-col justify-between items-center"},Q__namespace.default.createElement("div",{className:"w-full flex items-center flex-col mt-6 gap-2"},e?Q__namespace.default.createElement("a",{href:o,"aria-label":"Ir para o perfil",onClick:d},Q__namespace.default.createElement(J,{src:e?.avatar??"",name:e?.name??"",className:"w-20 h-20 rounded-full object-cover border-2 border-[#F7A700] cursor-pointer",type:"user"})):Q__namespace.default.createElement(Tt,{className:"w-20 h-20 rounded-full"})),Q__namespace.default.createElement("div",{className:"mt-8 text-center"},e?Q__namespace.default.createElement("a",{href:o,className:"block",onClick:d},Q__namespace.default.createElement("h2",{className:"text-lg font-bold text-black hover:underline"},e?.name),Q__namespace.default.createElement("p",{className:"text-[#687588] text-[14px]"},Bt(e?.headline??"",30))):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(Tt,{className:"w-32 h-5 mx-auto"}),Q__namespace.default.createElement(Tt,{className:"w-20 h-4 mx-auto mt-2"}))),Q__namespace.default.createElement("div",{className:"mt-4"},e?Q__namespace.default.createElement("button",{type:"button",className:"flex items-center h-[43px] gap-1 px-4 py-2 bg-[#0CAF6033] text-[#0CAF60] rounded-lg text-sm font-medium"},"Aberto a oportunidades ",Q__namespace.default.createElement(lucideReact.ChevronDown,{size:16})):Q__namespace.default.createElement(Tt,{className:"w-44 h-[43px] rounded-lg"})),Q__namespace.default.createElement("div",{className:"mb-6 flex justify-between w-full pt-4"},Q__namespace.default.createElement("div",{className:"flex flex-col items-center flex-1"},Q__namespace.default.createElement("div",{className:"h-6 flex items-center justify-center"},n?Q__namespace.default.createElement(he,{className:"w-2 h-2"}):Q__namespace.default.createElement("span",{className:"font-semibold text-gray-800"},r?.total??0)),Q__namespace.default.createElement("span",{className:"text-xs text-gray-500"},pe(t,"component.workspace.user.contacts"))),Q__namespace.default.createElement("div",{className:"flex flex-col items-center flex-1 border-l border-gray-200"},Q__namespace.default.createElement("div",{className:"h-6 flex items-center justify-center"},l?Q__namespace.default.createElement(he,{className:"w-2 h-2"}):Q__namespace.default.createElement("span",{className:"font-semibold text-gray-800"},i?.total??0)),Q__namespace.default.createElement("span",{className:"text-xs text-gray-500"},pe(t,"component.workspace.user.following"))),Q__namespace.default.createElement("div",{className:"flex flex-col items-center flex-1 border-l border-gray-200"},Q__namespace.default.createElement("div",{className:"h-6 flex items-center justify-center"},s?Q__namespace.default.createElement(he,{className:"w-2 h-2"}):Q__namespace.default.createElement("span",{className:"font-semibold text-gray-800"},a?.total??0)),Q__namespace.default.createElement("span",{className:"text-xs text-gray-500"},pe(t,"component.workspace.user.followers")))))};function FI(){return Q__namespace.default.createElement("aside",{className:"w-[20.688rem] flex flex-col gap-[2rem] h-full"},Q__namespace.default.createElement(LI,null),Q__namespace.default.createElement(DI,null))}function Tte(e){return Q__namespace.createElement("svg",{width:16,height:16,fill:"none",...e},Q__namespace.createElement("path",{d:"M14 3v7.5a.5.5 0 01-.172.375c-.955.827-1.869 1.125-2.74 1.125-1.181 0-2.285-.546-3.312-1.053-1.66-.822-3.102-1.534-4.776-.211V13.5a.5.5 0 01-1 0V3a.5.5 0 01.173-.375c2.25-1.949 4.27-.95 6.05-.07 1.714.849 3.201 1.583 4.95.07A.5.5 0 0114 3z",fill:"#0B89CE"}))}var Dte=Q__namespace.memo(Tte),OI=Dte;var zI=({avatars:e,followersCount:t=0})=>{let r=e.filter(a=>a&&a.trim()!=="").slice(0,4),n=t>r.length;return r.length===0?Q__namespace.default.createElement("div",{className:"flex items-center"},Q__namespace.default.createElement("div",{className:"relative ml-6 h-5 w-5"})):Q__namespace.default.createElement("div",{className:"flex items-center"},Q__namespace.default.createElement("div",{className:"relative ml-6 h-5",style:{paddingLeft:`${r.length*8}px`}},r.map((a,s)=>Q__namespace.default.createElement("img",{key:s,src:a,alt:`Follower ${s+1}`,className:"w-5 h-5 rounded-full border-2 border-white absolute",style:{right:`${s*12}px`,zIndex:s},onError:i=>{i.target.src=`https://i.pravatar.cc/20?img=${s+1}`;}}))),n&&Q__namespace.default.createElement("span",{className:"ml-2 text-body-sm text-primary font-medium"},"+",t-r.length))};function BI({logo:e="https://iili.io/FPFeWG4.png",name:t,sector:o,slug:r,followers:n,followersCount:a}){let {locale:s,user:i,environment:l}=w(),{userLocation:d}=Jo(),{registerEvent:c}=Qo(),p=ve(s,"my-pages.switch");ve(s,"my-pages.followers-label");let u=`/company/${s}/${r}`;return Q__namespace.default.createElement("div",{className:"w-[16.688rem] card-hover p-[1rem] flex flex-col gap-[1rem] rounded-lg border border-[#E4EBF1] hover:shadow-md hover:border-primary/20 transition-all duration-300 ease-in-out"},Q__namespace.default.createElement("a",{href:u,"aria-label":`Ir para a p\xE1gina ${t}`,onClick:f=>{f.preventDefault(),be();let g=navigator.userAgent,h=/Chrome/.test(g)&&!/Edg|OPR/.test(g)?"Chrome":/Firefox/.test(g)?"Firefox":/Safari/.test(g)&&!/Chrome/.test(g)?"Safari":/Edg/.test(g)?"Edge":/OPR/.test(g)?"Opera":"Unknown",v=(g.match(/(Chrome|Firefox|Version|Edg|OPR)\/(\d+)/)||[])[2]||"Unknown",y=/Windows/.test(g)?"Windows":/Mac OS/.test(g)?"macOS":/Linux/.test(g)?"Linux":/Android/.test(g)?"Android":/iPhone|iPad|iOS/.test(g)?"iOS":"Unknown",b=/iPhone/.test(g)?"iPhone":/iPad/.test(g)?"iPad":/Android/.test(g)?"Android Device":"Desktop";c({input:{actor:{user_id:i?.id??""},source:{app:"mirantes-web",environment:l,platform:"web",version:"1.0.0"},context:{browser:{name:h,version:v},country:d?.country_name??"",device:{model:b,os:y},locale:s,referrer:document.referrer||"",route:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},events:[{event_id:uuid.v4(),event_type:"PAGE_VIEW",occurred_at:new Date,metadata:{label:t,slug:r,elementId:`page-card-${r}`,navigationType:"card_click",interactionType:"user_click",isExternal:u.startsWith("http"),timestamp:new Date().toISOString(),followersCount:a,sector:o}}]}},{onSettled(){be(),window.location.href=u;},onError(){be(),window.location.href=u;},onSuccess(){be(),window.location.href=u;}});},className:"flex flex-col gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full flex gap-[0.5rem] items-center"},Q__namespace.default.createElement(J,{name:t??"",className:"w-10 h-10",src:e,type:"page"}),Q__namespace.default.createElement("span",{className:"font-bold text-[#050910] line-clamp-2 flex-shrink truncate"},t)),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),Q__namespace.default.createElement("div",{className:"p-[0.2rem] flex items-center gap-x-2 bg-[#0B89CE0D] w-fit rounded-full"},Q__namespace.default.createElement(OI,null),Q__namespace.default.createElement("span",{className:"text-body-sm text-primary font-medium line-clamp-2 flex-shrink truncate"},o)),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),(a??0)>0&&Q__namespace.default.createElement("div",{className:"w-full flex items-center gap-x-2"},Q__namespace.default.createElement(zI,{avatars:[...(n?.user||[]).map(f=>f?.avatar),...(n?.page||[]).map(f=>f?.logo)].filter(Boolean).map(f=>f||`https://i.pravatar.cc/20?img=${Math.floor(Math.random()*70)+1}`),followersCount:a}))),Q__namespace.default.createElement("a",{href:u,onClick:f=>{f.preventDefault(),be(),window.location.href=u;}},Q__namespace.default.createElement(X,{label:p,className:"bg-[#0B89CE1A] text-primary font-bold w-full rounded-[0.5rem] hover:bg-[#0B89CE33] transition-colors duration-300"})))}function UI(){return Q__namespace.default.createElement("div",{className:"w-[16.688rem] p-[1rem] flex flex-col gap-[1rem] rounded-lg border border-[#E4EBF1]"},Q__namespace.default.createElement("div",{className:"flex flex-col gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full flex gap-[0.5rem] items-center"},Q__namespace.default.createElement("div",{className:"w-10 h-10 bg-gray-200 rounded-full animate-pulse"}),Q__namespace.default.createElement("div",{className:"h-5 bg-gray-200 rounded w-24 animate-pulse"})),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),Q__namespace.default.createElement("div",{className:"p-[0.2rem] flex items-center gap-x-2 bg-[#0B89CE0D] w-fit rounded-full"},Q__namespace.default.createElement("div",{className:"w-4 h-4 bg-gray-200 rounded animate-pulse"}),Q__namespace.default.createElement("div",{className:"h-4 bg-gray-200 rounded w-20 animate-pulse"})),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),Q__namespace.default.createElement("div",{className:"w-full flex items-center gap-x-2"},Q__namespace.default.createElement("div",{className:"flex -space-x-2"},Array.from({length:3}).map((e,t)=>Q__namespace.default.createElement("div",{key:t,className:"w-6 h-6 bg-gray-200 rounded-full border-2 border-white animate-pulse"}))),Q__namespace.default.createElement("div",{className:"h-4 bg-gray-200 rounded w-12 animate-pulse"}))),Q__namespace.default.createElement("div",{className:"w-full h-10 bg-gray-200 rounded-[0.5rem] animate-pulse"}))}var Fte=()=>Q__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500"},Q__namespace.createElement("defs",null,Q__namespace.createElement("clipPath",{id:"freepik--clip-path--inject-63"},Q__namespace.createElement("path",{fill:"none",d:"M55.67 159h230v228h-230z"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-2--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M224.07 184.9s25.61 30.42 31 36 5.59 9.63 3.85 12.13-14.82 7.13-28.3 15.79-51.8 31-52.18 31.78-4.05-27-4.05-27l64.12-26.38-.19-1.93-20.8-38.51Z"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-3--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M157.76 389.39c10.46-1.76 23.86-8.95 27.85-18-3-15.69-6.79-37.79-6.79-51.31 0-22.72 6-35.62 3.27-51s-8.47-25.41-14.63-29.46c0 0-9.43 2.5-19.06 11.55s-18.1 24.61-21.4 39.44-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.73-.38"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-4--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M179.78 214.93s.58 7.51 1.16 11.17-8.47 13.9-8.47 13.9l13.09 19.83 14.83-11.55s21-1.54 22.91-3.28 1.93-20.79 1.93-20.79l5-2.89s-4.62-20-5.77-24.46l-1.16-4.42s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57 57 0 0 0 7.12 7.81"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-5--inject-63"},Q__namespace.createElement("path",{fill:"#0B89CE",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-6--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m173 232.65 19.26 29.27-8.86 11.36a224 224 0 0 0-13.28-22.34c-6.55-9.24-7.32-10.78-7.32-10.78Z"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-7--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M167.85 296.77s-5.59-23.3-7.9-28.5-15.4-10-21.76 1.35-.58 24.26 1.74 33.5 16.94 51 19.06 56.23 6 4 8.09 3.47 60.65-47.76 60.65-47.76l-4.62-10.39L177.67 328Z"}))),Q__namespace.createElement("g",{id:"freepik--background-simple--inject-63"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M429.84 253.51c-3.39-27-11.87-53.07-22-71.76-24.47-44.91-92.64-74.95-144-67.18-43.81 6.62-64.86 46.59-104.36 60.46-36.34 12.76-69.06 22.61-86.19 56.28C37 302.43 125.71 380.18 201.74 374.12c24-1.92 45.44-11.15 70.07-6.82 50 8.79 66.6 18.24 110.76.66 43.51-17.33 53.2-67.22 47.27-114.45"}),Q__namespace.createElement("path",{fill:"#fff",d:"M429.84 253.51c-3.39-27-11.87-53.07-22-71.76-24.47-44.91-92.64-74.95-144-67.18-43.81 6.62-64.86 46.59-104.36 60.46-36.34 12.76-69.06 22.61-86.19 56.28C37 302.43 125.71 380.18 201.74 374.12c24-1.92 45.44-11.15 70.07-6.82 50 8.79 66.6 18.24 110.76.66 43.51-17.33 53.2-67.22 47.27-114.45",opacity:"0.8"})),Q__namespace.createElement("g",{id:"freepik--Device--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m254.91 389.43-42.65-95.5h103.35L443.06 378"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m244.33 385.67-32.07-85.37v-6.37l45.37 99.95z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m271.35 297.88 43.96 51.53-53.36 12.43-30.32-57.6z"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M261.95 361.84v1.52l52.45-10.61.91-3.34z"}),Q__namespace.createElement("path",{fill:"#263238",d:"m269.69 316.42 2.25 3.32 5.72-1.55-2.38-3.24zM291.34 336.73l-2.72-3.68-6.5 1.75 2.54 3.76zM265.02 309.5l1.67 2.48 5.38-1.37-1.69-2.3zM275.38 324.83l3.08 4.56 6.29-1.59-3.4-4.61zM291.67 326.97l-5.39 1.37 2.7 3.66 5.49-1.48zM279.01 330.19l2.57 3.82 6.46-1.75-2.71-3.68zM258.93 310.85l1.66 2.68 5.16-1.32-1.69-2.5zM272.47 320.53l2.38 3.51 5.92-1.64-2.53-3.43zM267.23 312.77l1.92 2.85 5.54-1.46-2.04-2.77zM255.59 319.2l-1.68-3.03-6.13 1.56 1.71 3.08zM246.78 326.53l4.21-1.13-1.95-3.52-4.14 1.09zM257.11 307.91l1.31 2.12 5.09-1.13-1.37-2.02zM253.45 315.34l-1.62-2.92-6.23 1.37 1.72 3.11zM251.06 309.14l1.24 2.24 5.18-1.14-1.33-2.14zM242.35 318.17l4.06-1.04-1.74-3.13-4.05.89zM243.84 310.62l1.3 2.34 6.23-1.37-1.25-2.26zM263.41 318.08l2.1 3.39 5.5-1.48-2.25-3.32zM277.53 329.63l-3.07-4.54-5.73 1.58 2.78 4.49zM252.76 312.21l1.6 2.9 5.3-1.35-1.67-2.7zM253.96 330.74l-4.32 1.19 2.24 4.23 4.45-1.13zM266.01 322.28l2.22 3.58 5.69-1.56-2.37-3.52zM261.99 317.52l-1.83-2.95-5.34 1.36 1.68 3.04zM272.02 348.87l-6.11 1.56 2.18 3.93 6.13-1.51zM262.56 305.87l5.23-1.07-2.81-3.82-5.15.85zM249.66 308.5l-2.53-4.57-6.41 1.06 2.66 4.8zM257.98 323.51l-1.93-3.49-6.1 1.61 1.95 3.52zM273.55 336.18l-2.46-3.97-6.36 1.62 2.28 4.12zM270.59 331.4l-2.78-4.48-5.99 1.65 2.45 4.43zM280.65 334.26l-2.58-3.83-6.06 1.54 2.46 3.96zM264.59 321.72l-2.1-3.4-5.54 1.47 1.93 3.47zM261.09 314.34l1.82 2.93 5.31-1.4-1.93-2.86zM267.31 326.12l-2.22-3.59-5.76 1.55 2.04 3.68zM283.74 338.82l-2.55-3.76-6.22 1.68 2.37 3.83zM279.63 345.99l-2.71-4.37-6.84 1.88 2.4 4.31zM259.13 340.08l-2.34-4.23-4.47 1.14 2.28 4.32zM251.45 326.22l-4.23 1.14 1.99 3.75 4.29-1.18zM271.56 348.05l-2.38-4.31-6.06 1.66 2.33 4.2zM260.46 328l-2.03-3.67-6.08 1.64 2.06 3.71zM263.11 306.68l1.36 2.01 5.32-1.18-1.41-1.91zM240.18 314.06l4.03-.89-1.3-2.36-4.02.82zM256.59 307.08l5-1.02-2.75-4.07-4.9.81zM250.6 308.31l5.05-1.03-2.68-4.32-4.89.81zM248.59 321.06l-1.72-3.1-4.08 1.04 1.67 3.14zM268.77 304.6l4.52-.93-2.84-3.59-4.47.73zM242.44 309.98l-2.68-4.84-3.96.66 2.65 4.99zM265 350.66l-4.8 1.22 2.08 3.92 4.9-1.21zM287.81 344.84l-6.76 1.72 2.47 3.99 6.98-1.73zM280.13 346.8l-7.2 1.83 2.21 3.99 7.45-1.84zM295.81 342.8l-7.06 1.8 2.69 3.99 7.31-1.81zM302.76 341.03l-6 1.53 2.95 3.99 6.2-1.54zM262.22 345.65l-4.65 1.27 2.19 4.14 4.78-1.22zM276.42 340.82l-2.37-3.83-6.58 1.78 2.16 3.91zM287.27 344.04l-3-4.43-6.43 1.76 2.71 4.38zM268.73 342.92l-2.17-3.91-6.07 1.65 2.18 3.92zM257.14 346.1l4.63-1.27-2.18-3.93-4.55 1.23zM263.36 333.24l-2.44-4.42-6.06 1.67 2.38 4.3zM295.23 342.01l-3.31-4.49-6.72 1.84 3.01 4.44zM266.11 338.19l-2.29-4.13-6.12 1.56 2.34 4.22zM282.29 322.93l3.41 4.62 5.35-1.36-3.68-4.66zM275.64 313.91l4.74-1.25-2.13-2.69-4.64 1.18zM271.36 308.1l1.66 2.26 4.62-1.17-1.67-2.11zM302.14 340.25l-3.58-4.55-5.7 1.56 3.32 4.51zM276.22 314.7l2.39 3.23 4.88-1.32-2.5-3.17zM289.56 332.79l2.72 3.69 5.67-1.55-2.87-3.63zM270.76 307.3l4.59-1.01-1.43-1.82-4.55.93zM281.71 322.15l5.05-1.4-2.65-3.36-4.92 1.33z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M322.28 303.64v8.18a16 16 0 0 1-2.73 2.12c-1.51.91-13.94 3-13.94 3l15.76 17.29s14.45-1.58 18.5-2.73c4.24-1.22 3.33-16.68 3.33-16.68Z"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M322.28 303.64v8.18s-.22.22-.58.54l18.43 19.06c3.94-1.77 3.07-16.57 3.07-16.57Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M294.39 199.04v86.71l66.09 52.14v-134z"}),Q__namespace.createElement("path",{fill:"#0B89CE",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M298.94 203.59v73.06l55.48 34.26V208.44z"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M360.48 203.89h6.67v134.03h-6.67z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m302.58 208.14.3 65.18 46.38 26.37v-80.71l-31.83-4.82-2.12-4.51z"}),Q__namespace.createElement("path",{fill:"#0B89CE",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M305.61 216.02v55.48l40.93 21.83V223.3z"}),Q__namespace.createElement("ellipse",{cx:"324.72",cy:"255.73",fill:"#263238",rx:"11.03",ry:"15.2",transform:"rotate(-18.56 324.813 255.777)"}),Q__namespace.createElement("path",{fill:"#fff",d:"m325.92 256.67 3.89-4.31a2.21 2.21 0 0 0-.07-2.59c-.58-.83-1.49-1-2-.41l-3.74 4.15-3.75-6c-.54-.87-1.45-1.14-2-.6a2.11 2.11 0 0 0-.08 2.55l3.89 6.25-3.96 4.29a2.2 2.2 0 0 0 .08 2.59 1.68 1.68 0 0 0 1 .73 1 1 0 0 0 1-.32l3.75-4.15 3.74 6a1.8 1.8 0 0 0 1.06.84 1 1 0 0 0 1-.24 2.12 2.12 0 0 0 .07-2.55Z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m312.88 234.82 22.92 6.73M311.97 228.45l29.71 8.29"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M332.45 371.31s-14.49 1.34-19.85 5.63-1.34 6.44 3.75 7.78 27.9-.81 30.85-3.76 0-10.19-14.75-9.65"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M347.2 381a3.46 3.46 0 0 0 1-2.12c-6.49-.32-15 1.56-22.73 4a81 81 0 0 1-7.94 2.09c6.74.81 26.91-1.25 29.67-3.97"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"m281.08 212.16 10.59 5.51M275 209l3.15 1.64M283.41 239.92l3.59.41M269.67 238.33l9.68 1.12M285.67 265.67l-12 3.33"})),Q__namespace.createElement("g",{id:"freepik--Clock--inject-63"},Q__namespace.createElement("path",{fill:"#263238",d:"M270.18 119a28.7 28.7 0 1 0 28.7 28.7 28.7 28.7 0 0 0-28.7-28.7m0 51.76a23.06 23.06 0 1 1 23.07-23.06 23.05 23.05 0 0 1-23.07 23.09Z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M272.23 147.73a2.05 2.05 0 1 1-2.05-2 2.05 2.05 0 0 1 2.05 2"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"m263.31 158.14 6.87-10.41 11.61 9.61"})),Q__namespace.createElement("g",{id:"freepik--file-cabinet--inject-63"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"m117.88 169.73-3.45-9.43 1.84 2.07v-3.22l3.91 5.98-3.45-21.39 4.6 11.73.46-10.35.69 3.45.92-11.73 1.61 17.94 2.3-6.21-.46 8.05 6.21-18.4-2.99 23 4.37-3.22-2.53 4.14 3.22-2.3-3.67 10.58-13.35.23"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M132.64 192.96h-14.38l-3.88-24.92h22.13z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M99.42 192.79h72.59V385.9H99.42z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M103.64 199.13h63.43v46.51h-63.43z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M122.67 218.16h25.37v8.46h-25.37z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M103.64 253.4h63.43v46.51h-63.43z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M122.67 272.43h25.37v8.46h-25.37z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M103.64 307.66h63.43v46.51h-63.43z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M122.67 326.69h25.37v8.46h-25.37z"})),Q__namespace.createElement("g",{id:"freepik--Character--inject-63",clipPath:"url(#freepik--clip-path--inject-63)"},Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M179.79 374.88s36.38-16.07 55.94-17.28L250 389.13H142.22Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M224.07 184.9s25.61 30.42 31 36 5.59 9.63 3.85 12.13-14.82 7.13-28.3 15.79-51.8 31-52.18 31.78-4.05-27-4.05-27l64.12-26.38-.19-1.93-20.8-38.51Z"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-2--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M248.72 229.8 219 186.4l-1.43.42 20.8 38.51.19 1.93-64.12 26.38s.07.48.17 1.29l4.18 9.59Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M248.72 229.8 219 186.4l-1.43.42 20.8 38.51.19 1.93-64.12 26.38s.07.48.17 1.29l4.18 9.59Z",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M224.07 184.9s25.61 30.42 31 36 5.59 9.63 3.85 12.13-14.82 7.13-28.3 15.79-51.8 31-52.18 31.78-4.05-27-4.05-27l64.12-26.38-.19-1.93-20.8-38.51Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M203.66 171.61s-3.08-2.7-4.62 0-1.73 7.12-.77 7.51 4.81-.19 5.39-1.35 0-6.16 0-6.16"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M209.05 170.26s-3.27-3.46-5.39-2.12-1.54 8.67-.77 9.25 5.39-1 6-1.93.16-5.2.16-5.2"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M216.37 170.45s-2.89-4-5.58-4-4.63 9.63-3.66 10.4 7.31-.19 7.7-.77a52 52 0 0 0 1.54-5.63"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M222 177c0-1.15-.57-11.17-4-10.59s-7.12 8.67-6.93 10S222 177 222 177M238.51 227.26s9.82 3.66 13.48 3.46"}),Q__namespace.createElement("path",{fill:"#fff",d:"M157.76 389.39c10.46-1.76 23.86-8.95 27.85-18-3-15.69-6.79-37.79-6.79-51.31 0-22.72 6-35.62 3.27-51s-8.47-25.41-14.63-29.46c0 0-9.43 2.5-19.06 11.55s-18.1 24.61-21.4 39.44-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.73-.38"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-3--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M185.61 371.38c-5.86 5-32.25 14.71-36.1 15.57s-1.71-7.28 4.28-15.41-7.28 3-9.42 3.85.86-15.84.86-24 7.71-77.48 7.71-77.48l14.55-26.55 5-3a21.5 21.5 0 0 0-5-4.79s-9.43 2.5-19.06 11.55-18.13 24.66-21.43 39.49-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.71-.42c10.48-1.72 23.88-8.91 27.87-17.97"}),Q__namespace.createElement("path",{fill:"#fff",d:"M185.61 371.38c-5.86 5-32.25 14.71-36.1 15.57s-1.71-7.28 4.28-15.41-7.28 3-9.42 3.85.86-15.84.86-24 7.71-77.48 7.71-77.48l14.55-26.55 5-3a21.5 21.5 0 0 0-5-4.79s-9.43 2.5-19.06 11.55-18.13 24.66-21.43 39.49-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.71-.42c10.48-1.72 23.88-8.91 27.87-17.97",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M157.76 389.39c10.46-1.76 23.86-8.95 27.85-18-3-15.69-6.79-37.79-6.79-51.31 0-22.72 6-35.62 3.27-51s-8.47-25.41-14.63-29.46c0 0-9.43 2.5-19.06 11.55s-18.1 24.61-21.4 39.44-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.73-.38"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m166.9 243.16 16.54 30.12.89 16.52s4.61-11.78 2.56-19.47-19.99-27.17-19.99-27.17"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m184.32 289.81-4.61 69.71 5.13 14.35 3.59-28.71-3.08-57.41z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M179.78 214.93s.58 7.51 1.16 11.17-8.47 13.9-8.47 13.9l13.09 19.83 14.83-11.55s21-1.54 22.91-3.28 1.93-20.79 1.93-20.79l5-2.89s-4.62-20-5.77-24.46l-1.16-4.42s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57 57 0 0 0 7.12 7.81"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-4--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M203 241.83c-3.85-4.71 0-22.69 3-31.68s-4.28-12.84-4.28-12.84l21.86-3.77-.3-1.13a9.74 9.74 0 0 0 3.83-2.71l1.18-6.95c-2-6.32-11.47-9.36-21-7.87-9.82 1.54-12.32 5.2-12.32 5.2s-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57.2 57.2 0 0 0 7.12 7.89s.58 7.51 1.16 11.17-8.44 13.9-8.44 13.9l13.09 19.83 14.83-11.55s16-1.18 21.36-2.63l1.55-.65s-16.43 1.54-20.3-3.17"}),Q__namespace.createElement("path",{fill:"#fff",d:"M203 241.83c-3.85-4.71 0-22.69 3-31.68s-4.28-12.84-4.28-12.84l21.86-3.77-.3-1.13a9.74 9.74 0 0 0 3.83-2.71l1.18-6.95c-2-6.32-11.47-9.36-21-7.87-9.82 1.54-12.32 5.2-12.32 5.2s-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57.2 57.2 0 0 0 7.12 7.89s.58 7.51 1.16 11.17-8.44 13.9-8.44 13.9l13.09 19.83 14.83-11.55s16-1.18 21.36-2.63l1.55-.65s-16.43 1.54-20.3-3.17",opacity:"0.5"}),Q__namespace.createElement("path",{fill:"#263238",d:"M214.25 206.08v-.77c0-1.49.25-4.71 2.74-5.59 3.27-1.15 6 1.93 6 1.93l.19 3.08a4.25 4.25 0 0 0-4-1.54 9 9 0 0 0-4.93 2.89M219.84 212.24c0 1.59-.44 2.89-1 2.89s-1-1.3-1-2.89.43-2.89 1-2.89 1 1.29 1 2.89M213.77 232.41c-1.07 1.11-2.5 1.47-3.19.81s-.38-2.11.69-3.22 2.49-1.47 3.18-.81.39 2.11-.68 3.22"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M179.78 214.93s.58 7.51 1.16 11.17-8.47 13.9-8.47 13.9l13.09 19.83 14.83-11.55s21-1.54 22.91-3.28 1.93-20.79 1.93-20.79l5-2.89s-4.62-20-5.77-24.46l-1.16-4.42s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57 57 0 0 0 7.12 7.81"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M198.27 196.06c3.47-2.31 25-3.65 25-3.65s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57.2 57.2 0 0 0 7.12 7.89s.32 4.12.72 7.75l6 1.69 6.55-3.47 6.55-1.54s-4.82-3.66-2.12-7.12 7.7-4.62 7.89-7.32-10.54-6.6-7.07-8.91"}),Q__namespace.createElement("path",{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:"10",d:"M219.29 184.87s-2.26-4.14 1.88-3.39 4.14 7.91.75 9.41-21.83-1.88-32 1.13-17.31 11.29-17.31 11.29M178.26 209.71s7.91-6.77 14.3-7.9 9.79-1.13 2.64 3-2.26 3.38 2.26 1.88"}),Q__namespace.createElement("path",{fill:"#0B89CE",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-5--inject-63)"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81"}),Q__namespace.createElement("path",{fill:"#fff",d:"m173 232.65 19.26 29.27-8.86 11.36a224 224 0 0 0-13.28-22.34c-6.55-9.24-7.32-10.78-7.32-10.78Z"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-6--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"m173 232.65-10.2 7.51s.57 1.13 4.77 7.16l10.78-6.54Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"m173 232.65-10.2 7.51s.57 1.13 4.77 7.16l10.78-6.54Z",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m173 232.65 19.26 29.27-8.86 11.36a224 224 0 0 0-13.28-22.34c-6.55-9.24-7.32-10.78-7.32-10.78Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M222.53 305.44s3.08-6.36 3.66-10.4.77-6.36 3.08-8.28 9.82-9.63 11-12.52 1.92-.19 2.5 2.12.38 4.43-1.54 5.78a21.2 21.2 0 0 0-3.66 3.46l1.73 1.35s24.07-9.05 26.58-10 4.81-.2 5 1.73-.57 2.12-1.73 2.7-13.86 5-15.6 5.77l-1.73.77 1.35 1.35s6.93-.19 10.4-.38 8.66-.77 9.43.38a2.4 2.4 0 0 1-.58 3.27 3.72 3.72 0 0 1-3.08 1c-1.73 0-16.56 1.15-16.56 1.15l.39 2.12s15.79 2.5 16.36 3.27.58 1.16 0 2.31-1 1.16-2.5 1.16-14-1.93-14-1.93 6.16 3.47 6.93 4.05 3.46 1 2.69 2.31-1.15 1.73-2.31 1.54-9.43-3.85-9.43-3.85-8.28 1.15-11 1.35a38 38 0 0 1-6-.2l-7.7 5Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M167.85 296.77s-5.59-23.3-7.9-28.5-15.4-10-21.76 1.35-.58 24.26 1.74 33.5 16.94 51 19.06 56.23 6 4 8.09 3.47 60.65-47.76 60.65-47.76l-4.62-10.39L177.67 328Z"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-7--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M166.21 348a140 140 0 0 1 5.13-13.27c2.14-4.28-10.27 9.85-12.84 2.14s-18.83-46.23-15.84-59.07a24.35 24.35 0 0 1 9.78-14.74c-4.77-1.13-10.61.07-14.25 6.57-6.35 11.36-.58 24.26 1.74 33.5s16.94 51 19.06 56.23 6 4 8.09 3.47c1.54-.42 33-25.55 50-39.18Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M166.21 348a140 140 0 0 1 5.13-13.27c2.14-4.28-10.27 9.85-12.84 2.14s-18.83-46.23-15.84-59.07a24.35 24.35 0 0 1 9.78-14.74c-4.77-1.13-10.61.07-14.25 6.57-6.35 11.36-.58 24.26 1.74 33.5s16.94 51 19.06 56.23 6 4 8.09 3.47c1.54-.42 33-25.55 50-39.18Z",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M167.85 296.77s-5.59-23.3-7.9-28.5-15.4-10-21.76 1.35-.58 24.26 1.74 33.5 16.94 51 19.06 56.23 6 4 8.09 3.47 60.65-47.76 60.65-47.76l-4.62-10.39L177.67 328Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m216.37 308.52 5.2 10.59M94.22 255.39l-26.6 18.45s13.11 13.86 11.76 50.22c-1 27.77 2.67 59.3 8 65.71h28.32s-9.79-54-9.09-84.94c.55-23.51-6.51-39.83-12.39-49.44"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m97.42 255.39-26.6 18.45s13.11 13.86 11.75 50.22c-1 27.77 2.67 59.3 8 65.71h28.33s-9.78-54-9.08-84.94c.53-23.51-6.53-39.83-12.4-49.44"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M94.22 255.39h3.2l-26.6 18.45h-3.19z"}))),HI=Fte;function GI(){let{locale:e}=w(),t=Q.useRef(null),[o,r]=Q.useState(null),{isGettingPages:n,pages:a,fetchNextPage:s,hasNextPage:i,isFetchingNextPage:l}=O5(),c=ve(e,"my-pages.no-pages"),p=ve(e,"my-pages.no-pages-create-new");Q.useEffect(()=>{t.current&&r(t.current);},[]);let[m]=CL__default.default({loading:l,hasNextPage:!!i,onLoadMore:s,disabled:n||!i,rootMargin:"0px 0px 400px 0px",...o&&{scrollContainer:o}}),u=Q.useCallback(()=>{setTimeout(()=>{window.dispatchEvent(new CustomEvent("openCreateCompanyModal"));},800);},[]),f=n&&(!a||a.length===0),g=!n&&a?.length===0,h=Q.useMemo(()=>a?.map(v=>Q__namespace.default.createElement(BI,{key:v?.slug,...v,followers:v?.followers,followersCount:v?.followersCount})),[a]);return Q__namespace.default.createElement("div",{className:"max-w-[58.188rem] w-full bg-[#0B89CE1A] h-fit rounded-[1rem] p-[1.5rem]"},Q__namespace.default.createElement("div",{className:"bg-white rounded-[0.5rem] p-[1rem]"},Q__namespace.default.createElement("div",{ref:t,className:"w-full grid grid-cols-3 gap-[1rem] max-h-[27.626rem] overflow-y-auto overscroll-contain"},f?Array.from({length:6}).map((v,y)=>Q__namespace.default.createElement(UI,{key:y})):g?Q__namespace.default.createElement("div",{className:"col-span-3 flex flex-col items-center justify-center gap-2 border rounded-lg p-[2rem] min-h-[12.313rem] text-center"},Q__namespace.default.createElement("div",{className:"w-96 h-96"},Q__namespace.default.createElement(HI,null)),Q__namespace.default.createElement("span",{className:"font-bold text-body-lg"},c),Q__namespace.default.createElement("button",{onClick:u,className:"bg-[#0B89CE1A] p-[0.5rem] button-empty rounded-full hover:brightness-95 transition-all"},Q__namespace.default.createElement("span",{className:"text-primary"},p))):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,h,(i||l)&&Q__namespace.default.createElement("div",{ref:m,className:"col-span-3 flex items-center justify-center h-20 w-full"},l&&Q__namespace.default.createElement(he,{className:"!mx-auto"}))))))}function _I(){return Q__namespace.default.createElement("div",{className:"w-full flex justify-center gap-x-[2rem]"},Q__namespace.default.createElement(FI,null),Q__namespace.default.createElement(GI,null))}function _te(e){return Q__namespace.createElement("svg",{width:28,height:28,fill:"none",...e},Q__namespace.createElement("path",{opacity:.4,d:"M27.33 14c0 7.353-5.98 13.333-13.333 13.333C6.645 27.333.664 21.353.664 14 .664 6.648 6.645.667 13.997.667S27.331 6.647 27.331 14z",fill:"#687588"}),Q__namespace.createElement("path",{d:"M17.073 13.074h-2.148v-2.147a.926.926 0 10-1.852 0v2.147h-2.148a.926.926 0 000 1.853h2.148v2.146a.926.926 0 101.852 0v-2.146h2.148a.927.927 0 000-1.853z",fill:"#687588"}))}var Vte=Q__namespace.memo(_te),VI=Vte;function jI({isOpen:e,onClose:t}){let{locale:o}=w(),[r,n]=Q.useState(null),a=ve(o,"my-pages.title"),s=ve(o,"create-button-label"),{isGettingPages:i,pages:l,fetchNextPage:d,hasNextPage:c,isFetchingNextPage:p}=O5();Q.useEffect(()=>{if(e){let f=document.querySelector(".overflow-y-auto");f&&n(f);}},[e]);let[m]=CL__default.default({loading:p,hasNextPage:!!c,onLoadMore:d,disabled:!c,...r&&{scrollContainer:r}}),u=Q.useCallback(()=>{t?.(),setTimeout(()=>{window.dispatchEvent(new CustomEvent("openCreateCompanyModal"));},400);},[t]);return Q__namespace.default.createElement(qn,{title:Q__namespace.default.createElement("span",{className:"text-left block w-full"},a),isOpen:e,onClose:()=>t?.(),footer:Q__namespace.default.createElement(X,{align:"left",className:"w-full border font-medium text-[#687588] border-[#F1F5F9] p-[0.5rem]",label:s,onClick:u,leftElement:Q__namespace.default.createElement(VI,null)})},Q__namespace.default.createElement("div",{className:"flex flex-col gap-[1rem] w-full pb-4"},i&&!l?.length?Array.from({length:4}).map((f,g)=>Q__namespace.default.createElement("div",{key:g,className:"w-full bg-gray-100 animate-pulse h-[4.438rem] rounded-lg"})):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,l?.map(f=>Q__namespace.default.createElement("span",{onClick:()=>{be(),window.open("/company/"+o+"/"+f?.slug,"_blank");},key:f?.slug,className:"w-full flex flex-row items-center justify-start gap-x-[0.75rem] h-[4.438rem] p-[1rem] rounded-lg border border-[#E4EBF1]"},Q__namespace.default.createElement(J,{name:f?.name??"",className:"w-10 h-10 shrink-0",src:f?.logo,type:"page"}),Q__namespace.default.createElement("div",{className:"flex flex-col text-left overflow-hidden"},Q__namespace.default.createElement("span",{className:"text-[0.875rem] font-bold text-[#111827] truncate"},f?.name),Q__namespace.default.createElement("span",{className:"text-[0.75rem] text-[#687588] truncate"},f?.sector)))),(c||p)&&Q__namespace.default.createElement("div",{ref:m,className:"flex justify-center p-4"},Q__namespace.default.createElement(he,null)))))}function qI({isOpen:e=false,onClose:t}){let{isMobile:o}=ft();return o?Q__namespace.default.createElement(jI,{isOpen:e,onClose:t}):Q__namespace.default.createElement(w1,{isOpen:e,onClose:()=>{t&&(be(),t());},variant:"expanded",className:"bg-white",contentClassName:"overflow-y-auto scrollbar-hide p-7",closeOnClickOutside:true,offsetTop:75,closeOnEscape:true,preventBodyScroll:true,showOverlay:false,zIndex:9999},Q__namespace.default.createElement("div",{className:"w-full flex p-6 flex-col gap-[2rem] mt-4"},Q__namespace.default.createElement(TI,null),Q__namespace.default.createElement(_I,null)))}function KI({isTitleVisible:e=true}){let[t,o]=Q.useState(false),[r,n]=usehooks.useToggle(false),[a,s]=usehooks.useToggle(false),[i,l]=Q.useState(false),[d,c]=usehooks.useToggle(false),{locale:p,user:m}=w(),u=Q.useRef(null),f=Q.useCallback(()=>o(false),[]);ha(u,f);let g=Q.useCallback(()=>{if(m&&!m.isActive){c(true),o(false);return}o(false),n(true);},[m,c,n]);return Q.useEffect(()=>{let h=()=>{if(m&&!m.isActive){c(true),s(false);return}s(false),n(true);},v=()=>{o(false),s(true);},y=()=>o(false),b=()=>l(true),x=()=>l(false);return window.addEventListener("openCreateCompanyModal",h),window.addEventListener("openListPages",v),window.addEventListener("closeExploreCard",y),window.addEventListener("billing:open",b),window.addEventListener("billing:close",x),()=>{window.removeEventListener("openCreateCompanyModal",h),window.removeEventListener("openListPages",v),window.removeEventListener("closeExploreCard",y),window.removeEventListener("billing:open",b),window.removeEventListener("billing:close",x);}},[m,c,s,n]),Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement("div",{ref:u,className:"relative"},Q__namespace.default.createElement("button",{onClick:()=>o(h=>!h),className:ut("flex items-center px-5 h-[44px] transition-all text-body-sm font-bold text-gray-shade8 gap-x-2")},Q__namespace.default.createElement("div",{className:"w-6 h-6 [&>svg_*]:fill-gray-shade8"},Q__namespace.default.createElement(Im,null)),e?pe(p,"main.navbar.explore"):null),Q__namespace.default.createElement(react.AnimatePresence,{mode:"wait"},t&&Q__namespace.default.createElement(pI,{onOpenCreateCompanyModal:g,onClose:f}))),r&&Q__namespace.default.createElement(EI,{isOpen:r,onClose:()=>n(false)}),a&&Q__namespace.default.createElement(qI,{isOpen:a,onClose:()=>s(false)}),Q__namespace.default.createElement(billingV2.BillingModal,{isOpen:i,onClose:()=>l(false)}),Q__namespace.default.createElement(billingV2.BenefitsAndPlansModal,null),Q__namespace.default.createElement(billingV2.PaymentFlowModal,null),Q__namespace.default.createElement(Ao,{isOpen:d,onClose:()=>c(false)}))}var Rte=()=>{let e=navigator.userAgent||navigator.vendor;return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(e.toLowerCase())},ZI=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,YI=()=>/android/i.test(navigator.userAgent),JI=()=>{let{locale:e,user:t,environment:o}=w(),{userLocation:r}=Jo(),{toggleJob:n,isJobOpen:a}=Ii(),{registerEvent:s}=Qo(),i=ZI()?"ios":YI()?"android":"web",l=Rte(),d=()=>l&&(i==="ios"||i==="android")?"mirantes-mobile":"mirantes-web",c=()=>{if(!l)return;let m=navigator.userAgent,u="unknown";if(ZI()){let f=m.match(/iPhone|iPad|iPod/);u=f?f[0]:"iOS Device";}else if(YI()){let f=m.match(/Android.*; (.*?)\//);u=f?f[1]:"Android Device";}return {os:i,model:u}};return Q__namespace.default.createElement("button",{onClick:()=>{if(!a){let m=c();s({input:{source:{app:d(),platform:i,environment:o,version:"1.0.0"},actor:{user_id:t?.id,anonymous_id:t?.id?void 0:uuid.v4(),session_id:sessionStorage.getItem("session_id")||uuid.v4()},context:{route:"/jobs",referrer:document.referrer,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:e,country:r?.country_name||"",device:m,browser:{name:navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":navigator.userAgent.includes("Safari")?"Safari":navigator.userAgent.includes("Edge")?"Edge":"Other",version:(navigator.userAgent.match(/(Chrome|Firefox|Safari|Edge)\/(\d+\.\d+)/)||[])[2]||void 0}},events:[{event_id:uuid.v4(),event_type:"PAGE_VIEW",occurred_at:new Date,metadata:{interaction_type:"button_click",button_location:"navbar_job_trigger",from_route:window.location.pathname,environment:o,component:"JobTrigger"}}]}});}window.dispatchEvent(new CustomEvent("toggleMessages",{detail:{isVisible:false}})),be(),n();},className:E("flex items-center px-5 h-[44px] transition-all text-body-sm font-bold gap-x-2",a?"bg-primary/10 text-primary rounded-lg":"text-gray-shade8")},Q__namespace.default.createElement("div",{className:"w-6 h-6"},Q__namespace.default.createElement(J5,{color:a?"#0B89CE":"#737373",fontSize:20})),pe(e,"main.navbar.job"))};function $I(){let{locale:e}=w(),t=window.location.pathname,{isJobOpen:o}=Ii(),{isChatVisible:r}=g7(),n=!o&&!r&&t?.includes("/feed");return Q__namespace.default.createElement("nav",{className:"flex items-center"},Q__namespace.default.createElement(QA,{isActive:n,href:"/feed",label:pe(e,"main.navbar.home"),icon:Q__namespace.default.createElement(K5,null)}),Q__namespace.default.createElement(JI,null),Q__namespace.default.createElement(KI,null))}var XI=({loading:e,hasNextPage:t,onLoadMore:o})=>{let[r]=CL__default.default({loading:e,hasNextPage:t,onLoadMore:o,disabled:!t,rootMargin:"0px 0px 200px 0px"});return r};var t6=(e,t)=>{let o=nF__default.default.create({baseURL:e});return o.interceptors.request.use(r=>(t&&(r.headers.Authorization=`Bearer ${t}`),r),r=>Promise.reject(r)),o};var RI=async({query:e,searchApiInstance:t,page:o=1,limit:r=10})=>{try{return (await t.get("search/global",{params:{q:e,page:o,limit:r}})).data}catch(n){if(n?.response?.data?.found)return n.response.data.found;if(n?.response?.data?.users||n?.response?.data?.communities)return n.response.data;throw n}},eE=async e=>{try{let{data:t}=await e.get("search/last-searches");return t}catch(t){throw t}},tE=async e=>{try{let{data:t}=await e.delete("search/last-searches");return t}catch(t){throw t}};var oE=e=>{let{searchApi:t,user:o}=w(),r=t6(t??"",o?.accessToken),{data:n,error:a,isLoading:s,isFetchingNextPage:i,fetchNextPage:l,hasNextPage:d}=Ke({queryKey:["global-search",e],queryFn:({pageParam:p})=>RI({query:e,searchApiInstance:r,page:p}),getNextPageParam:p=>{let m=p?.users?.pagination?.hasMore,u=p?.vacancies?.pagination?.hasMore,f=p?.posts?.pagination?.hasMore,g=p?.communities?.pagination?.hasMore,h=p?.companies?.pagination?.hasMore;if(m||u||f||g||h)return (p?.users?.pagination?.page??p?.vacancies?.pagination?.page??p?.posts?.pagination?.page??p?.communities?.pagination?.page??p?.companies?.pagination?.page??1)+1},initialPageParam:1,enabled:e.trim()?.length>0&&!!o?.id});return {globalSearchData:n?.pages||[],globalSearchError:a,globalSearchIsGettingData:s,fetchNextPage:l,isFetchingNextPage:i,hasNextPage:d}};var rE={searchPlaceholder:"Search people, pages, communities...",startSearching:"Start searching",seeAllResults:"See all results",pagesAndCommunities:"Pages and Communities",people:"People",noResultsFound:"No results found for",results:"Results",recentSearches:"Recent searches",recents:"Recents",clearAll:"Clear all",clearHistory:"Clear history",clearing:"Clearing...",historyEmpty:"Your search history is empty",recentSearchesWillAppear:"Recent searches will appear here."};var nE={searchPlaceholder:"Rechercher des personnes, des pages, des communaut\xE9s...",startSearching:"Commencer \xE0 rechercher",seeAllResults:"Voir tous les r\xE9sultats",pagesAndCommunities:"Pages et Communaut\xE9s",people:"Personnes",noResultsFound:"Aucun r\xE9sultat trouv\xE9 pour",results:"R\xE9sultats",recentSearches:"Recherches r\xE9centes",recents:"R\xE9cents",clearAll:"Tout effacer",clearHistory:"Effacer l'historique",clearing:"Effacement...",historyEmpty:"Votre historique de recherche est vide",recentSearchesWillAppear:"Les recherches r\xE9centes appara\xEEtront ici."};var aE={searchPlaceholder:"Buscar pessoas, p\xE1ginas, comunidades...",startSearching:"Comece a pesquisar",seeAllResults:"Ver todos os resultados",pagesAndCommunities:"P\xE1ginas e Comunidades",people:"Pessoas",noResultsFound:"Nenhum resultado encontrado para",results:"Resultados",recentSearches:"Pesquisas recentes",recents:"Recentes",clearAll:"Limpar tudo",clearHistory:"Limpar hist\xF3rico",clearing:"Limpando...",historyEmpty:"Seu hist\xF3rico de pesquisa est\xE1 vazio",recentSearchesWillAppear:"As pesquisas recentes aparecer\xE3o aqui."};var ooe={pt:{...aE},en:{...rE},fr:{...nE}};function To(e,t,o){let r=ooe[e][t];return r}var sE=()=>{let[e,t]=Q.useState(0);return Q.useEffect(()=>{if(typeof window>"u")return;let o=window.visualViewport;if(!o)return;let r=()=>{let a=window.innerHeight-o.height;a>100?t(a):t(0);},n=()=>{let a=window.innerHeight-o.height;a>100?t(a):t(0);};return o.addEventListener("resize",r),o.addEventListener("scroll",n),r(),()=>{o.removeEventListener("resize",r),o.removeEventListener("scroll",n);}},[]),{keyboardHeight:e,isKeyboardOpen:e>0}};var R9=e=>{if(typeof window>"u"||!e?.trim())return;let t=new URL(window.location.href);t.searchParams.set("q",e),window.history.replaceState({},"",t.toString());},eh=(e,t)=>{if(!e?.trim()||!t)return;let o=window.location.origin,r=window.location.pathname,n=`${o}/search/${t}?q=${encodeURIComponent(e)}`;R9(e),!r.includes("/search/")&&window.location.replace(n);},iE=({search:e})=>{let{locale:t}=w(),{isMobile:o}=ft(),{keyboardHeight:r,isKeyboardOpen:n}=sE(),a=()=>{be(),eh(e,t);};return o&&n?Q__namespace.default.createElement("div",{className:"fixed left-0 right-0 flex justify-center py-3 bg-white border-t border-[#E6EBF1] z-[1000]",style:{bottom:r}},Q__namespace.default.createElement("button",{onClick:a,className:"w-[178px] h-[35px] text-[#0B89CE] font-bold text-[12px] py-3 bg-[#0B89CE0D] hover:bg-[#F5F9FC] transition-colors rounded-[8px]"},To(t,"seeAllResults"))):Q__namespace.default.createElement("div",{className:"w-full flex justify-center py-3"},Q__namespace.default.createElement("button",{onClick:a,className:"w-[178px] h-[35px] text-[#0B89CE] font-bold text-[12px] py-3 bg-[#0B89CE0D] hover:bg-[#F5F9FC] transition-colors"},To(t,"seeAllResults")))};var lE=()=>Q__namespace.default.createElement("div",{className:"flex flex-col gap-3"},[...Array(5)].map((e,t)=>Q__namespace.default.createElement("div",{key:t,className:"flex items-center gap-3 animate-pulse"},Q__namespace.default.createElement("div",{className:"w-10 h-10 bg-gray-200 rounded-full"}),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2 w-full"},Q__namespace.default.createElement("div",{className:"h-3 bg-gray-200 rounded w-1/2"}),Q__namespace.default.createElement("div",{className:"h-3 bg-gray-100 rounded w-1/3"})))));var th=()=>Q__namespace.default.createElement("div",{className:"flex-1 p-4"},Q__namespace.default.createElement(lE,null));var I0=({children:e,className:t})=>{let{isMobile:o}=ft();return Q__namespace.default.createElement("div",{className:`${o?"fixed inset-0 top-0 left-0 w-full h-full bg-white z-[999]":"absolute top-[54px] left-0 w-[380px] min-h-[300px] bg-white rounded-[16px] shadow-lg border border-[#E6EBF1] z-50"} ${t}`},e)};function soe(e){let{fontSize:t="20px",color:o="#687588"}=e;return Q__namespace.createElement("svg",{width:t,height:t,fill:"none",viewBox:"0 0 20 20",...e},Q__namespace.createElement("path",{fill:o,d:"M18.333 10A8.333 8.333 0 0110 18.333 8.334 8.334 0 1118.333 10",opacity:.4}),Q__namespace.createElement("path",{fill:o,d:"M12.978 13.179a.63.63 0 01-.32-.088L9.386 11.14a.63.63 0 01-.304-.538V6.396a.625.625 0 011.25 0v3.851l2.967 1.77a.626.626 0 01-.321 1.162"}))}var ioe=Q__namespace.memo(soe),dE=ioe;var pE=({term:e,onClick:t})=>Q__namespace.default.createElement("div",{onClick:t,className:"flex items-center gap-3 cursor-pointer hover:bg-[#F7FAFC] p-2 rounded-[8px] transition"},Q__namespace.default.createElement("div",{className:"w-8 h-8 rounded-full bg-[#F1F5F9] flex items-center justify-center"},Q__namespace.default.createElement(dE,{fontSize:"16px",color:"#687588"})),Q__namespace.default.createElement("p",{className:"text-[14px] text-[#050910] font-medium"},e));var mE=({items:e,onItemClick:t,onClearAll:o,isClearing:r})=>{let{locale:n}=w(),{isMobile:a}=ft();return Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto p-4"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-3"},Q__namespace.default.createElement("p",{className:"text-[12px] font-medium text-[#8893A1] uppercase"},a?To(n,"recents"):To(n,"recentSearches")),a&&o&&Q__namespace.default.createElement("button",{onClick:o,disabled:r,className:"text-[12px] font-medium text-[#0B89CE] hover:text-[#0A7AB8] transition-colors disabled:opacity-50"},r?To(n,"clearing"):To(n,"clearAll"))),Q__namespace.default.createElement("div",{className:"flex flex-col gap-1"},e?.slice(0,5)?.map(s=>Q__namespace.default.createElement(pE,{key:s?.id,term:s?.term,onClick:()=>t?.(s?.term)}))))};function loe(e){let{fontSize:t=35}=e;return Q__namespace.createElement("svg",{width:t,height:t,viewBox:"0 0 170 151",fill:"none",...e},Q__namespace.createElement("path",{d:"M42.883 122.543c-5.692 5.219-12.86 12.243-11.92 12.901.533.377 6.955-6.269 13.107-12.166l-1.187-.735zM16.826 122.991c-.103-1.939 1.298-3.163 1.741-2.057.443 1.107 1.332 1.332 1.775.666a1.094 1.094 0 00-.306-1.243 1.113 1.113 0 00-.397-.216.763.763 0 01-.663-.601.773.773 0 01.354-.822c1.66-.957 4.47-.873 4.27.217-.188 1.01-4.582 5.617-4.935 5.971-1.257 1.256-1.755-.296-1.84-1.915zM17.73 118.246a1.908 1.908 0 01-1.823 1.908 2.194 2.194 0 01-2.11-2.027c.041-2.574 3.934-2.363 3.933.119zM33.919 136.614c-.32.608.249.936.771.461 2.838-2.577 8.79-8.334 12.497-11.865l-.875-.611c-4.685 4.01-11.716 10.725-12.393 12.015zM33.015 115.753c-5.634 5.184-12.509 11.952-11.588 12.596.522.365 6.67-5.975 12.691-11.767l-1.103-.829zM24.383 129.519c-.32.608.249.937.772.462 2.694-2.444 8.183-7.747 11.904-11.301l-.85-.687c-4.666 4.044-11.175 10.287-11.827 11.526z",fill:"#0B89CE"}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.977 107.771c-7.39 3.973-14.842 8.636-18.692 12.89-.695.768-.251 1.006 2.822 2.648 4.968 2.654 16.806 8.98 41.805 27.157.697.507.755.448 1.952-.754 1.6-1.605 5.231-5.25 15.13-12.314.334-.238.66-.47.98-.696-.473-.304-.983-.634-1.535-.992-7.54 5.29-11.855 8.745-15.676 12.962-.48.529-1.8-.512-4.697-2.796-4.81-3.792-13.97-11.015-30.855-20.178-6.906-3.748-8.315-4.24-8.275-4.538.01-.08.123-.145.262-.254a151.259 151.259 0 0115.945-11.039l2.281-1.143c-.506-.332-.988-.65-1.447-.953z",fill:"#0B89CE"}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.828 21.115c-2.523.557-4.147.942-4.144.957-46.88 10.734-51.68 11.347-52.22 13.2-.068.232-.069.482-.077.774-.205 7.3.768 36.965 1.366 55.214.105 3.189.198 6.03.271 8.34.071 2.208.1 2.227 14.15 11.434 2.268 1.485 4.9 3.211 7.956 5.222 34.254 22.548 36.152 24.091 37.34 23.663.098-.035.191-.084.298-.135.696-.338 73.23-40.093 73.431-41.302.027-.163.056-.307.056-.45.003-1.45-2.861-2.906-38.728-25.286a234.207 234.207 0 00-4.442-2.698c-3.763-2.242-4.22-2.513-4.214-4.358l.004-.83c.014-3.122.054-11.78-.137-20.894-.363.115-.75.225-1.163.33.084 5.175.101 10.004.114 13.276.006 1.787.01 3.11.024 3.773.104 5.28.172 6.046-.147 6.279-.068.048-.151.074-.255.112-4.911 1.818-38.635 15.262-38.947 15.387-39.418 15.737-43.645 17.789-44.068 17.184-.091-.13-.007-.383-.058-.649-.142-.74-1.587-51.903-1.587-51.928-.045-3.094-.124-5.431-.184-7.203-.186-5.475-.188-5.556 1.557-5.914 5.671-1.162 14.903-3.325 25.154-5.726 9.336-2.187 19.518-4.572 28.624-6.58-.002-.4.007-.798.026-1.192zm-24.354 98.458c14.556 9.627 28.61 18.92 29.312 18.492l-.003-.003c6.89-4.206 28.194-15.914 45.873-25.628 14.309-7.862 26.242-14.42 26.236-14.64l-.002-.028c-.03-.292-.714-.518-24.573-15.535-20.202-12.712-21.31-13.935-22.048-13.742-.065.016-.126.044-.198.076-5.213 2.314-45.578 18.254-71.474 28.481l-11.106 4.387c6.105 3.672 17.182 10.997 27.983 18.14z",fill:"#050910"}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M65.12 25.986a469.96 469.96 0 00-8.891 2.285c.006.023-4.77 1.134-11.083 2.604-9.283 2.16-21.893 5.095-27.528 6.482-2.517.62-2.657.797-2.669 3.423-.02 5.04 0 5.995.615 27.519.603 21.118.422 22.756 1.14 23.415.087.08.188.146.305.23l.047.034c1.23.9 1.382 1.01 72.927-27.172.501-.198.865-.304 1.123-.53.935-.813.512-3.185.404-17.1a169.76 169.76 0 00-.04-2.293c-.323.041-.644.077-.964.106.064 2.723.107 5.778.123 9.205.038 7.92.134 8.971-.297 9.277-.084.06-.188.09-.316.139-65.637 24.637-72.292 28.207-72.82 27.457-.1-.142.018-.438-.001-.776l-.353-13.024c-.403-14.847-1.007-37.086-1.005-37.102.007-.49-.014-.822.114-1.078.419-.84 2.418-.89 12.113-3.157 8.98-2.1 16.981-4.006 23.987-5.676 4.921-1.173 9.352-2.229 13.284-3.152-.08-.369-.153-.74-.215-1.116z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M60.727 125.282c-.827-.368-7.414-4.491-9.307-5.67-1.219-.759-3.107 1.783 64.204-32.981.977-.505.586-.478 8.263 3.984 2.213 1.285 4.887-.693-38.487 21.964-23.262 12.153-23.119 12.144-24.673 12.703zm51.236-27.723c-.63-.524-.732-.484-6.323-4.136-.702-.458-.171-.355-25.502 12.188 6.895 5.215 6.574 5.207 7.447 4.743l24.378-12.795zm-50.467 17.363c7.552 5.437 7.007 5.419 7.842 4.983 16.528-8.642 16.197-8.458 16.49-8.721-7.197-5.14-6.61-5.111-7.489-4.675l-16.843 8.413zm61.971-23.403c-7.266-4.026-6.88-4.147-7.834-3.647-1.854.97-.231.103-8.97 4.567 6.762 4.563 6.425 4.546 6.946 4.27l9.858-5.19zm-70.593 27.755c7.78 4.961 7.765 4.945 7.788 4.961.41.374.12.221 7.076-3.471-6.957-4.855-7.232-5.699-9.45-4.334-1.695 1.042-3.585 1.763-5.414 2.844zM41.647 106.727c-5.466 2.532-5.517 2.837-6.51 2.181-8.67-5.728-10.177-5.856-8.038-6.796 14.34-6.302 34.747-14.957 66.539-28.552.78-.335.36-.324 8.833 4.216 1.011.543 3.829-.998-60.824 28.951zm-3.202-8.377c.584.532 2.33 1.585 7.349 5.095.6.42.18.402 18.465-8.175-6.955-5.441-6.82-5.065-7.356-4.832L38.445 98.35zm55.148-16.664c-6.625-4.302-5.963-4.4-6.843-4.018l-14.343 6.166c.57.545.009.016 6.215 4.34.559.392.162.363 14.97-6.488zm-16.168 7.472c-1.131-.925-3.113-2.275-5.8-4.323-.742-.564-.36-.643-9.577 3.417a26.132 26.132 0 00-3.224 1.457c2.221 1.598 4.381 3.147 6.535 4.708.465.333.13.296 12.068-5.26h-.002zm-49.753 13.756c8.905 5.565 8.388 5.54 9.122 5.188 3.295-1.578 4.307-2.043 8.092-3.818-2.628-1.951-4.414-3.097-6.392-4.689-1.438-1.164-1.227-.742-10.82 3.316l-.002.003zm73.383-24.654c-6.923-4.082-6.558-3.919-7.13-3.672-5.415 2.338-3.572 1.514-5.408 2.369 6.498 4.187 5.995 4.328 6.578 4.059l5.96-2.756zM48.464 117.311c-.55-.297-.014.018-9.787-6.099-.684-.427-.99-.156 6.504-3.695 60.582-28.607 59.194-28.598 61.116-27.429 9.559 5.81 10.499 3.652 1.341 8.172-38.519 19.008-55.794 27.533-59.174 29.051zm12.242-15.987c7.389 4.73 7.163 5.621 8.307 5.053l19.28-9.553c-6.956-4.87-6.847-5.312-8.455-4.535-5.146 2.486-8.264 3.895-19.131 9.035zm-20.248 9.63c.54.43 3.506 2.224 8.137 5.19.516.331.155.326 18.35-8.776-2.417-1.816-4.747-3.558-7.06-5.319-.666-.508-19.4 8.893-19.427 8.905zm61.033-20.627c-7.3-4.82-6.653-5.049-7.391-4.704-12.066 5.664-11.742 5.235-11.059 5.724 6.729 4.836 6.413 4.918 6.955 4.651l11.495-5.671zm-5.916-5.378c7.523 4.272 6.947 4.892 7.921 4.405l8.985-4.423c-7.976-4.55-7.544-4.529-8.175-4.194-2.071 1.1-4.9 2.403-8.73 4.212zM115.206 107.095c-7.144-3.931-7.176-3.764-6.923-4.285.299-.621.346-.513 7.493 3.365 1.203.653 1.199 1.331.024 1.998a1127.647 1127.647 0 01-20.897 11.571c-6.484 3.495-6.526 3.735-7.72 2.967-6.54-4.198-6.451-4.278-6.183-4.675.295-.438.275-.494 6.585 3.645 1.047.687.291.558 13.702-6.892 8.702-4.834 13.509-7.362 13.919-7.694zM45.523 45.661c-.318-10.667-.426-10.54 1.22-11.083 1.645-.542 2.526-.732 15.742-3.53 2.079-.44 2.152-1.665 2.634 17.393.07 2.768-1.258 1.377-16.87 6.578-2.98.991-2.481-1.13-2.726-9.358zm1.214-.798c0 9.165-.345 9.303.93 9.08 1.349-.231 1.99-.729 15.241-4.256 2.4-.638.792-.636.673-16.828-.01-1.455-.022-1.102-8.864.854-7.995 1.769-8.325 1.477-8.348 3.01-.037 2.718.184 5.426.368 8.14z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M54.474 42.616c-1.624.419-3.27.745-4.93.977-.63.09-.788-.156-.616-.802 1.254-4.725 8.328-.885 5.546-.175zM51.078 40.025c-2.133-.02-1.996-3.38.62-3.368 2.112.01 2.024 3.393-.62 3.368zM61.609 34.63c1.222.045 1.438.963-5.49 2.012-.534.081-2.265-.618 5.49-2.012zM60.19 36.823c.439.018.745-.052.793.296.042.317-.233.429-.475.486-4.149.958-4.442 1.096-4.544.539-.103-.557.503-.521 4.225-1.32z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M52.091 51.14c-1.002-.286-.788-.324-1.58.33a.495.495 0 01-.809-.365c-.037-1.043.065-.85-.802-1.401a.494.494 0 01.095-.883c.98-.36.827-.2 1.084-1.195a.496.496 0 01.87-.18c.644.82.449.725 1.47.662a.496.496 0 01.443.77c-.583.866-.552.65-.174 1.605a.495.495 0 01-.597.656zM67.224 39.67c.212 7.089-.219 8.915 2.346 8.06 7.082-2.36 10.752-3.143 12.63-3.705l-1.156-.575c-10.294 2.758-10.852 3.164-11.97 3.357-1.098.192-.8.072-.8-7.821-.16-2.338-.35-4.671-.321-7.014l-.818-.508c-.148 1.128-.055 3.389.089 8.207z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M70.16 37.2c-.15.557-.01.767.529.693.273-.038.545-.08.817-.123l-1.08-1.264a3.302 3.302 0 00-.267.694zM72.884 44.393c-.859-.246-.673-.285-1.362.285a.428.428 0 01-.698-.314c-.032-.893.063-.727-.69-1.207a.425.425 0 01.082-.76c.84-.305.712-.165.935-1.029a.425.425 0 01.748-.157c.55.703.377.63 1.268.57a.427.427 0 01.38.663c-.497.742-.478.552-.15 1.382a.427.427 0 01-.513.567z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M22.593 74.424c-.295-10.222-.257-10.199 1.393-10.855 1.75-.696 3.02-.995 16.912-4.702 2.405-.642 2.293-.98 2.502 16.987.035 2.967.18 1.546-16.463 8.347-5.047 2.061-4.026 1.26-4.345-9.777zm1.303-.038c.223 9.53-.355 9.553.791 9.408.645-.08 1.013-.307 3.39-1.23 14.952-5.8 14.495-4.623 14.391-6.961-.749-16.678.218-16.264-1.565-15.767-5.413 1.507-13.227 3.636-16.11 4.47-1.546.448-1.12.51-.897 10.08z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M33.047 70.709c-.105.546-.213.504-4.752 1.78-1.374.386-2.227.606-1.946-.418 1.163-4.24 6.94-2.607 6.698-1.362z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M28.552 68.943c-2.247-.04-1.683-3.656 1.07-3.597 2.333.058 1.722 3.648-1.07 3.597zM34.263 65.02c-.778.057-.757-.496-.224-.685 8.889-3.132 8.87-1.269.224.686zM34.673 66.868c-.871.013-.776-.53-.339-.754a25.826 25.826 0 014.486-1.223c.303-.07 2.364.453-4.147 1.977z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M29.032 80.63c-1.003-.286-.79-.324-1.58.33a.5.5 0 01-.517.068.494.494 0 01-.292-.432c-.037-1.043.065-.85-.803-1.402a.497.497 0 01-.123-.723.492.492 0 01.22-.159c.979-.36.827-.202 1.079-1.196a.49.49 0 01.379-.36.489.489 0 01.49.18c.645.82.45.725 1.472.662a.487.487 0 01.46.247.495.495 0 01-.019.523c-.581.866-.552.65-.172 1.606a.496.496 0 01-.594.656zM34.354 79.079c-1.004-.286-.789-.324-1.58.33a.5.5 0 01-.517.068.494.494 0 01-.292-.432c-.037-1.043.066-.85-.802-1.402a.492.492 0 01-.227-.471.496.496 0 01.322-.411c.98-.36.828-.202 1.085-1.196a.49.49 0 01.378-.36.495.495 0 01.49.18c.645.82.45.725 1.472.662a.489.489 0 01.46.247.493.493 0 01-.018.523c-.582.866-.552.649-.173 1.605a.495.495 0 01-.598.657z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M67.82 59.265c.098-8.541-.386-8.877 1.194-9.396 4.058-1.335 4.057-1.28 13.205-3.686 2.746-.72 2.333-1.78 2.665 14.834a1.855 1.855 0 01-1.299 1.96c-1.079.458-13.853 5.42-13.968 5.444-1.972.39-1.432.617-1.784-6.911-.044-.938-.02-1.59-.012-2.245zm1.08-.09c.172 8.352-.387 8.67 1.231 8.03 14.186-5.614 14.07-4.658 13.98-6.439-.718-14.295.292-14.314-1.341-13.863l-13.077 3.596c-1.364.377-.952.909-.791 8.672l-.002.004z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M74.109 54.917c.773 0 2.37.54 2.266 1.25-.077.528-.327.5-3.978 1.502-.855.236-1.216.36-1.43.075-.38-.507.496-2.828 3.142-2.827zM72.842 54.56c-1.959.028-1.546-3.08.69-3.067 1.876.01 1.568 3.032-.69 3.067zM82.096 49.22c.692.03.62.457.112.655a34.382 34.382 0 01-4.832 1.396c-.495.095-.703-.411-.151-.6a42.531 42.531 0 014.871-1.45zM77.494 52.201c4.082-1.565 4.53-.653 3.75-.36-4.905 1.826-4.194.53-3.75.36z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M73.322 64.624c-.856-.246-.674-.276-1.35.28a.421.421 0 01-.69-.31c-.032-.888.054-.725-.686-1.195a.422.422 0 01.081-.753c.837-.307.708-.172.925-1.022a.423.423 0 01.742-.154c.548.702.382.618 1.259.564a.423.423 0 01.377.658c-.497.741-.47.553-.148 1.37a.422.422 0 01-.51.562zM77.864 62.92c-.856-.246-.673-.277-1.348.281a.423.423 0 01-.692-.31c-.032-.89.055-.727-.685-1.196a.422.422 0 01.081-.754c.837-.306.708-.171.925-1.02a.423.423 0 01.742-.156c.547.702.382.618 1.259.564a.423.423 0 01.376.658c-.496.741-.469.554-.147 1.372a.421.421 0 01-.51.56z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M47.925 56.593c1.868-.768 12.272-3.445 14.812-4.112 2.013-.527 1.746-.82 2.068 15.945.036 1.88-.323 1.646-12.91 6.443-1.818.692-4.866 2.64-4.883-.03-.113-16.285-1.08-17.426.913-18.246zm-.015 9.836c.155 8.835-.373 9.05 1.2 8.487 1.343-.481-.038-.103 13.742-5.172 1.999-.736.735-.98.758-15.644 0-1.323.08-.983-7.576 1.12-8.853 2.427-8.301 1.913-8.355 3.595-.082 2.543.186 5.075.23 7.614z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M53.293 61.884c1.878 0 3.311 1.38 2.087 1.809a33.54 33.54 0 01-4.855 1.33c-1.227.231-.188-3.133 2.768-3.14z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M54.11 59.682c-.05 1.92-3.388 2.743-3.375.466.012-2.004 3.435-2.757 3.375-.466zM56.96 58.023c-.744.05-.771-.427-.286-.615 6.424-2.495 8.609-1.362.287.615zM57.258 59.726c-.785.017-.706-.56-.232-.732.475-.173 4.063-1.373 4.216-.82.145.522-1.004.83-3.984 1.552z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M52.923 71.719c-.856-.245-.674-.277-1.349.28a.422.422 0 01-.691-.31c-.032-.888.055-.725-.685-1.195a.424.424 0 01.08-.754c.838-.306.708-.17.926-1.02a.423.423 0 01.742-.156c.547.702.382.619 1.258.565a.423.423 0 01.377.658c-.496.74-.47.554-.147 1.37a.422.422 0 01-.511.562zM57.466 70.014c-.856-.245-.674-.276-1.349.282a.423.423 0 01-.691-.307c-.032-.889.055-.725-.685-1.196a.424.424 0 01.08-.754c.838-.305.708-.17.926-1.02a.423.423 0 01.742-.155c.547.702.382.619 1.258.564a.424.424 0 01.377.659c-.496.74-.47.553-.148 1.37a.42.42 0 01-.51.558zM61.821 68.5c-.856-.246-.672-.278-1.348.28a.421.421 0 01-.69-.31c-.033-.889.053-.725-.687-1.195a.422.422 0 01.082-.754c.836-.306.708-.171.925-1.021a.422.422 0 01.74-.155c.548.703.383.619 1.26.564a.424.424 0 01.377.659c-.496.74-.47.553-.148 1.37a.422.422 0 01-.51.561z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M22.634 40.427c1.096-.506.924-.42 16.654-3.825 1.176-.255 2.015-.317 2.123.927.445 5.125.598 11.95.647 17.09.022 2.217.27 1.697-14.683 5.973-2.288.654-5.454 2.35-5.476-.463-.142-18.966-.845-18.975.735-19.702zm.243 10.546c.137 9.74-.36 9.637 1.012 9.469.827-.103 2.806-.99 15.894-4.459 2.433-.645.81-.728.81-17.5 0-1.503.028-1.238-8.87.803-11.09 2.545-9.015-.394-8.846 11.687z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M31.66 48.051c-.09.597-.307.552-4.977 1.47-.972.191-1.709.294-1.474-.613 1.056-4.024 6.661-2.212 6.45-.857z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M27.5 45.92c-2.148.009-2.083-3.445.629-3.506 2.21-.053 2.24 3.493-.63 3.506zM32.885 42.405c-.82.007-.833-.52-.241-.709 7.95-2.551 9.493-.914.24.709zM33.128 44.296c-.694-.068-.681-.652-.111-.818 5.113-1.482 5.364-.568 4.501-.137a34.805 34.805 0 01-4.39.955z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M27.644 57.64c-1.003-.284-.788-.323-1.58.33a.495.495 0 01-.809-.364c-.037-1.041.066-.85-.802-1.4a.494.494 0 01.095-.882c.98-.36.828-.203 1.085-1.196a.495.495 0 01.868-.18c.645.82.45.726 1.472.662a.495.495 0 01.442.77c-.582.866-.552.65-.173 1.605a.495.495 0 01-.598.656zM33.408 56.31c-1.004-.285-.789-.324-1.58.33a.497.497 0 01-.81-.364c-.036-1.043.066-.85-.801-1.402a.494.494 0 01.095-.882c.98-.36.827-.201 1.08-1.196a.496.496 0 01.869-.18c.644.82.449.725 1.471.662a.496.496 0 01.443.77c-.583.866-.552.65-.174 1.605a.495.495 0 01-.593.657zM38.952 54.98c-1.003-.287-.789-.324-1.58.33a.495.495 0 01-.81-.366c-.036-1.042.066-.85-.801-1.4a.494.494 0 01.095-.883c.98-.36.827-.202 1.084-1.195a.494.494 0 01.87-.18c.643.82.45.725 1.47.662a.494.494 0 01.443.77c-.583.866-.552.65-.173 1.605a.496.496 0 01-.598.656z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M128.981 52.498c-2.406.07-5.82-1.574-7.993-2.62-6.848-3.294-7.896-.995-19.497-4.257-2.09-.588-4.257-.525-3.344 1.569 3.182 7.3 20.028 6.617 29.927 21.779 3.7 5.664 9.089 8.801 15.691 9.963 1.187.21 1.169.18 1.647-.989 4.75-11.566 6.258-11.567 4.931-12.065-5.934-2.227-10.758-9.356-14.026-14.767-3.661-6.054-7.091-10.095-14.714-10.224-10.109-.169-7.827 1.556-10.17-.49a61.858 61.858 0 019.822-.792c16.856.04 14.752 18.034 29.81 25.605.384.194.468.159 1.253-1.554.762-1.661 2.399-1.48 6.161-.27 10.041 3.23 17.639 7.743 4.593 2.71-.455-.18-.579-.085-.712.349-.809 2.657-4.788 13.026-7.552 16.639-.6.785-1.247 1.065-.658-.564 1.354-3.74 6.516-14.754 7.103-16.554.104-.323.169-.516-.247-.667-5.96-2.166-6.654-2.28-7.496-1.024a113.054 113.054 0 00-7.959 16.867c-.753 2.055-1.377 4.2.18 5.69 3.811 3.646 19.117 9.484 18.682 10.498-.744 1.736-14.554-5.555-16.453-6.738-6.124-3.824-5.125-5.839-3.471-10.409a20.693 20.693 0 01-7.313-1.888c-12.728-5.374-8.957-14.346-28.078-22.591-4.22-1.82-9.972-3.89-11.892-7.957-1.122-2.375.36-4.495 6.119-2.851 8.715 2.484 11.797.54 18.979 4.31 6.59 3.466 6.173 2.712 6.677 3.292z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M111.125 22.591c-.039 6.947-3.543 12.787-4.601 13.666-.346.29-.753.08 6.434 6.7 2.439 2.248 2.885 2.469 1.947 2.758-1.355.42-7.559-.658-8.356-.818-1.771-.36-2.607-1.294-4.734-3.545-.928-.98-2.082 2.248-9.7 3.444-13.603 2.14-25.325-6.947-27.142-19.203-2.667-17.992 16.22-30.85 32.39-23.475 8.136 3.712 13.162 10.412 13.762 20.473zm-1.306.187c0-10.38-8.092-20.882-21.463-21.275-10.676-.315-21.323 7.381-22.094 19.282-.951 14.595 11.867 25.043 25.786 22.711a21.115 21.115 0 0017.771-20.718zm1.569 21.474a30.393 30.393 0 00-4.603-5.223.726.726 0 00-1.078-.096c-.53.524-.27.834 3.511 4.046a5.081 5.081 0 002.17 1.273zM110.934 59.41a3.306 3.306 0 01-.617 1.438c-.569.846-.172 1.58-.026 2.36.062.329.282.17.469.126a1.288 1.288 0 011.732.877c.566 1.66.688 6.126-.136 2.076-.316-1.56-.547-2.563-1.395-2.435-.321.049-.495.14-.396.532 1.066 4.219 1.012 6.259 2.877 4.772 1.999-1.594 3.274-4.561 2.687-8.247a1.06 1.06 0 01.612.777c1.732 5.676-4.486 7.808.129 9.73.572.237.007-2.04 2.471-1.726a4.867 4.867 0 012.855 1.187c-.639.75-4.464-1.997-4.548.667-.014.41.443.34.689.432 4.562 1.718 5.4-.474 4.469-2.08-1.334-2.3-3.248-2.686-3.649-3.274.54-.622 3.263.658 4.443 3.136a2.69 2.69 0 01-2.943 3.799 19.962 19.962 0 01-4.585-1.449 2.698 2.698 0 01-1.693-2.443c-3.711 1.882-3.174.708-5.088-7.003-.899.615-1.755 1.57-3.576 1.612-2.043.047-1.455-1.349-1.208-8.352.022-.614 1.189-1.776.545 6.73-.128 1.694 2.814.3 3.825-1.415.64-1.084.949-1.739 1.215-2.17.652-1.052.971-.855.842.342zM104.023 49.232c-1.94-.068-4.255-1.228-4.056-1.685.134-.307.128-.228 2.972.57 2.308.647 2.404-1.135 2.941-.597.585.584-1.031 1.74-1.857 1.712z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M68.336 22.927A18.738 18.738 0 0184.443 3.8c19.959-3.075 30.844 20.084 17.352 32.574-12.497 11.56-33.12 3.226-33.46-13.447zM88.068 40.64c18.537.02 25.618-24.28 9.303-33.56-7.29-4.145-16.806-2.926-22.455 2.749-12.107 12.16-2.672 30.79 13.152 30.808v.003z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M95.707 13.212c.009 15.405.956 21.027.732 23.319-.069.698.728.54 1.383.314-.035-6.884-.306-17.72-.937-25.005-.154-1.791-1.36-1.701-3.056-1.334-13.923 3.013-19.188 4.127-21.544 4.708-.307.076-.238.281-.498 1.176a.204.204 0 00.158.258.203.203 0 00.112-.01c1.844-.656 5.134-.947 10.893-2.27 12.8-2.939 12.755-3.318 12.757-1.156z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M84.617 18.856c-1.181.009-1.2-.747-.346-1.02 11.438-3.679 13.661-1.316.346 1.02zM84.963 21.579c-1-.098-.981-.94-.16-1.178 7.359-2.13 7.722-.817 6.473-.197a50.547 50.547 0 01-6.313 1.375zM85.368 38.869c-1.438-.412-1.122-.477-2.273.472a.713.713 0 01-1.169-.522c-.054-1.497.103-1.215-1.153-2.015a.713.713 0 01.144-1.27c1.407-.514 1.187-.277 1.56-1.72a.712.712 0 011.25-.262c.923 1.18.629 1.044 2.118.952a.71.71 0 01.757.737.707.707 0 01-.122.372c-.836 1.243-.796.924-.25 2.31a.714.714 0 01-.861.947zM93.344 36.955c-1.438-.411-1.122-.476-2.273.472a.712.712 0 01-1.164-.524c-.055-1.497.102-1.214-1.154-2.014a.712.712 0 01.136-1.27c1.407-.514 1.188-.278 1.56-1.72a.714.714 0 011.25-.262c.924 1.18.63 1.044 2.119.953a.709.709 0 01.663.356.706.706 0 01-.028.752c-.837 1.243-.797.924-.25 2.309a.72.72 0 01.038.39.72.72 0 01-.506.557.711.711 0 01-.39 0zM74.657 25.215c1.321-1.844 3.499-1.936 3.093-.602-.405 1.334.242 2.184 1.13 1.902a1.282 1.282 0 00.425-1.843.9.9 0 01.76-1.528c2.213.338 4.713 2.469 3.736 3.315-.907.785-8.279 1.776-8.861 1.841-2.066.23-1.386-1.55-.283-3.085zM78.95 21.545a2.23 2.23 0 01-3.056.409 2.564 2.564 0 01-.444-3.39c1.917-2.317 5.315.718 3.5 2.98z",fill:"#0B89CE"}))}var coe=Q__namespace.memo(loe),n6=coe;var uE=({search:e})=>{let{locale:t}=w();return Q__namespace.default.createElement("div",{className:"flex-1 p-4"},Q__namespace.default.createElement("div",{className:"flex flex-col items-center py-8 text-center"},Q__namespace.default.createElement(n6,{fontSize:100}),Q__namespace.default.createElement("p",{className:"text-[14px] text-[#687588] mt-3 max-w-[250px]"},To(t,"noResultsFound")," ",Q__namespace.default.createElement("br",null),Q__namespace.default.createElement("span",{className:"font-medium text-[#0B89CE]"},'"',e,'"'))))};function Ti({name:e,asPage:t,src:o,rating:r,isCommunity:n}){let a=r>=4?"#FF9900":r>=3?"#969696":"#E53935",s=Math.min(1,Math.max(0,r/5));return Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(J,{type:t?"page":n?"community":"user",name:e??"",src:o??"",className:"w-14 h-14"}),Q__namespace.default.createElement("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 flex items-start gap-1 px-[0.25rem] py-[0.125rem] border-2 border-white font-bold text-[0.625rem] rounded-[0.84375rem]",style:{backgroundColor:a,color:"white"}},Q__namespace.default.createElement("span",null,r?.toFixed(1)),Q__namespace.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg"},Q__namespace.default.createElement("defs",null,Q__namespace.default.createElement("linearGradient",{id:"grad-star-badge"},Q__namespace.default.createElement("stop",{offset:`${s*100}%`,stopColor:"white"}),Q__namespace.default.createElement("stop",{offset:`${s*100}%`,stopColor:"rgba(255,255,255,0.3)"}))),Q__namespace.default.createElement("path",{d:"M3.20142 0.188283L3.85081 1.56118C3.89865 1.66065 3.98997 1.72972 4.09528 1.74507L5.55393 1.96857C5.63911 1.98115 5.71642 2.02843 5.76864 2.10057C5.82027 2.1718 5.84245 2.26206 5.8299 2.35078C5.81969 2.42446 5.78673 2.49261 5.73626 2.5448L4.67932 3.62267C4.60201 3.69789 4.56701 3.80933 4.58568 3.91831L4.8459 5.43365C4.87361 5.61662 4.75838 5.78916 4.58568 5.82385C4.51449 5.83582 4.44156 5.82323 4.37738 5.78885L3.07627 5.07569C2.97971 5.02443 2.86564 5.02443 2.76908 5.07569L1.46797 5.78885C1.3081 5.87819 1.11001 5.8174 1.02104 5.65162C0.988071 5.58562 0.976402 5.5104 0.987196 5.43703L1.24742 3.92138C1.26609 3.8127 1.23079 3.70065 1.15377 3.62543L0.0968382 2.54818C-0.0288971 2.42047 -0.0326896 2.21017 0.0883781 2.07786C0.0910036 2.07509 0.0939209 2.07202 0.0968382 2.06895C0.147016 2.01523 0.212946 1.98115 0.284128 1.97225L1.74277 1.74845C1.8478 1.73279 1.93911 1.66433 1.98724 1.56425L2.61329 0.188283C2.66902 0.0703953 2.78454 -0.00297725 2.90998 9.27295e-05H2.94908C3.05789 0.0139076 3.1527 0.0848242 3.20142 0.188283Z",fill:"url(#grad-star-badge)",opacity:"0.9"}))))}var oh=({name:e,title:t,company:o,image:r,slug:n,isHorizontal:a=false,headline:s})=>{let{locale:i}=w();return a?Q__namespace.default.createElement("div",{className:"flex flex-col items-center gap-2 cursor-pointer hover:bg-[#F7FAFC] p-2 rounded-[8px] transition min-w-[80px]",onClick:()=>{if(be(),t==="page")return window.open(`/company/${i}/${n}`,"_self");if(t==="community")return window.open(`/community/${i}/${n}`,"_self")}},Q__namespace.default.createElement(J,{src:r,name:e||"",type:t,className:"h-12 w-12"}),Q__namespace.default.createElement("div",{className:"text-center"},Q__namespace.default.createElement("p",{className:"text-[12px] text-[#050910] font-medium leading-[14px] truncate max-w-[70px]"},e))):Q__namespace.default.createElement("div",{className:"flex items-center gap-3 cursor-pointer hover:bg-[#F7FAFC] p-2 rounded-[8px] transition",onClick:()=>(be(),window.open(`/profile/${i}/${n}`,"_self"))},Q__namespace.default.createElement(Ti,{name:e,asPage:t==="page",src:r,rating:0}),Q__namespace.default.createElement("div",{className:"flex flex-col"},Q__namespace.default.createElement("p",{className:"text-[14px] text-[#050910] font-medium leading-[18px] line-clamp-1 flex-shrink"},e),Q__namespace.default.createElement("p",{className:"text-[11.5px] text-gray-shade8 font-medium leading-[18px] line-clamp-1 flex-shrink"},s||null)))};var fE=({search:e,users:t,pagesAndCommunities:o,sentryRef:r,isFetchingNextPage:n})=>{let{locale:a}=w();return Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto p-4"},o&&o?.length>0&&Q__namespace.default.createElement("div",{className:"mb-4"},Q__namespace.default.createElement("p",{className:"text-[12px] font-medium text-[#8893A1] uppercase mb-2"},To(a,"pagesAndCommunities")),Q__namespace.default.createElement("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide"},o?.map(s=>Q__namespace.default.createElement(oh,{key:s?.id,...s,isHorizontal:true})))),t&&t?.length>0&&Q__namespace.default.createElement("div",null,Q__namespace.default.createElement("p",{className:"text-[12px] font-medium text-[#8893A1] uppercase mb-2"},To(a,"people")),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2"},t?.map(s=>Q__namespace.default.createElement(oh,{key:s?.id,...s})),Q__namespace.default.createElement("div",{ref:r,className:"flex justify-center py-2"},n&&Q__namespace.default.createElement(he,{className:"w-5 h-5"})))))};var gE=()=>{let{locale:e}=w(),{isMobile:t}=ft();return Q__namespace.default.createElement("div",{className:"flex-1 flex flex-col items-center justify-center py-10 text-center"},Q__namespace.default.createElement(n6,{fontSize:100}),Q__namespace.default.createElement("p",{className:"text-[14px] font-bold mt-2"},t?To(e,"historyEmpty"):To(e,"startSearching")),t&&Q__namespace.default.createElement("p",{className:"text-[12px] text-[#8893A1] mt-1"},To(e,"recentSearchesWillAppear")))};function ya(e){let{color:t="#111827",fontSize:o=20}=e;return Q__namespace.default.createElement("svg",{width:o,height:o,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q__namespace.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.76639 1.52734C5.21636 1.52734 1.52783 5.21587 1.52783 9.7659C1.52783 14.3159 5.21636 18.0045 9.76639 18.0045C14.3164 18.0045 18.0049 14.3159 18.0049 9.7659C18.0049 5.21587 14.3164 1.52734 9.76639 1.52734ZM0.027832 9.7659C0.027832 4.38744 4.38793 0.0273438 9.76639 0.0273438C15.1448 0.0273438 19.5049 4.38744 19.5049 9.7659C19.5049 15.1444 15.1448 19.5045 9.76639 19.5045C4.38793 19.5045 0.027832 15.1444 0.027832 9.7659Z",fill:t}),Q__namespace.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4871 15.9548C15.7796 15.6615 16.2545 15.6609 16.5477 15.9534L20.0718 19.4683C20.365 19.7608 20.3657 20.2357 20.0732 20.529C19.7806 20.8222 19.3058 20.8228 19.0125 20.5303L15.4885 17.0155C15.1952 16.7229 15.1946 16.2481 15.4871 15.9548Z",fill:t}))}var hE=({onClose:e,inputValue:t,onInputChange:o,onKeyDown:r})=>{let{locale:n}=w(),a=To(n,"searchPlaceholder");return Q__namespace.default.createElement("div",{className:"flex items-center gap-2 p-4 border-b border-[#E6EBF1]"},Q__namespace.default.createElement("button",{onClick:e,className:"w-10 h-10 flex items-center justify-center rounded-full bg-[#F1F5F9] hover:bg-[#E2E8F0] transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-[#050910]"})),Q__namespace.default.createElement("div",{className:"flex-1"},Q__namespace.default.createElement(et,{leftIcon:Q__namespace.default.createElement(ya,{color:"#687588"}),className:"h-[40px] rounded-[1rem] bg-[#F7FAFC] border-[#E6EBF1] text-[20px] md:text-[16px]",wrapperClassName:"w-full text-[20px] md:text-[16px]",inputClassName:"text-[20px] md:text-[16px]",placeholder:a,value:t??"",onChange:s=>o?.(s.target.value),onKeyDown:r,autoFocus:true})))};var vE=({search:e,users:t,pagesAndCommunities:o,noResults:r,isLoading:n,isFetchingNextPage:a,sentryRef:s,lastSearches:i=[],lastSearchesIsLoading:l,onLastSearchClick:d,onClearAllSearches:c,isClearingSearches:p,onClose:m,inputValue:u,onInputChange:f,onKeyDown:g})=>{let{isMobile:h}=ft(),v=!t?.length&&!o?.length,y=!e.trim()&&i?.length>0,b=()=>h?Q__namespace.default.createElement(hE,{onClose:m,inputValue:u,onInputChange:f,onKeyDown:g}):null;return l&&!e?.trim()?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(th,null)):!e?.trim()&&v&&y?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(mE,{items:i,onItemClick:d,onClearAll:c,isClearing:p})):!e?.trim()&&v?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(gE,null)):n&&v?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(th,null)):r?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(uE,{search:e})):Q__namespace.default.createElement(I0,{className:h?"h-full flex flex-col":"max-h-[400px] overflow-hidden flex flex-col"},b(),Q__namespace.default.createElement(fE,{search:e,users:t,pagesAndCommunities:o,sentryRef:s,isFetchingNextPage:a}),Q__namespace.default.createElement(iE,{search:e}))};var yE=e=>{if(!e||e?.length===0)return {users:[],pagesAndCommunities:[],vacancies:[],posts:[]};let t=[],o=[],r=[],n=[],a=[];return e?.forEach(s=>{let i=(s?.users?.data||[])?.map(m=>({id:m?.user_id??"",name:m?.name??void 0,title:"user",image:m?.image_url??"",slug:m?.slug??"",headline:m?.headline??""}));t.push(...i);let l=(s?.communities?.data||[])?.map(m=>({id:m?.community_id??"",name:m?.name??void 0,title:"community",image:m?.image_url??"",slug:m?.slug??""}));o?.push(...l);let d=(s?.companies?.data||[]).map(m=>({id:m?.company_id??"",name:m?.name??void 0,title:"page",image:m?.image_url??"",slug:m?.slug??""}));r?.push(...d);let c=(s?.vacancies?.data||[])?.map(m=>({id:m?.vacancy_id??"",name:m?.title??void 0,title:"vacancy",company:m?.company_name??"",slug:m?.slug??""}));n?.push(...c);let p=(s?.posts?.data||[]).map(m=>({id:m?.post_id??"",name:m?.author_name??void 0,title:"post",image:m?.author_image_url??"",headline:m?.content??""}));a?.push(...p);}),{users:t,pagesAndCommunities:[...o,...r],vacancies:n,posts:a}};var bE=()=>{let e=()=>typeof window>"u"?"":new URLSearchParams(window.location.search).get("q")||"",[t,o]=Q.useState(()=>typeof window<"u"?e():""),r=a=>{if(typeof window>"u")return;let s=new URL(window.location.href);a.trim()?s.searchParams.set("q",a):s.searchParams.delete("q"),window.history.replaceState({},"",s.toString());};return Q.useEffect(()=>{if(typeof window<"u"){let a=e();a&&t!==a&&o(a);}},[]),{value:t,setValue:a=>{o(a);},updateUrlSearch:r,getSearchFromUrl:e}};var xE=({isFocus:e})=>{let{searchApi:t,user:o,queryClient:r}=w(),n=t6(t??"",o?.accessToken),a=De({queryKey:["last-searches",o?.id],queryFn:()=>eE(n),enabled:!!o?.id&&e}),s=ne({mutationFn:()=>tE(n),onSuccess:()=>{r?.setQueryData(["last-searches",o?.id],[]),r?.invalidateQueries({queryKey:["last-searches",o?.id]});}});return {lastSearches:a.data??[],lastSearchesError:a.error,lastSearchesIsLoading:a.isLoading,refetchLastSearches:a.refetch,deleteAllLastSearches:s.mutate,isDeletingAllSearches:s.isPending}};var s6=()=>{let[e,t]=Q.useState(false),o=Q.useRef(null),{isMobile:r}=ft(),{locale:n}=w(),{value:a,setValue:s}=bE(),i=usehooks.useDebounce(a,500),{globalSearchData:l,globalSearchIsGettingData:d,fetchNextPage:c,isFetchingNextPage:p,hasNextPage:m}=oE(i),{lastSearches:u,lastSearchesIsLoading:f,deleteAllLastSearches:g,isDeletingAllSearches:h}=xE({isFocus:e}),v=XI({loading:d||p,hasNextPage:!!m,onLoadMore:c}),{users:y,pagesAndCommunities:b}=yE(l);ha(o,()=>t(false));let x=S=>{S.key==="Enter"&&(S.preventDefault(),R9(a),eh(a,n));},C=S=>{s(S);},M=i?.trim()?.length>0&&!d&&y?.length===0&&b?.length===0,P=To?.(n,"searchPlaceholder");return Q__namespace.default.createElement("div",{className:"relative w-full",ref:o},r?Q__namespace.default.createElement(et,{leftIcon:Q__namespace.default.createElement("div",{className:"w-5 h-5 [&>svg_*]:fill-white flex items-center justify-center"},Q__namespace.default.createElement(ya,{color:"#687588"})),placeholderColor:"!text-white",className:"rounded-[1rem] w-full max-w-full !text-white h-[1.938rem] p-[1rem] bg-[#FFFFFF1A] placeholder-white",onFocus:()=>t(true),onChange:S=>s(S.target.value),onKeyDown:x,value:a,placeholder:P}):Q__namespace.default.createElement(et,{onFocus:()=>t(true),onChange:S=>s(S.target.value),onKeyDown:x,className:"h-[46px]",wrapperClassName:"min-w-[380px]",leftIcon:Q__namespace.default.createElement(ya,{color:"#687588"}),placeholder:P,value:a}),e&&Q__namespace.default.createElement(vE,{search:i,users:y,pagesAndCommunities:b,noResults:M,isLoading:d,isFetchingNextPage:p,sentryRef:v,lastSearches:u,lastSearchesIsLoading:f,onLastSearchClick:C,onClearAllSearches:g,isClearingSearches:h,onClose:()=>t(false),inputValue:a,onInputChange:s,onKeyDown:x}))};var wE=({hasMessage:e=false,color:t="#111827"})=>Q__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},Q__namespace.createElement("path",{fill:t,d:"M12.02 2C6.21 2 2 6.74 2 12c0 1.68.49 3.41 1.35 4.99.16.26.18.59.07.9l-.67 2.24c-.15.54.31.94.82.78l2.02-.6c.55-.18.98.05 1.491.36 1.46.86 3.279 1.3 4.919 1.3 4.96 0 10-3.83 10-10C22 6.65 17.7 2 12.02 2",opacity:"0.4"}),Q__namespace.createElement("path",{fill:t,d:"M7.37 10.73c.71 0 1.28.57 1.28 1.28 0 .7-.57 1.27-1.28 1.28-.7 0-1.28-.58-1.28-1.28 0-.71.57-1.28 1.28-1.28m4.61 0c.71 0 1.28.57 1.28 1.28 0 .7-.57 1.28-1.28 1.28-.71-.01-1.28-.58-1.28-1.29 0-.7.58-1.28 1.28-1.27m4.61 0c.71 0 1.28.57 1.28 1.28 0 .7-.57 1.28-1.28 1.28s-1.28-.58-1.28-1.28c0-.71.57-1.28 1.28-1.28"}),e&&Q__namespace.createElement(Q__namespace.Fragment,null,Q__namespace.createElement("rect",{width:"10",height:"10",x:"13.002",y:"1",fill:"#E03137",rx:"5"}),Q__namespace.createElement("rect",{width:"10",height:"10",x:"13.002",y:"1",stroke:"#fff",strokeWidth:"2",rx:"5"})));function hoe({hasMessage:e,color:t="#fff",...o}){return Q__namespace.createElement("div",{className:"relative inline-block"},Q__namespace.createElement("svg",{width:18,height:18,fill:"none",...o},Q__namespace.createElement("path",{opacity:.4,d:"M9.141.666c-4.842 0-8.35 3.95-8.35 8.333 0 1.4.408 2.842 1.125 4.159.133.216.15.491.058.75l-.558 1.866c-.125.45.258.784.683.65l1.684-.5c.458-.15.816.042 1.242.3 1.217.717 2.733 1.084 4.1 1.084 4.133 0 8.333-3.192 8.333-8.334 0-4.433-3.584-8.308-8.317-8.308z",fill:t}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.108 10.075A1.076 1.076 0 018.04 9c0-.583.484-1.067 1.067-1.058.592 0 1.067.475 1.067 1.066 0 .584-.475 1.067-1.067 1.067zm-3.842 0a1.074 1.074 0 01-1.067-1.067c0-.591.475-1.066 1.067-1.066s1.067.475 1.067 1.066c0 .584-.475 1.059-1.067 1.067zm6.617-1.067c0 .584.475 1.067 1.066 1.067.592 0 1.067-.483 1.067-1.067 0-.591-.475-1.066-1.067-1.066-.591 0-1.066.475-1.066 1.066z",fill:t})),e===true&&Q__namespace.createElement("span",{className:"absolute top-0 right-0 w-1.5 h-1.5 rounded-full bg-red-500 border border-white"}))}var CE=Q__namespace.memo(hoe);var i6="mirantes-pending-chat-id";function ME(){try{let e=sessionStorage.getItem(i6);return e&&sessionStorage.removeItem(i6),e}catch{return null}}function l6(e){e?sessionStorage.setItem(i6,e):sessionStorage.removeItem(i6);}function Om(){let[e,t]=y2("chat-visible",false),[o,r]=Q.useState(false),n=Q.useCallback(()=>{t(i=>!i);},[t]),a=Q.useCallback(i=>{t(true),i!==void 0&&r(i);},[t]),s=Q.useCallback(()=>{t(false);},[t]);return Q.useEffect(()=>{let i=l=>{let{open:d,sendMessageToPage:c,pendingChatId:p,chatId:m}=l.detail||{};t(typeof d=="boolean"?d:u=>!u),c!==void 0&&r(c),(p||m)&&l6(p||m||null);};return window.addEventListener("openChat",i),()=>{window.removeEventListener("openChat",i);}},[t]),{isChatVisible:e,isToSendMessageToPage:o,toggleChat:n,openChat:a,closeChat:s}}var xoe=()=>{let e=navigator.userAgent||navigator.vendor;return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(e.toLowerCase())},PE=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,SE=()=>/android/i.test(navigator.userAgent);function NE({forMobile:e=false,chatForPage:t=false}){let{user:o,environment:r,locale:n}=w(),{userLocation:a}=Jo(),{registerEvent:s}=Qo(),{hasMessages:i,setHasMessages:l}=$t(),{isChatVisible:d,toggleChat:c}=Om(),p=PE()?"ios":SE()?"android":"web",m=xoe(),u=()=>m&&(p==="ios"||p==="android")?"mirantes-mobile":"mirantes-web",f=()=>{if(!m)return;let v=navigator.userAgent,y="unknown";if(PE()){let b=v.match(/iPhone|iPad|iPod/);y=b?b[0]:"iOS Device";}else if(SE()){let b=v.match(/Android.*; (.*?)\//);y=b?b[1]:"Android Device";}return {os:p,model:y}},g=()=>{window.dispatchEvent(new CustomEvent("openChat",{detail:{sendMessageToPage:t}}));};Q.useEffect(()=>{if(!d)return;l(false);let v=f();s({input:{source:{app:u(),platform:p,environment:r,version:"1.0.0"},actor:{user_id:o?.id,anonymous_id:o?.id?void 0:uuid.v4(),session_id:sessionStorage.getItem("session_id")||uuid.v4()},context:{route:"/chat",referrer:document.referrer,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:n,country:a?.country_name||"",device:v,browser:{name:navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":navigator.userAgent.includes("Safari")?"Safari":navigator.userAgent.includes("Edge")?"Edge":"Other",version:(navigator.userAgent.match(/(Chrome|Firefox|Safari|Edge)\/(\d+\.\d+)/)||[])[2]||void 0}},events:[{event_id:uuid.v4(),event_type:"PAGE_VIEW",occurred_at:new Date,metadata:{interaction_type:"button_click",button_location:e?"mobile_navbar":"desktop_navbar",has_unread_messages:i,from_route:window.location.pathname,environment:r,component:"MirantesChatButton"}}]}});},[d]);let h=e?Q__namespace.default.createElement("button",{type:"button",onClick:g,className:E("w-8 h-8 rounded-full flex items-center justify-center transition-all z-10","cursor-pointer active:scale-95",d?"bg-primary/10":"bg-[#FFFFFF1A]"),"aria-label":d?"Fechar mensagens":"Abrir mensagens"},Q__namespace.default.createElement(CE,{hasMessage:i,color:"#ffffff"})):Q__namespace.default.createElement(X,{onClick:g,className:E("transition-all")},Q__namespace.default.createElement(wE,{hasMessage:i,color:d?"#0B89CE":"#111827"}));return Q__namespace.default.createElement("div",null,h)}var c6=NE;function AE({className:e}){let{Notification:t}=w();return Q__namespace.default.createElement("header",{className:ut("hidden lg:block w-full z-[500] h-[70px] bg-white sticky top-0",e)},Q__namespace.default.createElement("div",{className:"flex max-w-[1440px] px-8 h-full items-center justify-between w-full mx-auto"},Q__namespace.default.createElement("div",{className:"flex items-center gap-x-6"},Q__namespace.default.createElement("a",{href:"/",className:"button-empty !p-0 inline-flex","aria-label":"Ir para a p\xE1gina inicial",onClick:o=>{o.preventDefault(),be(),window.location.href="/";}},Q__namespace.default.createElement(OA,null)),Q__namespace.default.createElement(s6,null)),Q__namespace.default.createElement($I,null),Q__namespace.default.createElement("div",{className:"flex items-center gap-x-6"},Q__namespace.default.createElement(c6,null),t,Q__namespace.default.createElement(qA,null))))}function woe(e){return Q__namespace.createElement("svg",{width:52,height:32,fill:"none",...e},Q__namespace.createElement("path",{d:"M7.698 32H3.945c-2.11 0-3.82-1.66-3.82-3.708V0h3.521c2.239 0 4.052 1.76 4.052 3.933V32zM16.384 30.918h-3.751c-2.112 0-3.822-1.66-3.822-3.71V3.46h3.541c2.227 0 4.032 1.751 4.032 3.913v23.546zM24.178 27.245h-3.593c-1.828 0-3.312-1.44-3.312-3.215V7.137h3.433c1.918 0 3.472 1.509 3.472 3.37v16.738z",fill:"#fff"}))}var Coe=Q__namespace.memo(woe),IE=Coe;function EE({className:e}){let{user:t,locale:o,Notification:r}=w(),[n,a]=y2("mobile-explore-open",false);return Q.useEffect(()=>{let s=()=>{a(false);};return window.addEventListener("closeExploreCard",s),()=>{window.removeEventListener("closeExploreCard",s);}},[]),Q__namespace.default.createElement("header",{className:ut("w-full sticky top-0 z-[200] bg-primary h-[5rem] px-6 flex lg:hidden items-center justify-between gap-x-4",e)},Q__namespace.default.createElement("div",{role:"button",onClick:()=>{be(),window.location.href=`/feed/${o}`;},className:"flex-none flex items-center"},Q__namespace.default.createElement(IE,null)),Q__namespace.default.createElement("div",{className:"flex-1 flex items-center justify-center min-w-0"},Q__namespace.default.createElement(s6,null)),Q__namespace.default.createElement("div",{className:"flex-none flex items-center"},Q__namespace.default.createElement(c6,{forMobile:true})),Q__namespace.default.createElement("div",{className:"flex-none w-8 h-8 relative"},Q__namespace.default.createElement("div",{onClick:()=>{be(),window.location.href=`/profile/${o}`;},className:"absolute top-0 left-0 w-full h-full flex border border-white rounded-full border-dashed items-center justify-center cursor-pointer"},Q__namespace.default.createElement(J,{name:t?.name,src:t?.avatar,className:"w-8 h-8"}))))}function kE({className:e}){return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(AE,{className:e}),Q__namespace.default.createElement(EE,{className:e}))}function Um({delayDuration:e=0,...t}){return Q__namespace.createElement(ba__namespace.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function p6({...e}){return Q__namespace.createElement(Um,null,Q__namespace.createElement(ba__namespace.Root,{"data-slot":"tooltip",...e}))}function m6({...e}){return Q__namespace.createElement(ba__namespace.Trigger,{"data-slot":"tooltip-trigger",...e})}function u6({className:e,sideOffset:t=0,children:o,...r}){return Q__namespace.createElement(ba__namespace.Portal,null,Q__namespace.createElement(ba__namespace.Content,{"data-slot":"tooltip-content",sideOffset:t,style:{color:"#fff"},className:E("bg-primary text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r},o,Q__namespace.createElement(ba__namespace.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})))}var Poe=({activeTab:e,onTabChange:t})=>{let{user:o,locale:r}=w(),n=()=>{window.location.href="/profile/"+r;};return Q__namespace.default.createElement("div",{className:"flex flex-col items-center h-full pt-8 pb-8 px-4 bg-white border border-[#E4EBF1] w-[5.375rem] rounded-[1rem]"},Q__namespace.default.createElement(Um,null,Q__namespace.default.createElement(p6,null,Q__namespace.default.createElement(m6,{asChild:true},Q__namespace.default.createElement("div",{className:"mb-4"},Q__namespace.default.createElement(J,{name:o?.name||"User",src:o?.avatar,onClick:n,className:"w-10 h-10 cursor-pointer"}))),Q__namespace.default.createElement(u6,{side:"left",className:"bg-primary text-white"},Q__namespace.default.createElement("p",{className:"!text-white"},o?.name)))),Q__namespace.default.createElement("div",{className:"w-full h-px bg-[#0000001A] mb-6"}),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2 flex-1"},Q__namespace.default.createElement(X,{className:"rounded-[1rem] p-[0.625rem] h-[2.625rem] w-[2.625rem] bg-[#0B89CE]"},Q__namespace.default.createElement(M2,null))),Q__namespace.default.createElement(X,{onClick:()=>{localStorage.setItem("chosenMenuItem","privacy"),window.location.href=`/settings/${r}`;},className:"!bg-transparent !border-0 !cursor-pointer"},Q__namespace.default.createElement(Ku,null)))},TE=Poe;function f6(e,t=300){let[o,r]=Q.useState(e);return Q.useEffect(()=>{let n=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(n);}},[e,t]),o}var DE=()=>{let[e,t]=Q.useState("list"),[o,r]=Q.useState(false),[n,a]=Q.useState("forward"),[s,i]=Q.useState(false),[l,d]=Q.useState(false),[c,p]=Q.useState(null),[m,u]=Q.useState(false),[f,g]=Q.useState(null);return {viewMode:e,setViewMode:t,isTransitioning:o,setIsTransitioning:r,transitionDirection:n,setTransitionDirection:a,showCreateDrawer:s,setShowCreateDrawer:i,showNewChatDrawer:l,setShowNewChatDrawer:d,selectedContactId:c,setSelectedContactId:p,groupDetailsOpen:m,setGroupDetailsOpen:u,selectedGroupId:f,setSelectedGroupId:g}};var sh=768;function Bs(){let[e,t]=Q__namespace.useState(void 0);return Q__namespace.useEffect(()=>{let o=window.matchMedia(`(max-width: ${sh-1}px)`),r=()=>{t(window.innerWidth<sh);};return o.addEventListener("change",r),t(window.innerWidth<sh),()=>o.removeEventListener("change",r)},[]),!!e}async function Eoe(e,t,o){try{return (await c7.request(e??"",Bp,{input:o?.input},{"x-access-token":t??""}))?.createConversation}catch{return null}}function h6({chatForPage:e=false}){let{user:t,page:o,chatApiUrl:r}=w(),[n,a]=Q.useState(""),s=e?o?.id:t?.id,i=YC(n,false),{mutate:l,isPending:d}=ne({mutationFn:async m=>{let{participants:u,groupInfo:f}=m;if(!u?.length||!s)return null;let g=[...new Set(u)],h=f!==void 0||g?.length>1;if(!h&&g?.length===1&&!f){let b=g?.[0];a(b);let C=(await i.refetch())?.data?.checkExistingConversation?.conversationId;if(C)return C}let y={input:{participants:[s,...g],isGroup:h,...f&&{name:f.name,description:f.description,image:f.image,banner:f.banner},...e?{pageId:s}:{}}};return Eoe(r??"",t?.accessToken??"",y)},onSuccess:m=>{m?.id&&(hr?.invalidateQueries({queryKey:["conversation",m?.id]}),hr.invalidateQueries({queryKey:["messages",m?.id]}));}});return {createConversation:l,createDMConversation:m=>l({participants:m}),createGroupConversation:(m,u)=>l({participants:m,groupInfo:u}),isCreatingConversation:d||i.isFetching||i.isLoading}}function LE(e=false){let{user:t}=w(),{uploadAssets:o,isUploadingAsset:r}=rs(),{createConversation:n,isCreatingConversation:a}=h6({chatForPage:e});return {createGroup:(i,l)=>{let{name:d,bio:c,memberIds:p,photo:m}=i,u=f=>{n({participants:p,groupInfo:{name:d,image:f,description:c}},{onSuccess(g){let h=g?.id??g??"";l?.onSuccess?.(h);},onError(){l?.onError?.();}});};m?o({file:m,owner_type:"chat",owner_id:t?.id,is_public:true},{onSuccess:f=>{let g=f?.data?.url;u(g);},onError:()=>{u();}}):u();},isCreatingGroup:a||r}}var FE=(e,t,o,r)=>{let{createConversation:n}=h6({chatForPage:r}),{locale:a}=w(),s=Bs(),{createGroup:i,isCreatingGroup:l}=LE(r),{conversation:d,isLoadingConversation:c}=ca(e.selectedGroupId??"",r),p=()=>{e.setTransitionDirection("back"),e.setIsTransitioning(true),setTimeout(()=>{e.setViewMode("list"),e.setIsTransitioning(false);},150);};return {handleNavigateBack:p,handleOpenCreateGroup:()=>{e.setShowCreateDrawer(false),e.setTransitionDirection("forward"),e.setIsTransitioning(true),setTimeout(()=>{e.setViewMode("createGroup"),e.setIsTransitioning(false);},150);},handleOpenNewChat:()=>{s?e.setShowNewChatDrawer(true):(e.setShowCreateDrawer(false),e.setTransitionDirection("forward"),e.setIsTransitioning(true),setTimeout(()=>{e.setViewMode("newChat"),e.setIsTransitioning(false);},150));},handleCreateGroup:async A=>{i(A,{onSuccess:P=>{o(P),p();},onError:()=>{p();}});},handleSelectContact:async A=>{e.setSelectedContactId(A),n({participants:[A]},{onSuccess(P){let S=P?.id??P??"";e.setSelectedContactId(null),o(S),p();},onError(){p(),e.setSelectedContactId(null);}});},handleSelectContactFromDrawer:async A=>{e.setSelectedContactId(A),n({participants:[A]},{onSuccess(P){e.setShowNewChatDrawer(false),e.setSelectedContactId(null),o(P?.id??"");},onError(){e.setShowNewChatDrawer(false),e.setSelectedContactId(null);}});},handleSelectChat:A=>{o(A);},handleGroupInfo:A=>{e.setSelectedGroupId(A),e.setGroupDetailsOpen(true);},handleContactInfo:(A,P)=>{if(P)return window.open(`/company/${a}/${A}`,"_blank");window.open(`/profile/${a}/${A}`,"_blank");},handleAddMembers:()=>{e.setGroupDetailsOpen(false);},handleCloseGroupDetails:()=>{e.setGroupDetailsOpen(false),e.setSelectedGroupId(null);},getSelectedGroup:()=>d,isLoadingSelectedGroup:c,getAnimationClass:()=>e.isTransitioning?e.transitionDirection==="forward"?e.viewMode==="list"?"opacity-0 -translate-x-4":"opacity-0 translate-x-4":e.viewMode==="createGroup"||e.viewMode==="newChat"?"opacity-0 translate-x-4":"opacity-0 -translate-x-4":"opacity-100 translate-x-0",isCreatingConversation:l}};var OE=({containerRef:e,fetchNextPage:t,hasNextPage:o,isFetchingNextPage:r})=>{let n=Q.useCallback(()=>{let a=e.current;if(!a||!t||!o||r)return;let{scrollTop:s,scrollHeight:i,clientHeight:l}=a;i-s-l<=100&&t();},[e,t,o,r]);Q.useEffect(()=>{let a=e.current;if(a)return a.addEventListener("scroll",n),()=>a.removeEventListener("scroll",n)},[n,e]);};function b6({className:e,...t}){return Q__namespace.createElement(y6__namespace.Root,{"data-slot":"checkbox",className:E("peer w-5 h-5 border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-5 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 p-0",e),...t},Q__namespace.createElement(y6__namespace.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none p-0"},Q__namespace.createElement(lucideReact.CheckIcon,{size:14,className:"size-3.5 text-white"})))}var zoe=({contacts:e,onBack:t,onCreateGroup:o,isCreating:r,fetchNextPage:n,hasNextPage:a,isFetchingNextPage:s})=>{let{t:i}=Oe(),[l,d]=Q.useState(""),[c,p]=Q.useState(""),[m,u]=Q.useState(""),[f,g]=Q.useState([]),[h,v]=Q.useState(null),[y,b]=Q.useState(null),[x,C]=Q.useState(false),M=Q.useRef(null),A=Q.useRef(null),P=e.filter(B=>B.name.toLowerCase().includes(m.toLowerCase())),S=Q.useCallback(()=>{let B=A.current;if(!B||!n||!a||s)return;let{scrollTop:G,scrollHeight:k,clientHeight:D}=B;k-G-D<=100&&n();},[n,a,s]);Q.useEffect(()=>{let B=A.current;if(B)return B.addEventListener("scroll",S),()=>B.removeEventListener("scroll",S)},[S]);let I=e.filter(B=>f.includes(B.id)),H=B=>{g(G=>G.includes(B)?G.filter(k=>k!==B):[...G,B]);},L=B=>{g(G=>G.filter(k=>k!==B));},T=B=>{let G=B.target.files?.[0];if(G){v(G);let k=new FileReader;k.onloadend=()=>{b(k.result);},k.readAsDataURL(G);}},z=()=>{v(null),b(null),M.current&&(M.current.value="");},F=()=>{l.trim()&&f.length>0&&o?.({name:l,bio:c,memberIds:f,photo:h||void 0});};return Q__namespace.default.createElement("div",{className:"flex flex-col h-full bg-white rounded-[1rem] w-full border-[#f1f2f4]"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between px-4 py-3 gap-2 border-b border-[#f1f2f4]"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement("button",{onClick:t,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:bg-[#f1f2f4] p-0 transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-muted-foreground"})),Q__namespace.default.createElement("h1",{className:"text-body-md md:text-[1.25rem] font-semibold text-[#050910]"},i("new-group-title"))),Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement(X,{onClick:t,className:"bg-[#F1F5F9] rounded-[0.5rem] text-sm p-[0.5rem] text-primary text-body-sm md:text-[0.875rem] font-semibold"},i("cancel")),Q__namespace.default.createElement(X,{onClick:F,disabled:!l.trim()||f.length===0||r,className:"bg-primary rounded-[0.5rem] text-sm p-[0.5rem] text-white text-body-sm md:text-[0.875rem] font-semibold"},i(r?"creating":"create")))),Q__namespace.default.createElement("div",{ref:A,className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"px-4 py-4 space-y-4"},Q__namespace.default.createElement("div",{className:"flex items-center gap-3"},Q__namespace.default.createElement("input",{ref:M,type:"file",accept:"image/*",onChange:T,className:"hidden !text-[1.2rem] md:text-[0.875rem]"}),Q__namespace.default.createElement("div",{className:"relative",onMouseEnter:()=>C(true),onMouseLeave:()=>C(false)},Q__namespace.default.createElement("button",{onClick:()=>M.current?.click(),className:"relative w-14 h-14 rounded-xl border-2 border-dashed border-border flex items-center justify-center hover:bg-[#f1f2f4] transition-colors overflow-hidden"},y?Q__namespace.default.createElement("img",{src:y,alt:"Group photo",className:"w-full h-full object-cover"}):Q__namespace.default.createElement("div",{className:"flex flex-col items-center text-[#687588]"},Q__namespace.default.createElement("span",{className:"text-[#687588] text-[0.75rem] md:text-[0.875rem] mt-0.5"},i("photo")))),y&&x&&Q__namespace.default.createElement("button",{onClick:z,className:"absolute -top-1.5 -right-1.5 w-5 h-5 rounded-full bg-red-500 text-red-500 flex items-center justify-center shadow-md hover:bg-red-500/90 transition-colors"},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3"}))),Q__namespace.default.createElement(kr,{placeholder:i("group-name-placeholder"),value:l,autoFocus:true,onChange:B=>d(B.target.value),className:"flex-1 h-10 rounded-xl bg-transparent !text-[1.2rem] md:text-[0.875rem]"})),Q__namespace.default.createElement("div",{className:" rounded-xl p-4 bg-[#E4EBF1]"},Q__namespace.default.createElement(J2,{placeholder:i("group-description-placeholder"),value:c,onChange:B=>p(B.target.value),className:"min-h-[60px] resize-none border-0 bg-transparent p-0 !text-[1.2rem] md:text-[0.875rem] focus-visible:ring-0"})),I.length>0&&Q__namespace.default.createElement("div",{className:"space-y-2 flex flex-row-reverse justify-between items-center gap-[1rem]"},Q__namespace.default.createElement("p",{className:"text-[0.75rem] md:text-[0.87rem] font-medium text-[#050910]"},I.length," ",i("members-added")),Q__namespace.default.createElement("div",{className:"flex items-center -space-x-3"},I.slice(0,5).map((B,G)=>Q__namespace.default.createElement("div",{key:B.id,className:"relative group z-[50]"},Q__namespace.default.createElement(J,{className:"w-10 h-10 border-2 border-white",name:B.name,src:B.avatar}),Q__namespace.default.createElement("button",{onClick:()=>L(B.id),className:"absolute -top-2 -right-2 w-5 h-5 rounded-full bg-red-600 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow"},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3"})))),I.length>5&&Q__namespace.default.createElement("div",{className:"relative w-10 h-10 flex items-center justify-center rounded-full bg-gray-300 text-sm font-medium text-gray-700 border-2 border-white z-[49]"},"+",I.length-5))),Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(kr,{placeholder:i("search-placeholder"),value:m,onChange:B=>u(B.target.value),className:"h-10 bg-[#E4EBF1] rounded-xl border-0 !text-[1.2rem] md:text-[0.875rem]"})),Q__namespace.default.createElement("div",{className:"space-y-1"},P.map(B=>{let G=f.includes(B.id);return Q__namespace.default.createElement("button",{key:B.id,onClick:()=>H(B.id),className:`w-full flex items-center gap-3 p-3 rounded-xl transition-colors ${G?"bg-primary bg-opacity-10":"hover:bg-primary hover:bg-opacity-10"}`},Q__namespace.default.createElement(J,{className:"w-10 h-10",name:B?.name??"",src:B?.avatar??""}),Q__namespace.default.createElement("div",{className:"flex-1 text-left"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-[#050910]"},B?.name)),Q__namespace.default.createElement(b6,{checked:G,className:"rounded-md border border-[#CBD5E0] p-0 text-white"}))}),s&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-4"},Q__namespace.default.createElement(he,{className:"w-5 h-5 animate-spin text-primary"}))))))},UE=zoe;var HE=20;async function Uoe(e,t,o){try{let r={"Content-Type":"application/json"};return t&&(r["x-access-token"]=t),(await c7__default.default(e,aC,{input:o??{}},r))?.users??{data:[],meta:{currentPage:1,lastPage:1,total:0,perPage:HE}}}catch(r){throw console.warn("GraphQL API not available for users:",r),new Error(`Unable to fetch users: ${JSON.stringify(r)}`)}}function hd(e={}){let{chatApiUrl:t,user:o}=w(),{search:r,contactsOnly:n}=e,a=ds("contacts",r,n),{data:s,isLoading:i,isError:l,refetch:d,fetchNextPage:c,hasNextPage:p,isFetchingNextPage:m}=Ke({queryKey:a,queryFn:async({pageParam:f=1})=>{let g={};r?.trim()&&(g.name=r.trim()),n&&(g.isContact=true);let h={page:f,perPage:HE,sort:"name",sortDir:"asc",filter:Object.keys(g).length>0?g:void 0};return Uoe(t??"",o?.accessToken,h)},initialPageParam:1,getNextPageParam:f=>{if(!f||!f.meta)return;let g=f.meta;if(!(typeof g.currentPage!="number"||typeof g.lastPage!="number"))return g.currentPage<g.lastPage?g.currentPage+1:void 0},staleTime:5*60*1e3,retry:false});return {data:s?.pages?.flatMap(f=>f.data??[])??[],isLoading:i,isError:l,refetch:d,fetchNextPage:c,hasNextPage:p??false,isFetchingNextPage:m}}var GE=100,Qoe=({onBack:e,onSelectContact:t,isCreating:o=false,selectedContactId:r=null,showBackButton:n=true})=>{let{t:a}=Oe(),[s,i]=Q.useState(""),l=Q.useRef(null),d=f6(s,300),{data:c,isLoading:p,fetchNextPage:m,hasNextPage:u,isFetchingNextPage:f}=hd({search:d}),g=v=>{let y=v.target.value;y.length<=GE&&i(y);},h=Q.useCallback(()=>{let v=l.current;if(!v||!u||f)return;let{scrollTop:y,scrollHeight:b,clientHeight:x}=v;b-y-x<=100&&m();},[m,u,f]);return Q.useEffect(()=>{let v=l.current;if(v)return v.addEventListener("scroll",h),()=>v.removeEventListener("scroll",h)},[h]),Q__namespace.default.createElement("div",{className:"flex flex-col h-full bg-white rounded-[1rem] w-full border-border"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border"},Q__namespace.default.createElement("button",{onClick:e,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:bg-accent transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-[#050910]"})),Q__namespace.default.createElement("h1",{className:"text-lg font-semibold text-[#050910]"},a("new-conversation"))),Q__namespace.default.createElement("div",{className:"px-4 py-3 border-b border-border"},Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#050910]"}),Q__namespace.default.createElement(kr,{placeholder:a("search-contacts"),value:s,onChange:g,maxLength:GE,className:"h-10 pl-10 rounded-xl bg-transparent border-0 !text-[1.2rem] md:text-[0.875rem] text-[#050910]",autoFocus:true}))),Q__namespace.default.createElement("div",{ref:l,className:"flex-1 overflow-y-auto px-2 py-2"},Q__namespace.default.createElement("div",{className:"space-y-1"},p&&c?.length===0&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-8"},Q__namespace.default.createElement(he,{className:"w-6 h-6 "})),c.map(v=>{let y=r===v.id,b=o&&!y;return Q__namespace.default.createElement("button",{key:v.id,onClick:()=>v.id&&!o&&t(v.id),disabled:o,className:E("w-full flex items-center gap-3 p-3 rounded-xl transition-colors",b?"opacity-50 cursor-not-allowed":"hover:bg-primary/10",y&&o&&"bg-primary/10")},Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(J,{name:v?.name??"",src:v?.avatar??"",className:"w-10 h-10"}),y&&o&&Q__namespace.default.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-full"},Q__namespace.default.createElement(he,{className:"w-5 h-5 animate-spin text-white"}))),Q__namespace.default.createElement("div",{className:"flex-1 text-left"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-[#000000]"},Ve(v?.name??"")),v.email&&Q__namespace.default.createElement("p",{className:"text-xs text-[#6B7280]"},Bt(v?.email??"",30))),y&&o&&Q__namespace.default.createElement(he,null))}),f&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-4"},Q__namespace.default.createElement(he,{className:"w-5 h-5 animate-spin text-[#6B7280]"})),c.length===0&&!p&&!f&&Q__namespace.default.createElement("div",{className:"text-center text-sm text-[#6B7280] py-8"},a(s?"no-contacts-found":"no-contacts-available")))))},x6=Qoe;var _E=({viewMode:e,isTransitioning:t,transitionDirection:o,onNavigateBack:r,onSelectContact:n,onCreateGroup:a,selectedContactId:s,isCreating:i})=>{let{t:l}=Oe(),{data:d,fetchNextPage:c,hasNextPage:p,isFetchingNextPage:m}=hd(),u=d?.filter(g=>g.id&&g.name).map(g=>({id:g.id,name:g.name,subtitle:g.isOnline?l("online"):l("offline")}))||[],f=()=>t?o==="forward"?e==="list"?"opacity-0 -translate-x-4":"opacity-0 translate-x-4":e==="createGroup"||e==="newChat"?"opacity-0 translate-x-4":"opacity-0 -translate-x-4":"opacity-100 translate-x-0";return e==="createGroup"?Q__namespace.default.createElement("div",{className:E("h-full w-full transition-all duration-200 ease-out",f())},Q__namespace.default.createElement(UE,{contacts:u,onBack:r,onCreateGroup:a,isCreating:i,fetchNextPage:c,hasNextPage:p,isFetchingNextPage:m})):e==="newChat"?Q__namespace.default.createElement("div",{className:E("h-full w-full transition-all duration-200 ease-out",f())},Q__namespace.default.createElement(x6,{onBack:r,onSelectContact:n,selectedContactId:s})):null};var qE=({showBackButton:e,onBack:t,canCreateConversation:o,onOpenCreateGroup:r,onOpenNewChat:n,showCreateDrawer:a,setShowCreateDrawer:s})=>{let{t:i}=Oe(),l=Bs();return Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-4"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},e&&Q__namespace.default.createElement("button",{onClick:t,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-[#050910]"})),Q__namespace.default.createElement("h1",{className:"text-xl font-semibold text-[#050910]"},i("chats"))),o&&Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement("button",{onClick:n,className:"rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(Zu,null)),l?Q__namespace.default.createElement(yo,{open:a,onOpenChange:s},Q__namespace.default.createElement(Yu,{asChild:true},Q__namespace.default.createElement("button",{className:"w-8 h-8 p-0 rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(lucideReact.MoreVertical,{className:"w-5 h-5 text-[#050910]"}))),Q__namespace.default.createElement(qr,{className:"z-[9999999]"}),Q__namespace.default.createElement(bo,{className:"bg-white w-full h-auto rounded-t-lg p-0 z-[9999999]"},Q__namespace.default.createElement("div",{className:"p-4 space-y-2"},Q__namespace.default.createElement("button",{onClick:r,className:"w-full flex justify-start items-center gap-3 p-3 rounded-lg hover:bg-gray-100 transition-colors"},Q__namespace.default.createElement(lucideReact.Users,{className:"w-5 h-5"}),Q__namespace.default.createElement("span",null,i("new-group")))))):Q__namespace.default.createElement(lc,{open:a,onOpenChange:s},Q__namespace.default.createElement(cc,{asChild:true},Q__namespace.default.createElement("button",{className:"w-8 p-0 h-8 rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(lucideReact.MoreVertical,{className:"w-5 h-5 text-[#050910]"}))),Q__namespace.default.createElement(dc,{align:"end",className:"bg-white z-[9999999] border border-[#E4EBF1] shadow-lg focus:outline-none focus:ring-0"},Q__namespace.default.createElement(Gl,{onClick:r,className:"cursor-pointer hover:bg-gray-100"},Q__namespace.default.createElement(lucideReact.Users,{className:"w-4 h-4 mr-2"}),i("new-group"))))))};var WE=({searchQuery:e,onSearchChange:t})=>{let{t:o}=Oe();return Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement("input",{type:"text",placeholder:o("search"),value:e,onChange:r=>t?.(r.target.value),className:"w-full bg-[#F1F5F9] h-10 pl-10 pr-4 rounded-xl !text-[1.2rem] md:text-[0.875rem] placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-all"}))};var Zoe=({filters:e,activeFilter:t,onFilterChange:o})=>{let r=Bs(),n=Q.useRef(null),a=Q.useRef(0),s=Q.useRef(0),[i,l]=Q.useState(false),[d,c]=Q.useState(null),p=e.findIndex(g=>g.id===t);return Q__namespace.default.createElement("div",{ref:n,className:"flex gap-1 overflow-x-auto flex-shrink-0 touch-pan-x",onTouchStart:g=>{a.current=g.touches[0].clientX,s.current=g.touches[0].clientY,l(false),c(null);},onTouchMove:g=>{if(!r)return;let h=g.touches[0].clientX,v=g.touches[0].clientY,y=h-a.current,b=v-s.current;Math.abs(y)>Math.abs(b)&&Math.abs(y)>20&&(l(true),c(y>0?"right":"left"));},onTouchEnd:()=>{if(!i||!r){l(false),c(null);return}d==="left"&&p<e.length-1?o(e[p+1].id):d==="right"&&p>0&&o(e[p-1].id),l(false),c(null);}},e.map(g=>Q__namespace.default.createElement("button",{key:g.id,onClick:()=>o(g.id),className:E("px-4 py-1.5 rounded-full text-sm mb-2 text-gray-400 font-medium whitespace-nowrap transition-all duration-200 flex items-center gap-1.5",t===g.id?"bg-primary text-white":"text-muted-foreground hover:bg-primary hover:text-white")},g.id==="archived"&&Q__namespace.default.createElement(lucideReact.Archive,{className:"w-3.5 h-3.5"}),g.label,g.count!==void 0&&g.count>0&&Q__namespace.default.createElement("span",{className:E("text-xs px-1.5 py-0.5 rounded-full",t===g.id?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-muted-foreground")},"( "+g.count+" ) "))),r&&Q__namespace.default.createElement("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 pointer-events-none"},Q__namespace.default.createElement("div",{className:E("w-8 h-full bg-gradient-to-l from-card to-transparent",p>=e.length-1&&"opacity-0")})))},ZE=Zoe;var YE=({filters:e,activeFilter:t,onFilterChange:o})=>Q__namespace.default.createElement(ZE,{filters:e,activeFilter:t,onFilterChange:n=>{o?.(n);}});var C6=null;function JE(e){C6&&C6!==e&&C6(),C6=e;}var XE=15,lh=10,Joe=100,$oe=.5;function RE(e=180,t=120){let[o,r]=Q.useState(0),[n,a]=Q.useState(false),s=Q.useRef(0),i=Q.useRef(0),l=Q.useRef(0),d=Q.useRef(0),c=Q.useRef(0),p=Q.useRef(0),m=Q.useRef(null),u=Q.useRef(false),f=b=>{if(Math.abs(b)<=e)return b;let x=Math.abs(b)-e;return (e+x*.35)*Math.sign(b)},g=()=>{a(true),r(0),m.current=null,u.current=false,setTimeout(()=>a(false),220);};return {offset:o,animating:n,onStart:(b,x)=>{JE(g),s.current=b,i.current=x,l.current=b,d.current=b,c.current=Date.now(),p.current=Date.now(),m.current=null,u.current=false;},onMove:(b,x)=>{let C=b-s.current,M=x-i.current,A=Math.abs(C),P=Math.abs(M);if(m.current===null&&(A>XE||P>XE)&&(m.current=A>P*1.5),m.current!==true)return;if(!u.current)if(A>lh)u.current=true;else return;d.current=l.current,p.current=c.current,l.current=b,c.current=Date.now();let S=C>0?C-lh:C+lh;r(f(S));},onEnd:()=>{if(!u.current||m.current!==true){g();return}let x=Date.now()-p.current,C=x>0?(l.current-d.current)/x:0,M=Math.abs(o),A=Math.abs(C),P=o>0&&C>=0||o<0&&C<=0,I=M>Joe&&P||A>$oe&&M>30?o>0?t:-t:0;a(true),r(I),m.current=null,u.current=false,setTimeout(()=>a(false),220);},reset:g}}var ek=(e,t)=>{if(!e)return t||"";try{let o=new Date(e),r=new Date;if(o.getDate()===r.getDate()&&o.getMonth()===r.getMonth()&&o.getFullYear()===r.getFullYear()){let a=o.getHours().toString().padStart(2,"0"),s=o.getMinutes().toString().padStart(2,"0");return `${a}:${s}`}else {let a=o.getDate().toString().padStart(2,"0"),s=(o.getMonth()+1).toString().padStart(2,"0"),i=o.getFullYear();return `${a}/${s}/${i}`}}catch{return t||""}};function tk(e){if(!e)return "";try{return new Date(e).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})}catch{return ""}}var ok=({chat:e,isCompactMode:t=false})=>{let o=e?.unreadCount!==void 0&&e.unreadCount>0&&!e?.isRead;return Q__namespace.default.createElement("div",{className:"flex-1 min-w-0 text-left"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-0.5 w-full"},Q__namespace.default.createElement("div",{className:"flex items-center gap-1 min-w-0 flex-1"},Q__namespace.default.createElement("h3",{className:E("font-bold text-[#050910] truncate",t?"text-xs":"text-[0.875rem]")},e?.name||"Unknown")),Q__namespace.default.createElement("span",{className:E("text-[#687588] flex-shrink-0 ml-1",t?"text-[0.625rem]":"text-xs")},ek(e?.lastMessageAt,e?.time))),Q__namespace.default.createElement("div",{className:"flex items-center justify-between gap-1"},Q__namespace.default.createElement("div",{className:"flex items-center gap-1 flex-1 min-w-0"},e?.hasAttachment&&Q__namespace.default.createElement(lucideReact.Paperclip,{className:E("text-[#687588] flex-shrink-0",t?"w-2.5 h-2.5":"w-3.5 h-3.5")}),Q__namespace.default.createElement("div",{className:E("text-[#687588] flex-shrink truncate line-clamp-1",t?"text-[0.625rem]":"text-[0.875rem]")},nc({text:e?.lastMessage||"",isListed:true}))),Q__namespace.default.createElement("div",{className:"flex items-center gap-0.5 flex-shrink-0"},!t&&Q__namespace.default.createElement(Q__namespace.default.Fragment,null,e?.isPinned&&Q__namespace.default.createElement(lucideReact.Pin,{className:"w-3.5 h-3.5 text-[#687588]"}),e?.isMuted&&Q__namespace.default.createElement(lucideReact.BellOff,{className:"w-3.5 h-3.5 text-[#687588]"}),e?.isFavorite&&Q__namespace.default.createElement(lucideReact.Star,{className:"w-3.5 h-3.5 text-[#687588]"})),o&&Q__namespace.default.createElement("div",{className:E("rounded-full bg-primary text-white font-medium flex items-center justify-center",t?"w-3.5 h-3.5 text-[0.5rem]":"w-5 h-5 text-xs")},e?.unreadCount))))};var nk=({chat:e,onGroupInfo:t,onContactInfo:o,onBack:r,onCloseConversation:n,asPage:a})=>{let[s,i]=Q.useState(false),[l,d]=Q.useState(null),c=lo("pinned",e,a),p=lo("archived",e,a),m=lo("favorites",e,a),u=lo("muted",e,a),{deleteAConversation:f,isDeletingAConversation:g}=I4(e?.id,()=>{n?.(),r?.();});return {handleDropdownAction:(b,x)=>{switch(x.stopPropagation(),b){case "pin":c.mutate({conversationId:e.id,value:!e.isPinned});break;case "archive":p.mutate({conversationId:e.id,value:!e.isArchived});break;case "favorite":m.mutate({conversationId:e.id,value:!e.isFavorite});break;case "mute":u.mutate({conversationId:e.id,value:!e.isMuted});break;case "group-info":t&&t(e.id);break;case "contact-info":o&&o(e.id);break;case "exit-group":case "clear":d(b),i(true);break}},isModalOpen:s,closeModal:()=>{i(false),d(null);},confirmDelete:()=>{l&&(f({conversationId:e?.id}),l==="clear"&&n?.(),r?.(),i(false),d(null));},isDeletingAConversation:g}};var ak=({chat:e,onAction:t})=>Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(H1,{icon:lucideReact.Pin,label:e?.isPinned?"Desafixar chat":"Fixar chat",onClick:o=>t("pin",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.Archive,label:e?.isArchived?"Desarquivar":"Arquivar",onClick:o=>t("archive",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.Star,label:e?.isFavorite?"Remover dos favoritos":"Adicionar aos favoritos",onClick:o=>t("favorite",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.BellOff,label:e?.isMuted?"Ativar notifica\xE7\xF5es":"Silenciar",onClick:o=>t("mute",o)}),Q__namespace.default.createElement("div",{className:"h-px bg-[#E4EBF1] my-2"}),e?.isGroup?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(H1,{icon:lucideReact.Info,label:"Informa\xE7\xF5es do grupo",onClick:o=>t("group-info",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.LogOut,label:"Sair do grupo",destructive:true,onClick:o=>t("exit-group",o)})):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(H1,{icon:lucideReact.User,label:"Informa\xE7\xF5es do contato",onClick:o=>t("contact-info",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.Trash2,label:"Limpar conversa",destructive:true,onClick:o=>t("clear",o)}))),H1=({icon:e,label:t,onClick:o,destructive:r})=>Q__namespace.default.createElement("button",{onClick:o,className:`w-full flex justify-start items-center gap-3 p-3 rounded-lg hover:bg-accent transition-colors text-left ${r?"text-destructive":""}`},Q__namespace.default.createElement(e,{className:"w-5 h-5"}),Q__namespace.default.createElement("span",null,t));var sk=({chat:e,onAction:t,asPage:o})=>{let{t:r}=Oe();return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(G1,{icon:lucideReact.Pin,onClick:n=>t("pin",n)},e?.isPinned?r("remove-pin-chat"):r("pin-chat")),o?null:Q__namespace.default.createElement(G1,{icon:lucideReact.Archive,onClick:n=>t("archive",n)},e?.isArchived?r("unarchive-chat"):r("archive-chat")),Q__namespace.default.createElement(G1,{icon:lucideReact.Star,onClick:n=>t("favorite",n)},e?.isFavorite?r("remove-from-favorites"):r("add-to-favorites")),Q__namespace.default.createElement(G1,{icon:lucideReact.BellOff,onClick:n=>t("mute",n)},e?.isMuted?r("unsilence-chat"):r("mute-chat")),Q__namespace.default.createElement(K3,{className:"bg-[#E4EBF1]"}),e?.isGroup?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(G1,{icon:lucideReact.Info,onClick:n=>t("group-info",n)},r("group-info")),Q__namespace.default.createElement(G1,{icon:lucideReact.LogOut,destructive:true,onClick:n=>t("exit-group",n)},r("leave-group"))):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(G1,{icon:lucideReact.User,onClick:n=>t("contact-info",n)},r("contact-info")),Q__namespace.default.createElement(G1,{icon:lucideReact.Trash2,destructive:true,onClick:n=>t("clear",n)},r("clear-chat"))))},G1=({icon:e,children:t,onClick:o,destructive:r})=>Q__namespace.default.createElement(Gl,{onClick:o,className:`cursor-pointer bg-white hover:bg-[#F8FAFC] outline-none focus:outline-none ${r?"text-[#EF4444]":""}`},Q__namespace.default.createElement(e,{className:"w-4 h-4 mr-2"}),t);var bre=({onClose:e,onConfirm:t,isGroup:o,isDeletingTheConversation:r})=>Q__namespace.default.createElement("div",{className:"flex flex-col mt-6 items-center text-center"},Q__namespace.default.createElement("div",{className:"w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center mb-6"},Q__namespace.default.createElement(lucideReact.AlertCircle,{className:"w-8 h-8 text-red-500"})),Q__namespace.default.createElement("h2",{className:"text-xl font-semibold text-[#050505] mb-2"},o?"Voc\xEA quer sair este grupo?":"Voc\xEA quer excluir esta conversa?"),Q__namespace.default.createElement("p",{className:"text-sm text-[#687588] mb-8"},o?"Se sair do grupo, perder\xE1 as mensagens do grupo.":"Essa conversa ser\xE1 permanentemente eliminada."),Q__namespace.default.createElement("div",{className:"flex gap-3 w-full max-w-[20rem]"},Q__namespace.default.createElement(X,{onClick:e,disabled:r,className:"w-full border p-3 border-primary bg-white text-primary font-medium text-[0.875rem]",label:"Cancelar"}),Q__namespace.default.createElement(X,{onClick:()=>{t(),e();},disabled:r,isLoading:r,className:"w-full border p-3 border-primary bg-primary text-white font-medium text-[0.875rem]",label:o?"Sair do grupo":"Excluir"}))),xre=({isOpen:e,onClose:t,onConfirm:o,isGroup:r,isDeletingTheConversation:n})=>Q__namespace.default.createElement(Jr,{className:"w-[23rem] !max-h-[23rem] !rounded-md",isOpen:e,disableFullScreen:true,onClose:t,isLoading:n,closeOnClickOutside:false,showCloseButton:!n},Q__namespace.default.createElement("div",{className:"sm:max-w-md p-0 overflow-hidden"},Q__namespace.default.createElement(bre,{onClose:t,onConfirm:o,isDeletingTheConversation:n,isGroup:r}))),ik=xre;var M6=({chat:e,onGroupInfo:t,onContactInfo:o,asMessageHeader:r,onBack:n,onCloseConversation:a,asPage:s})=>{let[i,l]=Q.useState(false),d=Bs(),{handleDropdownAction:c,isModalOpen:p,closeModal:m,confirmDelete:u,isDeletingAConversation:f}=nk({chat:e,onGroupInfo:t,onContactInfo:o,onBack:n,onCloseConversation:a,asPage:s}),g=(y,b)=>{b.stopPropagation(),c(y,b),l(false);},h=Q__namespace.default.createElement("div",{className:E("p-1.5 rounded-full hover:bg-muted flex-shrink-0 cursor-pointer focus:outline-none focus:ring-0",{"opacity-100":r||d,"opacity-0 group-hover:opacity-100 transition-opacity":!r&&!d}),onClick:y=>{y.stopPropagation(),l(true);}},Q__namespace.default.createElement(lucideReact.MoreVertical,{className:E("w-4 h-4",{"text-[#687588]":!r,"text-dark-1":r})})),v=Q__namespace.default.createElement(ik,{isOpen:p,onClose:m,onConfirm:u,isGroup:!!e?.isGroup,isDeletingTheConversation:f});return d?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(yo,{open:i,onOpenChange:l},Q__namespace.default.createElement(Yu,{asChild:true},h),Q__namespace.default.createElement(qr,{className:"z-[9999999]"}),Q__namespace.default.createElement(bo,{className:"bg-white w-full h-auto rounded-t-lg p-0 z-[9999999]"},Q__namespace.default.createElement("div",{className:"p-4 space-y-1"},Q__namespace.default.createElement(ak,{chat:e,onAction:g})))),v):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(lc,{open:i,onOpenChange:l},Q__namespace.default.createElement(cc,{asChild:true,onClick:y=>{y.stopPropagation(),l(true);}},h),Q__namespace.default.createElement(dc,{align:"end",className:"w-48 bg-white z-[9999999] border border-[#E4EBF1] shadow-lg focus:outline-none focus:ring-0"},Q__namespace.default.createElement(sk,{asPage:s,chat:e,onAction:g}))),v)};var Pre=({chat:e,isActive:t,onClick:o,onGroupInfo:r,onContactInfo:n,isCompactMode:a=false,onBack:s,onCloseConversation:i,asPage:l})=>{let{onlineUsers:d}=$t(),{user:c}=w(),p=Q.useMemo(()=>!e?.participants||e?.isGroup||!c?.id?false:e?.participants?.some(m=>m?.userId&&m.userId!==c.id&&!!d[m.userId]),[e?.participants,e?.isGroup,d,c?.id]);return Q__namespace.default.createElement("button",{onClick:o,className:E("w-full flex items-center rounded-xl transition-all duration-200 animate-fade-in group focus:outline-none focus:ring-0",a?"gap-2 p-1.5":"gap-3 p-3",t?"bg-primary/10":"hover:bg-primary/10")},Q__namespace.default.createElement("div",{className:"relative flex-shrink-0"},Q__namespace.default.createElement(J,{name:e?.name,src:e?.avatar,size:a?"sm":"md"}),!e?.isGroup&&Q__namespace.default.createElement("div",{className:E("absolute bottom-0 right-0 rounded-full border-2 border-card",a?"w-2 h-2":"w-3 h-3",p?"bg-primary":"bg-gray-400")})),Q__namespace.default.createElement(ok,{chat:e,isCompactMode:a}),!a&&Q__namespace.default.createElement(M6,{chat:e,onGroupInfo:r,onContactInfo:n,onBack:s,asPage:l,onCloseConversation:i}))},lk=Pre;var ck=({leftVisible:e,rightVisible:t,leftProgress:o,rightProgress:r,showInfoButton:n,confirmDelete:a,onAction:s,maxSwipe:i})=>Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement("div",{className:"absolute inset-y-0 left-0 flex z-0",style:{width:i}},Q__namespace.default.createElement("div",{className:`flex h-full transition-opacity ${e?"pointer-events-auto":"pointer-events-none"}`,style:{opacity:e?1:0}},Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("archive");},className:"h-full px-4 rounded-none bg-gray-500 flex items-center justify-center",style:{transform:`scale(${.85+o*.15})`}},Q__namespace.default.createElement(lucideReact.Archive,{className:"w-5 h-5 text-white"})),Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("pin");},className:"h-full px-4 rounded-l bg-blue-500 flex items-center justify-center",style:{transform:`scale(${.75+o*.25})`}},Q__namespace.default.createElement(lucideReact.Pin,{className:"w-5 h-5 text-white"})),n&&Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("info");},className:"h-full px-4 bg-purple-500 flex items-center justify-center",style:{transform:`scale(${.75+o*.25})`}},Q__namespace.default.createElement(lucideReact.Info,{className:"w-5 h-5 text-white"})))),Q__namespace.default.createElement("div",{className:"absolute inset-y-0 right-0 flex justify-end z-0",style:{width:i}},Q__namespace.default.createElement("div",{className:`flex h-full transition-opacity ${t?"pointer-events-auto":"pointer-events-none"}`,style:{opacity:t?1:0}},Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("mute");},className:"h-full px-4 rounded-r-none bg-gray-500 flex items-center justify-center",style:{transform:`scale(${.75+r*.25})`}},Q__namespace.default.createElement(lucideReact.BellOff,{className:"w-5 h-5 text-white"})),Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("favorite");},className:"h-full px-4 rounded-l-none bg-primary flex items-center justify-center",style:{transform:`scale(${.75+r*.25})`}},Q__namespace.default.createElement(lucideReact.Star,{className:"w-5 h-5 text-white"})),Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("delete");},className:`h-full px-4 flex items-center justify-center transition-colors ${a?"bg-red-700":"bg-destructive"}`},Q__namespace.default.createElement(lucideReact.Trash2,{className:"w-5 h-5 text-white"})))));var dk=({chat:e,onInfo:t,reset:o,confirmDelete:r,setConfirmDelete:n})=>{let a=lo("pinned"),s=lo("archived"),i=lo("favorites"),l=lo("muted");return {handleAction:c=>{if(c==="info"){t&&t(e.id),o();return}if(c==="delete"&&!r){n(true);return}c==="delete"&&console.log("DELETE",e.id),c==="archive"&&s.mutate({conversationId:e.id,value:true}),c==="pin"&&a.mutate({conversationId:e.id,value:!e.isPinned}),c==="mute"&&l.mutate({conversationId:e.id,value:!e.isMuted}),c==="favorite"&&i.mutate({conversationId:e.id,value:!e.isFavorite}),n(false),o();}}};var pk=180,Dre=120,mk=100,Lre=15,Fre=({chat:e,isActive:t,onClick:o,onInfo:r,onGroupInfo:n,onBack:a,onCloseConversation:s,isCompactMode:i=false,asPage:l})=>{let{offset:d,animating:c,onStart:p,onMove:m,onEnd:u,reset:f}=RE(pk,Dre),[g,h]=Q.useState(false),{handleAction:v}=dk({chat:e,onInfo:r,reset:f,confirmDelete:g,setConfirmDelete:h}),y=d>30,b=d<-30,x=Math.min(1,d/mk),C=Math.min(1,-d/mk),M=e.isGroup&&r;return Q__namespace.default.createElement("div",{className:"relative overflow-hidden rounded-xl mb-1"},Q__namespace.default.createElement(ck,{leftVisible:y,rightVisible:b,leftProgress:x,rightProgress:C,showInfoButton:M,confirmDelete:g,chat:e,onAction:v,maxSwipe:pk}),Q__namespace.default.createElement("div",{className:`relative z-10 transition-transform ${c?"duration-200 ease-out":"duration-0"}`,style:{transform:`translateX(${d}px)`},onTouchStart:A=>p(A.touches[0].clientX,A.touches[0].clientY),onTouchMove:A=>m(A.touches[0].clientX,A.touches[0].clientY),onTouchEnd:u,onTouchCancel:f,onMouseLeave:f,onClick:()=>{Math.abs(d)>Lre?f():o();}},Q__namespace.default.createElement(lk,{onGroupInfo:n,onContactInfo:r,chat:e,isActive:t,onClick:()=>{},isCompactMode:i,onBack:a,asPage:l,onCloseConversation:s})))},uk=Fre;var fk=()=>Q__namespace.default.createElement("div",{className:"space-y-1"},[...Array(8)].map((e,t)=>Q__namespace.default.createElement("div",{key:t,className:"flex items-center justify-between gap-3 p-3 rounded-xl animate-pulse"},Q__namespace.default.createElement(Tt,{className:"w-12 h-12 rounded-full flex-shrink-0 bg-gray-300"}),Q__namespace.default.createElement("div",{className:"flex-1 min-w-0 space-y-2"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between"},Q__namespace.default.createElement(Tt,{className:"h-4 w-24 bg-gray-300"}),Q__namespace.default.createElement(Tt,{className:"h-3 w-10 bg-gray-300"})),Q__namespace.default.createElement("div",{className:"flex items-center gap-1.5"},Q__namespace.default.createElement(Tt,{className:"h-3 w-2 rounded-full bg-gray-300"}),Q__namespace.default.createElement(Tt,{className:"h-3 w-32 bg-gray-300"}))),t%3===0&&Q__namespace.default.createElement(Tt,{className:"w-3.5 h-3.5 rounded-full flex-shrink-0 bg-gray-300"})))),gk=({isCompactMode:e=false})=>Q__namespace.default.createElement("div",{className:` ${e?"w-24 h-24":"w-32 h-32"} rounded-full bg-gray-100 flex items-center justify-center mb-4`},Q__namespace.default.createElement("div",{className:` ${e?"w-16 h-16":"w-24 h-24"} rounded-full bg-gray-200 flex items-center justify-center`},Q__namespace.default.createElement("svg",{className:` ${e?"w-8 h-8":"w-12 h-12 "} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Q__namespace.default.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})))),Bre=({isCompactMode:e})=>{let{t}=Oe();return Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center py-12 px-4"},Q__namespace.default.createElement("div",{className:`${e?"w-16 h-16":"w-24 h-24 "} rounded-full bg-gray-100 flex items-center justify-center mb-4 `},Q__namespace.default.createElement("svg",{className:` text-gray-400 ${e?"w-8 h-8":"w-12 h-12"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Q__namespace.default.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))),Q__namespace.default.createElement("h3",{className:` ${e?"text-sm":"text-lg "} text-center font-medium text-gray-900 mb-2`},t("no-conversations-found")),e?null:Q__namespace.default.createElement("p",{className:"text-sm text-gray-500 text-center max-w-xs mb-6"},t("try-different-keywords")))},Ure=({isCompactMode:e})=>{let{t}=Oe();return Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center py-12 px-4"},Q__namespace.default.createElement(gk,{isCompactMode:e}),Q__namespace.default.createElement("h3",{className:` ${e?"text-sm":"text-lg"} font-medium text-center text-gray-900 mb-2`},t("no-conversations-available")),e?null:Q__namespace.default.createElement("p",{className:"text-sm text-gray-500 text-center max-w-xs mb-6"},t("start-a-new-conversation-to-start-messaging")))},Hre=({onNewChat:e,isCompactMode:t})=>{let{t:o}=Oe();return Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center py-12 px-4"},Q__namespace.default.createElement(gk,{isCompactMode:t}),Q__namespace.default.createElement("h3",{className:` ${t?"text-sm":"text-lg"} font-medium text-gray-900 mb-2`},o("no-conversations-yet")),t?null:Q__namespace.default.createElement("p",{className:"text-sm text-gray-500 text-center max-w-xs mb-6"},o("start-a-new-conversation-to-start-messaging")),Q__namespace.default.createElement("button",{onClick:e,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors"},Q__namespace.default.createElement("span",{className:` ${t?"text-xs":"text-sm"} flex items-center gap-2`},Q__namespace.default.createElement(lucideReact.PlusIcon,{className:"w-4 h-4"}),o("new-conversation"))))},ch=Q.forwardRef(({chats:e,selectedChatId:t,onChatSelect:o,onGroupInfo:r,onContactInfo:n,isLoading:a,isFetchingNextPage:s,searchQuery:i,chatForPage:l=false,isCompactMode:d=false,onNewChat:c,onBack:p,onCloseConversation:m},u)=>{let{isChatVisible:f}=Om(),{locale:g}=w(),h=i.trim().length>0,v=(e?.length===0||!e)&&!a;return Q__namespace.default.createElement("div",{ref:u,className:"flex-1 overflow-y-auto min-h-0"},a&&!h&&e?.length===0?Q__namespace.default.createElement(fk,null):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,a&&h?Q__namespace.default.createElement(fk,null):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,e?.map(y=>Q__namespace.default.createElement(uk,{key:y?.id,chat:y,asPage:l,isActive:t===y?.id,onClick:()=>{if(l){o(y?.id);return}d?(l6(y?.id),window.dispatchEvent(new CustomEvent("openChat",{detail:{open:true,sendMessageToPage:false,pendingChatId:y?.id}})),window.dispatchEvent(new CustomEvent("selectChatFromCompact",{detail:{chatId:y?.id}}))):f?o(y?.id):(l6(y?.id),window.dispatchEvent(new CustomEvent("openChat",{detail:{open:true,sendMessageToPage:false,pendingChatId:y?.id}})));},onInfo:()=>{if(y?.participants?.length!==2)return;if(l)return window.open(`/profile/${g}/${y?.slug}`,"_blank");let b=y?.participants?.some(x=>x?.page?.id);n(y?.slug??"",b);},onGroupInfo:r,isCompactMode:d,onBack:p,onCloseConversation:m})),s&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-4"},Q__namespace.default.createElement(he,{className:"w-5 h-5 text-gray-400"})),v&&Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center"},h?Q__namespace.default.createElement(Bre,{isCompactMode:d}):l?Q__namespace.default.createElement(Ure,null):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(Hre,{onNewChat:c,isCompactMode:d}))))))});ch.displayName="ChatListContent";function Us(e="",t=500){let[o,r]=Q.useState(e),n=usehooks.useDebounce(o,t);return {value:o,setValue:s=>{r(s);},debouncedSearchTerm:n}}function hk(){let[e,t]=Q.useState("about"),[o,r]=Q.useState(false),[n,a]=Q.useState(false),[s,i]=Q.useState("");return {activeTab:e,setActiveTab:t,showAddMembers:o,setShowAddMembers:r,isAdding:n,setIsAdding:a,memberSearchQuery:s,setMemberSearchQuery:i}}var Kre=({currentMembers:e=[],contacts:t=[],onBack:o,onAddMembers:r,isAdding:n,fetchNextPage:a,hasNextPage:s,isFetchingNextPage:i,onSearchQuery:l,searchQuery:d=""})=>{let{t:c}=Oe(),[p,m]=Q.useState([]),[u,f]=Q.useState("all"),[g,h]=Q.useState(false),v=Q.useRef(null),y=Q.useRef(null);Q.useEffect(()=>{y.current?.focus();},[]);let b=Q__namespace.default.useMemo(()=>{let T=t?.filter(z=>!e?.includes(z?.id)&&(z?.name?.toLowerCase().includes(d?.toLowerCase())||z?.email?.toLowerCase().includes(d?.toLowerCase())||z?.phone?.includes(d)))||[];return u==="mutual"&&(T=T.filter(z=>(z.mutualConnections??0)>0),T.sort((z,F)=>(F.mutualConnections??0)-(z.mutualConnections??0))),T},[t,e,d,u]),x=Q.useCallback(()=>{let T=v.current;if(!T||!a||!s||i)return;let{scrollTop:z,scrollHeight:F,clientHeight:B}=T;F-z-B<=100&&a();},[a,s,i]);Q.useEffect(()=>{let T=v.current;if(T)return T.addEventListener("scroll",x),()=>T.removeEventListener("scroll",x)},[x]);let C=t?.filter(T=>p.includes(T?.id))||[],M=T=>{m(z=>z.includes(T)?z.filter(F=>F!==T):[...z,T]);},A=T=>{m(z=>z.filter(F=>F!==T));},P=()=>{p.length>0&&r?.(p);},S=()=>{l(""),y.current?.focus();},I=()=>{let T=b.map(z=>z.id);m(T);},H=()=>{m([]);},L=p.length;return Q__namespace.default.createElement("div",{className:"flex flex-col h-[35.938rem] bg-white rounded-[1rem] w-full border-border overflow-hidden"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement("button",{onClick:o,className:"p-0 w-8 h-8 rounded-lg flex items-center justify-center hover:bg-accent transition-colors","aria-label":"Voltar"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-muted-foreground"})),Q__namespace.default.createElement("h1",{className:"text-body-lg font-semibold text-foreground"},c("add-members"))),Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement(oe,{variant:"outline",size:"sm",onClick:o,className:"rounded-[10px] text-sm h-8 px-4 py-6 border-primary text-primary"},c("cancel")),Q__namespace.default.createElement(oe,{size:"sm",onClick:P,disabled:L===0||n,className:"rounded-[10px] text-sm h-8 px-4 py-6 min-w-[120px]"},n?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(lucideReact.Loader2,{className:"w-3 h-3 mr-2 animate-spin"}),c("adding")):`${c("add")} (${L})`))),Q__namespace.default.createElement("div",{className:"flex-1 flex flex-col overflow-hidden"},C?.length>0&&Q__namespace.default.createElement("div",{className:"px-4 pt-4 pb-3 rounded-md border-b border-border shrink-0 bg-primary/5"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-3"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-foreground"},C.length," ",C.length===1?c("selected-member"):c("selected-members")),Q__namespace.default.createElement("button",{onClick:H,className:"text-xs text-red-500 hover:text-foreground transition-colors"},c("clear-selection"))),Q__namespace.default.createElement("div",{className:"flex items-center gap-0 -space-x-3 overflow-hidden pb-1"},C.slice(0,5).map((T,z)=>Q__namespace.default.createElement("div",{key:T?.id||z,className:"relative"},Q__namespace.default.createElement(J,{className:"w-10 h-10 border-2 border-white shadow-sm",name:T?.name??"",src:T?.avatar??""}),Q__namespace.default.createElement("button",{onClick:()=>A(T?.id||""),className:"absolute -top-1 -right-1 w-5 h-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-md hover:bg-red-600","aria-label":`Remover ${T?.name}`},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3"})))),C.length>5&&Q__namespace.default.createElement("div",{className:"w-10 h-10 flex items-center justify-center rounded-full bg-primary text-primary-foreground text-xs font-semibold border-2 border-white shadow-sm"},"+",C.length-5))),Q__namespace.default.createElement("div",{className:"px-4 pt-4 pb-3 border-b border-border shrink-0"},Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),Q__namespace.default.createElement(kr,{ref:y,placeholder:c("search-placeholder"),value:d,onChange:T=>l(T.target.value),className:"h-10 pl-10 pr-10 rounded-xl bg-input border-0 text-sm"}),d&&Q__namespace.default.createElement("button",{onClick:S,className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full hover:bg-accent flex items-center justify-center transition-colors","aria-label":"Limpar pesquisa"},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3 text-muted-foreground"})))),Q__namespace.default.createElement("div",{className:"px-4 py-3 border-b border-border shrink-0 bg-gray-50"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between"},Q__namespace.default.createElement("div",{className:"text-sm text-muted-foreground"},b?.length||0," ",b?.length===1?c("user-available"):c("users-available")),b?.length>0&&L<b.length&&Q__namespace.default.createElement("button",{onClick:I,className:"text-xs text-primary hover:text-primary/80 font-medium transition-colors"},c("select-all")))),Q__namespace.default.createElement("div",{ref:v,className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"px-4 py-3"},b?.length===0&&!i?Q__namespace.default.createElement("div",{className:"text-center py-12"},Q__namespace.default.createElement("div",{className:"w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center mx-auto mb-4"},Q__namespace.default.createElement(lucideReact.UserPlus,{className:"w-8 h-8 text-muted-foreground/50"})),Q__namespace.default.createElement("p",{className:"text-sm font-medium text-foreground mb-1"},c(d?"no-contact-found":"no-contact-available")),Q__namespace.default.createElement("p",{className:"text-xs text-muted-foreground"},c(d?"try-different-search":"all-contacts-in-group"))):Q__namespace.default.createElement("div",{className:"space-y-4"},b?.map(T=>{let z=p.includes(T?.id||"");return Q__namespace.default.createElement("button",{key:T?.id,onClick:()=>M(T?.id||""),className:E("w-full flex items-center gap-3 p-3 rounded-xl transition-all",z?"bg-primary/10 ring-2 ring-primary/20":"hover:bg-accent")},Q__namespace.default.createElement(J,{className:"w-11 h-11 shrink-0",name:T?.name??"",src:T?.avatar??""}),Q__namespace.default.createElement("div",{className:"flex-1 text-left min-w-0"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-foreground truncate"},T?.name),T?.subtitle&&Q__namespace.default.createElement("p",{className:"text-xs text-muted-foreground truncate"},T.subtitle),T?.mutualConnections&&T.mutualConnections>0&&Q__namespace.default.createElement("p",{className:"text-xs text-primary mt-0.5 flex items-center gap-1"},Q__namespace.default.createElement(lucideReact.Users,{className:"w-3 h-3"}),T.mutualConnections," ",T.mutualConnections===1?c("mutual-connection"):c("mutual-connections"))),Q__namespace.default.createElement(b6,{checked:z,className:"rounded-md shrink-0 p-2"}))}),i&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-6"},Q__namespace.default.createElement(lucideReact.Loader2,{className:"w-5 h-5 animate-spin text-primary"})))))))},wk=Kre;function Ck({name:e,onClose:t,isMobile:o}){return Q__namespace.default.createElement("div",{className:E("flex items-center justify-between px-4 py-4",o?"border-[#F6F6F6]":"border-gray-200")},o&&Q__namespace.default.createElement("button",{onClick:t,"aria-label":"Fechar"},Q__namespace.default.createElement(lucideReact.X,{className:"h-6 w-6"})),Q__namespace.default.createElement("h2",{className:E("font-bold",o?"text-lg":"text-xl","text-[#050910]")},e),o&&Q__namespace.default.createElement("div",{className:"w-6"}))}function Mk({activeTab:e,setActiveTab:t,membersCount:o,onTabChange:r}){let{t:n}=Oe();return Q__namespace.default.createElement("div",{className:"flex border-b border-gray-200 items-center justify-center"},Q__namespace.default.createElement("span",{role:"button",onClick:()=>{t("about"),r();},className:E("px-4 py-3 text-sm font-medium transition whitespace-nowrap",e==="about"?"text-primary border-b-[2px] border-primary":"text-gray-600 hover:text-gray-900")},n("about")),Q__namespace.default.createElement("span",{role:"button",onClick:()=>t("members"),className:E("flex-1 py-3 text-sm font-medium transition",e==="members"?"text-primary border-b-[2px] border-primary":"text-gray-600 hover:text-gray-900")},n("members")," (",o,")"))}function Pk({name:e,image:t,description:o,creatorName:r,createdAt:n,conversationId:a,currentUserRole:s,onDescriptionUpdate:i}){let{t:l}=Oe();return Q__namespace.default.createElement("div",{className:"p-6 flex flex-col gap-6"},t&&Q__namespace.default.createElement("div",{className:"flex justify-center"},Q__namespace.default.createElement(J,{name:e||l("about.group"),src:t,className:"w-24 h-24 rounded-2xl shadow-md"})),Q__namespace.default.createElement("div",null,Q__namespace.default.createElement("h3",{className:"font-semibold text-sm mb-2 text-gray-900"},l("about.description")),Q__namespace.default.createElement("p",{className:"text-gray-600 text-sm leading-relaxed"},o||l("about.description"))),r&&Q__namespace.default.createElement("div",null,Q__namespace.default.createElement("h3",{className:"font-semibold text-sm mb-2 text-gray-900"},l("about.created-by")),Q__namespace.default.createElement("p",{className:"text-gray-600 text-sm"},`${r} ${l("about.created-at")} ${tk(n)}`)))}function N6(e){return {hasAdminPermissions:e==="OWNER"||e==="ADMIN",isCreator:e==="OWNER"}}function Sk(e,t){return Q.useMemo(()=>t?e?.filter(o=>{let r=o?.users?.[0],n=o?.page;return (r?.name||n?.name||"")?.toLowerCase()?.includes(t?.toLowerCase())})||[]:e||[],[e,t])}function Nk({hasAdminPermissions:e,membersCount:t,memberSearchQuery:o,setMemberSearchQuery:r,onAddMembersClick:n}){let{t:a}=Oe();return Q__namespace.default.createElement("div",{className:"px-4 pt-4 pb-3 shrink-0 space-y-2"},e&&Q__namespace.default.createElement("button",{onClick:n,className:"w-full flex items-center justify-center gap-2 p-3 rounded-xl border-2 border-dashed border-gray-300 hover:border-primary hover:bg-primary/5 transition text-sm font-medium text-gray-700 hover:text-primary"},Q__namespace.default.createElement(lucideReact.UserPlus,{className:"w-5 h-5"}),a("add-members")),t>5&&Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),Q__namespace.default.createElement(kr,{placeholder:a("search-members-placeholder"),value:o,onChange:s=>r(s.target.value),className:"h-12 pl-10 pr-10 rounded-xl bg-gray-50 border-0 text-sm"}),o&&Q__namespace.default.createElement("button",{onClick:()=>r(""),className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full hover:bg-accent flex items-center justify-center transition-colors","aria-label":a("clear-search")},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3 text-muted-foreground"}))))}function Ak({displayName:e,isCurrentUser:t,isOwner:o,isAdmin:r}){let{t:n}=Oe();return Q__namespace.default.createElement("div",{className:"min-w-0 flex-1"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2 flex-wrap"},Q__namespace.default.createElement("p",{className:"font-semibold text-sm text-gray-900 truncate"},e),t&&Q__namespace.default.createElement("span",{className:"text-xs text-gray-500 shrink-0"},"(",n("you-label"),")"),(o||r)&&Q__namespace.default.createElement("span",{className:E("px-2 py-[2px] rounded-full text-[10px] font-bold shrink-0",o?"bg-yellow-100 text-yellow-800":"bg-blue-100 text-blue-700")},n(o?"owner":"admin"))))}var Ek=(e,t)=>{let{user:o,chatApiUrl:r,queryClient:n}=w(),a=f=>{f&&n?.invalidateQueries({queryKey:["conversation",f]}),n?.invalidateQueries({queryKey:["conversations",o?.id]});},{mutate:s,isPending:i}=ne({mutationFn:async f=>!t||!r?null:(await c7.request(r,lC,{input:{userId:f,conversationId:t}},{"x-access-token":o?.accessToken??""}))?.makeGroupAdmin,onSuccess:()=>{a(t);},onError:()=>{a(t);}}),{mutate:l,isPending:d}=ne({mutationFn:async f=>!t||!r?null:(await c7.request(r,iC,{input:{conversationId:t,participantId:f}},{"x-access-token":o?.accessToken??""}))?.deleteParticipantGroup,onSuccess:()=>{a(t);},onError:()=>{a(t);}});return {handleMakeAdmin:f=>{f&&s(f);},handleRemoveAdmin:f=>{f&&s(f);},handleRemoveMember:(f,g)=>{if(!(!f||!g)){if(g==="OWNER")return alert("O propriet\xE1rio do grupo n\xE3o pode ser removido.");if(g==="ADMIN"&&e!=="OWNER")return alert("Apenas o propriet\xE1rio pode remover administradores.");l([f]);}},handleStartChat:f=>{},isMakingAdmin:i,isRemovingParticipant:d}};function Rre(e){return Q__namespace.createElement("svg",{width:20,height:20,fill:"none",...e},Q__namespace.createElement("path",{opacity:.4,d:"M10.018 1.666c-4.842 0-8.35 3.95-8.35 8.333 0 1.4.408 2.842 1.125 4.159.133.216.15.491.058.75l-.558 1.866c-.125.45.258.784.683.65l1.684-.5c.458-.15.816.042 1.242.3 1.217.717 2.733 1.084 4.1 1.084 4.133 0 8.333-3.192 8.333-8.334 0-4.433-3.584-8.308-8.317-8.308z",fill:"#687588"}),Q__namespace.createElement("path",{d:"M6.14 8.941c.592 0 1.068.475 1.068 1.067 0 .583-.476 1.059-1.067 1.067a1.075 1.075 0 01-1.067-1.067c0-.592.475-1.066 1.067-1.067zm3.842 0c.592 0 1.068.475 1.068 1.067a1.07 1.07 0 01-1.068 1.067A1.076 1.076 0 018.916 10c0-.583.483-1.067 1.066-1.059zm3.842 0c.592 0 1.066.475 1.067 1.067a1.07 1.07 0 01-1.067 1.067 1.07 1.07 0 01-1.066-1.067c0-.592.475-1.066 1.066-1.067z",fill:"#687588"}))}var ene=Q__namespace.memo(Rre),kk=ene;function Tk({participant:e,isCurrentUser:t,hasAdminPermissions:o,isCreator:r,isMember:n,isAdmin:a,isOwner:s,memberActions:i,currentUserRole:l}){let {t:d}=Oe(),p=l==="OWNER",m=o&&n,u=p&&a,f=()=>s||t?false:a?p:o&&n;return Q__namespace.default.createElement("div",{className:"flex items-center gap-2 shrink-0 ml-4"},!o&&!t&&Q__namespace.default.createElement("button",{onClick:()=>i.handleStartChat(e?.id??void 0),className:"p-2 text-xs text-primary hover:bg-primary/10 hover:text-white transition","aria-label":d("start-chat")},Q__namespace.default.createElement(kk,{className:"w-5 h-5"})),m&&Q__namespace.default.createElement("button",{onClick:()=>{let g=e.users?.[0]?.id??e.userId??void 0;i.handleMakeAdmin(g);},className:"p-2 text-xs text-primary hover:bg-primary hover:text-white transition","aria-label":d("make-admin")},Q__namespace.default.createElement(lucideReact.UserRoundPlus,{className:"w-5 h-5"})),u&&Q__namespace.default.createElement("button",{onClick:()=>{let g=e.users?.[0]?.id??e.userId??void 0;i.handleRemoveAdmin(g);},className:"p-2 text-xs text-orange-600 hover:bg-orange-600 hover:text-white transition","aria-label":d("remove-admin")},Q__namespace.default.createElement(lucideReact.UserRoundMinus,{className:"w-5 h-5"})),f()&&Q__namespace.default.createElement("button",{onClick:()=>i.handleRemoveMember(e?.id??void 0,e?.role??void 0),className:"p-2 text-xs text-red-600 hover:bg-red-600/10 hover:text-white transition","aria-label":d("remove")},Q__namespace.default.createElement(Wn,{className:"w-5 h-5"})))}function Dk({participant:e,currentUserId:t,currentUserRole:o,conversationId:r}){let{t:n}=Oe(),{hasAdminPermissions:a,isCreator:s}=N6(o),i=Ek(o,r),l=e.users?.[0],d=e.page,c=l?.name||d?.name||n("unknown"),p=l?.avatar||d?.logo,m=l?.slug||d?.slug,u=e.role==="OWNER",f=e.role==="ADMIN",g=e.role==="MEMBER",h=l?.id===t;return Q__namespace.default.createElement("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-xl hover:bg-gray-50 transition group"},Q__namespace.default.createElement("button",{onClick:()=>{m&&window.open(`/profile/pt/${m}`,"_blank");},className:"flex items-center gap-3 min-w-0 text-left flex-1"},Q__namespace.default.createElement(J,{name:c,src:p??"",className:"w-11 h-11 ring-2 ring-white shadow-sm shrink-0",type:"user"}),Q__namespace.default.createElement(Ak,{displayName:c,isCurrentUser:h,isOwner:u,isAdmin:f})),Q__namespace.default.createElement(Tk,{participant:e,isCurrentUser:h,hasAdminPermissions:a,isCreator:s,isMember:g,isAdmin:f,isOwner:u,memberActions:i,currentUserRole:o}))}function Lk({filteredParticipants:e,currentUserId:t,currentUserRole:o,memberSearchQuery:r,conversationId:n}){let{t:a}=Oe();return e.length===0?Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"p-4"},Q__namespace.default.createElement("div",{className:"text-center py-8"},Q__namespace.default.createElement("p",{className:"text-sm text-gray-500"},a(r?"no-members-found":"no-members-in-group"))))):Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"p-4"},Q__namespace.default.createElement("div",{className:"flex flex-col gap-2"},e?.map(s=>Q__namespace.default.createElement(Dk,{key:s.id,participant:s,currentUserId:t,currentUserRole:o,conversationId:n})))))}function Ok({filteredCount:e,totalCount:t}){let{t:o}=Oe();return Q__namespace.default.createElement("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200"},Q__namespace.default.createElement("p",{className:"text-xs text-gray-600"},e===1?`${e} ${o("member-found")} ${o("members-found-count")} ${t}`:`${e} ${o("members-found")} ${o("members-found-count")} ${t}`))}function zk({participant:e,currentUserId:t,currentUserRole:o,memberSearchQuery:r,setMemberSearchQuery:n,onAddMembersClick:a,conversationId:s}){let{hasAdminPermissions:i}=N6(o),l=Sk(e,r),d=e?.length||0;return Q__namespace.default.createElement("div",{className:"flex flex-col h-full"},Q__namespace.default.createElement(Nk,{hasAdminPermissions:i,membersCount:d,memberSearchQuery:r,setMemberSearchQuery:n,onAddMembersClick:a}),r&&Q__namespace.default.createElement(Ok,{filteredCount:l.length,totalCount:d}),Q__namespace.default.createElement(Lk,{filteredParticipants:l,currentUserId:t,currentUserRole:o,memberSearchQuery:r,conversationId:s}))}function mh({participant:e,name:t,description:o,image:r,createdAt:n,creatorName:a,currentUserId:s,currentUserRole:i,activeTab:l,setActiveTab:d,showAddMembers:c,memberSearchQuery:p,setMemberSearchQuery:m,searchQuery:u,onSearchQuery:f,contacts:g,isAdding:h,fetchNextPage:v,hasNextPage:y,isFetchingNextPage:b,onAddMembersClick:x,onConfirmAddMembers:C,onBackFromAddMembers:M,onClose:A,isMobile:P,conversationId:S}){let I=e?.length||0;if(c){let H=e?.map(L=>L.users?.[0]?.id).filter(Boolean);return Q__namespace.default.createElement(wk,{searchQuery:u,onSearchQuery:f,currentMembers:H,contacts:g,onBack:M,onAddMembers:C,isAdding:h,fetchNextPage:v,hasNextPage:y,isFetchingNextPage:b})}return Q__namespace.default.createElement("div",{className:E("flex flex-col",l==="about"?"h-full":"h-[35.938rem]")},Q__namespace.default.createElement(Ck,{name:t,onClose:A,isMobile:P}),Q__namespace.default.createElement(Mk,{activeTab:l,setActiveTab:d,membersCount:I,onTabChange:()=>m("")}),Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto"},l==="about"?Q__namespace.default.createElement(Pk,{name:t,image:r,description:o,creatorName:a,createdAt:n,conversationId:S,currentUserRole:i}):Q__namespace.default.createElement(zk,{participant:e,currentUserId:s,currentUserRole:i,memberSearchQuery:p,setMemberSearchQuery:m,onAddMembersClick:x,conversationId:S})))}var Bk=c7.gql`
2921
+ `;i(R,{onSuccess(le){F("description",le);}});};return Q__namespace.default.createElement("form",{onSubmit:z,className:"flex flex-col gap-[1rem] overflow-y-auto"},Q__namespace.default.createElement("span",{className:"text-body-md font-bold md:text-[1.25rem] text-[#111827]"},m),Q__namespace.default.createElement(uI,{initialUrl:B("slug"),onChange:N=>{F("slug",N);}}),Q__namespace.default.createElement("div",{className:"flex flex-col md:flex-row gap-[1rem]"},Q__namespace.default.createElement(et,{disabled:G,onChange:N=>{let U=N.target.value,q=Mte__default.default(U,{lower:true,trim:false,replacement:"-"});F("name",U),F("slug",q);},error:T?.name?.message?.length?ve(r,`${T?.name?.message}`):"",value:B("name"),className:"w-full bg-white h-12",placeholder:C}),Q__namespace.default.createElement(et,{disabled:G,onChange:N=>F("site",N.target.value),error:T?.site?.message?.length?ve(r,`${T?.site?.message}`):"",value:B("site")??"",className:" bg-white h-12",placeholder:"Website"})),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2 md:flex-row items-start md:items-center justify-between"},Q__namespace.default.createElement("span",{className:"text-body-sm md:text-[0.875rem] font-normal text-[#111827]"},g,Q__namespace.default.createElement("span",{className:"text-red-600"},"*")),Q__namespace.default.createElement("div",{className:"flex items-center gap-x-[1rem]"},Q__namespace.default.createElement(y4,{isSelected:B("isAcademic")===true,onSelect:()=>F("isAcademic",true),label:H}),Q__namespace.default.createElement(y4,{label:v,onSelect:()=>F("isAcademic",false),isSelected:B("isAcademic")===false}))),T?.isAcademic?.message?.length&&Q__namespace.default.createElement("p",{className:"text-red-shade6 text-body-sm"},ve(r,`${T?.isAcademic?.message}`)),Q__namespace.default.createElement("div",{className:"flex flex-col md:flex-row items-stretch gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(et,{type:"number",min:1800,disabled:G,error:T?.foundedYear?.message?.length?ve(r,`${T?.foundedYear?.message}`):"",onChange:N=>F("foundedYear",parseInt(N.target.value)),value:B("foundedYear")?.toString(),className:"bg-white h-12",placeholder:f})),Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(_p,{options:L,className:"h-12",placeholder:A,disabled:G,isLoading:k,onSearch:N=>{a(N);},onChange:N=>{F("sector.id",N?.id??"");},error:T?.sector?.message?.length?ve(r,`${T?.sector?.message}`):"",value:B("sector.id"),required:true,enableSearch:true,floattable:true}))),Q__namespace.default.createElement("div",{className:"flex flex-col md:flex-row items-stretch gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(_p,{disabled:G,options:[{id:"MICRO",label:"1\u201310",value:"1-10"},{id:"SMALL",label:"11\u201350",value:"11\u201350"},{id:"MEDIUM",label:"51\u2013200",value:"51\u2013200"},{id:"LARGE",label:"201\u2013500",value:"201\u2013500"},{id:"ENTERPRISE",label:"500\u20131000",value:"500\u20131000"},{id:"HUGE",label:"+1000",value:"+1000"}],error:T?.organizationSize?.message?.length?ve(r,`${T?.organizationSize?.message}`):"",className:"h-12",placeholder:y,required:true,onChange:N=>F("organizationSize",N?.id??""),value:B("organizationSize"),enableSearch:false,floattable:true})),Q__namespace.default.createElement("div",{className:"w-full md:w-1/2"},Q__namespace.default.createElement(_p,{disabled:G,options:x,className:"h-12",placeholder:b,onChange:N=>F("organizationType",N?.id??""),error:T?.organizationType?.message?.length?ve(r,`${T?.organizationType?.message}`):"",value:B("organizationType"),required:true,enableSearch:true,floattable:true}))),Q__namespace.default.createElement(fI,{disabled:G||l,className:E("!p-2 w-full",d),placeholder:I,renderButton:Q__namespace.default.createElement(hI,{onClick:D,disabled:G||l}),maxLength:140,onChange:N=>F("description",N),value:B("description")??"",error:T?.description?.message?.length?ve(r,`${T?.description?.message}`):""}),Q__namespace.default.createElement("div",{className:"w-full flex items-start gap-x-2"},Q__namespace.default.createElement(Zo,{disabled:G,isChecked:B("termsAccepted"),onClick:()=>F("termsAccepted",!B("termsAccepted"))}),Q__namespace.default.createElement("span",{className:"flex flex-col text-body-sm md:text-[0.875rem]"},Q__namespace.default.createElement("span",null,u+" ",M+" ",P+" ",Q__namespace.default.createElement("a",{target:"_blank",href:"/terms-companies",className:"text-primary cursor-pointer hover:underline"},S+" "),h))),!o&&Q__namespace.default.createElement("div",{className:"w-full flex gap-x-4 justify-between"},Q__namespace.default.createElement(X,{type:"button",disabled:G,className:"w-full p-3 bg-white border border-primary !text-primary font-bold text-body-sm md:text-[1rem]",onClick:t,label:c}),Q__namespace.default.createElement(X,{type:"submit",isLoading:G,disabled:!B("termsAccepted")||G,className:"w-full p-3 bg-primary !text-white font-bold text-body-sm md:text-[1rem]",label:p})))}function Ste(e){return Q__namespace.createElement("svg",{width:266,height:167,fill:"none",...e},Q__namespace.createElement("path",{d:"M92.068 10.15c0 4.177 6.696 7.564 2.037 7.564-4.66 0-8.437-3.387-8.437-7.564 0-4.178 3.777-7.564 8.436-7.564 4.66 0-2.036 3.386-2.036 7.564zM158.23 6.5l1.132 3.484h3.664l-2.964 2.154 1.132 3.484-2.964-2.153-2.964 2.153 1.132-3.484-2.964-2.154h3.664L158.23 6.5z",fill:"#FE964A"}),Q__namespace.createElement("path",{d:"M34.378 80.156s10.748-5.353 13.186-2.547c1.34 1.541 2.351 3.409 1.152 4.925-.925 1.17-2.26 1.319-3.825 1.044-3.312-.582-3.262-5.182-1.932-8.031 1.836-3.934 11.582-1.612 11.582-1.612",stroke:"#0BA259",strokeWidth:2.017}),Q__namespace.createElement("circle",{cx:229.219,cy:74.789,r:5.883,fill:"#FFEDEC"}),Q__namespace.createElement("path",{d:"M56.047 136.492l.837-7.22 5.835 3.7.666-6.057 5.322 3.667 1.658-6.548",stroke:"#2F78EE",strokeWidth:1.681}),Q__namespace.createElement("path",{d:"M193.302 22.43s-.818-4.862 1.53-5.83c1.973-.814 3.683 2.785 5.304 1.48 1.642-1.322-2.457-3.416-1.122-4.997 1.405-1.664 5.916 0 5.916 0",stroke:"#2F78EE",strokeWidth:2.017}),Q__namespace.createElement("path",{d:"M32.956 15.136l21.606 10.757-5.4 7.364-16.206-18.12z",fill:"#2F78EE"}),Q__namespace.createElement("circle",{cx:224.346,cy:94.81,r:2.521,fill:"#FFEDEC"}),Q__namespace.createElement("path",{d:"M200.116 128.002c2.771.279 5.465-3.937 5.154-.846-.311 3.091-2.81 5.37-5.581 5.091-2.771-.279-4.765-3.01-4.454-6.101.311-3.091 2.11 1.577 4.881 1.856z",fill:"#2F78EE"}),Q__namespace.createElement("path",{d:"M209.108 39.492l1.886 5.808h6.107l-4.94 3.589 1.887 5.807-4.94-3.59-4.94 3.59 1.886-5.807-4.94-3.59h6.107l1.887-5.807z",fill:"#0BA259"}),Q__namespace.createElement("rect",{x:82.801,y:26.328,width:100,height:100,rx:50,fill:"#0B89CE"}),Q__namespace.createElement("g",{filter:"url(#prefix__filter0_d_60588_61009)"},Q__namespace.createElement("rect",{x:102.801,y:46.328,width:60,height:60,rx:30,fill:"#fff",shapeRendering:"crispEdges"}),Q__namespace.createElement("path",{d:"M127.34 88.328l-4.073-2.905 5.85-7.407-9.144-2.723 1.555-4.684 8.995 3.123-.222-9.404h5.035l-.222 9.404 8.959-3.123 1.555 4.684-9.107 2.723 5.775 7.407-4.072 2.905-5.405-7.697-5.479 7.697z",fill:"#0B89CE"})),Q__namespace.createElement("defs",null,Q__namespace.createElement("filter",{id:"prefix__filter0_d_60588_61009",x:62.801,y:26.328,width:140,height:140,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},Q__namespace.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),Q__namespace.createElement("feColorMatrix",{in:"SourceAlpha",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),Q__namespace.createElement("feOffset",{dy:20}),Q__namespace.createElement("feGaussianBlur",{stdDeviation:20}),Q__namespace.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),Q__namespace.createElement("feColorMatrix",{values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"}),Q__namespace.createElement("feBlend",{in2:"BackgroundImageFix",result:"effect1_dropShadow_60588_61009"}),Q__namespace.createElement("feBlend",{in:"SourceGraphic",in2:"effect1_dropShadow_60588_61009",result:"shape"}))))}var Nte=Q__namespace.memo(Ste),PI=Nte;function SI({companyId:e,handleCreatePage:t}){let{locale:o}=w(),r=ve(o,"congratulations.title"),n=ve(o,"congratulations.description"),a=ve(o,"congratulations.button");return Q__namespace.default.createElement("div",{className:"flex flex-col items-center justify-center gap-[1rem]"},Q__namespace.default.createElement(PI,null),Q__namespace.default.createElement("span",{className:"font-bold text-body-sm md:text-[2rem] text-[#111827]"},r),Q__namespace.default.createElement("span",{className:"text-center font-normal text-body-sm md:text-[0.875rem] text-[#687588]"},n),Q__namespace.default.createElement(Xr,{onClick:()=>{if(t?.(),e?.length){be(),window.location.href=`/company/${o}/${e}`;return}},className:"w-full p-2 md:p-3 font-bold text-body-sm md:text-[1rem]"},Q__namespace.default.createElement("span",{className:"text-white"},a)))}function II({onClose:e}){let[t,o]=Q.useState("create-company-page"),[r,n]=Q.useState("");return {actualStepComponent:[{id:"create-company-page",component:Q__namespace.default.createElement(e6,{onCancel:()=>{o("create-company-page"),e?.();},onNextStep:i=>{n(i??""),o("congratulations");}}),className:"bg-[linear-gradient(180deg,_#DEF3FF_0%,_#FCFEFF_100%)] max-h-full"},{id:"congratulations",component:Q__namespace.default.createElement(SI,{companyId:r,handleCreatePage:()=>{o("create-company-page"),e?.();}}),className:""}]?.find(i=>i.id===t)}}function EI({isOpen:e,onClose:t}){let{isMobile:o}=ft(),{actualStepComponent:r}=II({onClose:t});return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,o?Q__namespace.default.createElement(qn,{onClose:t,isOpen:e,className:"bg-[linear-gradient(180deg,_#DEF3FF_0%,_#FCFEFF_100%)]"},Q__namespace.default.createElement(e6,{onCancel:t})):Q__namespace.default.createElement(_e,{hideCloseButton:true,isOpen:e,onClose:t,closeOnClickOutside:false,disableFullScreen:true,className:E("w-[20.938rem] md:w-[31.25rem] mt-4 !rounded-[1rem] p-[1.5rem] md:p-[2rem]",r?.className)},r?.component))}function Ate(e){return Q__namespace.createElement("svg",{width:18,height:18,fill:"none",...e},Q__namespace.createElement("path",{d:"M16.031 9a.843.843 0 01-.843.844H9.843v5.344a.844.844 0 11-1.688 0V9.843H2.812a.844.844 0 010-1.688h5.344V2.812a.844.844 0 111.688 0v5.344h5.344A.844.844 0 0116.03 9z",fill:"#0B89CE"}))}var Ite=Q__namespace.memo(Ate),kI=Ite;function TI(){let{locale:e,user:t}=w(),[o,r]=usehooks.useToggle(false),n=ve(e,"my-pages.title"),a=ve(e,"create-button-label");return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement("div",{className:"w-full flex items-center justify-between"},Q__namespace.default.createElement("span",{className:"font-bold w-full text-[1.25rem] text-[#050910]"},n),Q__namespace.default.createElement(X,{onClick:()=>{if(t&&!t.isActive){r(true);return}setTimeout(()=>{window.dispatchEvent(new CustomEvent("openCreateCompanyModal"));},800);},rightElement:Q__namespace.default.createElement(kI,null),className:"bg-[#0B89CE1A] flex gap-x-[1.5rem] text-primary !w-[8.875rem] p-[0.5rem] rounded-full",label:a})),Q__namespace.default.createElement(Ao,{isOpen:o,onClose:()=>r(false)}))}function DI(){let{locale:e}=w(),t=ve(e,"my-pages.recruit-now"),o=ve(e,"my-pages.recruit-now-description"),r=ve(e,"my-pages.recruit-now-publish-job");return Q__namespace.default.createElement("div",{className:"w-full rounded-[0.5rem] border border-[#E4EBF1] overflow-hidden"},Q__namespace.default.createElement("div",{className:"w-full h-[4.5rem] rounded-t-[0.5rem] bg-cover bg-center",style:{backgroundImage:"url('https://iili.io/FPF7K1R.png')",backgroundColor:"#eee"}}),Q__namespace.default.createElement("div",{className:"w-full p-4 flex flex-col gap-[0.625rem]"},Q__namespace.default.createElement("img",{src:"https://iili.io/FPFeWG4.png",loading:"lazy",className:"w-8 -mt-8 rounded-full h-8"}),Q__namespace.default.createElement("span",{className:"text-[0.875rem] font-medium"},t),Q__namespace.default.createElement("span",{className:"text-body-sm font-normal text-[#A0AEC0]"},o),Q__namespace.default.createElement(X,{disabled:true,label:r,className:"w-full rounded-[0.5rem] p-[0.5rem] bg-[#0B89CE0D] text-body-sm font-bold text-primary "})))}var LI=()=>{let{user:e,locale:t}=w(),o=`/profile/${t}`,{meta:r,isGettingContacts:n}=da({sort:"created_at",sortDir:"desc",perPage:1}),{meta:a,isGettingFollowers:s}=Cc({sort:"created_at",sortDir:"desc",perPage:1}),{meta:i,isGettingFollowing:l}=Mc({sort:"created_at",sortDir:"desc",perPage:1}),d=c=>{c.preventDefault(),be(),window.location.href=o;};return Q__namespace.default.createElement("div",{className:"w-full h-[364px] border rounded-[1rem] border-[#E4EBF1] bg-white shadow-sm p-4 flex flex-col justify-between items-center"},Q__namespace.default.createElement("div",{className:"w-full flex items-center flex-col mt-6 gap-2"},e?Q__namespace.default.createElement("a",{href:o,"aria-label":"Ir para o perfil",onClick:d},Q__namespace.default.createElement(J,{src:e?.avatar??"",name:e?.name??"",className:"w-20 h-20 rounded-full object-cover border-2 border-[#F7A700] cursor-pointer",type:"user"})):Q__namespace.default.createElement(Tt,{className:"w-20 h-20 rounded-full"})),Q__namespace.default.createElement("div",{className:"mt-8 text-center"},e?Q__namespace.default.createElement("a",{href:o,className:"block",onClick:d},Q__namespace.default.createElement("h2",{className:"text-lg font-bold text-black hover:underline"},e?.name),Q__namespace.default.createElement("p",{className:"text-[#687588] text-[14px]"},Bt(e?.headline??"",30))):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(Tt,{className:"w-32 h-5 mx-auto"}),Q__namespace.default.createElement(Tt,{className:"w-20 h-4 mx-auto mt-2"}))),Q__namespace.default.createElement("div",{className:"mt-4"},e?Q__namespace.default.createElement("button",{type:"button",className:"flex items-center h-[43px] gap-1 px-4 py-2 bg-[#0CAF6033] text-[#0CAF60] rounded-lg text-sm font-medium"},"Aberto a oportunidades ",Q__namespace.default.createElement(lucideReact.ChevronDown,{size:16})):Q__namespace.default.createElement(Tt,{className:"w-44 h-[43px] rounded-lg"})),Q__namespace.default.createElement("div",{className:"mb-6 flex justify-between w-full pt-4"},Q__namespace.default.createElement("div",{className:"flex flex-col items-center flex-1"},Q__namespace.default.createElement("div",{className:"h-6 flex items-center justify-center"},n?Q__namespace.default.createElement(he,{className:"w-2 h-2"}):Q__namespace.default.createElement("span",{className:"font-semibold text-gray-800"},r?.total??0)),Q__namespace.default.createElement("span",{className:"text-xs text-gray-500"},pe(t,"component.workspace.user.contacts"))),Q__namespace.default.createElement("div",{className:"flex flex-col items-center flex-1 border-l border-gray-200"},Q__namespace.default.createElement("div",{className:"h-6 flex items-center justify-center"},l?Q__namespace.default.createElement(he,{className:"w-2 h-2"}):Q__namespace.default.createElement("span",{className:"font-semibold text-gray-800"},i?.total??0)),Q__namespace.default.createElement("span",{className:"text-xs text-gray-500"},pe(t,"component.workspace.user.following"))),Q__namespace.default.createElement("div",{className:"flex flex-col items-center flex-1 border-l border-gray-200"},Q__namespace.default.createElement("div",{className:"h-6 flex items-center justify-center"},s?Q__namespace.default.createElement(he,{className:"w-2 h-2"}):Q__namespace.default.createElement("span",{className:"font-semibold text-gray-800"},a?.total??0)),Q__namespace.default.createElement("span",{className:"text-xs text-gray-500"},pe(t,"component.workspace.user.followers")))))};function FI(){return Q__namespace.default.createElement("aside",{className:"w-[20.688rem] flex flex-col gap-[2rem] h-full"},Q__namespace.default.createElement(LI,null),Q__namespace.default.createElement(DI,null))}function Tte(e){return Q__namespace.createElement("svg",{width:16,height:16,fill:"none",...e},Q__namespace.createElement("path",{d:"M14 3v7.5a.5.5 0 01-.172.375c-.955.827-1.869 1.125-2.74 1.125-1.181 0-2.285-.546-3.312-1.053-1.66-.822-3.102-1.534-4.776-.211V13.5a.5.5 0 01-1 0V3a.5.5 0 01.173-.375c2.25-1.949 4.27-.95 6.05-.07 1.714.849 3.201 1.583 4.95.07A.5.5 0 0114 3z",fill:"#0B89CE"}))}var Dte=Q__namespace.memo(Tte),OI=Dte;var zI=({avatars:e,followersCount:t=0})=>{let r=e.filter(a=>a&&a.trim()!=="").slice(0,4),n=t>r.length;return r.length===0?Q__namespace.default.createElement("div",{className:"flex items-center"},Q__namespace.default.createElement("div",{className:"relative ml-6 h-5 w-5"})):Q__namespace.default.createElement("div",{className:"flex items-center"},Q__namespace.default.createElement("div",{className:"relative ml-6 h-5",style:{paddingLeft:`${r.length*8}px`}},r.map((a,s)=>Q__namespace.default.createElement("img",{key:s,src:a,alt:`Follower ${s+1}`,className:"w-5 h-5 rounded-full border-2 border-white absolute",style:{right:`${s*12}px`,zIndex:s},onError:i=>{i.target.src=`https://i.pravatar.cc/20?img=${s+1}`;}}))),n&&Q__namespace.default.createElement("span",{className:"ml-2 text-body-sm text-primary font-medium"},"+",t-r.length))};function BI({logo:e="https://iili.io/FPFeWG4.png",name:t,sector:o,slug:r,followers:n,followersCount:a}){let {locale:s,user:i,environment:l}=w(),{userLocation:d}=Jo(),{registerEvent:c}=Qo(),p=ve(s,"my-pages.switch");ve(s,"my-pages.followers-label");let u=`/company/${s}/${r}`;return Q__namespace.default.createElement("div",{className:"w-[16.688rem] card-hover p-[1rem] flex flex-col gap-[1rem] rounded-lg border border-[#E4EBF1] hover:shadow-md hover:border-primary/20 transition-all duration-300 ease-in-out"},Q__namespace.default.createElement("a",{href:u,"aria-label":`Ir para a p\xE1gina ${t}`,onClick:f=>{f.preventDefault(),be();let g=navigator.userAgent,h=/Chrome/.test(g)&&!/Edg|OPR/.test(g)?"Chrome":/Firefox/.test(g)?"Firefox":/Safari/.test(g)&&!/Chrome/.test(g)?"Safari":/Edg/.test(g)?"Edge":/OPR/.test(g)?"Opera":"Unknown",v=(g.match(/(Chrome|Firefox|Version|Edg|OPR)\/(\d+)/)||[])[2]||"Unknown",y=/Windows/.test(g)?"Windows":/Mac OS/.test(g)?"macOS":/Linux/.test(g)?"Linux":/Android/.test(g)?"Android":/iPhone|iPad|iOS/.test(g)?"iOS":"Unknown",b=/iPhone/.test(g)?"iPhone":/iPad/.test(g)?"iPad":/Android/.test(g)?"Android Device":"Desktop";c({input:{actor:{user_id:i?.id??""},source:{app:"mirantes-web",environment:l,platform:"web",version:"1.0.0"},context:{browser:{name:h,version:v},country:d?.country_name??"",device:{model:b,os:y},locale:s,referrer:document.referrer||"",route:u,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone},events:[{event_id:uuid.v4(),event_type:"PAGE_VIEW",occurred_at:new Date,metadata:{label:t,slug:r,elementId:`page-card-${r}`,navigationType:"card_click",interactionType:"user_click",isExternal:u.startsWith("http"),timestamp:new Date().toISOString(),followersCount:a,sector:o}}]}},{onSettled(){be(),window.location.href=u;},onError(){be(),window.location.href=u;},onSuccess(){be(),window.location.href=u;}});},className:"flex flex-col gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full flex gap-[0.5rem] items-center"},Q__namespace.default.createElement(J,{name:t??"",className:"w-10 h-10",src:e,type:"page"}),Q__namespace.default.createElement("span",{className:"font-bold text-[#050910] line-clamp-2 flex-shrink truncate"},t)),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),Q__namespace.default.createElement("div",{className:"p-[0.2rem] flex items-center gap-x-2 bg-[#0B89CE0D] w-fit rounded-full"},Q__namespace.default.createElement(OI,null),Q__namespace.default.createElement("span",{className:"text-body-sm text-primary font-medium line-clamp-2 flex-shrink truncate"},o)),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),(a??0)>0&&Q__namespace.default.createElement("div",{className:"w-full flex items-center gap-x-2"},Q__namespace.default.createElement(zI,{avatars:[...(n?.user||[]).map(f=>f?.avatar),...(n?.page||[]).map(f=>f?.logo)].filter(Boolean).map(f=>f||`https://i.pravatar.cc/20?img=${Math.floor(Math.random()*70)+1}`),followersCount:a}))),Q__namespace.default.createElement("a",{href:u,onClick:f=>{f.preventDefault(),be(),window.location.href=u;}},Q__namespace.default.createElement(X,{label:p,className:"bg-[#0B89CE1A] text-primary font-bold w-full rounded-[0.5rem] hover:bg-[#0B89CE33] transition-colors duration-300"})))}function UI(){return Q__namespace.default.createElement("div",{className:"w-[16.688rem] p-[1rem] flex flex-col gap-[1rem] rounded-lg border border-[#E4EBF1]"},Q__namespace.default.createElement("div",{className:"flex flex-col gap-[1rem]"},Q__namespace.default.createElement("div",{className:"w-full flex gap-[0.5rem] items-center"},Q__namespace.default.createElement("div",{className:"w-10 h-10 bg-gray-200 rounded-full animate-pulse"}),Q__namespace.default.createElement("div",{className:"h-5 bg-gray-200 rounded w-24 animate-pulse"})),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),Q__namespace.default.createElement("div",{className:"p-[0.2rem] flex items-center gap-x-2 bg-[#0B89CE0D] w-fit rounded-full"},Q__namespace.default.createElement("div",{className:"w-4 h-4 bg-gray-200 rounded animate-pulse"}),Q__namespace.default.createElement("div",{className:"h-4 bg-gray-200 rounded w-20 animate-pulse"})),Q__namespace.default.createElement("div",{className:"w-full h-[1px] bg-[#E9EFF6]"}),Q__namespace.default.createElement("div",{className:"w-full flex items-center gap-x-2"},Q__namespace.default.createElement("div",{className:"flex -space-x-2"},Array.from({length:3}).map((e,t)=>Q__namespace.default.createElement("div",{key:t,className:"w-6 h-6 bg-gray-200 rounded-full border-2 border-white animate-pulse"}))),Q__namespace.default.createElement("div",{className:"h-4 bg-gray-200 rounded w-12 animate-pulse"}))),Q__namespace.default.createElement("div",{className:"w-full h-10 bg-gray-200 rounded-[0.5rem] animate-pulse"}))}var Fte=()=>Q__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 500"},Q__namespace.createElement("defs",null,Q__namespace.createElement("clipPath",{id:"freepik--clip-path--inject-63"},Q__namespace.createElement("path",{fill:"none",d:"M55.67 159h230v228h-230z"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-2--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M224.07 184.9s25.61 30.42 31 36 5.59 9.63 3.85 12.13-14.82 7.13-28.3 15.79-51.8 31-52.18 31.78-4.05-27-4.05-27l64.12-26.38-.19-1.93-20.8-38.51Z"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-3--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M157.76 389.39c10.46-1.76 23.86-8.95 27.85-18-3-15.69-6.79-37.79-6.79-51.31 0-22.72 6-35.62 3.27-51s-8.47-25.41-14.63-29.46c0 0-9.43 2.5-19.06 11.55s-18.1 24.61-21.4 39.44-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.73-.38"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-4--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M179.78 214.93s.58 7.51 1.16 11.17-8.47 13.9-8.47 13.9l13.09 19.83 14.83-11.55s21-1.54 22.91-3.28 1.93-20.79 1.93-20.79l5-2.89s-4.62-20-5.77-24.46l-1.16-4.42s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57 57 0 0 0 7.12 7.81"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-5--inject-63"},Q__namespace.createElement("path",{fill:"#0B89CE",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-6--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m173 232.65 19.26 29.27-8.86 11.36a224 224 0 0 0-13.28-22.34c-6.55-9.24-7.32-10.78-7.32-10.78Z"})),Q__namespace.createElement("clipPath",{id:"freepik--clip-path-7--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M167.85 296.77s-5.59-23.3-7.9-28.5-15.4-10-21.76 1.35-.58 24.26 1.74 33.5 16.94 51 19.06 56.23 6 4 8.09 3.47 60.65-47.76 60.65-47.76l-4.62-10.39L177.67 328Z"}))),Q__namespace.createElement("g",{id:"freepik--background-simple--inject-63"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M429.84 253.51c-3.39-27-11.87-53.07-22-71.76-24.47-44.91-92.64-74.95-144-67.18-43.81 6.62-64.86 46.59-104.36 60.46-36.34 12.76-69.06 22.61-86.19 56.28C37 302.43 125.71 380.18 201.74 374.12c24-1.92 45.44-11.15 70.07-6.82 50 8.79 66.6 18.24 110.76.66 43.51-17.33 53.2-67.22 47.27-114.45"}),Q__namespace.createElement("path",{fill:"#fff",d:"M429.84 253.51c-3.39-27-11.87-53.07-22-71.76-24.47-44.91-92.64-74.95-144-67.18-43.81 6.62-64.86 46.59-104.36 60.46-36.34 12.76-69.06 22.61-86.19 56.28C37 302.43 125.71 380.18 201.74 374.12c24-1.92 45.44-11.15 70.07-6.82 50 8.79 66.6 18.24 110.76.66 43.51-17.33 53.2-67.22 47.27-114.45",opacity:"0.8"})),Q__namespace.createElement("g",{id:"freepik--Device--inject-63"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m254.91 389.43-42.65-95.5h103.35L443.06 378"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m244.33 385.67-32.07-85.37v-6.37l45.37 99.95z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m271.35 297.88 43.96 51.53-53.36 12.43-30.32-57.6z"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M261.95 361.84v1.52l52.45-10.61.91-3.34z"}),Q__namespace.createElement("path",{fill:"#263238",d:"m269.69 316.42 2.25 3.32 5.72-1.55-2.38-3.24zM291.34 336.73l-2.72-3.68-6.5 1.75 2.54 3.76zM265.02 309.5l1.67 2.48 5.38-1.37-1.69-2.3zM275.38 324.83l3.08 4.56 6.29-1.59-3.4-4.61zM291.67 326.97l-5.39 1.37 2.7 3.66 5.49-1.48zM279.01 330.19l2.57 3.82 6.46-1.75-2.71-3.68zM258.93 310.85l1.66 2.68 5.16-1.32-1.69-2.5zM272.47 320.53l2.38 3.51 5.92-1.64-2.53-3.43zM267.23 312.77l1.92 2.85 5.54-1.46-2.04-2.77zM255.59 319.2l-1.68-3.03-6.13 1.56 1.71 3.08zM246.78 326.53l4.21-1.13-1.95-3.52-4.14 1.09zM257.11 307.91l1.31 2.12 5.09-1.13-1.37-2.02zM253.45 315.34l-1.62-2.92-6.23 1.37 1.72 3.11zM251.06 309.14l1.24 2.24 5.18-1.14-1.33-2.14zM242.35 318.17l4.06-1.04-1.74-3.13-4.05.89zM243.84 310.62l1.3 2.34 6.23-1.37-1.25-2.26zM263.41 318.08l2.1 3.39 5.5-1.48-2.25-3.32zM277.53 329.63l-3.07-4.54-5.73 1.58 2.78 4.49zM252.76 312.21l1.6 2.9 5.3-1.35-1.67-2.7zM253.96 330.74l-4.32 1.19 2.24 4.23 4.45-1.13zM266.01 322.28l2.22 3.58 5.69-1.56-2.37-3.52zM261.99 317.52l-1.83-2.95-5.34 1.36 1.68 3.04zM272.02 348.87l-6.11 1.56 2.18 3.93 6.13-1.51zM262.56 305.87l5.23-1.07-2.81-3.82-5.15.85zM249.66 308.5l-2.53-4.57-6.41 1.06 2.66 4.8zM257.98 323.51l-1.93-3.49-6.1 1.61 1.95 3.52zM273.55 336.18l-2.46-3.97-6.36 1.62 2.28 4.12zM270.59 331.4l-2.78-4.48-5.99 1.65 2.45 4.43zM280.65 334.26l-2.58-3.83-6.06 1.54 2.46 3.96zM264.59 321.72l-2.1-3.4-5.54 1.47 1.93 3.47zM261.09 314.34l1.82 2.93 5.31-1.4-1.93-2.86zM267.31 326.12l-2.22-3.59-5.76 1.55 2.04 3.68zM283.74 338.82l-2.55-3.76-6.22 1.68 2.37 3.83zM279.63 345.99l-2.71-4.37-6.84 1.88 2.4 4.31zM259.13 340.08l-2.34-4.23-4.47 1.14 2.28 4.32zM251.45 326.22l-4.23 1.14 1.99 3.75 4.29-1.18zM271.56 348.05l-2.38-4.31-6.06 1.66 2.33 4.2zM260.46 328l-2.03-3.67-6.08 1.64 2.06 3.71zM263.11 306.68l1.36 2.01 5.32-1.18-1.41-1.91zM240.18 314.06l4.03-.89-1.3-2.36-4.02.82zM256.59 307.08l5-1.02-2.75-4.07-4.9.81zM250.6 308.31l5.05-1.03-2.68-4.32-4.89.81zM248.59 321.06l-1.72-3.1-4.08 1.04 1.67 3.14zM268.77 304.6l4.52-.93-2.84-3.59-4.47.73zM242.44 309.98l-2.68-4.84-3.96.66 2.65 4.99zM265 350.66l-4.8 1.22 2.08 3.92 4.9-1.21zM287.81 344.84l-6.76 1.72 2.47 3.99 6.98-1.73zM280.13 346.8l-7.2 1.83 2.21 3.99 7.45-1.84zM295.81 342.8l-7.06 1.8 2.69 3.99 7.31-1.81zM302.76 341.03l-6 1.53 2.95 3.99 6.2-1.54zM262.22 345.65l-4.65 1.27 2.19 4.14 4.78-1.22zM276.42 340.82l-2.37-3.83-6.58 1.78 2.16 3.91zM287.27 344.04l-3-4.43-6.43 1.76 2.71 4.38zM268.73 342.92l-2.17-3.91-6.07 1.65 2.18 3.92zM257.14 346.1l4.63-1.27-2.18-3.93-4.55 1.23zM263.36 333.24l-2.44-4.42-6.06 1.67 2.38 4.3zM295.23 342.01l-3.31-4.49-6.72 1.84 3.01 4.44zM266.11 338.19l-2.29-4.13-6.12 1.56 2.34 4.22zM282.29 322.93l3.41 4.62 5.35-1.36-3.68-4.66zM275.64 313.91l4.74-1.25-2.13-2.69-4.64 1.18zM271.36 308.1l1.66 2.26 4.62-1.17-1.67-2.11zM302.14 340.25l-3.58-4.55-5.7 1.56 3.32 4.51zM276.22 314.7l2.39 3.23 4.88-1.32-2.5-3.17zM289.56 332.79l2.72 3.69 5.67-1.55-2.87-3.63zM270.76 307.3l4.59-1.01-1.43-1.82-4.55.93zM281.71 322.15l5.05-1.4-2.65-3.36-4.92 1.33z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M322.28 303.64v8.18a16 16 0 0 1-2.73 2.12c-1.51.91-13.94 3-13.94 3l15.76 17.29s14.45-1.58 18.5-2.73c4.24-1.22 3.33-16.68 3.33-16.68Z"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M322.28 303.64v8.18s-.22.22-.58.54l18.43 19.06c3.94-1.77 3.07-16.57 3.07-16.57Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M294.39 199.04v86.71l66.09 52.14v-134z"}),Q__namespace.createElement("path",{fill:"#0B89CE",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M298.94 203.59v73.06l55.48 34.26V208.44z"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M360.48 203.89h6.67v134.03h-6.67z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m302.58 208.14.3 65.18 46.38 26.37v-80.71l-31.83-4.82-2.12-4.51z"}),Q__namespace.createElement("path",{fill:"#0B89CE",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M305.61 216.02v55.48l40.93 21.83V223.3z"}),Q__namespace.createElement("ellipse",{cx:"324.72",cy:"255.73",fill:"#263238",rx:"11.03",ry:"15.2",transform:"rotate(-18.56 324.813 255.777)"}),Q__namespace.createElement("path",{fill:"#fff",d:"m325.92 256.67 3.89-4.31a2.21 2.21 0 0 0-.07-2.59c-.58-.83-1.49-1-2-.41l-3.74 4.15-3.75-6c-.54-.87-1.45-1.14-2-.6a2.11 2.11 0 0 0-.08 2.55l3.89 6.25-3.96 4.29a2.2 2.2 0 0 0 .08 2.59 1.68 1.68 0 0 0 1 .73 1 1 0 0 0 1-.32l3.75-4.15 3.74 6a1.8 1.8 0 0 0 1.06.84 1 1 0 0 0 1-.24 2.12 2.12 0 0 0 .07-2.55Z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m312.88 234.82 22.92 6.73M311.97 228.45l29.71 8.29"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M332.45 371.31s-14.49 1.34-19.85 5.63-1.34 6.44 3.75 7.78 27.9-.81 30.85-3.76 0-10.19-14.75-9.65"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M347.2 381a3.46 3.46 0 0 0 1-2.12c-6.49-.32-15 1.56-22.73 4a81 81 0 0 1-7.94 2.09c6.74.81 26.91-1.25 29.67-3.97"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"m281.08 212.16 10.59 5.51M275 209l3.15 1.64M283.41 239.92l3.59.41M269.67 238.33l9.68 1.12M285.67 265.67l-12 3.33"})),Q__namespace.createElement("g",{id:"freepik--Clock--inject-63"},Q__namespace.createElement("path",{fill:"#263238",d:"M270.18 119a28.7 28.7 0 1 0 28.7 28.7 28.7 28.7 0 0 0-28.7-28.7m0 51.76a23.06 23.06 0 1 1 23.07-23.06 23.05 23.05 0 0 1-23.07 23.09Z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M272.23 147.73a2.05 2.05 0 1 1-2.05-2 2.05 2.05 0 0 1 2.05 2"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"m263.31 158.14 6.87-10.41 11.61 9.61"})),Q__namespace.createElement("g",{id:"freepik--file-cabinet--inject-63"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"m117.88 169.73-3.45-9.43 1.84 2.07v-3.22l3.91 5.98-3.45-21.39 4.6 11.73.46-10.35.69 3.45.92-11.73 1.61 17.94 2.3-6.21-.46 8.05 6.21-18.4-2.99 23 4.37-3.22-2.53 4.14 3.22-2.3-3.67 10.58-13.35.23"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M132.64 192.96h-14.38l-3.88-24.92h22.13z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M99.42 192.79h72.59V385.9H99.42z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M103.64 199.13h63.43v46.51h-63.43z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M122.67 218.16h25.37v8.46h-25.37z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M103.64 253.4h63.43v46.51h-63.43z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M122.67 272.43h25.37v8.46h-25.37z"}),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",d:"M103.64 307.66h63.43v46.51h-63.43z"}),Q__namespace.createElement("path",{fill:"#263238",d:"M122.67 326.69h25.37v8.46h-25.37z"})),Q__namespace.createElement("g",{id:"freepik--Character--inject-63",clipPath:"url(#freepik--clip-path--inject-63)"},Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M179.79 374.88s36.38-16.07 55.94-17.28L250 389.13H142.22Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M224.07 184.9s25.61 30.42 31 36 5.59 9.63 3.85 12.13-14.82 7.13-28.3 15.79-51.8 31-52.18 31.78-4.05-27-4.05-27l64.12-26.38-.19-1.93-20.8-38.51Z"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-2--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M248.72 229.8 219 186.4l-1.43.42 20.8 38.51.19 1.93-64.12 26.38s.07.48.17 1.29l4.18 9.59Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M248.72 229.8 219 186.4l-1.43.42 20.8 38.51.19 1.93-64.12 26.38s.07.48.17 1.29l4.18 9.59Z",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M224.07 184.9s25.61 30.42 31 36 5.59 9.63 3.85 12.13-14.82 7.13-28.3 15.79-51.8 31-52.18 31.78-4.05-27-4.05-27l64.12-26.38-.19-1.93-20.8-38.51Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M203.66 171.61s-3.08-2.7-4.62 0-1.73 7.12-.77 7.51 4.81-.19 5.39-1.35 0-6.16 0-6.16"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M209.05 170.26s-3.27-3.46-5.39-2.12-1.54 8.67-.77 9.25 5.39-1 6-1.93.16-5.2.16-5.2"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M216.37 170.45s-2.89-4-5.58-4-4.63 9.63-3.66 10.4 7.31-.19 7.7-.77a52 52 0 0 0 1.54-5.63"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M222 177c0-1.15-.57-11.17-4-10.59s-7.12 8.67-6.93 10S222 177 222 177M238.51 227.26s9.82 3.66 13.48 3.46"}),Q__namespace.createElement("path",{fill:"#fff",d:"M157.76 389.39c10.46-1.76 23.86-8.95 27.85-18-3-15.69-6.79-37.79-6.79-51.31 0-22.72 6-35.62 3.27-51s-8.47-25.41-14.63-29.46c0 0-9.43 2.5-19.06 11.55s-18.1 24.61-21.4 39.44-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.73-.38"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-3--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M185.61 371.38c-5.86 5-32.25 14.71-36.1 15.57s-1.71-7.28 4.28-15.41-7.28 3-9.42 3.85.86-15.84.86-24 7.71-77.48 7.71-77.48l14.55-26.55 5-3a21.5 21.5 0 0 0-5-4.79s-9.43 2.5-19.06 11.55-18.13 24.66-21.43 39.49-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.71-.42c10.48-1.72 23.88-8.91 27.87-17.97"}),Q__namespace.createElement("path",{fill:"#fff",d:"M185.61 371.38c-5.86 5-32.25 14.71-36.1 15.57s-1.71-7.28 4.28-15.41-7.28 3-9.42 3.85.86-15.84.86-24 7.71-77.48 7.71-77.48l14.55-26.55 5-3a21.5 21.5 0 0 0-5-4.79s-9.43 2.5-19.06 11.55-18.13 24.66-21.43 39.49-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.71-.42c10.48-1.72 23.88-8.91 27.87-17.97",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M157.76 389.39c10.46-1.76 23.86-8.95 27.85-18-3-15.69-6.79-37.79-6.79-51.31 0-22.72 6-35.62 3.27-51s-8.47-25.41-14.63-29.46c0 0-9.43 2.5-19.06 11.55s-18.1 24.61-21.4 39.44-7.7 60.46-7.7 72.4-.86 26.76-.86 26.76h34.59a26.5 26.5 0 0 0 4.73-.38"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m166.9 243.16 16.54 30.12.89 16.52s4.61-11.78 2.56-19.47-19.99-27.17-19.99-27.17"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m184.32 289.81-4.61 69.71 5.13 14.35 3.59-28.71-3.08-57.41z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M179.78 214.93s.58 7.51 1.16 11.17-8.47 13.9-8.47 13.9l13.09 19.83 14.83-11.55s21-1.54 22.91-3.28 1.93-20.79 1.93-20.79l5-2.89s-4.62-20-5.77-24.46l-1.16-4.42s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57 57 0 0 0 7.12 7.81"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-4--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M203 241.83c-3.85-4.71 0-22.69 3-31.68s-4.28-12.84-4.28-12.84l21.86-3.77-.3-1.13a9.74 9.74 0 0 0 3.83-2.71l1.18-6.95c-2-6.32-11.47-9.36-21-7.87-9.82 1.54-12.32 5.2-12.32 5.2s-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57.2 57.2 0 0 0 7.12 7.89s.58 7.51 1.16 11.17-8.44 13.9-8.44 13.9l13.09 19.83 14.83-11.55s16-1.18 21.36-2.63l1.55-.65s-16.43 1.54-20.3-3.17"}),Q__namespace.createElement("path",{fill:"#fff",d:"M203 241.83c-3.85-4.71 0-22.69 3-31.68s-4.28-12.84-4.28-12.84l21.86-3.77-.3-1.13a9.74 9.74 0 0 0 3.83-2.71l1.18-6.95c-2-6.32-11.47-9.36-21-7.87-9.82 1.54-12.32 5.2-12.32 5.2s-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57.2 57.2 0 0 0 7.12 7.89s.58 7.51 1.16 11.17-8.44 13.9-8.44 13.9l13.09 19.83 14.83-11.55s16-1.18 21.36-2.63l1.55-.65s-16.43 1.54-20.3-3.17",opacity:"0.5"}),Q__namespace.createElement("path",{fill:"#263238",d:"M214.25 206.08v-.77c0-1.49.25-4.71 2.74-5.59 3.27-1.15 6 1.93 6 1.93l.19 3.08a4.25 4.25 0 0 0-4-1.54 9 9 0 0 0-4.93 2.89M219.84 212.24c0 1.59-.44 2.89-1 2.89s-1-1.3-1-2.89.43-2.89 1-2.89 1 1.29 1 2.89M213.77 232.41c-1.07 1.11-2.5 1.47-3.19.81s-.38-2.11.69-3.22 2.49-1.47 3.18-.81.39 2.11-.68 3.22"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M179.78 214.93s.58 7.51 1.16 11.17-8.47 13.9-8.47 13.9l13.09 19.83 14.83-11.55s21-1.54 22.91-3.28 1.93-20.79 1.93-20.79l5-2.89s-4.62-20-5.77-24.46l-1.16-4.42s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57 57 0 0 0 7.12 7.81"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M198.27 196.06c3.47-2.31 25-3.65 25-3.65s6.74-2.32 5.2-9-11.36-10-21.18-8.48-12.32 5.2-12.32 5.2-13.87-.19-21.76 6.36-3.08 16.94-.58 20.6a57.2 57.2 0 0 0 7.12 7.89s.32 4.12.72 7.75l6 1.69 6.55-3.47 6.55-1.54s-4.82-3.66-2.12-7.12 7.7-4.62 7.89-7.32-10.54-6.6-7.07-8.91"}),Q__namespace.createElement("path",{fill:"none",stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:"10",d:"M219.29 184.87s-2.26-4.14 1.88-3.39 4.14 7.91.75 9.41-21.83-1.88-32 1.13-17.31 11.29-17.31 11.29M178.26 209.71s7.91-6.77 14.3-7.9 9.79-1.13 2.64 3-2.26 3.38 2.26 1.88"}),Q__namespace.createElement("path",{fill:"#0B89CE",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-5--inject-63)"},Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M194.8 224.56s-1.15-12.13-7.12-12.51-5.78 8.28-4 14.25 6 7.89 9.43 4.81"}),Q__namespace.createElement("path",{fill:"#fff",d:"m173 232.65 19.26 29.27-8.86 11.36a224 224 0 0 0-13.28-22.34c-6.55-9.24-7.32-10.78-7.32-10.78Z"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-6--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"m173 232.65-10.2 7.51s.57 1.13 4.77 7.16l10.78-6.54Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"m173 232.65-10.2 7.51s.57 1.13 4.77 7.16l10.78-6.54Z",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m173 232.65 19.26 29.27-8.86 11.36a224 224 0 0 0-13.28-22.34c-6.55-9.24-7.32-10.78-7.32-10.78Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M222.53 305.44s3.08-6.36 3.66-10.4.77-6.36 3.08-8.28 9.82-9.63 11-12.52 1.92-.19 2.5 2.12.38 4.43-1.54 5.78a21.2 21.2 0 0 0-3.66 3.46l1.73 1.35s24.07-9.05 26.58-10 4.81-.2 5 1.73-.57 2.12-1.73 2.7-13.86 5-15.6 5.77l-1.73.77 1.35 1.35s6.93-.19 10.4-.38 8.66-.77 9.43.38a2.4 2.4 0 0 1-.58 3.27 3.72 3.72 0 0 1-3.08 1c-1.73 0-16.56 1.15-16.56 1.15l.39 2.12s15.79 2.5 16.36 3.27.58 1.16 0 2.31-1 1.16-2.5 1.16-14-1.93-14-1.93 6.16 3.47 6.93 4.05 3.46 1 2.69 2.31-1.15 1.73-2.31 1.54-9.43-3.85-9.43-3.85-8.28 1.15-11 1.35a38 38 0 0 1-6-.2l-7.7 5Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M167.85 296.77s-5.59-23.3-7.9-28.5-15.4-10-21.76 1.35-.58 24.26 1.74 33.5 16.94 51 19.06 56.23 6 4 8.09 3.47 60.65-47.76 60.65-47.76l-4.62-10.39L177.67 328Z"}),Q__namespace.createElement("g",{clipPath:"url(#freepik--clip-path-7--inject-63)"},Q__namespace.createElement("path",{fill:"#0B89CE",d:"M166.21 348a140 140 0 0 1 5.13-13.27c2.14-4.28-10.27 9.85-12.84 2.14s-18.83-46.23-15.84-59.07a24.35 24.35 0 0 1 9.78-14.74c-4.77-1.13-10.61.07-14.25 6.57-6.35 11.36-.58 24.26 1.74 33.5s16.94 51 19.06 56.23 6 4 8.09 3.47c1.54-.42 33-25.55 50-39.18Z"}),Q__namespace.createElement("path",{fill:"#fff",d:"M166.21 348a140 140 0 0 1 5.13-13.27c2.14-4.28-10.27 9.85-12.84 2.14s-18.83-46.23-15.84-59.07a24.35 24.35 0 0 1 9.78-14.74c-4.77-1.13-10.61.07-14.25 6.57-6.35 11.36-.58 24.26 1.74 33.5s16.94 51 19.06 56.23 6 4 8.09 3.47c1.54-.42 33-25.55 50-39.18Z",opacity:"0.5"})),Q__namespace.createElement("path",{fill:"none",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M167.85 296.77s-5.59-23.3-7.9-28.5-15.4-10-21.76 1.35-.58 24.26 1.74 33.5 16.94 51 19.06 56.23 6 4 8.09 3.47 60.65-47.76 60.65-47.76l-4.62-10.39L177.67 328Z"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m216.37 308.52 5.2 10.59M94.22 255.39l-26.6 18.45s13.11 13.86 11.76 50.22c-1 27.77 2.67 59.3 8 65.71h28.32s-9.79-54-9.09-84.94c.55-23.51-6.51-39.83-12.39-49.44"}),Q__namespace.createElement("path",{fill:"#263238",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"m97.42 255.39-26.6 18.45s13.11 13.86 11.75 50.22c-1 27.77 2.67 59.3 8 65.71h28.33s-9.78-54-9.08-84.94c.53-23.51-6.53-39.83-12.4-49.44"}),Q__namespace.createElement("path",{fill:"#fff",stroke:"#263238",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.75",d:"M94.22 255.39h3.2l-26.6 18.45h-3.19z"}))),HI=Fte;function GI(){let{locale:e}=w(),t=Q.useRef(null),[o,r]=Q.useState(null),{isGettingPages:n,pages:a,fetchNextPage:s,hasNextPage:i,isFetchingNextPage:l}=O5(),c=ve(e,"my-pages.no-pages"),p=ve(e,"my-pages.no-pages-create-new");Q.useEffect(()=>{t.current&&r(t.current);},[]);let[m]=CL__default.default({loading:l,hasNextPage:!!i,onLoadMore:s,disabled:n||!i,rootMargin:"0px 0px 400px 0px",...o&&{scrollContainer:o}}),u=Q.useCallback(()=>{setTimeout(()=>{window.dispatchEvent(new CustomEvent("openCreateCompanyModal"));},800);},[]),f=n&&(!a||a.length===0),g=!n&&a?.length===0,h=Q.useMemo(()=>a?.map(v=>Q__namespace.default.createElement(BI,{key:v?.slug,...v,followers:v?.followers,followersCount:v?.followersCount})),[a]);return Q__namespace.default.createElement("div",{className:"max-w-[58.188rem] w-full bg-[#0B89CE1A] h-fit rounded-[1rem] p-[1.5rem]"},Q__namespace.default.createElement("div",{className:"bg-white rounded-[0.5rem] p-[1rem]"},Q__namespace.default.createElement("div",{ref:t,className:"w-full grid grid-cols-3 gap-[1rem] max-h-[27.626rem] overflow-y-auto overscroll-contain"},f?Array.from({length:6}).map((v,y)=>Q__namespace.default.createElement(UI,{key:y})):g?Q__namespace.default.createElement("div",{className:"col-span-3 flex flex-col items-center justify-center gap-2 border rounded-lg p-[2rem] min-h-[12.313rem] text-center"},Q__namespace.default.createElement("div",{className:"w-96 h-96"},Q__namespace.default.createElement(HI,null)),Q__namespace.default.createElement("span",{className:"font-bold text-body-lg"},c),Q__namespace.default.createElement("button",{onClick:u,className:"bg-[#0B89CE1A] p-[0.5rem] button-empty rounded-full hover:brightness-95 transition-all"},Q__namespace.default.createElement("span",{className:"text-primary"},p))):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,h,(i||l)&&Q__namespace.default.createElement("div",{ref:m,className:"col-span-3 flex items-center justify-center h-20 w-full"},l&&Q__namespace.default.createElement(he,{className:"!mx-auto"}))))))}function _I(){return Q__namespace.default.createElement("div",{className:"w-full flex justify-center gap-x-[2rem]"},Q__namespace.default.createElement(FI,null),Q__namespace.default.createElement(GI,null))}function _te(e){return Q__namespace.createElement("svg",{width:28,height:28,fill:"none",...e},Q__namespace.createElement("path",{opacity:.4,d:"M27.33 14c0 7.353-5.98 13.333-13.333 13.333C6.645 27.333.664 21.353.664 14 .664 6.648 6.645.667 13.997.667S27.331 6.647 27.331 14z",fill:"#687588"}),Q__namespace.createElement("path",{d:"M17.073 13.074h-2.148v-2.147a.926.926 0 10-1.852 0v2.147h-2.148a.926.926 0 000 1.853h2.148v2.146a.926.926 0 101.852 0v-2.146h2.148a.927.927 0 000-1.853z",fill:"#687588"}))}var Vte=Q__namespace.memo(_te),VI=Vte;function jI({isOpen:e,onClose:t}){let{locale:o}=w(),[r,n]=Q.useState(null),a=ve(o,"my-pages.title"),s=ve(o,"create-button-label"),{isGettingPages:i,pages:l,fetchNextPage:d,hasNextPage:c,isFetchingNextPage:p}=O5();Q.useEffect(()=>{if(e){let f=document.querySelector(".overflow-y-auto");f&&n(f);}},[e]);let[m]=CL__default.default({loading:p,hasNextPage:!!c,onLoadMore:d,disabled:!c,...r&&{scrollContainer:r}}),u=Q.useCallback(()=>{t?.(),setTimeout(()=>{window.dispatchEvent(new CustomEvent("openCreateCompanyModal"));},400);},[t]);return Q__namespace.default.createElement(qn,{title:Q__namespace.default.createElement("span",{className:"text-left block w-full"},a),isOpen:e,onClose:()=>t?.(),footer:Q__namespace.default.createElement(X,{align:"left",className:"w-full border font-medium text-[#687588] border-[#F1F5F9] p-[0.5rem]",label:s,onClick:u,leftElement:Q__namespace.default.createElement(VI,null)})},Q__namespace.default.createElement("div",{className:"flex flex-col gap-[1rem] w-full pb-4"},i&&!l?.length?Array.from({length:4}).map((f,g)=>Q__namespace.default.createElement("div",{key:g,className:"w-full bg-gray-100 animate-pulse h-[4.438rem] rounded-lg"})):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,l?.map(f=>Q__namespace.default.createElement("span",{onClick:()=>{be(),window.open("/company/"+o+"/"+f?.slug,"_blank");},key:f?.slug,className:"w-full flex flex-row items-center justify-start gap-x-[0.75rem] h-[4.438rem] p-[1rem] rounded-lg border border-[#E4EBF1]"},Q__namespace.default.createElement(J,{name:f?.name??"",className:"w-10 h-10 shrink-0",src:f?.logo,type:"page"}),Q__namespace.default.createElement("div",{className:"flex flex-col text-left overflow-hidden"},Q__namespace.default.createElement("span",{className:"text-[0.875rem] font-bold text-[#111827] truncate"},f?.name),Q__namespace.default.createElement("span",{className:"text-[0.75rem] text-[#687588] truncate"},f?.sector)))),(c||p)&&Q__namespace.default.createElement("div",{ref:m,className:"flex justify-center p-4"},Q__namespace.default.createElement(he,null)))))}function qI({isOpen:e=false,onClose:t}){let{isMobile:o}=ft();return o?Q__namespace.default.createElement(jI,{isOpen:e,onClose:t}):Q__namespace.default.createElement(w1,{isOpen:e,onClose:()=>{t&&(be(),t());},variant:"expanded",className:"bg-white",contentClassName:"overflow-y-auto scrollbar-hide p-7",closeOnClickOutside:true,offsetTop:75,closeOnEscape:true,preventBodyScroll:true,showOverlay:false,zIndex:9999},Q__namespace.default.createElement("div",{className:"w-full flex p-6 flex-col gap-[2rem] mt-4"},Q__namespace.default.createElement(TI,null),Q__namespace.default.createElement(_I,null)))}function KI({isTitleVisible:e=true}){let[t,o]=Q.useState(false),[r,n]=usehooks.useToggle(false),[a,s]=usehooks.useToggle(false),[i,l]=Q.useState(false),[d,c]=usehooks.useToggle(false),{locale:p,user:m}=w(),u=Q.useRef(null),f=Q.useCallback(()=>o(false),[]);ha(u,f);let g=Q.useCallback(()=>{if(m&&!m.isActive){c(true),o(false);return}o(false),n(true);},[m,c,n]);return Q.useEffect(()=>{let h=()=>{if(m&&!m.isActive){c(true),s(false);return}s(false),n(true);},v=()=>{o(false),s(true);},y=()=>o(false),b=()=>l(true),x=()=>l(false);return window.addEventListener("openCreateCompanyModal",h),window.addEventListener("openListPages",v),window.addEventListener("closeExploreCard",y),window.addEventListener("billing:open",b),window.addEventListener("billing:close",x),()=>{window.removeEventListener("openCreateCompanyModal",h),window.removeEventListener("openListPages",v),window.removeEventListener("closeExploreCard",y),window.removeEventListener("billing:open",b),window.removeEventListener("billing:close",x);}},[m,c,s,n]),Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement("div",{ref:u,className:"relative"},Q__namespace.default.createElement("button",{onClick:()=>o(h=>!h),className:ut("flex items-center px-5 h-[44px] transition-all text-body-sm font-bold text-gray-shade8 gap-x-2")},Q__namespace.default.createElement("div",{className:"w-6 h-6 [&>svg_*]:fill-gray-shade8"},Q__namespace.default.createElement(Im,null)),e?pe(p,"main.navbar.explore"):null),Q__namespace.default.createElement(react.AnimatePresence,{mode:"wait"},t&&Q__namespace.default.createElement(pI,{onOpenCreateCompanyModal:g,onClose:f}))),r&&Q__namespace.default.createElement(EI,{isOpen:r,onClose:()=>n(false)}),a&&Q__namespace.default.createElement(qI,{isOpen:a,onClose:()=>s(false)}),Q__namespace.default.createElement(billingV2.BillingModal,{isOpen:i,onClose:()=>l(false)}),Q__namespace.default.createElement(billingV2.BenefitsAndPlansModal,null),Q__namespace.default.createElement(billingV2.PaymentFlowModal,null),Q__namespace.default.createElement(Ao,{isOpen:d,onClose:()=>c(false)}))}var Rte=()=>{let e=navigator.userAgent||navigator.vendor;return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(e.toLowerCase())},ZI=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,YI=()=>/android/i.test(navigator.userAgent),JI=()=>{let{locale:e,user:t,environment:o}=w(),{userLocation:r}=Jo(),{toggleJob:n,isJobOpen:a}=Ii(),{registerEvent:s}=Qo(),i=ZI()?"ios":YI()?"android":"web",l=Rte(),d=()=>l&&(i==="ios"||i==="android")?"mirantes-mobile":"mirantes-web",c=()=>{if(!l)return;let m=navigator.userAgent,u="unknown";if(ZI()){let f=m.match(/iPhone|iPad|iPod/);u=f?f[0]:"iOS Device";}else if(YI()){let f=m.match(/Android.*; (.*?)\//);u=f?f[1]:"Android Device";}return {os:i,model:u}};return Q__namespace.default.createElement("button",{onClick:()=>{if(!a){let m=c();s({input:{source:{app:d(),platform:i,environment:o,version:"1.0.0"},actor:{user_id:t?.id,anonymous_id:t?.id?void 0:uuid.v4(),session_id:sessionStorage.getItem("session_id")||uuid.v4()},context:{route:"/jobs",referrer:document.referrer,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:e,country:r?.country_name||"",device:m,browser:{name:navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":navigator.userAgent.includes("Safari")?"Safari":navigator.userAgent.includes("Edge")?"Edge":"Other",version:(navigator.userAgent.match(/(Chrome|Firefox|Safari|Edge)\/(\d+\.\d+)/)||[])[2]||void 0}},events:[{event_id:uuid.v4(),event_type:"PAGE_VIEW",occurred_at:new Date,metadata:{interaction_type:"button_click",button_location:"navbar_job_trigger",from_route:window.location.pathname,environment:o,component:"JobTrigger"}}]}});}window.dispatchEvent(new CustomEvent("toggleMessages",{detail:{isVisible:false}})),be(),n();},className:E("flex items-center px-5 h-[44px] transition-all text-body-sm font-bold gap-x-2",a?"bg-primary/10 text-primary rounded-lg":"text-gray-shade8")},Q__namespace.default.createElement("div",{className:"w-6 h-6"},Q__namespace.default.createElement(J5,{color:a?"#0B89CE":"#737373",fontSize:20})),pe(e,"main.navbar.job"))};function $I(){let{locale:e}=w(),t=window.location.pathname,{isJobOpen:o}=Ii(),{isChatVisible:r}=g7(),n=!o&&!r&&t?.includes("/feed");return Q__namespace.default.createElement("nav",{className:"flex items-center"},Q__namespace.default.createElement(QA,{isActive:n,href:"/feed",label:pe(e,"main.navbar.home"),icon:Q__namespace.default.createElement(K5,null)}),Q__namespace.default.createElement(JI,null),Q__namespace.default.createElement(KI,null))}var XI=({loading:e,hasNextPage:t,onLoadMore:o})=>{let[r]=CL__default.default({loading:e,hasNextPage:t,onLoadMore:o,disabled:!t,rootMargin:"0px 0px 200px 0px"});return r};var t6=(e,t)=>{let o=nF__default.default.create({baseURL:e});return o.interceptors.request.use(r=>(t&&(r.headers.Authorization=`Bearer ${t}`),r),r=>Promise.reject(r)),o};var RI=async({query:e,searchApiInstance:t,page:o=1,limit:r=10})=>{try{return (await t.get("search/global",{params:{q:e,page:o,limit:r}})).data}catch(n){if(n?.response?.data?.found)return n.response.data.found;if(n?.response?.data?.users||n?.response?.data?.communities)return n.response.data;throw n}},eE=async e=>{try{let{data:t}=await e.get("search/last-searches");return t}catch(t){throw t}},tE=async e=>{try{let{data:t}=await e.delete("search/last-searches");return t}catch(t){throw t}};var oE=e=>{let{searchApi:t,user:o}=w(),r=t6(t??"",o?.accessToken),{data:n,error:a,isLoading:s,isFetchingNextPage:i,fetchNextPage:l,hasNextPage:d}=Ke({queryKey:["global-search",e],queryFn:({pageParam:p})=>RI({query:e,searchApiInstance:r,page:p}),getNextPageParam:p=>{let m=p?.users?.pagination?.hasMore,u=p?.vacancies?.pagination?.hasMore,f=p?.posts?.pagination?.hasMore,g=p?.communities?.pagination?.hasMore,h=p?.companies?.pagination?.hasMore;if(m||u||f||g||h)return (p?.users?.pagination?.page??p?.vacancies?.pagination?.page??p?.posts?.pagination?.page??p?.communities?.pagination?.page??p?.companies?.pagination?.page??1)+1},initialPageParam:1,enabled:e.trim()?.length>0&&!!o?.id});return {globalSearchData:n?.pages||[],globalSearchError:a,globalSearchIsGettingData:s,fetchNextPage:l,isFetchingNextPage:i,hasNextPage:d}};var rE={searchPlaceholder:"Search people, pages, communities...",startSearching:"Start searching",seeAllResults:"See all results",pagesAndCommunities:"Pages and Communities",people:"People",noResultsFound:"No results found for",results:"Results",recentSearches:"Recent searches",recents:"Recents",clearAll:"Clear all",clearHistory:"Clear history",clearing:"Clearing...",historyEmpty:"Your search history is empty",recentSearchesWillAppear:"Recent searches will appear here."};var nE={searchPlaceholder:"Rechercher des personnes, des pages, des communaut\xE9s...",startSearching:"Commencer \xE0 rechercher",seeAllResults:"Voir tous les r\xE9sultats",pagesAndCommunities:"Pages et Communaut\xE9s",people:"Personnes",noResultsFound:"Aucun r\xE9sultat trouv\xE9 pour",results:"R\xE9sultats",recentSearches:"Recherches r\xE9centes",recents:"R\xE9cents",clearAll:"Tout effacer",clearHistory:"Effacer l'historique",clearing:"Effacement...",historyEmpty:"Votre historique de recherche est vide",recentSearchesWillAppear:"Les recherches r\xE9centes appara\xEEtront ici."};var aE={searchPlaceholder:"Buscar pessoas, p\xE1ginas, comunidades...",startSearching:"Comece a pesquisar",seeAllResults:"Ver todos os resultados",pagesAndCommunities:"P\xE1ginas e Comunidades",people:"Pessoas",noResultsFound:"Nenhum resultado encontrado para",results:"Resultados",recentSearches:"Pesquisas recentes",recents:"Recentes",clearAll:"Limpar tudo",clearHistory:"Limpar hist\xF3rico",clearing:"Limpando...",historyEmpty:"Seu hist\xF3rico de pesquisa est\xE1 vazio",recentSearchesWillAppear:"As pesquisas recentes aparecer\xE3o aqui."};var ooe={pt:{...aE},en:{...rE},fr:{...nE}};function To(e,t,o){let r=ooe[e][t];return r}var sE=()=>{let[e,t]=Q.useState(0);return Q.useEffect(()=>{if(typeof window>"u")return;let o=window.visualViewport;if(!o)return;let r=()=>{let a=window.innerHeight-o.height;a>100?t(a):t(0);},n=()=>{let a=window.innerHeight-o.height;a>100?t(a):t(0);};return o.addEventListener("resize",r),o.addEventListener("scroll",n),r(),()=>{o.removeEventListener("resize",r),o.removeEventListener("scroll",n);}},[]),{keyboardHeight:e,isKeyboardOpen:e>0}};var R9=e=>{if(typeof window>"u"||!e?.trim())return;let t=new URL(window.location.href);t.searchParams.set("q",e),window.history.replaceState({},"",t.toString());},eh=(e,t)=>{if(!e?.trim()||!t)return;let o=window.location.origin,r=window.location.pathname,n=`${o}/search/${t}?q=${encodeURIComponent(e)}`;R9(e),!r.includes("/search/")&&window.location.replace(n);},iE=({search:e})=>{let{locale:t}=w(),{isMobile:o}=ft(),{keyboardHeight:r,isKeyboardOpen:n}=sE(),a=()=>{be(),eh(e,t);};return o&&n?Q__namespace.default.createElement("div",{className:"fixed left-0 right-0 flex justify-center py-3 bg-white border-t border-[#E6EBF1] z-[1000]",style:{bottom:r}},Q__namespace.default.createElement("button",{onClick:a,className:"w-[178px] h-[35px] text-[#0B89CE] font-bold text-[12px] py-3 bg-[#0B89CE0D] hover:bg-[#F5F9FC] transition-colors rounded-[8px]"},To(t,"seeAllResults"))):Q__namespace.default.createElement("div",{className:"w-full flex justify-center py-3"},Q__namespace.default.createElement("button",{onClick:a,className:"w-[178px] h-[35px] text-[#0B89CE] font-bold text-[12px] py-3 bg-[#0B89CE0D] hover:bg-[#F5F9FC] transition-colors"},To(t,"seeAllResults")))};var lE=()=>Q__namespace.default.createElement("div",{className:"flex flex-col gap-3"},[...Array(5)].map((e,t)=>Q__namespace.default.createElement("div",{key:t,className:"flex items-center gap-3 animate-pulse"},Q__namespace.default.createElement("div",{className:"w-10 h-10 bg-gray-200 rounded-full"}),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2 w-full"},Q__namespace.default.createElement("div",{className:"h-3 bg-gray-200 rounded w-1/2"}),Q__namespace.default.createElement("div",{className:"h-3 bg-gray-100 rounded w-1/3"})))));var th=()=>Q__namespace.default.createElement("div",{className:"flex-1 p-4"},Q__namespace.default.createElement(lE,null));var I0=({children:e,className:t})=>{let{isMobile:o}=ft();return Q__namespace.default.createElement("div",{className:`${o?"fixed inset-0 top-0 left-0 w-full h-full bg-white z-[999]":"absolute top-[54px] left-0 w-[380px] min-h-[300px] bg-white rounded-[16px] shadow-lg border border-[#E6EBF1] z-50"} ${t}`},e)};function soe(e){let{fontSize:t="20px",color:o="#687588"}=e;return Q__namespace.createElement("svg",{width:t,height:t,fill:"none",viewBox:"0 0 20 20",...e},Q__namespace.createElement("path",{fill:o,d:"M18.333 10A8.333 8.333 0 0110 18.333 8.334 8.334 0 1118.333 10",opacity:.4}),Q__namespace.createElement("path",{fill:o,d:"M12.978 13.179a.63.63 0 01-.32-.088L9.386 11.14a.63.63 0 01-.304-.538V6.396a.625.625 0 011.25 0v3.851l2.967 1.77a.626.626 0 01-.321 1.162"}))}var ioe=Q__namespace.memo(soe),dE=ioe;var pE=({term:e,onClick:t})=>Q__namespace.default.createElement("div",{onClick:t,className:"flex items-center gap-3 cursor-pointer hover:bg-[#F7FAFC] p-2 rounded-[8px] transition"},Q__namespace.default.createElement("div",{className:"w-8 h-8 rounded-full bg-[#F1F5F9] flex items-center justify-center"},Q__namespace.default.createElement(dE,{fontSize:"16px",color:"#687588"})),Q__namespace.default.createElement("p",{className:"text-[14px] text-[#050910] font-medium"},e));var mE=({items:e,onItemClick:t,onClearAll:o,isClearing:r})=>{let{locale:n}=w(),{isMobile:a}=ft();return Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto p-4"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-3"},Q__namespace.default.createElement("p",{className:"text-[12px] font-medium text-[#8893A1] uppercase"},a?To(n,"recents"):To(n,"recentSearches")),a&&o&&Q__namespace.default.createElement("button",{onClick:o,disabled:r,className:"text-[12px] font-medium text-[#0B89CE] hover:text-[#0A7AB8] transition-colors disabled:opacity-50"},r?To(n,"clearing"):To(n,"clearAll"))),Q__namespace.default.createElement("div",{className:"flex flex-col gap-1"},e?.slice(0,5)?.map(s=>Q__namespace.default.createElement(pE,{key:s?.id,term:s?.term,onClick:()=>t?.(s?.term)}))))};function loe(e){let{fontSize:t=35}=e;return Q__namespace.createElement("svg",{width:t,height:t,viewBox:"0 0 170 151",fill:"none",...e},Q__namespace.createElement("path",{d:"M42.883 122.543c-5.692 5.219-12.86 12.243-11.92 12.901.533.377 6.955-6.269 13.107-12.166l-1.187-.735zM16.826 122.991c-.103-1.939 1.298-3.163 1.741-2.057.443 1.107 1.332 1.332 1.775.666a1.094 1.094 0 00-.306-1.243 1.113 1.113 0 00-.397-.216.763.763 0 01-.663-.601.773.773 0 01.354-.822c1.66-.957 4.47-.873 4.27.217-.188 1.01-4.582 5.617-4.935 5.971-1.257 1.256-1.755-.296-1.84-1.915zM17.73 118.246a1.908 1.908 0 01-1.823 1.908 2.194 2.194 0 01-2.11-2.027c.041-2.574 3.934-2.363 3.933.119zM33.919 136.614c-.32.608.249.936.771.461 2.838-2.577 8.79-8.334 12.497-11.865l-.875-.611c-4.685 4.01-11.716 10.725-12.393 12.015zM33.015 115.753c-5.634 5.184-12.509 11.952-11.588 12.596.522.365 6.67-5.975 12.691-11.767l-1.103-.829zM24.383 129.519c-.32.608.249.937.772.462 2.694-2.444 8.183-7.747 11.904-11.301l-.85-.687c-4.666 4.044-11.175 10.287-11.827 11.526z",fill:"#0B89CE"}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.977 107.771c-7.39 3.973-14.842 8.636-18.692 12.89-.695.768-.251 1.006 2.822 2.648 4.968 2.654 16.806 8.98 41.805 27.157.697.507.755.448 1.952-.754 1.6-1.605 5.231-5.25 15.13-12.314.334-.238.66-.47.98-.696-.473-.304-.983-.634-1.535-.992-7.54 5.29-11.855 8.745-15.676 12.962-.48.529-1.8-.512-4.697-2.796-4.81-3.792-13.97-11.015-30.855-20.178-6.906-3.748-8.315-4.24-8.275-4.538.01-.08.123-.145.262-.254a151.259 151.259 0 0115.945-11.039l2.281-1.143c-.506-.332-.988-.65-1.447-.953z",fill:"#0B89CE"}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M64.828 21.115c-2.523.557-4.147.942-4.144.957-46.88 10.734-51.68 11.347-52.22 13.2-.068.232-.069.482-.077.774-.205 7.3.768 36.965 1.366 55.214.105 3.189.198 6.03.271 8.34.071 2.208.1 2.227 14.15 11.434 2.268 1.485 4.9 3.211 7.956 5.222 34.254 22.548 36.152 24.091 37.34 23.663.098-.035.191-.084.298-.135.696-.338 73.23-40.093 73.431-41.302.027-.163.056-.307.056-.45.003-1.45-2.861-2.906-38.728-25.286a234.207 234.207 0 00-4.442-2.698c-3.763-2.242-4.22-2.513-4.214-4.358l.004-.83c.014-3.122.054-11.78-.137-20.894-.363.115-.75.225-1.163.33.084 5.175.101 10.004.114 13.276.006 1.787.01 3.11.024 3.773.104 5.28.172 6.046-.147 6.279-.068.048-.151.074-.255.112-4.911 1.818-38.635 15.262-38.947 15.387-39.418 15.737-43.645 17.789-44.068 17.184-.091-.13-.007-.383-.058-.649-.142-.74-1.587-51.903-1.587-51.928-.045-3.094-.124-5.431-.184-7.203-.186-5.475-.188-5.556 1.557-5.914 5.671-1.162 14.903-3.325 25.154-5.726 9.336-2.187 19.518-4.572 28.624-6.58-.002-.4.007-.798.026-1.192zm-24.354 98.458c14.556 9.627 28.61 18.92 29.312 18.492l-.003-.003c6.89-4.206 28.194-15.914 45.873-25.628 14.309-7.862 26.242-14.42 26.236-14.64l-.002-.028c-.03-.292-.714-.518-24.573-15.535-20.202-12.712-21.31-13.935-22.048-13.742-.065.016-.126.044-.198.076-5.213 2.314-45.578 18.254-71.474 28.481l-11.106 4.387c6.105 3.672 17.182 10.997 27.983 18.14z",fill:"#050910"}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M65.12 25.986a469.96 469.96 0 00-8.891 2.285c.006.023-4.77 1.134-11.083 2.604-9.283 2.16-21.893 5.095-27.528 6.482-2.517.62-2.657.797-2.669 3.423-.02 5.04 0 5.995.615 27.519.603 21.118.422 22.756 1.14 23.415.087.08.188.146.305.23l.047.034c1.23.9 1.382 1.01 72.927-27.172.501-.198.865-.304 1.123-.53.935-.813.512-3.185.404-17.1a169.76 169.76 0 00-.04-2.293c-.323.041-.644.077-.964.106.064 2.723.107 5.778.123 9.205.038 7.92.134 8.971-.297 9.277-.084.06-.188.09-.316.139-65.637 24.637-72.292 28.207-72.82 27.457-.1-.142.018-.438-.001-.776l-.353-13.024c-.403-14.847-1.007-37.086-1.005-37.102.007-.49-.014-.822.114-1.078.419-.84 2.418-.89 12.113-3.157 8.98-2.1 16.981-4.006 23.987-5.676 4.921-1.173 9.352-2.229 13.284-3.152-.08-.369-.153-.74-.215-1.116z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M60.727 125.282c-.827-.368-7.414-4.491-9.307-5.67-1.219-.759-3.107 1.783 64.204-32.981.977-.505.586-.478 8.263 3.984 2.213 1.285 4.887-.693-38.487 21.964-23.262 12.153-23.119 12.144-24.673 12.703zm51.236-27.723c-.63-.524-.732-.484-6.323-4.136-.702-.458-.171-.355-25.502 12.188 6.895 5.215 6.574 5.207 7.447 4.743l24.378-12.795zm-50.467 17.363c7.552 5.437 7.007 5.419 7.842 4.983 16.528-8.642 16.197-8.458 16.49-8.721-7.197-5.14-6.61-5.111-7.489-4.675l-16.843 8.413zm61.971-23.403c-7.266-4.026-6.88-4.147-7.834-3.647-1.854.97-.231.103-8.97 4.567 6.762 4.563 6.425 4.546 6.946 4.27l9.858-5.19zm-70.593 27.755c7.78 4.961 7.765 4.945 7.788 4.961.41.374.12.221 7.076-3.471-6.957-4.855-7.232-5.699-9.45-4.334-1.695 1.042-3.585 1.763-5.414 2.844zM41.647 106.727c-5.466 2.532-5.517 2.837-6.51 2.181-8.67-5.728-10.177-5.856-8.038-6.796 14.34-6.302 34.747-14.957 66.539-28.552.78-.335.36-.324 8.833 4.216 1.011.543 3.829-.998-60.824 28.951zm-3.202-8.377c.584.532 2.33 1.585 7.349 5.095.6.42.18.402 18.465-8.175-6.955-5.441-6.82-5.065-7.356-4.832L38.445 98.35zm55.148-16.664c-6.625-4.302-5.963-4.4-6.843-4.018l-14.343 6.166c.57.545.009.016 6.215 4.34.559.392.162.363 14.97-6.488zm-16.168 7.472c-1.131-.925-3.113-2.275-5.8-4.323-.742-.564-.36-.643-9.577 3.417a26.132 26.132 0 00-3.224 1.457c2.221 1.598 4.381 3.147 6.535 4.708.465.333.13.296 12.068-5.26h-.002zm-49.753 13.756c8.905 5.565 8.388 5.54 9.122 5.188 3.295-1.578 4.307-2.043 8.092-3.818-2.628-1.951-4.414-3.097-6.392-4.689-1.438-1.164-1.227-.742-10.82 3.316l-.002.003zm73.383-24.654c-6.923-4.082-6.558-3.919-7.13-3.672-5.415 2.338-3.572 1.514-5.408 2.369 6.498 4.187 5.995 4.328 6.578 4.059l5.96-2.756zM48.464 117.311c-.55-.297-.014.018-9.787-6.099-.684-.427-.99-.156 6.504-3.695 60.582-28.607 59.194-28.598 61.116-27.429 9.559 5.81 10.499 3.652 1.341 8.172-38.519 19.008-55.794 27.533-59.174 29.051zm12.242-15.987c7.389 4.73 7.163 5.621 8.307 5.053l19.28-9.553c-6.956-4.87-6.847-5.312-8.455-4.535-5.146 2.486-8.264 3.895-19.131 9.035zm-20.248 9.63c.54.43 3.506 2.224 8.137 5.19.516.331.155.326 18.35-8.776-2.417-1.816-4.747-3.558-7.06-5.319-.666-.508-19.4 8.893-19.427 8.905zm61.033-20.627c-7.3-4.82-6.653-5.049-7.391-4.704-12.066 5.664-11.742 5.235-11.059 5.724 6.729 4.836 6.413 4.918 6.955 4.651l11.495-5.671zm-5.916-5.378c7.523 4.272 6.947 4.892 7.921 4.405l8.985-4.423c-7.976-4.55-7.544-4.529-8.175-4.194-2.071 1.1-4.9 2.403-8.73 4.212zM115.206 107.095c-7.144-3.931-7.176-3.764-6.923-4.285.299-.621.346-.513 7.493 3.365 1.203.653 1.199 1.331.024 1.998a1127.647 1127.647 0 01-20.897 11.571c-6.484 3.495-6.526 3.735-7.72 2.967-6.54-4.198-6.451-4.278-6.183-4.675.295-.438.275-.494 6.585 3.645 1.047.687.291.558 13.702-6.892 8.702-4.834 13.509-7.362 13.919-7.694zM45.523 45.661c-.318-10.667-.426-10.54 1.22-11.083 1.645-.542 2.526-.732 15.742-3.53 2.079-.44 2.152-1.665 2.634 17.393.07 2.768-1.258 1.377-16.87 6.578-2.98.991-2.481-1.13-2.726-9.358zm1.214-.798c0 9.165-.345 9.303.93 9.08 1.349-.231 1.99-.729 15.241-4.256 2.4-.638.792-.636.673-16.828-.01-1.455-.022-1.102-8.864.854-7.995 1.769-8.325 1.477-8.348 3.01-.037 2.718.184 5.426.368 8.14z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M54.474 42.616c-1.624.419-3.27.745-4.93.977-.63.09-.788-.156-.616-.802 1.254-4.725 8.328-.885 5.546-.175zM51.078 40.025c-2.133-.02-1.996-3.38.62-3.368 2.112.01 2.024 3.393-.62 3.368zM61.609 34.63c1.222.045 1.438.963-5.49 2.012-.534.081-2.265-.618 5.49-2.012zM60.19 36.823c.439.018.745-.052.793.296.042.317-.233.429-.475.486-4.149.958-4.442 1.096-4.544.539-.103-.557.503-.521 4.225-1.32z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M52.091 51.14c-1.002-.286-.788-.324-1.58.33a.495.495 0 01-.809-.365c-.037-1.043.065-.85-.802-1.401a.494.494 0 01.095-.883c.98-.36.827-.2 1.084-1.195a.496.496 0 01.87-.18c.644.82.449.725 1.47.662a.496.496 0 01.443.77c-.583.866-.552.65-.174 1.605a.495.495 0 01-.597.656zM67.224 39.67c.212 7.089-.219 8.915 2.346 8.06 7.082-2.36 10.752-3.143 12.63-3.705l-1.156-.575c-10.294 2.758-10.852 3.164-11.97 3.357-1.098.192-.8.072-.8-7.821-.16-2.338-.35-4.671-.321-7.014l-.818-.508c-.148 1.128-.055 3.389.089 8.207z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M70.16 37.2c-.15.557-.01.767.529.693.273-.038.545-.08.817-.123l-1.08-1.264a3.302 3.302 0 00-.267.694zM72.884 44.393c-.859-.246-.673-.285-1.362.285a.428.428 0 01-.698-.314c-.032-.893.063-.727-.69-1.207a.425.425 0 01.082-.76c.84-.305.712-.165.935-1.029a.425.425 0 01.748-.157c.55.703.377.63 1.268.57a.427.427 0 01.38.663c-.497.742-.478.552-.15 1.382a.427.427 0 01-.513.567z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M22.593 74.424c-.295-10.222-.257-10.199 1.393-10.855 1.75-.696 3.02-.995 16.912-4.702 2.405-.642 2.293-.98 2.502 16.987.035 2.967.18 1.546-16.463 8.347-5.047 2.061-4.026 1.26-4.345-9.777zm1.303-.038c.223 9.53-.355 9.553.791 9.408.645-.08 1.013-.307 3.39-1.23 14.952-5.8 14.495-4.623 14.391-6.961-.749-16.678.218-16.264-1.565-15.767-5.413 1.507-13.227 3.636-16.11 4.47-1.546.448-1.12.51-.897 10.08z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M33.047 70.709c-.105.546-.213.504-4.752 1.78-1.374.386-2.227.606-1.946-.418 1.163-4.24 6.94-2.607 6.698-1.362z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M28.552 68.943c-2.247-.04-1.683-3.656 1.07-3.597 2.333.058 1.722 3.648-1.07 3.597zM34.263 65.02c-.778.057-.757-.496-.224-.685 8.889-3.132 8.87-1.269.224.686zM34.673 66.868c-.871.013-.776-.53-.339-.754a25.826 25.826 0 014.486-1.223c.303-.07 2.364.453-4.147 1.977z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M29.032 80.63c-1.003-.286-.79-.324-1.58.33a.5.5 0 01-.517.068.494.494 0 01-.292-.432c-.037-1.043.065-.85-.803-1.402a.497.497 0 01-.123-.723.492.492 0 01.22-.159c.979-.36.827-.202 1.079-1.196a.49.49 0 01.379-.36.489.489 0 01.49.18c.645.82.45.725 1.472.662a.487.487 0 01.46.247.495.495 0 01-.019.523c-.581.866-.552.65-.172 1.606a.496.496 0 01-.594.656zM34.354 79.079c-1.004-.286-.789-.324-1.58.33a.5.5 0 01-.517.068.494.494 0 01-.292-.432c-.037-1.043.066-.85-.802-1.402a.492.492 0 01-.227-.471.496.496 0 01.322-.411c.98-.36.828-.202 1.085-1.196a.49.49 0 01.378-.36.495.495 0 01.49.18c.645.82.45.725 1.472.662a.489.489 0 01.46.247.493.493 0 01-.018.523c-.582.866-.552.649-.173 1.605a.495.495 0 01-.598.657z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M67.82 59.265c.098-8.541-.386-8.877 1.194-9.396 4.058-1.335 4.057-1.28 13.205-3.686 2.746-.72 2.333-1.78 2.665 14.834a1.855 1.855 0 01-1.299 1.96c-1.079.458-13.853 5.42-13.968 5.444-1.972.39-1.432.617-1.784-6.911-.044-.938-.02-1.59-.012-2.245zm1.08-.09c.172 8.352-.387 8.67 1.231 8.03 14.186-5.614 14.07-4.658 13.98-6.439-.718-14.295.292-14.314-1.341-13.863l-13.077 3.596c-1.364.377-.952.909-.791 8.672l-.002.004z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M74.109 54.917c.773 0 2.37.54 2.266 1.25-.077.528-.327.5-3.978 1.502-.855.236-1.216.36-1.43.075-.38-.507.496-2.828 3.142-2.827zM72.842 54.56c-1.959.028-1.546-3.08.69-3.067 1.876.01 1.568 3.032-.69 3.067zM82.096 49.22c.692.03.62.457.112.655a34.382 34.382 0 01-4.832 1.396c-.495.095-.703-.411-.151-.6a42.531 42.531 0 014.871-1.45zM77.494 52.201c4.082-1.565 4.53-.653 3.75-.36-4.905 1.826-4.194.53-3.75.36z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M73.322 64.624c-.856-.246-.674-.276-1.35.28a.421.421 0 01-.69-.31c-.032-.888.054-.725-.686-1.195a.422.422 0 01.081-.753c.837-.307.708-.172.925-1.022a.423.423 0 01.742-.154c.548.702.382.618 1.259.564a.423.423 0 01.377.658c-.497.741-.47.553-.148 1.37a.422.422 0 01-.51.562zM77.864 62.92c-.856-.246-.673-.277-1.348.281a.423.423 0 01-.692-.31c-.032-.89.055-.727-.685-1.196a.422.422 0 01.081-.754c.837-.306.708-.171.925-1.02a.423.423 0 01.742-.156c.547.702.382.618 1.259.564a.423.423 0 01.376.658c-.496.741-.469.554-.147 1.372a.421.421 0 01-.51.56z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M47.925 56.593c1.868-.768 12.272-3.445 14.812-4.112 2.013-.527 1.746-.82 2.068 15.945.036 1.88-.323 1.646-12.91 6.443-1.818.692-4.866 2.64-4.883-.03-.113-16.285-1.08-17.426.913-18.246zm-.015 9.836c.155 8.835-.373 9.05 1.2 8.487 1.343-.481-.038-.103 13.742-5.172 1.999-.736.735-.98.758-15.644 0-1.323.08-.983-7.576 1.12-8.853 2.427-8.301 1.913-8.355 3.595-.082 2.543.186 5.075.23 7.614z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M53.293 61.884c1.878 0 3.311 1.38 2.087 1.809a33.54 33.54 0 01-4.855 1.33c-1.227.231-.188-3.133 2.768-3.14z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M54.11 59.682c-.05 1.92-3.388 2.743-3.375.466.012-2.004 3.435-2.757 3.375-.466zM56.96 58.023c-.744.05-.771-.427-.286-.615 6.424-2.495 8.609-1.362.287.615zM57.258 59.726c-.785.017-.706-.56-.232-.732.475-.173 4.063-1.373 4.216-.82.145.522-1.004.83-3.984 1.552z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M52.923 71.719c-.856-.245-.674-.277-1.349.28a.422.422 0 01-.691-.31c-.032-.888.055-.725-.685-1.195a.424.424 0 01.08-.754c.838-.306.708-.17.926-1.02a.423.423 0 01.742-.156c.547.702.382.619 1.258.565a.423.423 0 01.377.658c-.496.74-.47.554-.147 1.37a.422.422 0 01-.511.562zM57.466 70.014c-.856-.245-.674-.276-1.349.282a.423.423 0 01-.691-.307c-.032-.889.055-.725-.685-1.196a.424.424 0 01.08-.754c.838-.305.708-.17.926-1.02a.423.423 0 01.742-.155c.547.702.382.619 1.258.564a.424.424 0 01.377.659c-.496.74-.47.553-.148 1.37a.42.42 0 01-.51.558zM61.821 68.5c-.856-.246-.672-.278-1.348.28a.421.421 0 01-.69-.31c-.033-.889.053-.725-.687-1.195a.422.422 0 01.082-.754c.836-.306.708-.171.925-1.021a.422.422 0 01.74-.155c.548.703.383.619 1.26.564a.424.424 0 01.377.659c-.496.74-.47.553-.148 1.37a.422.422 0 01-.51.561z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M22.634 40.427c1.096-.506.924-.42 16.654-3.825 1.176-.255 2.015-.317 2.123.927.445 5.125.598 11.95.647 17.09.022 2.217.27 1.697-14.683 5.973-2.288.654-5.454 2.35-5.476-.463-.142-18.966-.845-18.975.735-19.702zm.243 10.546c.137 9.74-.36 9.637 1.012 9.469.827-.103 2.806-.99 15.894-4.459 2.433-.645.81-.728.81-17.5 0-1.503.028-1.238-8.87.803-11.09 2.545-9.015-.394-8.846 11.687z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M31.66 48.051c-.09.597-.307.552-4.977 1.47-.972.191-1.709.294-1.474-.613 1.056-4.024 6.661-2.212 6.45-.857z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M27.5 45.92c-2.148.009-2.083-3.445.629-3.506 2.21-.053 2.24 3.493-.63 3.506zM32.885 42.405c-.82.007-.833-.52-.241-.709 7.95-2.551 9.493-.914.24.709zM33.128 44.296c-.694-.068-.681-.652-.111-.818 5.113-1.482 5.364-.568 4.501-.137a34.805 34.805 0 01-4.39.955z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M27.644 57.64c-1.003-.284-.788-.323-1.58.33a.495.495 0 01-.809-.364c-.037-1.041.066-.85-.802-1.4a.494.494 0 01.095-.882c.98-.36.828-.203 1.085-1.196a.495.495 0 01.868-.18c.645.82.45.726 1.472.662a.495.495 0 01.442.77c-.582.866-.552.65-.173 1.605a.495.495 0 01-.598.656zM33.408 56.31c-1.004-.285-.789-.324-1.58.33a.497.497 0 01-.81-.364c-.036-1.043.066-.85-.801-1.402a.494.494 0 01.095-.882c.98-.36.827-.201 1.08-1.196a.496.496 0 01.869-.18c.644.82.449.725 1.471.662a.496.496 0 01.443.77c-.583.866-.552.65-.174 1.605a.495.495 0 01-.593.657zM38.952 54.98c-1.003-.287-.789-.324-1.58.33a.495.495 0 01-.81-.366c-.036-1.042.066-.85-.801-1.4a.494.494 0 01.095-.883c.98-.36.827-.202 1.084-1.195a.494.494 0 01.87-.18c.643.82.45.725 1.47.662a.494.494 0 01.443.77c-.583.866-.552.65-.173 1.605a.496.496 0 01-.598.656z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M128.981 52.498c-2.406.07-5.82-1.574-7.993-2.62-6.848-3.294-7.896-.995-19.497-4.257-2.09-.588-4.257-.525-3.344 1.569 3.182 7.3 20.028 6.617 29.927 21.779 3.7 5.664 9.089 8.801 15.691 9.963 1.187.21 1.169.18 1.647-.989 4.75-11.566 6.258-11.567 4.931-12.065-5.934-2.227-10.758-9.356-14.026-14.767-3.661-6.054-7.091-10.095-14.714-10.224-10.109-.169-7.827 1.556-10.17-.49a61.858 61.858 0 019.822-.792c16.856.04 14.752 18.034 29.81 25.605.384.194.468.159 1.253-1.554.762-1.661 2.399-1.48 6.161-.27 10.041 3.23 17.639 7.743 4.593 2.71-.455-.18-.579-.085-.712.349-.809 2.657-4.788 13.026-7.552 16.639-.6.785-1.247 1.065-.658-.564 1.354-3.74 6.516-14.754 7.103-16.554.104-.323.169-.516-.247-.667-5.96-2.166-6.654-2.28-7.496-1.024a113.054 113.054 0 00-7.959 16.867c-.753 2.055-1.377 4.2.18 5.69 3.811 3.646 19.117 9.484 18.682 10.498-.744 1.736-14.554-5.555-16.453-6.738-6.124-3.824-5.125-5.839-3.471-10.409a20.693 20.693 0 01-7.313-1.888c-12.728-5.374-8.957-14.346-28.078-22.591-4.22-1.82-9.972-3.89-11.892-7.957-1.122-2.375.36-4.495 6.119-2.851 8.715 2.484 11.797.54 18.979 4.31 6.59 3.466 6.173 2.712 6.677 3.292z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M111.125 22.591c-.039 6.947-3.543 12.787-4.601 13.666-.346.29-.753.08 6.434 6.7 2.439 2.248 2.885 2.469 1.947 2.758-1.355.42-7.559-.658-8.356-.818-1.771-.36-2.607-1.294-4.734-3.545-.928-.98-2.082 2.248-9.7 3.444-13.603 2.14-25.325-6.947-27.142-19.203-2.667-17.992 16.22-30.85 32.39-23.475 8.136 3.712 13.162 10.412 13.762 20.473zm-1.306.187c0-10.38-8.092-20.882-21.463-21.275-10.676-.315-21.323 7.381-22.094 19.282-.951 14.595 11.867 25.043 25.786 22.711a21.115 21.115 0 0017.771-20.718zm1.569 21.474a30.393 30.393 0 00-4.603-5.223.726.726 0 00-1.078-.096c-.53.524-.27.834 3.511 4.046a5.081 5.081 0 002.17 1.273zM110.934 59.41a3.306 3.306 0 01-.617 1.438c-.569.846-.172 1.58-.026 2.36.062.329.282.17.469.126a1.288 1.288 0 011.732.877c.566 1.66.688 6.126-.136 2.076-.316-1.56-.547-2.563-1.395-2.435-.321.049-.495.14-.396.532 1.066 4.219 1.012 6.259 2.877 4.772 1.999-1.594 3.274-4.561 2.687-8.247a1.06 1.06 0 01.612.777c1.732 5.676-4.486 7.808.129 9.73.572.237.007-2.04 2.471-1.726a4.867 4.867 0 012.855 1.187c-.639.75-4.464-1.997-4.548.667-.014.41.443.34.689.432 4.562 1.718 5.4-.474 4.469-2.08-1.334-2.3-3.248-2.686-3.649-3.274.54-.622 3.263.658 4.443 3.136a2.69 2.69 0 01-2.943 3.799 19.962 19.962 0 01-4.585-1.449 2.698 2.698 0 01-1.693-2.443c-3.711 1.882-3.174.708-5.088-7.003-.899.615-1.755 1.57-3.576 1.612-2.043.047-1.455-1.349-1.208-8.352.022-.614 1.189-1.776.545 6.73-.128 1.694 2.814.3 3.825-1.415.64-1.084.949-1.739 1.215-2.17.652-1.052.971-.855.842.342zM104.023 49.232c-1.94-.068-4.255-1.228-4.056-1.685.134-.307.128-.228 2.972.57 2.308.647 2.404-1.135 2.941-.597.585.584-1.031 1.74-1.857 1.712z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M68.336 22.927A18.738 18.738 0 0184.443 3.8c19.959-3.075 30.844 20.084 17.352 32.574-12.497 11.56-33.12 3.226-33.46-13.447zM88.068 40.64c18.537.02 25.618-24.28 9.303-33.56-7.29-4.145-16.806-2.926-22.455 2.749-12.107 12.16-2.672 30.79 13.152 30.808v.003z",fill:"#050910"}),Q__namespace.createElement("path",{d:"M95.707 13.212c.009 15.405.956 21.027.732 23.319-.069.698.728.54 1.383.314-.035-6.884-.306-17.72-.937-25.005-.154-1.791-1.36-1.701-3.056-1.334-13.923 3.013-19.188 4.127-21.544 4.708-.307.076-.238.281-.498 1.176a.204.204 0 00.158.258.203.203 0 00.112-.01c1.844-.656 5.134-.947 10.893-2.27 12.8-2.939 12.755-3.318 12.757-1.156z",fill:"#0B89CE"}),Q__namespace.createElement("path",{d:"M84.617 18.856c-1.181.009-1.2-.747-.346-1.02 11.438-3.679 13.661-1.316.346 1.02zM84.963 21.579c-1-.098-.981-.94-.16-1.178 7.359-2.13 7.722-.817 6.473-.197a50.547 50.547 0 01-6.313 1.375zM85.368 38.869c-1.438-.412-1.122-.477-2.273.472a.713.713 0 01-1.169-.522c-.054-1.497.103-1.215-1.153-2.015a.713.713 0 01.144-1.27c1.407-.514 1.187-.277 1.56-1.72a.712.712 0 011.25-.262c.923 1.18.629 1.044 2.118.952a.71.71 0 01.757.737.707.707 0 01-.122.372c-.836 1.243-.796.924-.25 2.31a.714.714 0 01-.861.947zM93.344 36.955c-1.438-.411-1.122-.476-2.273.472a.712.712 0 01-1.164-.524c-.055-1.497.102-1.214-1.154-2.014a.712.712 0 01.136-1.27c1.407-.514 1.188-.278 1.56-1.72a.714.714 0 011.25-.262c.924 1.18.63 1.044 2.119.953a.709.709 0 01.663.356.706.706 0 01-.028.752c-.837 1.243-.797.924-.25 2.309a.72.72 0 01.038.39.72.72 0 01-.506.557.711.711 0 01-.39 0zM74.657 25.215c1.321-1.844 3.499-1.936 3.093-.602-.405 1.334.242 2.184 1.13 1.902a1.282 1.282 0 00.425-1.843.9.9 0 01.76-1.528c2.213.338 4.713 2.469 3.736 3.315-.907.785-8.279 1.776-8.861 1.841-2.066.23-1.386-1.55-.283-3.085zM78.95 21.545a2.23 2.23 0 01-3.056.409 2.564 2.564 0 01-.444-3.39c1.917-2.317 5.315.718 3.5 2.98z",fill:"#0B89CE"}))}var coe=Q__namespace.memo(loe),n6=coe;var uE=({search:e})=>{let{locale:t}=w();return Q__namespace.default.createElement("div",{className:"flex-1 p-4"},Q__namespace.default.createElement("div",{className:"flex flex-col items-center py-8 text-center"},Q__namespace.default.createElement(n6,{fontSize:100}),Q__namespace.default.createElement("p",{className:"text-[14px] text-[#687588] mt-3 max-w-[250px]"},To(t,"noResultsFound")," ",Q__namespace.default.createElement("br",null),Q__namespace.default.createElement("span",{className:"font-medium text-[#0B89CE]"},'"',e,'"'))))};function Ti({name:e,asPage:t,src:o,rating:r,isCommunity:n}){let a=r>=4?"#FF9900":r>=3?"#969696":"#E53935",s=Math.min(1,Math.max(0,r/5));return Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(J,{type:t?"page":n?"community":"user",name:e??"",src:o??"",className:"w-14 h-14"}),Q__namespace.default.createElement("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 flex items-start gap-1 px-[0.25rem] py-[0.125rem] border-2 border-white font-bold text-[0.625rem] rounded-[0.84375rem]",style:{backgroundColor:a,color:"white"}},Q__namespace.default.createElement("span",null,r?.toFixed(1)),Q__namespace.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 6 6",xmlns:"http://www.w3.org/2000/svg"},Q__namespace.default.createElement("defs",null,Q__namespace.default.createElement("linearGradient",{id:"grad-star-badge"},Q__namespace.default.createElement("stop",{offset:`${s*100}%`,stopColor:"white"}),Q__namespace.default.createElement("stop",{offset:`${s*100}%`,stopColor:"rgba(255,255,255,0.3)"}))),Q__namespace.default.createElement("path",{d:"M3.20142 0.188283L3.85081 1.56118C3.89865 1.66065 3.98997 1.72972 4.09528 1.74507L5.55393 1.96857C5.63911 1.98115 5.71642 2.02843 5.76864 2.10057C5.82027 2.1718 5.84245 2.26206 5.8299 2.35078C5.81969 2.42446 5.78673 2.49261 5.73626 2.5448L4.67932 3.62267C4.60201 3.69789 4.56701 3.80933 4.58568 3.91831L4.8459 5.43365C4.87361 5.61662 4.75838 5.78916 4.58568 5.82385C4.51449 5.83582 4.44156 5.82323 4.37738 5.78885L3.07627 5.07569C2.97971 5.02443 2.86564 5.02443 2.76908 5.07569L1.46797 5.78885C1.3081 5.87819 1.11001 5.8174 1.02104 5.65162C0.988071 5.58562 0.976402 5.5104 0.987196 5.43703L1.24742 3.92138C1.26609 3.8127 1.23079 3.70065 1.15377 3.62543L0.0968382 2.54818C-0.0288971 2.42047 -0.0326896 2.21017 0.0883781 2.07786C0.0910036 2.07509 0.0939209 2.07202 0.0968382 2.06895C0.147016 2.01523 0.212946 1.98115 0.284128 1.97225L1.74277 1.74845C1.8478 1.73279 1.93911 1.66433 1.98724 1.56425L2.61329 0.188283C2.66902 0.0703953 2.78454 -0.00297725 2.90998 9.27295e-05H2.94908C3.05789 0.0139076 3.1527 0.0848242 3.20142 0.188283Z",fill:"url(#grad-star-badge)",opacity:"0.9"}))))}var oh=({name:e,title:t,company:o,image:r,slug:n,isHorizontal:a=false,headline:s})=>{let{locale:i}=w();return a?Q__namespace.default.createElement("div",{className:"flex flex-col items-center gap-2 cursor-pointer hover:bg-[#F7FAFC] p-2 rounded-[8px] transition min-w-[80px]",onClick:()=>{if(be(),t==="page")return window.open(`/company/${i}/${n}`,"_self");if(t==="community")return window.open(`/community/${i}/${n}`,"_self")}},Q__namespace.default.createElement(J,{src:r,name:e||"",type:t,className:"h-12 w-12"}),Q__namespace.default.createElement("div",{className:"text-center"},Q__namespace.default.createElement("p",{className:"text-[12px] text-[#050910] font-medium leading-[14px] truncate max-w-[70px]"},e))):Q__namespace.default.createElement("div",{className:"flex items-center gap-3 cursor-pointer hover:bg-[#F7FAFC] p-2 rounded-[8px] transition",onClick:()=>(be(),window.open(`/profile/${i}/${n}`,"_self"))},Q__namespace.default.createElement(Ti,{name:e,asPage:t==="page",src:r,rating:0}),Q__namespace.default.createElement("div",{className:"flex flex-col"},Q__namespace.default.createElement("p",{className:"text-[14px] text-[#050910] font-medium leading-[18px] line-clamp-1 flex-shrink"},e),Q__namespace.default.createElement("p",{className:"text-[11.5px] text-gray-shade8 font-medium leading-[18px] line-clamp-1 flex-shrink"},s||null)))};var fE=({search:e,users:t,pagesAndCommunities:o,sentryRef:r,isFetchingNextPage:n})=>{let{locale:a}=w();return Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto p-4"},o&&o?.length>0&&Q__namespace.default.createElement("div",{className:"mb-4"},Q__namespace.default.createElement("p",{className:"text-[12px] font-medium text-[#8893A1] uppercase mb-2"},To(a,"pagesAndCommunities")),Q__namespace.default.createElement("div",{className:"flex gap-2 overflow-x-auto pb-2 scrollbar-hide"},o?.map(s=>Q__namespace.default.createElement(oh,{key:s?.id,...s,isHorizontal:true})))),t&&t?.length>0&&Q__namespace.default.createElement("div",null,Q__namespace.default.createElement("p",{className:"text-[12px] font-medium text-[#8893A1] uppercase mb-2"},To(a,"people")),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2"},t?.map(s=>Q__namespace.default.createElement(oh,{key:s?.id,...s})),Q__namespace.default.createElement("div",{ref:r,className:"flex justify-center py-2"},n&&Q__namespace.default.createElement(he,{className:"w-5 h-5"})))))};var gE=()=>{let{locale:e}=w(),{isMobile:t}=ft();return Q__namespace.default.createElement("div",{className:"flex-1 flex flex-col items-center justify-center py-10 text-center"},Q__namespace.default.createElement(n6,{fontSize:100}),Q__namespace.default.createElement("p",{className:"text-[14px] font-bold mt-2"},t?To(e,"historyEmpty"):To(e,"startSearching")),t&&Q__namespace.default.createElement("p",{className:"text-[12px] text-[#8893A1] mt-1"},To(e,"recentSearchesWillAppear")))};function ya(e){let{color:t="#111827",fontSize:o=20}=e;return Q__namespace.default.createElement("svg",{width:o,height:o,viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Q__namespace.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.76639 1.52734C5.21636 1.52734 1.52783 5.21587 1.52783 9.7659C1.52783 14.3159 5.21636 18.0045 9.76639 18.0045C14.3164 18.0045 18.0049 14.3159 18.0049 9.7659C18.0049 5.21587 14.3164 1.52734 9.76639 1.52734ZM0.027832 9.7659C0.027832 4.38744 4.38793 0.0273438 9.76639 0.0273438C15.1448 0.0273438 19.5049 4.38744 19.5049 9.7659C19.5049 15.1444 15.1448 19.5045 9.76639 19.5045C4.38793 19.5045 0.027832 15.1444 0.027832 9.7659Z",fill:t}),Q__namespace.default.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.4871 15.9548C15.7796 15.6615 16.2545 15.6609 16.5477 15.9534L20.0718 19.4683C20.365 19.7608 20.3657 20.2357 20.0732 20.529C19.7806 20.8222 19.3058 20.8228 19.0125 20.5303L15.4885 17.0155C15.1952 16.7229 15.1946 16.2481 15.4871 15.9548Z",fill:t}))}var hE=({onClose:e,inputValue:t,onInputChange:o,onKeyDown:r})=>{let{locale:n}=w(),a=To(n,"searchPlaceholder");return Q__namespace.default.createElement("div",{className:"flex items-center gap-2 p-4 border-b border-[#E6EBF1]"},Q__namespace.default.createElement("button",{onClick:e,className:"w-10 h-10 flex items-center justify-center rounded-full bg-[#F1F5F9] hover:bg-[#E2E8F0] transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-[#050910]"})),Q__namespace.default.createElement("div",{className:"flex-1"},Q__namespace.default.createElement(et,{leftIcon:Q__namespace.default.createElement(ya,{color:"#687588"}),className:"h-[40px] rounded-[1rem] bg-[#F7FAFC] border-[#E6EBF1] text-[20px] md:text-[16px]",wrapperClassName:"w-full text-[20px] md:text-[16px]",inputClassName:"text-[20px] md:text-[16px]",placeholder:a,value:t??"",onChange:s=>o?.(s.target.value),onKeyDown:r,autoFocus:true})))};var vE=({search:e,users:t,pagesAndCommunities:o,noResults:r,isLoading:n,isFetchingNextPage:a,sentryRef:s,lastSearches:i=[],lastSearchesIsLoading:l,onLastSearchClick:d,onClearAllSearches:c,isClearingSearches:p,onClose:m,inputValue:u,onInputChange:f,onKeyDown:g})=>{let{isMobile:h}=ft(),v=!t?.length&&!o?.length,y=!e.trim()&&i?.length>0,b=()=>h?Q__namespace.default.createElement(hE,{onClose:m,inputValue:u,onInputChange:f,onKeyDown:g}):null;return l&&!e?.trim()?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(th,null)):!e?.trim()&&v&&y?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(mE,{items:i,onItemClick:d,onClearAll:c,isClearing:p})):!e?.trim()&&v?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(gE,null)):n&&v?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(th,null)):r?Q__namespace.default.createElement(I0,{className:"h-full flex flex-col"},b(),Q__namespace.default.createElement(uE,{search:e})):Q__namespace.default.createElement(I0,{className:h?"h-full flex flex-col":"max-h-[400px] overflow-hidden flex flex-col"},b(),Q__namespace.default.createElement(fE,{search:e,users:t,pagesAndCommunities:o,sentryRef:s,isFetchingNextPage:a}),Q__namespace.default.createElement(iE,{search:e}))};var yE=e=>{if(!e||e?.length===0)return {users:[],pagesAndCommunities:[],vacancies:[],posts:[]};let t=[],o=[],r=[],n=[],a=[];return e?.forEach(s=>{let i=(s?.users?.data||[])?.map(m=>({id:m?.user_id??"",name:m?.name??void 0,title:"user",image:m?.image_url??"",slug:m?.slug??"",headline:m?.headline??""}));t.push(...i);let l=(s?.communities?.data||[])?.map(m=>({id:m?.community_id??"",name:m?.name??void 0,title:"community",image:m?.image_url??"",slug:m?.slug??""}));o?.push(...l);let d=(s?.companies?.data||[]).map(m=>({id:m?.company_id??"",name:m?.name??void 0,title:"page",image:m?.image_url??"",slug:m?.slug??""}));r?.push(...d);let c=(s?.vacancies?.data||[])?.map(m=>({id:m?.vacancy_id??"",name:m?.title??void 0,title:"vacancy",company:m?.company_name??"",slug:m?.slug??""}));n?.push(...c);let p=(s?.posts?.data||[]).map(m=>({id:m?.post_id??"",name:m?.author_name??void 0,title:"post",image:m?.author_image_url??"",headline:m?.content??""}));a?.push(...p);}),{users:t,pagesAndCommunities:[...o,...r],vacancies:n,posts:a}};var bE=()=>{let e=()=>typeof window>"u"?"":new URLSearchParams(window.location.search).get("q")||"",[t,o]=Q.useState(()=>typeof window<"u"?e():""),r=a=>{if(typeof window>"u")return;let s=new URL(window.location.href);a.trim()?s.searchParams.set("q",a):s.searchParams.delete("q"),window.history.replaceState({},"",s.toString());};return Q.useEffect(()=>{if(typeof window<"u"){let a=e();a&&t!==a&&o(a);}},[]),{value:t,setValue:a=>{o(a);},updateUrlSearch:r,getSearchFromUrl:e}};var xE=({isFocus:e})=>{let{searchApi:t,user:o,queryClient:r}=w(),n=t6(t??"",o?.accessToken),a=De({queryKey:["last-searches",o?.id],queryFn:()=>eE(n),enabled:!!o?.id&&e}),s=ne({mutationFn:()=>tE(n),onSuccess:()=>{r?.setQueryData(["last-searches",o?.id],[]),r?.invalidateQueries({queryKey:["last-searches",o?.id]});}});return {lastSearches:a.data??[],lastSearchesError:a.error,lastSearchesIsLoading:a.isLoading,refetchLastSearches:a.refetch,deleteAllLastSearches:s.mutate,isDeletingAllSearches:s.isPending}};var s6=()=>{let[e,t]=Q.useState(false),o=Q.useRef(null),{isMobile:r}=ft(),{locale:n}=w(),{value:a,setValue:s}=bE(),i=usehooks.useDebounce(a,500),{globalSearchData:l,globalSearchIsGettingData:d,fetchNextPage:c,isFetchingNextPage:p,hasNextPage:m}=oE(i),{lastSearches:u,lastSearchesIsLoading:f,deleteAllLastSearches:g,isDeletingAllSearches:h}=xE({isFocus:e}),v=XI({loading:d||p,hasNextPage:!!m,onLoadMore:c}),{users:y,pagesAndCommunities:b}=yE(l);ha(o,()=>t(false));let x=S=>{S.key==="Enter"&&(S.preventDefault(),R9(a),eh(a,n));},C=S=>{s(S);},M=i?.trim()?.length>0&&!d&&y?.length===0&&b?.length===0,P=To?.(n,"searchPlaceholder");return Q__namespace.default.createElement("div",{className:"relative w-full",ref:o},r?Q__namespace.default.createElement(et,{leftIcon:Q__namespace.default.createElement("div",{className:"w-5 h-5 [&>svg_*]:fill-white flex items-center justify-center"},Q__namespace.default.createElement(ya,{color:"#687588"})),placeholderColor:"!text-white",className:"rounded-[1rem] w-full max-w-full !text-white h-[1.938rem] p-[1rem] bg-[#FFFFFF1A] placeholder-white",onFocus:()=>t(true),onChange:S=>s(S.target.value),onKeyDown:x,value:a,placeholder:P}):Q__namespace.default.createElement(et,{onFocus:()=>t(true),onChange:S=>s(S.target.value),onKeyDown:x,className:"h-[46px]",wrapperClassName:"min-w-[380px]",leftIcon:Q__namespace.default.createElement(ya,{color:"#687588"}),placeholder:P,value:a}),e&&Q__namespace.default.createElement(vE,{search:i,users:y,pagesAndCommunities:b,noResults:M,isLoading:d,isFetchingNextPage:p,sentryRef:v,lastSearches:u,lastSearchesIsLoading:f,onLastSearchClick:C,onClearAllSearches:g,isClearingSearches:h,onClose:()=>t(false),inputValue:a,onInputChange:s,onKeyDown:x}))};var wE=({hasMessage:e=false,color:t="#111827"})=>Q__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},Q__namespace.createElement("path",{fill:t,d:"M12.02 2C6.21 2 2 6.74 2 12c0 1.68.49 3.41 1.35 4.99.16.26.18.59.07.9l-.67 2.24c-.15.54.31.94.82.78l2.02-.6c.55-.18.98.05 1.491.36 1.46.86 3.279 1.3 4.919 1.3 4.96 0 10-3.83 10-10C22 6.65 17.7 2 12.02 2",opacity:"0.4"}),Q__namespace.createElement("path",{fill:t,d:"M7.37 10.73c.71 0 1.28.57 1.28 1.28 0 .7-.57 1.27-1.28 1.28-.7 0-1.28-.58-1.28-1.28 0-.71.57-1.28 1.28-1.28m4.61 0c.71 0 1.28.57 1.28 1.28 0 .7-.57 1.28-1.28 1.28-.71-.01-1.28-.58-1.28-1.29 0-.7.58-1.28 1.28-1.27m4.61 0c.71 0 1.28.57 1.28 1.28 0 .7-.57 1.28-1.28 1.28s-1.28-.58-1.28-1.28c0-.71.57-1.28 1.28-1.28"}),e&&Q__namespace.createElement(Q__namespace.Fragment,null,Q__namespace.createElement("rect",{width:"10",height:"10",x:"13.002",y:"1",fill:"#E03137",rx:"5"}),Q__namespace.createElement("rect",{width:"10",height:"10",x:"13.002",y:"1",stroke:"#fff",strokeWidth:"2",rx:"5"})));function hoe({hasMessage:e,color:t="#fff",...o}){return Q__namespace.createElement("div",{className:"relative inline-block"},Q__namespace.createElement("svg",{width:18,height:18,fill:"none",...o},Q__namespace.createElement("path",{opacity:.4,d:"M9.141.666c-4.842 0-8.35 3.95-8.35 8.333 0 1.4.408 2.842 1.125 4.159.133.216.15.491.058.75l-.558 1.866c-.125.45.258.784.683.65l1.684-.5c.458-.15.816.042 1.242.3 1.217.717 2.733 1.084 4.1 1.084 4.133 0 8.333-3.192 8.333-8.334 0-4.433-3.584-8.308-8.317-8.308z",fill:t}),Q__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.108 10.075A1.076 1.076 0 018.04 9c0-.583.484-1.067 1.067-1.058.592 0 1.067.475 1.067 1.066 0 .584-.475 1.067-1.067 1.067zm-3.842 0a1.074 1.074 0 01-1.067-1.067c0-.591.475-1.066 1.067-1.066s1.067.475 1.067 1.066c0 .584-.475 1.059-1.067 1.067zm6.617-1.067c0 .584.475 1.067 1.066 1.067.592 0 1.067-.483 1.067-1.067 0-.591-.475-1.066-1.067-1.066-.591 0-1.066.475-1.066 1.066z",fill:t})),e===true&&Q__namespace.createElement("span",{className:"absolute top-0 right-0 w-1.5 h-1.5 rounded-full bg-red-500 border border-white"}))}var CE=Q__namespace.memo(hoe);var i6="mirantes-pending-chat-id";function ME(){try{let e=sessionStorage.getItem(i6);return e&&sessionStorage.removeItem(i6),e}catch{return null}}function l6(e){e?sessionStorage.setItem(i6,e):sessionStorage.removeItem(i6);}function Om(){let[e,t]=y2("chat-visible",false),[o,r]=Q.useState(false),n=Q.useCallback(()=>{t(i=>!i);},[t]),a=Q.useCallback(i=>{t(true),i!==void 0&&r(i);},[t]),s=Q.useCallback(()=>{t(false);},[t]);return Q.useEffect(()=>{let i=l=>{let{open:d,sendMessageToPage:c,pendingChatId:p,chatId:m}=l.detail||{};t(typeof d=="boolean"?d:u=>!u),c!==void 0&&r(c),(p||m)&&l6(p||m||null);};return window.addEventListener("openChat",i),()=>{window.removeEventListener("openChat",i);}},[t]),{isChatVisible:e,isToSendMessageToPage:o,toggleChat:n,openChat:a,closeChat:s}}var xoe=()=>{let e=navigator.userAgent||navigator.vendor;return /android|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i.test(e.toLowerCase())},PE=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1,SE=()=>/android/i.test(navigator.userAgent);function NE({forMobile:e=false,chatForPage:t=false}){let{user:o,environment:r,locale:n}=w(),{userLocation:a}=Jo(),{registerEvent:s}=Qo(),{hasMessages:i,setHasMessages:l}=$t(),{isChatVisible:d,toggleChat:c}=Om(),p=PE()?"ios":SE()?"android":"web",m=xoe(),u=()=>m&&(p==="ios"||p==="android")?"mirantes-mobile":"mirantes-web",f=()=>{if(!m)return;let v=navigator.userAgent,y="unknown";if(PE()){let b=v.match(/iPhone|iPad|iPod/);y=b?b[0]:"iOS Device";}else if(SE()){let b=v.match(/Android.*; (.*?)\//);y=b?b[1]:"Android Device";}return {os:p,model:y}},g=()=>{window.dispatchEvent(new CustomEvent("openChat",{detail:{sendMessageToPage:t}}));};Q.useEffect(()=>{if(!d)return;l(false);let v=f();s({input:{source:{app:u(),platform:p,environment:r,version:"1.0.0"},actor:{user_id:o?.id,anonymous_id:o?.id?void 0:uuid.v4(),session_id:sessionStorage.getItem("session_id")||uuid.v4()},context:{route:"/chat",referrer:document.referrer,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,locale:n,country:a?.country_name||"",device:v,browser:{name:navigator.userAgent.includes("Chrome")?"Chrome":navigator.userAgent.includes("Firefox")?"Firefox":navigator.userAgent.includes("Safari")?"Safari":navigator.userAgent.includes("Edge")?"Edge":"Other",version:(navigator.userAgent.match(/(Chrome|Firefox|Safari|Edge)\/(\d+\.\d+)/)||[])[2]||void 0}},events:[{event_id:uuid.v4(),event_type:"PAGE_VIEW",occurred_at:new Date,metadata:{interaction_type:"button_click",button_location:e?"mobile_navbar":"desktop_navbar",has_unread_messages:i,from_route:window.location.pathname,environment:r,component:"MirantesChatButton"}}]}});},[d]);let h=e?Q__namespace.default.createElement("button",{type:"button",onClick:g,className:E("w-8 h-8 rounded-full flex items-center justify-center transition-all z-10","cursor-pointer active:scale-95",d?"bg-primary/10":"bg-[#FFFFFF1A]"),"aria-label":d?"Fechar mensagens":"Abrir mensagens"},Q__namespace.default.createElement(CE,{hasMessage:i,color:"#ffffff"})):Q__namespace.default.createElement(X,{onClick:g,className:E("transition-all")},Q__namespace.default.createElement(wE,{hasMessage:i,color:d?"#0B89CE":"#111827"}));return Q__namespace.default.createElement("div",null,h)}var c6=NE;function AE({className:e}){let{Notification:t}=w();return Q__namespace.default.createElement("header",{className:ut("hidden lg:block w-full z-[500] h-[70px] bg-white sticky top-0",e)},Q__namespace.default.createElement("div",{className:"flex max-w-[1440px] px-8 h-full items-center justify-between w-full mx-auto"},Q__namespace.default.createElement("div",{className:"flex items-center gap-x-6"},Q__namespace.default.createElement("a",{href:"/",className:"button-empty !p-0 inline-flex","aria-label":"Ir para a p\xE1gina inicial",onClick:o=>{o.preventDefault(),be(),window.location.href="/";}},Q__namespace.default.createElement(OA,null)),Q__namespace.default.createElement(s6,null)),Q__namespace.default.createElement($I,null),Q__namespace.default.createElement("div",{className:"flex items-center gap-x-6"},Q__namespace.default.createElement(c6,null),t,Q__namespace.default.createElement(qA,null))))}function woe(e){return Q__namespace.createElement("svg",{width:52,height:32,fill:"none",...e},Q__namespace.createElement("path",{d:"M7.698 32H3.945c-2.11 0-3.82-1.66-3.82-3.708V0h3.521c2.239 0 4.052 1.76 4.052 3.933V32zM16.384 30.918h-3.751c-2.112 0-3.822-1.66-3.822-3.71V3.46h3.541c2.227 0 4.032 1.751 4.032 3.913v23.546zM24.178 27.245h-3.593c-1.828 0-3.312-1.44-3.312-3.215V7.137h3.433c1.918 0 3.472 1.509 3.472 3.37v16.738z",fill:"#fff"}))}var Coe=Q__namespace.memo(woe),IE=Coe;function EE({className:e}){let{user:t,locale:o,Notification:r}=w(),[n,a]=y2("mobile-explore-open",false);return Q.useEffect(()=>{let s=()=>{a(false);};return window.addEventListener("closeExploreCard",s),()=>{window.removeEventListener("closeExploreCard",s);}},[]),Q__namespace.default.createElement("header",{className:ut("w-full sticky top-0 z-[200] bg-primary h-[5rem] px-6 flex lg:hidden items-center justify-between gap-x-4",e)},Q__namespace.default.createElement("div",{role:"button",onClick:()=>{be(),window.location.href=`/feed/${o}`;},className:"flex-none flex items-center"},Q__namespace.default.createElement(IE,null)),Q__namespace.default.createElement("div",{className:"flex-1 flex items-center justify-center min-w-0"},Q__namespace.default.createElement(s6,null)),Q__namespace.default.createElement("div",{className:"flex-none flex items-center"},Q__namespace.default.createElement(c6,{forMobile:true})),Q__namespace.default.createElement("div",{className:"flex-none w-8 h-8 relative"},Q__namespace.default.createElement("div",{onClick:()=>{be(),window.location.href=`/profile/${o}`;},className:"absolute top-0 left-0 w-full h-full flex border border-white rounded-full border-dashed items-center justify-center cursor-pointer"},Q__namespace.default.createElement(J,{name:t?.name,src:t?.avatar,className:"w-8 h-8"}))))}function kE({className:e}){return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(AE,{className:e}),Q__namespace.default.createElement(EE,{className:e}))}function Um({delayDuration:e=0,...t}){return Q__namespace.createElement(ba__namespace.Provider,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function p6({...e}){return Q__namespace.createElement(Um,null,Q__namespace.createElement(ba__namespace.Root,{"data-slot":"tooltip",...e}))}function m6({...e}){return Q__namespace.createElement(ba__namespace.Trigger,{"data-slot":"tooltip-trigger",...e})}function u6({className:e,sideOffset:t=0,children:o,...r}){return Q__namespace.createElement(ba__namespace.Portal,null,Q__namespace.createElement(ba__namespace.Content,{"data-slot":"tooltip-content",sideOffset:t,style:{color:"#fff"},className:E("bg-primary text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...r},o,Q__namespace.createElement(ba__namespace.Arrow,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})))}var Poe=({activeTab:e,onTabChange:t})=>{let{user:o,locale:r}=w(),n=()=>{window.location.href="/profile/"+r;};return Q__namespace.default.createElement("div",{className:"flex flex-col items-center h-full pt-8 pb-8 px-4 bg-white border border-[#E4EBF1] w-[5.375rem] rounded-[1rem]"},Q__namespace.default.createElement(Um,null,Q__namespace.default.createElement(p6,null,Q__namespace.default.createElement(m6,{asChild:true},Q__namespace.default.createElement("div",{className:"mb-4"},Q__namespace.default.createElement(J,{name:o?.name||"User",src:o?.avatar,onClick:n,className:"w-10 h-10 cursor-pointer"}))),Q__namespace.default.createElement(u6,{side:"left",className:"bg-primary text-white"},Q__namespace.default.createElement("p",{className:"!text-white"},o?.name)))),Q__namespace.default.createElement("div",{className:"w-full h-px bg-[#0000001A] mb-6"}),Q__namespace.default.createElement("div",{className:"flex flex-col gap-2 flex-1"},Q__namespace.default.createElement(X,{className:"rounded-[1rem] p-[0.625rem] h-[2.625rem] w-[2.625rem] bg-[#0B89CE]"},Q__namespace.default.createElement(M2,null))),Q__namespace.default.createElement(X,{onClick:()=>{localStorage.setItem("chosenMenuItem","privacy"),window.location.href=`/settings/${r}`;},className:"!bg-transparent !border-0 !cursor-pointer"},Q__namespace.default.createElement(Ku,null)))},TE=Poe;function f6(e,t=300){let[o,r]=Q.useState(e);return Q.useEffect(()=>{let n=setTimeout(()=>{r(e);},t);return ()=>{clearTimeout(n);}},[e,t]),o}var DE=()=>{let[e,t]=Q.useState("list"),[o,r]=Q.useState(false),[n,a]=Q.useState("forward"),[s,i]=Q.useState(false),[l,d]=Q.useState(false),[c,p]=Q.useState(null),[m,u]=Q.useState(false),[f,g]=Q.useState(null);return {viewMode:e,setViewMode:t,isTransitioning:o,setIsTransitioning:r,transitionDirection:n,setTransitionDirection:a,showCreateDrawer:s,setShowCreateDrawer:i,showNewChatDrawer:l,setShowNewChatDrawer:d,selectedContactId:c,setSelectedContactId:p,groupDetailsOpen:m,setGroupDetailsOpen:u,selectedGroupId:f,setSelectedGroupId:g}};var sh=768;function Bs(){let[e,t]=Q__namespace.useState(void 0);return Q__namespace.useEffect(()=>{let o=window.matchMedia(`(max-width: ${sh-1}px)`),r=()=>{t(window.innerWidth<sh);};return o.addEventListener("change",r),t(window.innerWidth<sh),()=>o.removeEventListener("change",r)},[]),!!e}async function Eoe(e,t,o){try{return (await c7.request(e??"",Bp,{input:o?.input},{"x-access-token":t??""}))?.createConversation}catch{return null}}function h6({chatForPage:e=false}){let{user:t,page:o,chatApiUrl:r}=w(),[n,a]=Q.useState(""),s=e?o?.id:t?.id,i=YC(n,false),{mutate:l,isPending:d}=ne({mutationFn:async m=>{let{participants:u,groupInfo:f}=m;if(!u?.length||!s)return null;let g=[...new Set(u)],h=f!==void 0||g?.length>1;if(!h&&g?.length===1&&!f){let b=g?.[0];a(b);let C=(await i.refetch())?.data?.checkExistingConversation?.conversationId;if(C)return C}let y={input:{participants:[s,...g],isGroup:h,...f&&{name:f.name,description:f.description,image:f.image,banner:f.banner},...e?{pageId:s}:{}}};return Eoe(r??"",t?.accessToken??"",y)},onSuccess:m=>{m?.id&&(hr?.invalidateQueries({queryKey:["conversation",m?.id]}),hr.invalidateQueries({queryKey:["messages",m?.id]}));}});return {createConversation:l,createDMConversation:m=>l({participants:m}),createGroupConversation:(m,u)=>l({participants:m,groupInfo:u}),isCreatingConversation:d||i.isFetching||i.isLoading}}function LE(e=false){let{user:t}=w(),{uploadAssets:o,isUploadingAsset:r}=rs(),{createConversation:n,isCreatingConversation:a}=h6({chatForPage:e});return {createGroup:(i,l)=>{let{name:d,bio:c,memberIds:p,photo:m}=i,u=f=>{n({participants:p,groupInfo:{name:d,image:f,description:c}},{onSuccess(g){let h=g?.id??g??"";l?.onSuccess?.(h);},onError(){l?.onError?.();}});};m?o({file:m,owner_type:"chat",owner_id:t?.id,is_public:true},{onSuccess:f=>{let g=f?.data?.url;u(g);},onError:()=>{u();}}):u();},isCreatingGroup:a||r}}var FE=(e,t,o,r)=>{let{createConversation:n}=h6({chatForPage:r}),{locale:a}=w(),s=Bs(),{createGroup:i,isCreatingGroup:l}=LE(r),{conversation:d,isLoadingConversation:c}=ca(e.selectedGroupId??"",r),p=()=>{e.setTransitionDirection("back"),e.setIsTransitioning(true),setTimeout(()=>{e.setViewMode("list"),e.setIsTransitioning(false);},150);};return {handleNavigateBack:p,handleOpenCreateGroup:()=>{e.setShowCreateDrawer(false),e.setTransitionDirection("forward"),e.setIsTransitioning(true),setTimeout(()=>{e.setViewMode("createGroup"),e.setIsTransitioning(false);},150);},handleOpenNewChat:()=>{s?e.setShowNewChatDrawer(true):(e.setShowCreateDrawer(false),e.setTransitionDirection("forward"),e.setIsTransitioning(true),setTimeout(()=>{e.setViewMode("newChat"),e.setIsTransitioning(false);},150));},handleCreateGroup:async A=>{i(A,{onSuccess:P=>{o(P),p();},onError:()=>{p();}});},handleSelectContact:async A=>{e.setSelectedContactId(A),n({participants:[A]},{onSuccess(P){let S=P?.id??P??"";e.setSelectedContactId(null),o(S),p();},onError(){p(),e.setSelectedContactId(null);}});},handleSelectContactFromDrawer:async A=>{e.setSelectedContactId(A),n({participants:[A]},{onSuccess(P){e.setShowNewChatDrawer(false),e.setSelectedContactId(null),o(P?.id??"");},onError(){e.setShowNewChatDrawer(false),e.setSelectedContactId(null);}});},handleSelectChat:A=>{o(A);},handleGroupInfo:A=>{e.setSelectedGroupId(A),e.setGroupDetailsOpen(true);},handleContactInfo:(A,P)=>{if(P)return window.open(`/company/${a}/${A}`,"_blank");window.open(`/profile/${a}/${A}`,"_blank");},handleAddMembers:()=>{e.setGroupDetailsOpen(false);},handleCloseGroupDetails:()=>{e.setGroupDetailsOpen(false),e.setSelectedGroupId(null);},getSelectedGroup:()=>d,isLoadingSelectedGroup:c,getAnimationClass:()=>e.isTransitioning?e.transitionDirection==="forward"?e.viewMode==="list"?"opacity-0 -translate-x-4":"opacity-0 translate-x-4":e.viewMode==="createGroup"||e.viewMode==="newChat"?"opacity-0 translate-x-4":"opacity-0 -translate-x-4":"opacity-100 translate-x-0",isCreatingConversation:l}};var OE=({containerRef:e,fetchNextPage:t,hasNextPage:o,isFetchingNextPage:r})=>{let n=Q.useCallback(()=>{let a=e.current;if(!a||!t||!o||r)return;let{scrollTop:s,scrollHeight:i,clientHeight:l}=a;i-s-l<=100&&t();},[e,t,o,r]);Q.useEffect(()=>{let a=e.current;if(a)return a.addEventListener("scroll",n),()=>a.removeEventListener("scroll",n)},[n,e]);};function b6({className:e,...t}){return Q__namespace.createElement(y6__namespace.Root,{"data-slot":"checkbox",className:E("peer w-5 h-5 border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-5 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 p-0",e),...t},Q__namespace.createElement(y6__namespace.Indicator,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none p-0"},Q__namespace.createElement(lucideReact.CheckIcon,{size:14,className:"size-3.5 text-white"})))}var zoe=({contacts:e,onBack:t,onCreateGroup:o,isCreating:r,fetchNextPage:n,hasNextPage:a,isFetchingNextPage:s})=>{let{t:i}=Oe(),[l,d]=Q.useState(""),[c,p]=Q.useState(""),[m,u]=Q.useState(""),[f,g]=Q.useState([]),[h,v]=Q.useState(null),[y,b]=Q.useState(null),[x,C]=Q.useState(false),M=Q.useRef(null),A=Q.useRef(null),P=e.filter(B=>B.name.toLowerCase().includes(m.toLowerCase())),S=Q.useCallback(()=>{let B=A.current;if(!B||!n||!a||s)return;let{scrollTop:G,scrollHeight:k,clientHeight:D}=B;k-G-D<=100&&n();},[n,a,s]);Q.useEffect(()=>{let B=A.current;if(B)return B.addEventListener("scroll",S),()=>B.removeEventListener("scroll",S)},[S]);let I=e.filter(B=>f.includes(B.id)),H=B=>{g(G=>G.includes(B)?G.filter(k=>k!==B):[...G,B]);},L=B=>{g(G=>G.filter(k=>k!==B));},T=B=>{let G=B.target.files?.[0];if(G){v(G);let k=new FileReader;k.onloadend=()=>{b(k.result);},k.readAsDataURL(G);}},z=()=>{v(null),b(null),M.current&&(M.current.value="");},F=()=>{l.trim()&&f.length>0&&o?.({name:l,bio:c,memberIds:f,photo:h||void 0});};return Q__namespace.default.createElement("div",{className:"flex flex-col h-full bg-white rounded-[1rem] w-full border-[#f1f2f4]"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between px-4 py-3 gap-2 border-b border-[#f1f2f4]"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement("button",{onClick:t,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:bg-[#f1f2f4] p-0 transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-muted-foreground"})),Q__namespace.default.createElement("h1",{className:"text-body-md md:text-[1.25rem] font-semibold text-[#050910]"},i("new-group-title"))),Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement(X,{onClick:t,className:"bg-[#F1F5F9] rounded-[0.5rem] text-sm p-[0.5rem] text-primary text-body-sm md:text-[0.875rem] font-semibold"},i("cancel")),Q__namespace.default.createElement(X,{onClick:F,disabled:!l.trim()||f.length===0||r,className:"bg-primary rounded-[0.5rem] text-sm p-[0.5rem] text-white text-body-sm md:text-[0.875rem] font-semibold"},i(r?"creating":"create")))),Q__namespace.default.createElement("div",{ref:A,className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"px-4 py-4 space-y-4"},Q__namespace.default.createElement("div",{className:"flex items-center gap-3"},Q__namespace.default.createElement("input",{ref:M,type:"file",accept:"image/*",onChange:T,className:"hidden !text-[1.2rem] md:text-[0.875rem]"}),Q__namespace.default.createElement("div",{className:"relative",onMouseEnter:()=>C(true),onMouseLeave:()=>C(false)},Q__namespace.default.createElement("button",{onClick:()=>M.current?.click(),className:"relative w-14 h-14 rounded-xl border-2 border-dashed border-border flex items-center justify-center hover:bg-[#f1f2f4] transition-colors overflow-hidden"},y?Q__namespace.default.createElement("img",{src:y,alt:"Group photo",className:"w-full h-full object-cover"}):Q__namespace.default.createElement("div",{className:"flex flex-col items-center text-[#687588]"},Q__namespace.default.createElement("span",{className:"text-[#687588] text-[0.75rem] md:text-[0.875rem] mt-0.5"},i("photo")))),y&&x&&Q__namespace.default.createElement("button",{onClick:z,className:"absolute -top-1.5 -right-1.5 w-5 h-5 rounded-full bg-red-500 text-red-500 flex items-center justify-center shadow-md hover:bg-red-500/90 transition-colors"},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3"}))),Q__namespace.default.createElement(kr,{placeholder:i("group-name-placeholder"),value:l,autoFocus:true,onChange:B=>d(B.target.value),className:"flex-1 h-10 rounded-xl bg-transparent !text-[1.2rem] md:text-[0.875rem]"})),Q__namespace.default.createElement("div",{className:" rounded-xl p-4 bg-[#E4EBF1]"},Q__namespace.default.createElement(J2,{placeholder:i("group-description-placeholder"),value:c,onChange:B=>p(B.target.value),className:"min-h-[60px] resize-none border-0 bg-transparent p-0 !text-[1.2rem] md:text-[0.875rem] focus-visible:ring-0"})),I.length>0&&Q__namespace.default.createElement("div",{className:"space-y-2 flex flex-row-reverse justify-between items-center gap-[1rem]"},Q__namespace.default.createElement("p",{className:"text-[0.75rem] md:text-[0.87rem] font-medium text-[#050910]"},I.length," ",i("members-added")),Q__namespace.default.createElement("div",{className:"flex items-center -space-x-3"},I.slice(0,5).map((B,G)=>Q__namespace.default.createElement("div",{key:B.id,className:"relative group z-[50]"},Q__namespace.default.createElement(J,{className:"w-10 h-10 border-2 border-white",name:B.name,src:B.avatar}),Q__namespace.default.createElement("button",{onClick:()=>L(B.id),className:"absolute -top-2 -right-2 w-5 h-5 rounded-full bg-red-600 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow"},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3"})))),I.length>5&&Q__namespace.default.createElement("div",{className:"relative w-10 h-10 flex items-center justify-center rounded-full bg-gray-300 text-sm font-medium text-gray-700 border-2 border-white z-[49]"},"+",I.length-5))),Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(kr,{placeholder:i("search-placeholder"),value:m,onChange:B=>u(B.target.value),className:"h-10 bg-[#E4EBF1] rounded-xl border-0 !text-[1.2rem] md:text-[0.875rem]"})),Q__namespace.default.createElement("div",{className:"space-y-1"},P.map(B=>{let G=f.includes(B.id);return Q__namespace.default.createElement("button",{key:B.id,onClick:()=>H(B.id),className:`w-full flex items-center gap-3 p-3 rounded-xl transition-colors ${G?"bg-primary bg-opacity-10":"hover:bg-primary hover:bg-opacity-10"}`},Q__namespace.default.createElement(J,{className:"w-10 h-10",name:B?.name??"",src:B?.avatar??""}),Q__namespace.default.createElement("div",{className:"flex-1 text-left"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-[#050910]"},B?.name)),Q__namespace.default.createElement(b6,{checked:G,className:"rounded-md border border-[#CBD5E0] p-0 text-white"}))}),s&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-4"},Q__namespace.default.createElement(he,{className:"w-5 h-5 animate-spin text-primary"}))))))},UE=zoe;var HE=20;async function Uoe(e,t,o){try{let r={"Content-Type":"application/json"};return t&&(r["x-access-token"]=t),(await c7__default.default(e,aC,{input:o??{}},r))?.users??{data:[],meta:{currentPage:1,lastPage:1,total:0,perPage:HE}}}catch(r){throw console.warn("GraphQL API not available for users:",r),new Error(`Unable to fetch users: ${JSON.stringify(r)}`)}}function hd(e={}){let{chatApiUrl:t,user:o}=w(),{search:r,contactsOnly:n}=e,a=ds("contacts",r,n),{data:s,isLoading:i,isError:l,refetch:d,fetchNextPage:c,hasNextPage:p,isFetchingNextPage:m}=Ke({queryKey:a,queryFn:async({pageParam:f=1})=>{let g={};r?.trim()&&(g.name=r.trim()),n&&(g.isContact=true);let h={page:f,perPage:HE,sort:"name",sortDir:"asc",filter:Object.keys(g).length>0?g:void 0};return Uoe(t??"",o?.accessToken,h)},initialPageParam:1,getNextPageParam:f=>{if(!f||!f.meta)return;let g=f.meta;if(!(typeof g.currentPage!="number"||typeof g.lastPage!="number"))return g.currentPage<g.lastPage?g.currentPage+1:void 0},staleTime:5*60*1e3,retry:false});return {data:s?.pages?.flatMap(f=>f.data??[])??[],isLoading:i,isError:l,refetch:d,fetchNextPage:c,hasNextPage:p??false,isFetchingNextPage:m}}var GE=100,Qoe=({onBack:e,onSelectContact:t,isCreating:o=false,selectedContactId:r=null,showBackButton:n=true})=>{let{t:a}=Oe(),[s,i]=Q.useState(""),l=Q.useRef(null),d=f6(s,300),{data:c,isLoading:p,fetchNextPage:m,hasNextPage:u,isFetchingNextPage:f}=hd({search:d}),g=v=>{let y=v.target.value;y.length<=GE&&i(y);},h=Q.useCallback(()=>{let v=l.current;if(!v||!u||f)return;let{scrollTop:y,scrollHeight:b,clientHeight:x}=v;b-y-x<=100&&m();},[m,u,f]);return Q.useEffect(()=>{let v=l.current;if(v)return v.addEventListener("scroll",h),()=>v.removeEventListener("scroll",h)},[h]),Q__namespace.default.createElement("div",{className:"flex flex-col h-full bg-white rounded-[1rem] w-full border-border"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border"},Q__namespace.default.createElement("button",{onClick:e,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:bg-accent transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-[#050910]"})),Q__namespace.default.createElement("h1",{className:"text-lg font-semibold text-[#050910]"},a("new-conversation"))),Q__namespace.default.createElement("div",{className:"px-4 py-3 border-b border-border"},Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-[#050910]"}),Q__namespace.default.createElement(kr,{placeholder:a("search-contacts"),value:s,onChange:g,maxLength:GE,className:"h-10 pl-10 rounded-xl bg-transparent border-0 !text-[1.2rem] md:text-[0.875rem] text-[#050910]",autoFocus:true}))),Q__namespace.default.createElement("div",{ref:l,className:"flex-1 overflow-y-auto px-2 py-2"},Q__namespace.default.createElement("div",{className:"space-y-1"},p&&c?.length===0&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-8"},Q__namespace.default.createElement(he,{className:"w-6 h-6 "})),c.map(v=>{let y=r===v.id,b=o&&!y;return Q__namespace.default.createElement("button",{key:v.id,onClick:()=>v.id&&!o&&t(v.id),disabled:o,className:E("w-full flex items-center gap-3 p-3 rounded-xl transition-colors",b?"opacity-50 cursor-not-allowed":"hover:bg-primary/10",y&&o&&"bg-primary/10")},Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(J,{name:v?.name??"",src:v?.avatar??"",className:"w-10 h-10"}),y&&o&&Q__namespace.default.createElement("div",{className:"absolute inset-0 flex items-center justify-center bg-black/30 rounded-full"},Q__namespace.default.createElement(he,{className:"w-5 h-5 animate-spin text-white"}))),Q__namespace.default.createElement("div",{className:"flex-1 text-left"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-[#000000]"},Ve(v?.name??"")),v?.email&&Q__namespace.default.createElement("p",{className:"text-xs text-[#6B7280]"},Bt(v?.email??"",30))),y&&o&&Q__namespace.default.createElement(he,null))}),f&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-4"},Q__namespace.default.createElement(he,{className:"w-5 h-5 animate-spin text-[#6B7280]"})),c.length===0&&!p&&!f&&Q__namespace.default.createElement("div",{className:"text-center text-sm text-[#6B7280] py-8"},a(s?"no-contacts-found":"no-contacts-available")))))},x6=Qoe;var _E=({viewMode:e,isTransitioning:t,transitionDirection:o,onNavigateBack:r,onSelectContact:n,onCreateGroup:a,selectedContactId:s,isCreating:i})=>{let{t:l}=Oe(),{data:d,fetchNextPage:c,hasNextPage:p,isFetchingNextPage:m}=hd(),u=d?.filter(g=>g.id&&g.name).map(g=>({id:g.id,name:g.name,subtitle:g.isOnline?l("online"):l("offline")}))||[],f=()=>t?o==="forward"?e==="list"?"opacity-0 -translate-x-4":"opacity-0 translate-x-4":e==="createGroup"||e==="newChat"?"opacity-0 translate-x-4":"opacity-0 -translate-x-4":"opacity-100 translate-x-0";return e==="createGroup"?Q__namespace.default.createElement("div",{className:E("h-full w-full transition-all duration-200 ease-out",f())},Q__namespace.default.createElement(UE,{contacts:u,onBack:r,onCreateGroup:a,isCreating:i,fetchNextPage:c,hasNextPage:p,isFetchingNextPage:m})):e==="newChat"?Q__namespace.default.createElement("div",{className:E("h-full w-full transition-all duration-200 ease-out",f())},Q__namespace.default.createElement(x6,{onBack:r,onSelectContact:n,selectedContactId:s})):null};var qE=({showBackButton:e,onBack:t,canCreateConversation:o,onOpenCreateGroup:r,onOpenNewChat:n,showCreateDrawer:a,setShowCreateDrawer:s})=>{let{t:i}=Oe(),l=Bs();return Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-4"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},e&&Q__namespace.default.createElement("button",{onClick:t,className:"w-8 h-8 rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-[#050910]"})),Q__namespace.default.createElement("h1",{className:"text-xl font-semibold text-[#050910]"},i("chats"))),o&&Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement("button",{onClick:n,className:"rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(Zu,null)),l?Q__namespace.default.createElement(yo,{open:a,onOpenChange:s},Q__namespace.default.createElement(Yu,{asChild:true},Q__namespace.default.createElement("button",{className:"w-8 h-8 p-0 rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(lucideReact.MoreVertical,{className:"w-5 h-5 text-[#050910]"}))),Q__namespace.default.createElement(qr,{className:"z-[9999999]"}),Q__namespace.default.createElement(bo,{className:"bg-white w-full h-auto rounded-t-lg p-0 z-[9999999]"},Q__namespace.default.createElement("div",{className:"p-4 space-y-2"},Q__namespace.default.createElement("button",{onClick:r,className:"w-full flex justify-start items-center gap-3 p-3 rounded-lg hover:bg-gray-100 transition-colors"},Q__namespace.default.createElement(lucideReact.Users,{className:"w-5 h-5"}),Q__namespace.default.createElement("span",null,i("new-group")))))):Q__namespace.default.createElement(lc,{open:a,onOpenChange:s},Q__namespace.default.createElement(cc,{asChild:true},Q__namespace.default.createElement("button",{className:"w-8 p-0 h-8 rounded-lg flex items-center justify-center hover:opacity-80 transition-colors"},Q__namespace.default.createElement(lucideReact.MoreVertical,{className:"w-5 h-5 text-[#050910]"}))),Q__namespace.default.createElement(dc,{align:"end",className:"bg-white z-[9999999] border border-[#E4EBF1] shadow-lg focus:outline-none focus:ring-0"},Q__namespace.default.createElement(Gl,{onClick:r,className:"cursor-pointer hover:bg-gray-100"},Q__namespace.default.createElement(lucideReact.Users,{className:"w-4 h-4 mr-2"}),i("new-group"))))))};var WE=({searchQuery:e,onSearchChange:t})=>{let{t:o}=Oe();return Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement("input",{type:"text",placeholder:o("search"),value:e,onChange:r=>t?.(r.target.value),className:"w-full bg-[#F1F5F9] h-10 pl-10 pr-4 rounded-xl !text-[1.2rem] md:text-[0.875rem] placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring transition-all"}))};var Zoe=({filters:e,activeFilter:t,onFilterChange:o})=>{let r=Bs(),n=Q.useRef(null),a=Q.useRef(0),s=Q.useRef(0),[i,l]=Q.useState(false),[d,c]=Q.useState(null),p=e.findIndex(g=>g.id===t);return Q__namespace.default.createElement("div",{ref:n,className:"flex gap-1 overflow-x-auto flex-shrink-0 touch-pan-x",onTouchStart:g=>{a.current=g.touches[0].clientX,s.current=g.touches[0].clientY,l(false),c(null);},onTouchMove:g=>{if(!r)return;let h=g.touches[0].clientX,v=g.touches[0].clientY,y=h-a.current,b=v-s.current;Math.abs(y)>Math.abs(b)&&Math.abs(y)>20&&(l(true),c(y>0?"right":"left"));},onTouchEnd:()=>{if(!i||!r){l(false),c(null);return}d==="left"&&p<e.length-1?o(e[p+1].id):d==="right"&&p>0&&o(e[p-1].id),l(false),c(null);}},e.map(g=>Q__namespace.default.createElement("button",{key:g.id,onClick:()=>o(g.id),className:E("px-4 py-1.5 rounded-full text-sm mb-2 text-gray-400 font-medium whitespace-nowrap transition-all duration-200 flex items-center gap-1.5",t===g.id?"bg-primary text-white":"text-muted-foreground hover:bg-primary hover:text-white")},g.id==="archived"&&Q__namespace.default.createElement(lucideReact.Archive,{className:"w-3.5 h-3.5"}),g.label,g.count!==void 0&&g.count>0&&Q__namespace.default.createElement("span",{className:E("text-xs px-1.5 py-0.5 rounded-full",t===g.id?"bg-primary-foreground/20 text-primary-foreground":"bg-muted text-muted-foreground")},"( "+g.count+" ) "))),r&&Q__namespace.default.createElement("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 pointer-events-none"},Q__namespace.default.createElement("div",{className:E("w-8 h-full bg-gradient-to-l from-card to-transparent",p>=e.length-1&&"opacity-0")})))},ZE=Zoe;var YE=({filters:e,activeFilter:t,onFilterChange:o})=>Q__namespace.default.createElement(ZE,{filters:e,activeFilter:t,onFilterChange:n=>{o?.(n);}});var C6=null;function JE(e){C6&&C6!==e&&C6(),C6=e;}var XE=15,lh=10,Joe=100,$oe=.5;function RE(e=180,t=120){let[o,r]=Q.useState(0),[n,a]=Q.useState(false),s=Q.useRef(0),i=Q.useRef(0),l=Q.useRef(0),d=Q.useRef(0),c=Q.useRef(0),p=Q.useRef(0),m=Q.useRef(null),u=Q.useRef(false),f=b=>{if(Math.abs(b)<=e)return b;let x=Math.abs(b)-e;return (e+x*.35)*Math.sign(b)},g=()=>{a(true),r(0),m.current=null,u.current=false,setTimeout(()=>a(false),220);};return {offset:o,animating:n,onStart:(b,x)=>{JE(g),s.current=b,i.current=x,l.current=b,d.current=b,c.current=Date.now(),p.current=Date.now(),m.current=null,u.current=false;},onMove:(b,x)=>{let C=b-s.current,M=x-i.current,A=Math.abs(C),P=Math.abs(M);if(m.current===null&&(A>XE||P>XE)&&(m.current=A>P*1.5),m.current!==true)return;if(!u.current)if(A>lh)u.current=true;else return;d.current=l.current,p.current=c.current,l.current=b,c.current=Date.now();let S=C>0?C-lh:C+lh;r(f(S));},onEnd:()=>{if(!u.current||m.current!==true){g();return}let x=Date.now()-p.current,C=x>0?(l.current-d.current)/x:0,M=Math.abs(o),A=Math.abs(C),P=o>0&&C>=0||o<0&&C<=0,I=M>Joe&&P||A>$oe&&M>30?o>0?t:-t:0;a(true),r(I),m.current=null,u.current=false,setTimeout(()=>a(false),220);},reset:g}}var ek=(e,t)=>{if(!e)return t||"";try{let o=new Date(e),r=new Date;if(o.getDate()===r.getDate()&&o.getMonth()===r.getMonth()&&o.getFullYear()===r.getFullYear()){let a=o.getHours().toString().padStart(2,"0"),s=o.getMinutes().toString().padStart(2,"0");return `${a}:${s}`}else {let a=o.getDate().toString().padStart(2,"0"),s=(o.getMonth()+1).toString().padStart(2,"0"),i=o.getFullYear();return `${a}/${s}/${i}`}}catch{return t||""}};function tk(e){if(!e)return "";try{return new Date(e).toLocaleDateString("pt-BR",{day:"2-digit",month:"long",year:"numeric"})}catch{return ""}}var ok=({chat:e,isCompactMode:t=false})=>{let o=e?.unreadCount!==void 0&&e.unreadCount>0&&!e?.isRead;return Q__namespace.default.createElement("div",{className:"flex-1 min-w-0 text-left"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-0.5 w-full"},Q__namespace.default.createElement("div",{className:"flex items-center gap-1 min-w-0 flex-1"},Q__namespace.default.createElement("h3",{className:E("font-bold text-[#050910] truncate",t?"text-xs":"text-[0.875rem]")},e?.name||"Unknown")),Q__namespace.default.createElement("span",{className:E("text-[#687588] flex-shrink-0 ml-1",t?"text-[0.625rem]":"text-xs")},ek(e?.lastMessageAt,e?.time))),Q__namespace.default.createElement("div",{className:"flex items-center justify-between gap-1"},Q__namespace.default.createElement("div",{className:"flex items-center gap-1 flex-1 min-w-0"},e?.hasAttachment&&Q__namespace.default.createElement(lucideReact.Paperclip,{className:E("text-[#687588] flex-shrink-0",t?"w-2.5 h-2.5":"w-3.5 h-3.5")}),Q__namespace.default.createElement("div",{className:E("text-[#687588] flex-shrink truncate line-clamp-1",t?"text-[0.625rem]":"text-[0.875rem]")},nc({text:e?.lastMessage||"",isListed:true}))),Q__namespace.default.createElement("div",{className:"flex items-center gap-0.5 flex-shrink-0"},!t&&Q__namespace.default.createElement(Q__namespace.default.Fragment,null,e?.isPinned&&Q__namespace.default.createElement(lucideReact.Pin,{className:"w-3.5 h-3.5 text-[#687588]"}),e?.isMuted&&Q__namespace.default.createElement(lucideReact.BellOff,{className:"w-3.5 h-3.5 text-[#687588]"}),e?.isFavorite&&Q__namespace.default.createElement(lucideReact.Star,{className:"w-3.5 h-3.5 text-[#687588]"})),o&&Q__namespace.default.createElement("div",{className:E("rounded-full bg-primary text-white font-medium flex items-center justify-center",t?"w-3.5 h-3.5 text-[0.5rem]":"w-5 h-5 text-xs")},e?.unreadCount))))};var nk=({chat:e,onGroupInfo:t,onContactInfo:o,onBack:r,onCloseConversation:n,asPage:a})=>{let[s,i]=Q.useState(false),[l,d]=Q.useState(null),c=lo("pinned",e,a),p=lo("archived",e,a),m=lo("favorites",e,a),u=lo("muted",e,a),{deleteAConversation:f,isDeletingAConversation:g}=I4(e?.id,()=>{n?.(),r?.();});return {handleDropdownAction:(b,x)=>{switch(x.stopPropagation(),b){case "pin":c.mutate({conversationId:e.id,value:!e.isPinned});break;case "archive":p.mutate({conversationId:e.id,value:!e.isArchived});break;case "favorite":m.mutate({conversationId:e.id,value:!e.isFavorite});break;case "mute":u.mutate({conversationId:e.id,value:!e.isMuted});break;case "group-info":t&&t(e.id);break;case "contact-info":o&&o(e.id);break;case "exit-group":case "clear":d(b),i(true);break}},isModalOpen:s,closeModal:()=>{i(false),d(null);},confirmDelete:()=>{l&&(f({conversationId:e?.id}),l==="clear"&&n?.(),r?.(),i(false),d(null));},isDeletingAConversation:g}};var ak=({chat:e,onAction:t})=>Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(H1,{icon:lucideReact.Pin,label:e?.isPinned?"Desafixar chat":"Fixar chat",onClick:o=>t("pin",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.Archive,label:e?.isArchived?"Desarquivar":"Arquivar",onClick:o=>t("archive",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.Star,label:e?.isFavorite?"Remover dos favoritos":"Adicionar aos favoritos",onClick:o=>t("favorite",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.BellOff,label:e?.isMuted?"Ativar notifica\xE7\xF5es":"Silenciar",onClick:o=>t("mute",o)}),Q__namespace.default.createElement("div",{className:"h-px bg-[#E4EBF1] my-2"}),e?.isGroup?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(H1,{icon:lucideReact.Info,label:"Informa\xE7\xF5es do grupo",onClick:o=>t("group-info",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.LogOut,label:"Sair do grupo",destructive:true,onClick:o=>t("exit-group",o)})):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(H1,{icon:lucideReact.User,label:"Informa\xE7\xF5es do contato",onClick:o=>t("contact-info",o)}),Q__namespace.default.createElement(H1,{icon:lucideReact.Trash2,label:"Limpar conversa",destructive:true,onClick:o=>t("clear",o)}))),H1=({icon:e,label:t,onClick:o,destructive:r})=>Q__namespace.default.createElement("button",{onClick:o,className:`w-full flex justify-start items-center gap-3 p-3 rounded-lg hover:bg-accent transition-colors text-left ${r?"text-destructive":""}`},Q__namespace.default.createElement(e,{className:"w-5 h-5"}),Q__namespace.default.createElement("span",null,t));var sk=({chat:e,onAction:t,asPage:o})=>{let{t:r}=Oe();return Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(G1,{icon:lucideReact.Pin,onClick:n=>t("pin",n)},e?.isPinned?r("remove-pin-chat"):r("pin-chat")),o?null:Q__namespace.default.createElement(G1,{icon:lucideReact.Archive,onClick:n=>t("archive",n)},e?.isArchived?r("unarchive-chat"):r("archive-chat")),Q__namespace.default.createElement(G1,{icon:lucideReact.Star,onClick:n=>t("favorite",n)},e?.isFavorite?r("remove-from-favorites"):r("add-to-favorites")),Q__namespace.default.createElement(G1,{icon:lucideReact.BellOff,onClick:n=>t("mute",n)},e?.isMuted?r("unsilence-chat"):r("mute-chat")),Q__namespace.default.createElement(K3,{className:"bg-[#E4EBF1]"}),e?.isGroup?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(G1,{icon:lucideReact.Info,onClick:n=>t("group-info",n)},r("group-info")),Q__namespace.default.createElement(G1,{icon:lucideReact.LogOut,destructive:true,onClick:n=>t("exit-group",n)},r("leave-group"))):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(G1,{icon:lucideReact.User,onClick:n=>t("contact-info",n)},r("contact-info")),Q__namespace.default.createElement(G1,{icon:lucideReact.Trash2,destructive:true,onClick:n=>t("clear",n)},r("clear-chat"))))},G1=({icon:e,children:t,onClick:o,destructive:r})=>Q__namespace.default.createElement(Gl,{onClick:o,className:`cursor-pointer bg-white hover:bg-[#F8FAFC] outline-none focus:outline-none ${r?"text-[#EF4444]":""}`},Q__namespace.default.createElement(e,{className:"w-4 h-4 mr-2"}),t);var bre=({onClose:e,onConfirm:t,isGroup:o,isDeletingTheConversation:r})=>Q__namespace.default.createElement("div",{className:"flex flex-col mt-6 items-center text-center"},Q__namespace.default.createElement("div",{className:"w-16 h-16 rounded-full bg-red-500/10 flex items-center justify-center mb-6"},Q__namespace.default.createElement(lucideReact.AlertCircle,{className:"w-8 h-8 text-red-500"})),Q__namespace.default.createElement("h2",{className:"text-xl font-semibold text-[#050505] mb-2"},o?"Voc\xEA quer sair este grupo?":"Voc\xEA quer excluir esta conversa?"),Q__namespace.default.createElement("p",{className:"text-sm text-[#687588] mb-8"},o?"Se sair do grupo, perder\xE1 as mensagens do grupo.":"Essa conversa ser\xE1 permanentemente eliminada."),Q__namespace.default.createElement("div",{className:"flex gap-3 w-full max-w-[20rem]"},Q__namespace.default.createElement(X,{onClick:e,disabled:r,className:"w-full border p-3 border-primary bg-white text-primary font-medium text-[0.875rem]",label:"Cancelar"}),Q__namespace.default.createElement(X,{onClick:()=>{t(),e();},disabled:r,isLoading:r,className:"w-full border p-3 border-primary bg-primary text-white font-medium text-[0.875rem]",label:o?"Sair do grupo":"Excluir"}))),xre=({isOpen:e,onClose:t,onConfirm:o,isGroup:r,isDeletingTheConversation:n})=>Q__namespace.default.createElement(Jr,{className:"w-[23rem] !max-h-[23rem] !rounded-md",isOpen:e,disableFullScreen:true,onClose:t,isLoading:n,closeOnClickOutside:false,showCloseButton:!n},Q__namespace.default.createElement("div",{className:"sm:max-w-md p-0 overflow-hidden"},Q__namespace.default.createElement(bre,{onClose:t,onConfirm:o,isDeletingTheConversation:n,isGroup:r}))),ik=xre;var M6=({chat:e,onGroupInfo:t,onContactInfo:o,asMessageHeader:r,onBack:n,onCloseConversation:a,asPage:s})=>{let[i,l]=Q.useState(false),d=Bs(),{handleDropdownAction:c,isModalOpen:p,closeModal:m,confirmDelete:u,isDeletingAConversation:f}=nk({chat:e,onGroupInfo:t,onContactInfo:o,onBack:n,onCloseConversation:a,asPage:s}),g=(y,b)=>{b.stopPropagation(),c(y,b),l(false);},h=Q__namespace.default.createElement("div",{className:E("p-1.5 rounded-full hover:bg-muted flex-shrink-0 cursor-pointer focus:outline-none focus:ring-0",{"opacity-100":r||d,"opacity-0 group-hover:opacity-100 transition-opacity":!r&&!d}),onClick:y=>{y.stopPropagation(),l(true);}},Q__namespace.default.createElement(lucideReact.MoreVertical,{className:E("w-4 h-4",{"text-[#687588]":!r,"text-dark-1":r})})),v=Q__namespace.default.createElement(ik,{isOpen:p,onClose:m,onConfirm:u,isGroup:!!e?.isGroup,isDeletingTheConversation:f});return d?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(yo,{open:i,onOpenChange:l},Q__namespace.default.createElement(Yu,{asChild:true},h),Q__namespace.default.createElement(qr,{className:"z-[9999999]"}),Q__namespace.default.createElement(bo,{className:"bg-white w-full h-auto rounded-t-lg p-0 z-[9999999]"},Q__namespace.default.createElement("div",{className:"p-4 space-y-1"},Q__namespace.default.createElement(ak,{chat:e,onAction:g})))),v):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(lc,{open:i,onOpenChange:l},Q__namespace.default.createElement(cc,{asChild:true,onClick:y=>{y.stopPropagation(),l(true);}},h),Q__namespace.default.createElement(dc,{align:"end",className:"w-48 bg-white z-[9999999] border border-[#E4EBF1] shadow-lg focus:outline-none focus:ring-0"},Q__namespace.default.createElement(sk,{asPage:s,chat:e,onAction:g}))),v)};var Pre=({chat:e,isActive:t,onClick:o,onGroupInfo:r,onContactInfo:n,isCompactMode:a=false,onBack:s,onCloseConversation:i,asPage:l})=>{let{onlineUsers:d}=$t(),{user:c}=w(),p=Q.useMemo(()=>!e?.participants||e?.isGroup||!c?.id?false:e?.participants?.some(m=>m?.userId&&m.userId!==c.id&&!!d[m.userId]),[e?.participants,e?.isGroup,d,c?.id]);return Q__namespace.default.createElement("button",{onClick:o,className:E("w-full flex items-center rounded-xl transition-all duration-200 animate-fade-in group focus:outline-none focus:ring-0",a?"gap-2 p-1.5":"gap-3 p-3",t?"bg-primary/10":"hover:bg-primary/10")},Q__namespace.default.createElement("div",{className:"relative flex-shrink-0"},Q__namespace.default.createElement(J,{name:e?.name,src:e?.avatar,size:a?"sm":"md"}),!e?.isGroup&&Q__namespace.default.createElement("div",{className:E("absolute bottom-0 right-0 rounded-full border-2 border-card",a?"w-2 h-2":"w-3 h-3",p?"bg-primary":"bg-gray-400")})),Q__namespace.default.createElement(ok,{chat:e,isCompactMode:a}),!a&&Q__namespace.default.createElement(M6,{chat:e,onGroupInfo:r,onContactInfo:n,onBack:s,asPage:l,onCloseConversation:i}))},lk=Pre;var ck=({leftVisible:e,rightVisible:t,leftProgress:o,rightProgress:r,showInfoButton:n,confirmDelete:a,onAction:s,maxSwipe:i})=>Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement("div",{className:"absolute inset-y-0 left-0 flex z-0",style:{width:i}},Q__namespace.default.createElement("div",{className:`flex h-full transition-opacity ${e?"pointer-events-auto":"pointer-events-none"}`,style:{opacity:e?1:0}},Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("archive");},className:"h-full px-4 rounded-none bg-gray-500 flex items-center justify-center",style:{transform:`scale(${.85+o*.15})`}},Q__namespace.default.createElement(lucideReact.Archive,{className:"w-5 h-5 text-white"})),Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("pin");},className:"h-full px-4 rounded-l bg-blue-500 flex items-center justify-center",style:{transform:`scale(${.75+o*.25})`}},Q__namespace.default.createElement(lucideReact.Pin,{className:"w-5 h-5 text-white"})),n&&Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("info");},className:"h-full px-4 bg-purple-500 flex items-center justify-center",style:{transform:`scale(${.75+o*.25})`}},Q__namespace.default.createElement(lucideReact.Info,{className:"w-5 h-5 text-white"})))),Q__namespace.default.createElement("div",{className:"absolute inset-y-0 right-0 flex justify-end z-0",style:{width:i}},Q__namespace.default.createElement("div",{className:`flex h-full transition-opacity ${t?"pointer-events-auto":"pointer-events-none"}`,style:{opacity:t?1:0}},Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("mute");},className:"h-full px-4 rounded-r-none bg-gray-500 flex items-center justify-center",style:{transform:`scale(${.75+r*.25})`}},Q__namespace.default.createElement(lucideReact.BellOff,{className:"w-5 h-5 text-white"})),Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("favorite");},className:"h-full px-4 rounded-l-none bg-primary flex items-center justify-center",style:{transform:`scale(${.75+r*.25})`}},Q__namespace.default.createElement(lucideReact.Star,{className:"w-5 h-5 text-white"})),Q__namespace.default.createElement("button",{onClick:l=>{l.stopPropagation(),s("delete");},className:`h-full px-4 flex items-center justify-center transition-colors ${a?"bg-red-700":"bg-destructive"}`},Q__namespace.default.createElement(lucideReact.Trash2,{className:"w-5 h-5 text-white"})))));var dk=({chat:e,onInfo:t,reset:o,confirmDelete:r,setConfirmDelete:n})=>{let a=lo("pinned"),s=lo("archived"),i=lo("favorites"),l=lo("muted");return {handleAction:c=>{if(c==="info"){t&&t(e.id),o();return}if(c==="delete"&&!r){n(true);return}c==="delete"&&console.log("DELETE",e.id),c==="archive"&&s.mutate({conversationId:e.id,value:true}),c==="pin"&&a.mutate({conversationId:e.id,value:!e.isPinned}),c==="mute"&&l.mutate({conversationId:e.id,value:!e.isMuted}),c==="favorite"&&i.mutate({conversationId:e.id,value:!e.isFavorite}),n(false),o();}}};var pk=180,Dre=120,mk=100,Lre=15,Fre=({chat:e,isActive:t,onClick:o,onInfo:r,onGroupInfo:n,onBack:a,onCloseConversation:s,isCompactMode:i=false,asPage:l})=>{let{offset:d,animating:c,onStart:p,onMove:m,onEnd:u,reset:f}=RE(pk,Dre),[g,h]=Q.useState(false),{handleAction:v}=dk({chat:e,onInfo:r,reset:f,confirmDelete:g,setConfirmDelete:h}),y=d>30,b=d<-30,x=Math.min(1,d/mk),C=Math.min(1,-d/mk),M=e.isGroup&&r;return Q__namespace.default.createElement("div",{className:"relative overflow-hidden rounded-xl mb-1"},Q__namespace.default.createElement(ck,{leftVisible:y,rightVisible:b,leftProgress:x,rightProgress:C,showInfoButton:M,confirmDelete:g,chat:e,onAction:v,maxSwipe:pk}),Q__namespace.default.createElement("div",{className:`relative z-10 transition-transform ${c?"duration-200 ease-out":"duration-0"}`,style:{transform:`translateX(${d}px)`},onTouchStart:A=>p(A.touches[0].clientX,A.touches[0].clientY),onTouchMove:A=>m(A.touches[0].clientX,A.touches[0].clientY),onTouchEnd:u,onTouchCancel:f,onMouseLeave:f,onClick:()=>{Math.abs(d)>Lre?f():o();}},Q__namespace.default.createElement(lk,{onGroupInfo:n,onContactInfo:r,chat:e,isActive:t,onClick:()=>{},isCompactMode:i,onBack:a,asPage:l,onCloseConversation:s})))},uk=Fre;var fk=()=>Q__namespace.default.createElement("div",{className:"space-y-1"},[...Array(8)].map((e,t)=>Q__namespace.default.createElement("div",{key:t,className:"flex items-center justify-between gap-3 p-3 rounded-xl animate-pulse"},Q__namespace.default.createElement(Tt,{className:"w-12 h-12 rounded-full flex-shrink-0 bg-gray-300"}),Q__namespace.default.createElement("div",{className:"flex-1 min-w-0 space-y-2"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between"},Q__namespace.default.createElement(Tt,{className:"h-4 w-24 bg-gray-300"}),Q__namespace.default.createElement(Tt,{className:"h-3 w-10 bg-gray-300"})),Q__namespace.default.createElement("div",{className:"flex items-center gap-1.5"},Q__namespace.default.createElement(Tt,{className:"h-3 w-2 rounded-full bg-gray-300"}),Q__namespace.default.createElement(Tt,{className:"h-3 w-32 bg-gray-300"}))),t%3===0&&Q__namespace.default.createElement(Tt,{className:"w-3.5 h-3.5 rounded-full flex-shrink-0 bg-gray-300"})))),gk=({isCompactMode:e=false})=>Q__namespace.default.createElement("div",{className:` ${e?"w-24 h-24":"w-32 h-32"} rounded-full bg-gray-100 flex items-center justify-center mb-4`},Q__namespace.default.createElement("div",{className:` ${e?"w-16 h-16":"w-24 h-24"} rounded-full bg-gray-200 flex items-center justify-center`},Q__namespace.default.createElement("svg",{className:` ${e?"w-8 h-8":"w-12 h-12 "} text-gray-400`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Q__namespace.default.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})))),Bre=({isCompactMode:e})=>{let{t}=Oe();return Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center py-12 px-4"},Q__namespace.default.createElement("div",{className:`${e?"w-16 h-16":"w-24 h-24 "} rounded-full bg-gray-100 flex items-center justify-center mb-4 `},Q__namespace.default.createElement("svg",{className:` text-gray-400 ${e?"w-8 h-8":"w-12 h-12"}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Q__namespace.default.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"}))),Q__namespace.default.createElement("h3",{className:` ${e?"text-sm":"text-lg "} text-center font-medium text-gray-900 mb-2`},t("no-conversations-found")),e?null:Q__namespace.default.createElement("p",{className:"text-sm text-gray-500 text-center max-w-xs mb-6"},t("try-different-keywords")))},Ure=({isCompactMode:e})=>{let{t}=Oe();return Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center py-12 px-4"},Q__namespace.default.createElement(gk,{isCompactMode:e}),Q__namespace.default.createElement("h3",{className:` ${e?"text-sm":"text-lg"} font-medium text-center text-gray-900 mb-2`},t("no-conversations-available")),e?null:Q__namespace.default.createElement("p",{className:"text-sm text-gray-500 text-center max-w-xs mb-6"},t("start-a-new-conversation-to-start-messaging")))},Hre=({onNewChat:e,isCompactMode:t})=>{let{t:o}=Oe();return Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center py-12 px-4"},Q__namespace.default.createElement(gk,{isCompactMode:t}),Q__namespace.default.createElement("h3",{className:` ${t?"text-sm":"text-lg"} font-medium text-gray-900 mb-2`},o("no-conversations-yet")),t?null:Q__namespace.default.createElement("p",{className:"text-sm text-gray-500 text-center max-w-xs mb-6"},o("start-a-new-conversation-to-start-messaging")),Q__namespace.default.createElement("button",{onClick:e,className:"px-4 py-2 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors"},Q__namespace.default.createElement("span",{className:` ${t?"text-xs":"text-sm"} flex items-center gap-2`},Q__namespace.default.createElement(lucideReact.PlusIcon,{className:"w-4 h-4"}),o("new-conversation"))))},ch=Q.forwardRef(({chats:e,selectedChatId:t,onChatSelect:o,onGroupInfo:r,onContactInfo:n,isLoading:a,isFetchingNextPage:s,searchQuery:i,chatForPage:l=false,isCompactMode:d=false,onNewChat:c,onBack:p,onCloseConversation:m},u)=>{let{isChatVisible:f}=Om(),{locale:g}=w(),h=i.trim().length>0,v=(e?.length===0||!e)&&!a;return Q__namespace.default.createElement("div",{ref:u,className:"flex-1 overflow-y-auto min-h-0"},a&&!h&&e?.length===0?Q__namespace.default.createElement(fk,null):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,a&&h?Q__namespace.default.createElement(fk,null):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,e?.map(y=>Q__namespace.default.createElement(uk,{key:y?.id,chat:y,asPage:l,isActive:t===y?.id,onClick:()=>{if(l){o(y?.id);return}d?(l6(y?.id),window.dispatchEvent(new CustomEvent("openChat",{detail:{open:true,sendMessageToPage:false,pendingChatId:y?.id}})),window.dispatchEvent(new CustomEvent("selectChatFromCompact",{detail:{chatId:y?.id}}))):f?o(y?.id):(l6(y?.id),window.dispatchEvent(new CustomEvent("openChat",{detail:{open:true,sendMessageToPage:false,pendingChatId:y?.id}})));},onInfo:()=>{if(y?.participants?.length!==2)return;if(l)return window.open(`/profile/${g}/${y?.slug}`,"_blank");let b=y?.participants?.some(x=>x?.page?.id);n(y?.slug??"",b);},onGroupInfo:r,isCompactMode:d,onBack:p,onCloseConversation:m})),s&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-4"},Q__namespace.default.createElement(he,{className:"w-5 h-5 text-gray-400"})),v&&Q__namespace.default.createElement("div",{className:"w-full h-full flex flex-col items-center justify-center"},h?Q__namespace.default.createElement(Bre,{isCompactMode:d}):l?Q__namespace.default.createElement(Ure,null):Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(Hre,{onNewChat:c,isCompactMode:d}))))))});ch.displayName="ChatListContent";function Us(e="",t=500){let[o,r]=Q.useState(e),n=usehooks.useDebounce(o,t);return {value:o,setValue:s=>{r(s);},debouncedSearchTerm:n}}function hk(){let[e,t]=Q.useState("about"),[o,r]=Q.useState(false),[n,a]=Q.useState(false),[s,i]=Q.useState("");return {activeTab:e,setActiveTab:t,showAddMembers:o,setShowAddMembers:r,isAdding:n,setIsAdding:a,memberSearchQuery:s,setMemberSearchQuery:i}}var Kre=({currentMembers:e=[],contacts:t=[],onBack:o,onAddMembers:r,isAdding:n,fetchNextPage:a,hasNextPage:s,isFetchingNextPage:i,onSearchQuery:l,searchQuery:d=""})=>{let{t:c}=Oe(),[p,m]=Q.useState([]),[u,f]=Q.useState("all"),[g,h]=Q.useState(false),v=Q.useRef(null),y=Q.useRef(null);Q.useEffect(()=>{y.current?.focus();},[]);let b=Q__namespace.default.useMemo(()=>{let T=t?.filter(z=>!e?.includes(z?.id)&&(z?.name?.toLowerCase().includes(d?.toLowerCase())||z?.email?.toLowerCase().includes(d?.toLowerCase())||z?.phone?.includes(d)))||[];return u==="mutual"&&(T=T.filter(z=>(z.mutualConnections??0)>0),T.sort((z,F)=>(F.mutualConnections??0)-(z.mutualConnections??0))),T},[t,e,d,u]),x=Q.useCallback(()=>{let T=v.current;if(!T||!a||!s||i)return;let{scrollTop:z,scrollHeight:F,clientHeight:B}=T;F-z-B<=100&&a();},[a,s,i]);Q.useEffect(()=>{let T=v.current;if(T)return T.addEventListener("scroll",x),()=>T.removeEventListener("scroll",x)},[x]);let C=t?.filter(T=>p.includes(T?.id))||[],M=T=>{m(z=>z.includes(T)?z.filter(F=>F!==T):[...z,T]);},A=T=>{m(z=>z.filter(F=>F!==T));},P=()=>{p.length>0&&r?.(p);},S=()=>{l(""),y.current?.focus();},I=()=>{let T=b.map(z=>z.id);m(T);},H=()=>{m([]);},L=p.length;return Q__namespace.default.createElement("div",{className:"flex flex-col h-[35.938rem] bg-white rounded-[1rem] w-full border-border overflow-hidden"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border shrink-0"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement("button",{onClick:o,className:"p-0 w-8 h-8 rounded-lg flex items-center justify-center hover:bg-accent transition-colors","aria-label":"Voltar"},Q__namespace.default.createElement(lucideReact.ChevronLeft,{className:"w-5 h-5 text-muted-foreground"})),Q__namespace.default.createElement("h1",{className:"text-body-lg font-semibold text-foreground"},c("add-members"))),Q__namespace.default.createElement("div",{className:"flex items-center gap-2"},Q__namespace.default.createElement(oe,{variant:"outline",size:"sm",onClick:o,className:"rounded-[10px] text-sm h-8 px-4 py-6 border-primary text-primary"},c("cancel")),Q__namespace.default.createElement(oe,{size:"sm",onClick:P,disabled:L===0||n,className:"rounded-[10px] text-sm h-8 px-4 py-6 min-w-[120px]"},n?Q__namespace.default.createElement(Q__namespace.default.Fragment,null,Q__namespace.default.createElement(lucideReact.Loader2,{className:"w-3 h-3 mr-2 animate-spin"}),c("adding")):`${c("add")} (${L})`))),Q__namespace.default.createElement("div",{className:"flex-1 flex flex-col overflow-hidden"},C?.length>0&&Q__namespace.default.createElement("div",{className:"px-4 pt-4 pb-3 rounded-md border-b border-border shrink-0 bg-primary/5"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between mb-3"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-foreground"},C.length," ",C.length===1?c("selected-member"):c("selected-members")),Q__namespace.default.createElement("button",{onClick:H,className:"text-xs text-red-500 hover:text-foreground transition-colors"},c("clear-selection"))),Q__namespace.default.createElement("div",{className:"flex items-center gap-0 -space-x-3 overflow-hidden pb-1"},C.slice(0,5).map((T,z)=>Q__namespace.default.createElement("div",{key:T?.id||z,className:"relative"},Q__namespace.default.createElement(J,{className:"w-10 h-10 border-2 border-white shadow-sm",name:T?.name??"",src:T?.avatar??""}),Q__namespace.default.createElement("button",{onClick:()=>A(T?.id||""),className:"absolute -top-1 -right-1 w-5 h-5 rounded-full bg-red-500 text-white flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity shadow-md hover:bg-red-600","aria-label":`Remover ${T?.name}`},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3"})))),C.length>5&&Q__namespace.default.createElement("div",{className:"w-10 h-10 flex items-center justify-center rounded-full bg-primary text-primary-foreground text-xs font-semibold border-2 border-white shadow-sm"},"+",C.length-5))),Q__namespace.default.createElement("div",{className:"px-4 pt-4 pb-3 border-b border-border shrink-0"},Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),Q__namespace.default.createElement(kr,{ref:y,placeholder:c("search-placeholder"),value:d,onChange:T=>l(T.target.value),className:"h-10 pl-10 pr-10 rounded-xl bg-input border-0 text-sm"}),d&&Q__namespace.default.createElement("button",{onClick:S,className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full hover:bg-accent flex items-center justify-center transition-colors","aria-label":"Limpar pesquisa"},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3 text-muted-foreground"})))),Q__namespace.default.createElement("div",{className:"px-4 py-3 border-b border-border shrink-0 bg-gray-50"},Q__namespace.default.createElement("div",{className:"flex items-center justify-between"},Q__namespace.default.createElement("div",{className:"text-sm text-muted-foreground"},b?.length||0," ",b?.length===1?c("user-available"):c("users-available")),b?.length>0&&L<b.length&&Q__namespace.default.createElement("button",{onClick:I,className:"text-xs text-primary hover:text-primary/80 font-medium transition-colors"},c("select-all")))),Q__namespace.default.createElement("div",{ref:v,className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"px-4 py-3"},b?.length===0&&!i?Q__namespace.default.createElement("div",{className:"text-center py-12"},Q__namespace.default.createElement("div",{className:"w-16 h-16 rounded-full bg-gray-100 flex items-center justify-center mx-auto mb-4"},Q__namespace.default.createElement(lucideReact.UserPlus,{className:"w-8 h-8 text-muted-foreground/50"})),Q__namespace.default.createElement("p",{className:"text-sm font-medium text-foreground mb-1"},c(d?"no-contact-found":"no-contact-available")),Q__namespace.default.createElement("p",{className:"text-xs text-muted-foreground"},c(d?"try-different-search":"all-contacts-in-group"))):Q__namespace.default.createElement("div",{className:"space-y-4"},b?.map(T=>{let z=p.includes(T?.id||"");return Q__namespace.default.createElement("button",{key:T?.id,onClick:()=>M(T?.id||""),className:E("w-full flex items-center gap-3 p-3 rounded-xl transition-all",z?"bg-primary/10 ring-2 ring-primary/20":"hover:bg-accent")},Q__namespace.default.createElement(J,{className:"w-11 h-11 shrink-0",name:T?.name??"",src:T?.avatar??""}),Q__namespace.default.createElement("div",{className:"flex-1 text-left min-w-0"},Q__namespace.default.createElement("p",{className:"text-sm font-medium text-foreground truncate"},T?.name),T?.subtitle&&Q__namespace.default.createElement("p",{className:"text-xs text-muted-foreground truncate"},T.subtitle),T?.mutualConnections&&T.mutualConnections>0&&Q__namespace.default.createElement("p",{className:"text-xs text-primary mt-0.5 flex items-center gap-1"},Q__namespace.default.createElement(lucideReact.Users,{className:"w-3 h-3"}),T.mutualConnections," ",T.mutualConnections===1?c("mutual-connection"):c("mutual-connections"))),Q__namespace.default.createElement(b6,{checked:z,className:"rounded-md shrink-0 p-2"}))}),i&&Q__namespace.default.createElement("div",{className:"flex items-center justify-center py-6"},Q__namespace.default.createElement(lucideReact.Loader2,{className:"w-5 h-5 animate-spin text-primary"})))))))},wk=Kre;function Ck({name:e,onClose:t,isMobile:o}){return Q__namespace.default.createElement("div",{className:E("flex items-center justify-between px-4 py-4",o?"border-[#F6F6F6]":"border-gray-200")},o&&Q__namespace.default.createElement("button",{onClick:t,"aria-label":"Fechar"},Q__namespace.default.createElement(lucideReact.X,{className:"h-6 w-6"})),Q__namespace.default.createElement("h2",{className:E("font-bold",o?"text-lg":"text-xl","text-[#050910]")},e),o&&Q__namespace.default.createElement("div",{className:"w-6"}))}function Mk({activeTab:e,setActiveTab:t,membersCount:o,onTabChange:r}){let{t:n}=Oe();return Q__namespace.default.createElement("div",{className:"flex border-b border-gray-200 items-center justify-center"},Q__namespace.default.createElement("span",{role:"button",onClick:()=>{t("about"),r();},className:E("px-4 py-3 text-sm font-medium transition whitespace-nowrap",e==="about"?"text-primary border-b-[2px] border-primary":"text-gray-600 hover:text-gray-900")},n("about")),Q__namespace.default.createElement("span",{role:"button",onClick:()=>t("members"),className:E("flex-1 py-3 text-sm font-medium transition",e==="members"?"text-primary border-b-[2px] border-primary":"text-gray-600 hover:text-gray-900")},n("members")," (",o,")"))}function Pk({name:e,image:t,description:o,creatorName:r,createdAt:n,conversationId:a,currentUserRole:s,onDescriptionUpdate:i}){let{t:l}=Oe();return Q__namespace.default.createElement("div",{className:"p-6 flex flex-col gap-6"},t&&Q__namespace.default.createElement("div",{className:"flex justify-center"},Q__namespace.default.createElement(J,{name:e||l("about.group"),src:t,className:"w-24 h-24 rounded-2xl shadow-md"})),Q__namespace.default.createElement("div",null,Q__namespace.default.createElement("h3",{className:"font-semibold text-sm mb-2 text-gray-900"},l("about.description")),Q__namespace.default.createElement("p",{className:"text-gray-600 text-sm leading-relaxed"},o||l("about.description"))),r&&Q__namespace.default.createElement("div",null,Q__namespace.default.createElement("h3",{className:"font-semibold text-sm mb-2 text-gray-900"},l("about.created-by")),Q__namespace.default.createElement("p",{className:"text-gray-600 text-sm"},`${r} ${l("about.created-at")} ${tk(n)}`)))}function N6(e){return {hasAdminPermissions:e==="OWNER"||e==="ADMIN",isCreator:e==="OWNER"}}function Sk(e,t){return Q.useMemo(()=>t?e?.filter(o=>{let r=o?.users?.[0],n=o?.page;return (r?.name||n?.name||"")?.toLowerCase()?.includes(t?.toLowerCase())})||[]:e||[],[e,t])}function Nk({hasAdminPermissions:e,membersCount:t,memberSearchQuery:o,setMemberSearchQuery:r,onAddMembersClick:n}){let{t:a}=Oe();return Q__namespace.default.createElement("div",{className:"px-4 pt-4 pb-3 shrink-0 space-y-2"},e&&Q__namespace.default.createElement("button",{onClick:n,className:"w-full flex items-center justify-center gap-2 p-3 rounded-xl border-2 border-dashed border-gray-300 hover:border-primary hover:bg-primary/5 transition text-sm font-medium text-gray-700 hover:text-primary"},Q__namespace.default.createElement(lucideReact.UserPlus,{className:"w-5 h-5"}),a("add-members")),t>5&&Q__namespace.default.createElement("div",{className:"relative"},Q__namespace.default.createElement(lucideReact.Search,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),Q__namespace.default.createElement(kr,{placeholder:a("search-members-placeholder"),value:o,onChange:s=>r(s.target.value),className:"h-12 pl-10 pr-10 rounded-xl bg-gray-50 border-0 text-sm"}),o&&Q__namespace.default.createElement("button",{onClick:()=>r(""),className:"absolute right-3 top-1/2 -translate-y-1/2 w-5 h-5 rounded-full hover:bg-accent flex items-center justify-center transition-colors","aria-label":a("clear-search")},Q__namespace.default.createElement(lucideReact.X,{className:"w-3 h-3 text-muted-foreground"}))))}function Ak({displayName:e,isCurrentUser:t,isOwner:o,isAdmin:r}){let{t:n}=Oe();return Q__namespace.default.createElement("div",{className:"min-w-0 flex-1"},Q__namespace.default.createElement("div",{className:"flex items-center gap-2 flex-wrap"},Q__namespace.default.createElement("p",{className:"font-semibold text-sm text-gray-900 truncate"},e),t&&Q__namespace.default.createElement("span",{className:"text-xs text-gray-500 shrink-0"},"(",n("you-label"),")"),(o||r)&&Q__namespace.default.createElement("span",{className:E("px-2 py-[2px] rounded-full text-[10px] font-bold shrink-0",o?"bg-yellow-100 text-yellow-800":"bg-blue-100 text-blue-700")},n(o?"owner":"admin"))))}var Ek=(e,t)=>{let{user:o,chatApiUrl:r,queryClient:n}=w(),a=f=>{f&&n?.invalidateQueries({queryKey:["conversation",f]}),n?.invalidateQueries({queryKey:["conversations",o?.id]});},{mutate:s,isPending:i}=ne({mutationFn:async f=>!t||!r?null:(await c7.request(r,lC,{input:{userId:f,conversationId:t}},{"x-access-token":o?.accessToken??""}))?.makeGroupAdmin,onSuccess:()=>{a(t);},onError:()=>{a(t);}}),{mutate:l,isPending:d}=ne({mutationFn:async f=>!t||!r?null:(await c7.request(r,iC,{input:{conversationId:t,participantId:f}},{"x-access-token":o?.accessToken??""}))?.deleteParticipantGroup,onSuccess:()=>{a(t);},onError:()=>{a(t);}});return {handleMakeAdmin:f=>{f&&s(f);},handleRemoveAdmin:f=>{f&&s(f);},handleRemoveMember:(f,g)=>{if(!(!f||!g)){if(g==="OWNER")return alert("O propriet\xE1rio do grupo n\xE3o pode ser removido.");if(g==="ADMIN"&&e!=="OWNER")return alert("Apenas o propriet\xE1rio pode remover administradores.");l([f]);}},handleStartChat:f=>{},isMakingAdmin:i,isRemovingParticipant:d}};function Rre(e){return Q__namespace.createElement("svg",{width:20,height:20,fill:"none",...e},Q__namespace.createElement("path",{opacity:.4,d:"M10.018 1.666c-4.842 0-8.35 3.95-8.35 8.333 0 1.4.408 2.842 1.125 4.159.133.216.15.491.058.75l-.558 1.866c-.125.45.258.784.683.65l1.684-.5c.458-.15.816.042 1.242.3 1.217.717 2.733 1.084 4.1 1.084 4.133 0 8.333-3.192 8.333-8.334 0-4.433-3.584-8.308-8.317-8.308z",fill:"#687588"}),Q__namespace.createElement("path",{d:"M6.14 8.941c.592 0 1.068.475 1.068 1.067 0 .583-.476 1.059-1.067 1.067a1.075 1.075 0 01-1.067-1.067c0-.592.475-1.066 1.067-1.067zm3.842 0c.592 0 1.068.475 1.068 1.067a1.07 1.07 0 01-1.068 1.067A1.076 1.076 0 018.916 10c0-.583.483-1.067 1.066-1.059zm3.842 0c.592 0 1.066.475 1.067 1.067a1.07 1.07 0 01-1.067 1.067 1.07 1.07 0 01-1.066-1.067c0-.592.475-1.066 1.066-1.067z",fill:"#687588"}))}var ene=Q__namespace.memo(Rre),kk=ene;function Tk({participant:e,isCurrentUser:t,hasAdminPermissions:o,isCreator:r,isMember:n,isAdmin:a,isOwner:s,memberActions:i,currentUserRole:l}){let {t:d}=Oe(),p=l==="OWNER",m=o&&n,u=p&&a,f=()=>s||t?false:a?p:o&&n;return Q__namespace.default.createElement("div",{className:"flex items-center gap-2 shrink-0 ml-4"},!o&&!t&&Q__namespace.default.createElement("button",{onClick:()=>i.handleStartChat(e?.id??void 0),className:"p-2 text-xs text-primary hover:bg-primary/10 hover:text-white transition","aria-label":d("start-chat")},Q__namespace.default.createElement(kk,{className:"w-5 h-5"})),m&&Q__namespace.default.createElement("button",{onClick:()=>{let g=e.users?.[0]?.id??e.userId??void 0;i.handleMakeAdmin(g);},className:"p-2 text-xs text-primary hover:bg-primary hover:text-white transition","aria-label":d("make-admin")},Q__namespace.default.createElement(lucideReact.UserRoundPlus,{className:"w-5 h-5"})),u&&Q__namespace.default.createElement("button",{onClick:()=>{let g=e.users?.[0]?.id??e.userId??void 0;i.handleRemoveAdmin(g);},className:"p-2 text-xs text-orange-600 hover:bg-orange-600 hover:text-white transition","aria-label":d("remove-admin")},Q__namespace.default.createElement(lucideReact.UserRoundMinus,{className:"w-5 h-5"})),f()&&Q__namespace.default.createElement("button",{onClick:()=>i.handleRemoveMember(e?.id??void 0,e?.role??void 0),className:"p-2 text-xs text-red-600 hover:bg-red-600/10 hover:text-white transition","aria-label":d("remove")},Q__namespace.default.createElement(Wn,{className:"w-5 h-5"})))}function Dk({participant:e,currentUserId:t,currentUserRole:o,conversationId:r}){let{t:n}=Oe(),{hasAdminPermissions:a,isCreator:s}=N6(o),i=Ek(o,r),l=e.users?.[0],d=e.page,c=l?.name||d?.name||n("unknown"),p=l?.avatar||d?.logo,m=l?.slug||d?.slug,u=e.role==="OWNER",f=e.role==="ADMIN",g=e.role==="MEMBER",h=l?.id===t;return Q__namespace.default.createElement("div",{className:"flex items-center justify-between px-3 py-2.5 rounded-xl hover:bg-gray-50 transition group"},Q__namespace.default.createElement("button",{onClick:()=>{m&&window.open(`/profile/pt/${m}`,"_blank");},className:"flex items-center gap-3 min-w-0 text-left flex-1"},Q__namespace.default.createElement(J,{name:c,src:p??"",className:"w-11 h-11 ring-2 ring-white shadow-sm shrink-0",type:"user"}),Q__namespace.default.createElement(Ak,{displayName:c,isCurrentUser:h,isOwner:u,isAdmin:f})),Q__namespace.default.createElement(Tk,{participant:e,isCurrentUser:h,hasAdminPermissions:a,isCreator:s,isMember:g,isAdmin:f,isOwner:u,memberActions:i,currentUserRole:o}))}function Lk({filteredParticipants:e,currentUserId:t,currentUserRole:o,memberSearchQuery:r,conversationId:n}){let{t:a}=Oe();return e.length===0?Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"p-4"},Q__namespace.default.createElement("div",{className:"text-center py-8"},Q__namespace.default.createElement("p",{className:"text-sm text-gray-500"},a(r?"no-members-found":"no-members-in-group"))))):Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto"},Q__namespace.default.createElement("div",{className:"p-4"},Q__namespace.default.createElement("div",{className:"flex flex-col gap-2"},e?.map(s=>Q__namespace.default.createElement(Dk,{key:s.id,participant:s,currentUserId:t,currentUserRole:o,conversationId:n})))))}function Ok({filteredCount:e,totalCount:t}){let{t:o}=Oe();return Q__namespace.default.createElement("div",{className:"px-4 py-2 bg-gray-50 border-b border-gray-200"},Q__namespace.default.createElement("p",{className:"text-xs text-gray-600"},e===1?`${e} ${o("member-found")} ${o("members-found-count")} ${t}`:`${e} ${o("members-found")} ${o("members-found-count")} ${t}`))}function zk({participant:e,currentUserId:t,currentUserRole:o,memberSearchQuery:r,setMemberSearchQuery:n,onAddMembersClick:a,conversationId:s}){let{hasAdminPermissions:i}=N6(o),l=Sk(e,r),d=e?.length||0;return Q__namespace.default.createElement("div",{className:"flex flex-col h-full"},Q__namespace.default.createElement(Nk,{hasAdminPermissions:i,membersCount:d,memberSearchQuery:r,setMemberSearchQuery:n,onAddMembersClick:a}),r&&Q__namespace.default.createElement(Ok,{filteredCount:l.length,totalCount:d}),Q__namespace.default.createElement(Lk,{filteredParticipants:l,currentUserId:t,currentUserRole:o,memberSearchQuery:r,conversationId:s}))}function mh({participant:e,name:t,description:o,image:r,createdAt:n,creatorName:a,currentUserId:s,currentUserRole:i,activeTab:l,setActiveTab:d,showAddMembers:c,memberSearchQuery:p,setMemberSearchQuery:m,searchQuery:u,onSearchQuery:f,contacts:g,isAdding:h,fetchNextPage:v,hasNextPage:y,isFetchingNextPage:b,onAddMembersClick:x,onConfirmAddMembers:C,onBackFromAddMembers:M,onClose:A,isMobile:P,conversationId:S}){let I=e?.length||0;if(c){let H=e?.map(L=>L.users?.[0]?.id).filter(Boolean);return Q__namespace.default.createElement(wk,{searchQuery:u,onSearchQuery:f,currentMembers:H,contacts:g,onBack:M,onAddMembers:C,isAdding:h,fetchNextPage:v,hasNextPage:y,isFetchingNextPage:b})}return Q__namespace.default.createElement("div",{className:E("flex flex-col",l==="about"?"h-full":"h-[35.938rem]")},Q__namespace.default.createElement(Ck,{name:t,onClose:A,isMobile:P}),Q__namespace.default.createElement(Mk,{activeTab:l,setActiveTab:d,membersCount:I,onTabChange:()=>m("")}),Q__namespace.default.createElement("div",{className:"flex-1 overflow-y-auto"},l==="about"?Q__namespace.default.createElement(Pk,{name:t,image:r,description:o,creatorName:a,createdAt:n,conversationId:S,currentUserRole:i}):Q__namespace.default.createElement(zk,{participant:e,currentUserId:s,currentUserRole:i,memberSearchQuery:p,setMemberSearchQuery:m,onAddMembersClick:x,conversationId:S})))}var Bk=c7.gql`
2918
2922
  mutation CreateParticipant($input: CreateParticipantInput!) {
2919
2923
  createParticipant(input: $input) {
2920
2924
  id
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mirantes-micro/foundation-design-system",
3
3
  "description": "A scalable and customizable design system package featuring a collection of reusable React components, utility functions, and context providers. Built to enforce visual and functional consistency across applications, this package offers accessible, themeable UI elements, shared logic through utility helpers, and context-based providers for managing global state such as themes, modals, and user sessions.",
4
- "version": "1.2.253",
4
+ "version": "1.2.256",
5
5
  "license": "MIT",
6
6
  "author": {
7
7
  "name": "Mirantes Frontend team"