@amityco/ulta-ui-kit 1.1.1-beta01 → 1.1.1-beta03
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.
- package/dist/esm/index.css +1 -1
- package/dist/esm/index.js +11 -11
- package/dist/index.css +1 -1
- package/dist/index.js +11 -11
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -467,7 +467,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Wc]+=1);var o0=`url("data:ima
|
|
|
467
467
|
}
|
|
468
468
|
`,nC=m(ee)`
|
|
469
469
|
margin-right: 10px;
|
|
470
|
-
`;var _z=({"data-qa-anchor":e="",className:t,title:o,content:r,okText:n="Ok",onOk:i,OkButton:a=rC,cancelText:s="Cancel",CancelButton:l=nC,onCancel:c,type:p="confirm"})=>te.createElement(eC,{"data-qa-anchor":`confirm-modal-${e}`,clean:!0,className:t,title:o,footer:te.createElement(oC,null,p==="confirm"&&te.createElement(l,{"data-qa-anchor":"confirm-modal-cancel-button",onClick:c},s),te.createElement(a,{"data-qa-anchor":`confirm-modal-${e}-ok-button`,onClick:i},n)),onCancel:c},te.createElement(tC,null,r)),iC=()=>{let{confirmData:e,closeConfirm:t}=we();if(!e)return null;let o=()=>{t(),e!=null&&e.onCancel&&e.onCancel();},r=()=>{t(),e!=null&&e.onOk&&e.onOk(),e!=null&&e.onSuccess&&(e==null||e.onSuccess());};return te.createElement(Na,null,te.createElement(_z,E(d({},e),{onCancel:o,onOk:r})))};var f0={icon__container:"Zr",icon:"_r",notifications:"
|
|
470
|
+
`;var _z=({"data-qa-anchor":e="",className:t,title:o,content:r,okText:n="Ok",onOk:i,OkButton:a=rC,cancelText:s="Cancel",CancelButton:l=nC,onCancel:c,type:p="confirm"})=>te.createElement(eC,{"data-qa-anchor":`confirm-modal-${e}`,clean:!0,className:t,title:o,footer:te.createElement(oC,null,p==="confirm"&&te.createElement(l,{"data-qa-anchor":"confirm-modal-cancel-button",onClick:c},s),te.createElement(a,{"data-qa-anchor":`confirm-modal-${e}-ok-button`,onClick:i},n)),onCancel:c},te.createElement(tC,null,r)),iC=()=>{let{confirmData:e,closeConfirm:t}=we();if(!e)return null;let o=()=>{t(),e!=null&&e.onCancel&&e.onCancel();},r=()=>{t(),e!=null&&e.onOk&&e.onOk(),e!=null&&e.onSuccess&&(e==null||e.onSuccess());};return te.createElement(Na,null,te.createElement(_z,E(d({},e),{onCancel:o,onOk:r})))};var f0={icon__container:"Zr",icon:"_r",notifications:"E",notificationContainer:"I",appear:"R"};var kz=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"18",height:"18",viewBox:"0 0 18 18",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9 0.0273438C13.7812 0.0273438 17.7188 3.96484 17.7188 8.74609C17.7188 13.5625 13.7812 17.4648 9 17.4648C4.18359 17.4648 0.28125 13.5625 0.28125 8.74609C0.28125 3.96484 4.18359 0.0273438 9 0.0273438ZM9 1.71484C5.09766 1.71484 1.96875 4.87891 1.96875 8.74609C1.96875 12.6484 5.09766 15.7773 9 15.7773C12.8672 15.7773 16.0312 12.6484 16.0312 8.74609C16.0312 4.87891 12.8672 1.71484 9 1.71484ZM13.9219 6.32031C14.0625 6.46094 14.0625 6.74219 13.9219 6.91797L7.83984 12.9297C7.66406 13.1055 7.41797 13.1055 7.24219 12.9297L4.04297 9.69531C3.90234 9.55469 3.90234 9.27344 4.04297 9.09766L4.85156 8.32422C5.02734 8.14844 5.27344 8.14844 5.44922 8.32422L7.55859 10.4336L12.5156 5.51172C12.6914 5.33594 12.9727 5.33594 13.1133 5.51172L13.9219 6.32031Z"}))},y0=kz;var Sz=t=>{var e=P(t,[]);return te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 512 512"},e),te.createElement("path",{d:`M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504
|
|
471
471
|
119.083 392.957 8 256 8zm0 448c-110.532 0-200-89.431-200-200 0-110.495 89.472-200 200-200
|
|
472
472
|
110.491 0 200 89.471 200 200 0 110.53-89.431 200-200 200zm42-104c0 23.159-18.841 42-42
|
|
473
473
|
42s-42-18.841-42-42 18.841-42 42-42 42 18.841 42 42zm-81.37-211.401l6.8 136c.319 6.387
|
|
@@ -478,12 +478,12 @@ See https://s-c.sh/2BAXzed for more info.`),window[Wc]+=1);var o0=`url("data:ima
|
|
|
478
478
|
52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4
|
|
479
479
|
256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160
|
|
480
480
|
303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34
|
|
481
|
-
0-22.58L207.6 256z`})),mC=Nz;var h0={icon:"ea"};var W4=createContext({notifications:[],notificationFunction:{success:()=>{},info:()=>{},error:()=>{},show:()=>{}}}),Az=3e3,cC=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,d({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||Az);};return te.createElement(W4.Provider,{value:{notifications:t,notificationFunction:{success:i=>n(E(d({},i),{icon:te.createElement(y0,{className:h0.icon})})),info:i=>n(E(d({},i),{icon:te.createElement(Y1,{className:h0.icon})})),error:i=>n(E(d({},i),{icon:te.createElement(mC,{className:h0.icon})})),show:i=>n(i)}}},e)},pC=()=>{let{notifications:e}=useContext(W4);return e},So=()=>{let{notificationFunction:e}=useContext(W4);return e};var Os=({className:e,content:t,icon:o,duration:r})=>{let[n,i]=useState(!0);return r&&setTimeout(()=>{i(!1);},r),n?n&&te.createElement("div",{className:gr(f0.notificationContainer,e)},te.createElement("div",{className:gr(f0.icon__container)},o)," ",t):null},gC=()=>{let e=pC();return te.createElement("div",{className:f0.notifications},e.map(t=>te.createElement(Os,E(d({},t),{key:t.id}))))};var Us={closeIcon:"ra","svg-inline--fa":"aa",appear:"
|
|
481
|
+
0-22.58L207.6 256z`})),mC=Nz;var h0={icon:"ea"};var W4=createContext({notifications:[],notificationFunction:{success:()=>{},info:()=>{},error:()=>{},show:()=>{}}}),Az=3e3,cC=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,d({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||Az);};return te.createElement(W4.Provider,{value:{notifications:t,notificationFunction:{success:i=>n(E(d({},i),{icon:te.createElement(y0,{className:h0.icon})})),info:i=>n(E(d({},i),{icon:te.createElement(Y1,{className:h0.icon})})),error:i=>n(E(d({},i),{icon:te.createElement(mC,{className:h0.icon})})),show:i=>n(i)}}},e)},pC=()=>{let{notifications:e}=useContext(W4);return e},So=()=>{let{notificationFunction:e}=useContext(W4);return e};var Os=({className:e,content:t,icon:o,duration:r})=>{let[n,i]=useState(!0);return r&&setTimeout(()=>{i(!1);},r),n?n&&te.createElement("div",{className:gr(f0.notificationContainer,e)},te.createElement("div",{className:gr(f0.icon__container)},o)," ",t):null},gC=()=>{let e=pC();return te.createElement("div",{className:f0.notifications},e.map(t=>te.createElement(Os,E(d({},t),{key:t.id}))))};var Us={closeIcon:"ra","svg-inline--fa":"aa",appear:"U",overlay:"oa",modalWindow:"v",smallModalWindow:"ta",title:"D",content:"ia",footer:"F"};var Fz=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 320 512",fill:"currentColor"},e),te.createElement("path",{d:`M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34
|
|
482
482
|
0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4
|
|
483
483
|
52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4
|
|
484
484
|
256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160
|
|
485
485
|
303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34
|
|
486
|
-
0-22.58L207.6 256z`})),R1=Fz;var CC=[.25,.4,.5,.75],jz=(e,t=!1)=>{if(!e)return Array(CC.length).fill("");if(t===!0&&e===Qo.theme.dark.primary_color)return ["#4a82f2","#a0bdf8","#d9e5fc","#ffffff"];if(t===!1&&e===Qo.theme.light.primary_color)return ["#4a82f2","#a0bdf8","#d9e5fc","#ffffff"];let o=parseToHsl(e);return CC.map(n=>t?darken(n,hslToColorString(o)):lighten(n,hslToColorString(o)))};function vC(e){let t=q4(),o=useMemo(()=>e!=null&&e.preferred_theme&&(e==null?void 0:e.preferred_theme)!=="default"?e.preferred_theme:"default",[e==null?void 0:e.preferred_theme,t]),r=o==="default"?t:o;return useMemo(()=>{var s;let i=((s=e==null?void 0:e.theme)==null?void 0:s[r])||{},a=jz(i.primary_color);return {"--asc-color-primary-default":i.primary_color,"--asc-color-primary-shade1":a[0],"--asc-color-primary-shade2":a[1],"--asc-color-primary-shade3":a[2],"--asc-color-primary-shade4":a[3],"--asc-color-secondary-default":i.secondary_color,"--asc-color-secondary-shade1":i.secondary_shade1_color,"--asc-color-secondary-shade2":i.secondary_shade2_color,"--asc-color-secondary-shade3":i.secondary_shade3_color,"--asc-color-secondary-shade4":i.secondary_shade4_color,"--asc-color-alert-default":i.alert_color,"--asc-color-base-inverse":i.base_inverse_color,"--asc-color-base-default":i.base_color,"--asc-color-base-shade1":i.base_shade1_color,"--asc-color-base-shade2":i.base_shade2_color,"--asc-color-base-shade3":i.base_shade3_color,"--asc-color-base-shade4":i.base_shade4_color,"--asc-color-base-shade5":i.base_shade5_color,"--asc-color-background-default":i.background_color}},[e,r])}var Gz=createContext({currentTheme:"light",toggleTheme:()=>{}});var q4=()=>{let{currentTheme:e}=useContext(Gz);return e};var K4=({page:e,component:t,element:o})=>o!=="*"?[`${e}/${t}/${o}`,`*/${t}/${o}`,`${e}/*/${o}`,`*/*/${o}`,`${e}/${t}/*`,`*/${t}/*`,`${e}/*/*`]:t!=="*"?[`${e}/${t}/*`,`${e}/*/*`,`*/${t}/*`]:e!=="*"?[`${e}/*/*`]:[],xC=createContext({config:null,parseConfig:()=>{},isExcluded:()=>!1,getConfig:()=>({})}),x0=()=>{let e=useContext(xC);if(!e)throw new Error("useCustomization must be used within a CustomizationProvider");return e},Qo={preferred_theme:"default",theme:{light:{primary_color:"#36486c",secondary_color:"#292b32",secondary_shade1_color:"#636878",secondary_shade2_color:"#898e9e",secondary_shade3_color:"#a5a9b5",secondary_shade4_color:"#ebecef",base_color:"#292b32",base_shade1_color:"#636878",base_shade2_color:"#898e9e",base_shade3_color:"#a5a9b5",base_shade4_color:"#ebecef",base_shade5_color:"#F9F9FA",alert_color:"#FA4D30",background_color:"#FFFFFF",base_inverse_color:"#000000"},dark:{primary_color:"#1054DE",secondary_color:"#ebecef",secondary_shade1_color:"#a5a9b5",secondary_shade2_color:"#898e9e",secondary_shade3_color:"#40434e",secondary_shade4_color:"#292b32",base_color:"#ebecef",base_shade1_color:"#a5a9b5",base_shade2_color:"#6e7487",base_shade3_color:"#40434e",base_shade4_color:"#292b32",base_shade5_color:"#f9f9fa",alert_color:"#FA4D30",background_color:"#191919",base_inverse_color:"#FFFFFF"}},excludes:[],customizations:{"select_target_page/*/*":{theme:{},title:"Share to"},"select_target_page/*/back_button":{back_icon:"back.png"},"camera_page/*/*":{resolution:"720p"},"camera_page/*/close_button":{close_icon:"close.png"},"create_story_page/*/*":{},"create_story_page/*/back_button":{back_icon:"back.png",background_color:"#1234DB"},"create_story_page/*/aspect_ratio_button":{aspect_ratio_icon:"aspect_ratio.png",background_color:"1234DB"},"create_story_page/*/story_hyperlink_button":{hyperlink_button_icon:"hyperlink_button.png",background_color:"#1234DB"},"create_story_page/*/hyper_link":{hyper_link_icon:"hyper_link.png",background_color:"#1234DB"},"create_story_page/*/share_story_button":{share_icon:"share_story_button.png",background_color:"#1234DB",hide_avatar:!1},"story_page/*/*":{},"story_page/*/progress_bar":{progress_color:"#UD1234",background_color:"#AB1234"},"story_page/*/overflow_menu":{overflow_menu_icon:"threeDot.png"},"story_page/*/close_button":{close_icon:"close.png"},"story_page/*/story_impression_button":{impression_icon:"impressionIcon.png"},"story_page/*/story_comment_button":{comment_icon:"comment.png",background_color:"#2b2b2b"},"story_page/*/story_reaction_button":{reaction_icon:"like.png",background_color:"#2b2b2b"},"story_page/*/create_new_story_button":{create_new_story_icon:"plus.png",background_color:"#ffffff"},"story_page/*/speaker_button":{mute_icon:"mute.png",unmute_icon:"unmute.png",background_color:"#1243EE"},"story_page/*/arrow_left_button":{arrow_left_icon:"arrow_left.png",background_color:"#1243EE"},"story_page/*/arrow_right_button":{arrow_right_icon:"arrow_right.png",background_color:"#1243EE"},"*/edit_comment_component/*":{theme:{}},"*/edit_comment_component/edit_cancel_button":{cancel_icon:"",cancel_button_text:"Cancel",background_color:""},"*/edit_comment_component/save_button":{save_icon:"",save_button_text:"Save",background_color:"#1243EE"},"*/hyper_link_config_component/*":{theme:{}},"*/hyper_link_config_component/done_button":{done_icon:"",done_button_text:"Done",background_color:"#1243EE"},"*/hyper_link_config_component/edit_cancel_button":{cancel_icon:"",cancel_button_text:"Cancel"},"*/comment_tray_component/*":{theme:{}},"*/comment_tray_component/comment_bubble_deleted_view":{comment_bubble_deleted_icon:"comment_bubble_deleted.png",text:"This reply has been deleted"},"*/story_tab_component/*":{},"*/story_tab_component/story_ring":{progress_color:["#339AF9","#78FA58"],background_color:"#AB1234"},"*/story_tab_component/create_new_story_button":{create_new_story_icon:"plus.png",background_color:"#1243EE"},"*/*/close_button":{close_icon:"close.png"},"social_home_page/top_navigation/header_label":{text:"Community"},"social_home_page/top_navigation/global_search_button":{icon:"searchButtonIcon"},"social_home_page/top_navigation/post_creation_button":{icon:"postCreationIcon"},"social_home_page/*/newsfeed_button":{text:"Newsfeed"},"social_home_page/*/explore_button":{text:"Explore"},"social_home_page/*/my_communities_button":{text:"My Communities"},"social_home_page/empty_newsfeed/illustration":{icon:"emptyFeedIcon"},"social_home_page/empty_newsfeed/title":{text:"Your Feed is empty"},"social_home_page/empty_newsfeed/description":{text:"Find community or create your own"},"social_home_page/empty_newsfeed/explore_communities_button":{icon:"exploreCommunityIcon",text:"Explore Community"},"social_home_page/empty_newsfeed/create_community_button":{icon:"createCommunityIcon",text:"Create Community"},"social_home_page/my_communities/community_avatar":{},"social_home_page/my_communities/community_display_name":{},"social_home_page/my_communities/community_private_badge":{icon:"lockIcon"},"social_home_page/my_communities/community_official_badge":{icon:"officalBadgeIcon"},"social_home_page/my_communities/community_category_name":{},"social_home_page/my_communities/community_members_count":{},"social_home_page/newsfeed_component/*":{},"social_home_page/global_feed_component/*":{},"global_search_page/*/*":{},"post_detail_page/*/back_button":{icon:"backButtonIcon"},"post_detail_page/*/menu_button":{icon:"menuIcon"},"*/*/moderator_badge":{icon:"badgeIcon",text:"Moderator"},"*/post_content/timestamp":{},"*/post_content/menu_button":{icon:"menuIcon"},"*/post_content/post_content_view_count":{},"*/post_content/reaction_button":{icon:"likeButtonIcon",text:"Like"},"*/post_content/comment_button":{icon:"commentButtonIcon",text:"Comment"},"*/post_content/share_button":{icon:"shareButtonIcon",text:"Share"},"post_composer_page/*/*":{},"post_composer_page/*/close_button":{image:"platformValue"},"post_composer_page/*/community_display_name":{},"post_composer_page/*/create_new_post_button":{text:"Post"},"post_composer_page/*/edit_post_button":{text:"Save"},"post_composer_page/*/edit_post_title":{text:"Edit post"},"post_composer_page/media_attachment/*":{},"post_composer_page/media_attachment/camera_button":{image:"platformValue"},"post_composer_page/media_attachment/image_button":{image:"platformValue"},"post_composer_page/media_attachment/video_button":{image:"platformValue"},"post_composer_page/media_attachment/file_button":{image:"platformValue"},"post_composer_page/media_attachment/detailed_button":{image:"platformValue"},"post_composer_page/detailed_media_attachment/*":{},"post_composer_page/detailed_media_attachment/camera_button":{text:"Camera",image:"platformValue"},"post_composer_page/detailed_media_attachment/image_button":{text:"Photo",image:"platformValue"},"post_composer_page/detailed_media_attachment/video_button":{text:"Video",image:"platformValue"},"post_composer_page/detailed_media_attachment/file_button":{text:"Attachment",image:"platformValue"},"social_home_page/*/*":{},"social_home_page/create_post_menu/*":{},"social_home_page/create_post_menu/create_post_button":{text:"Post",image:"Post"},"social_home_page/create_post_menu/create_story_button":{text:"Story",image:"Story"},"social_home_page/create_post_menu/create_poll_button":{text:"Poll",image:"Poll"},"social_home_page/create_post_menu/create_livestream_button":{text:"Livestream",image:"Livestream"},"select_post_target_page/*/close_button":{image:"platformValue"},"select_post_target_page/*/my_timeline_avatar":{},"select_post_target_page/*/title":{text:"Post to"},"select_post_target_page/*/my_timeline_text":{text:"My Timeline"},"select_story_target_page/*/close_button":{image:"platformValue"},"select_story_target_page/*/title":{text:"Share to"},"*/*/community_official_badge":{image:"platformValue"},"*/*/community_private_badge":{image:"platformValue"},"social_global_search_page/*/*":{},"social_global_search_page/top_search_bar/*":{text:"Search community and user"},"social_global_search_page/top_search_bar/search_icon":{icon:"search"},"social_global_search_page/top_search_bar/clear_button":{icon:"clear"},"social_global_search_page/top_search_bar/cancel_button":{text:"Cancel"},"social_global_search_page/community_search_result/community_avatar":{},"social_global_search_page/community_search_result/community_display_name":{},"social_global_search_page/community_search_result/community_private_badge":{icon:"lockIcon"},"social_global_search_page/community_search_result/community_official_badge":{icon:"officialBadgeIcon"},"social_global_search_page/community_search_result/community_category_name":{},"social_global_search_page/community_search_result/community_members_count":{},"my_communities_search_page/top_search_bar/*":{text:"Search my community"},"my_communities_search_page/*/community_avatar":{},"my_communities_search_page/*/community_display_name":{},"my_communities_search_page/*/community_private_badge":{icon:"lockIcon"},"my_communities_search_page/*/community_official_badge":{icon:"officialBadgeIcon"},"my_communities_search_page/*/community_category_name":{},"my_communities_search_page/*/community_members_count":{},"my_communities_search_page/top_search_bar/cancel_button":{text:"Cancel"},"community_profile_page/*/*":{},"community_profile_page/community_feed/*":{},"*/post_content/announcement_badge":{image:"value"},"*/post_content/pin_badge":{image:"value"},"*/post_content/non_member_section":{image:"value"},"community_profile_page/community_header/*":{},"community_profile_page/community_header/community_cover":{},"community_profile_page/community_header/community_name":{},"community_profile_page/community_header/community_verify_badge":{image:"value"},"community_profile_page/community_header/community_category":{},"community_profile_page/community_header/community_description":{},"community_profile_page/community_header/community_info":{},"community_profile_page/community_header/community_join_button":{image:"value"},"community_profile_page/community_header/community_pending_post":{image:"value"},"community_profile_page/community_header/back_button":{image:"value"},"community_profile_page/community_header/menu_button":{image:"value"},"community_profile_page/community_profile_tab/*":{},"community_profile_page/community_profile_tab/community_feed_tab_button":{image:"value"},"community_profile_page/community_profile_tab/community_pin_tab_button":{image:"value"},"community_profile_page/community_pin/*":{},"community_profile_page/community_pin/community_create_post_button":{image:"value"},"community_profile_page/post_content/*":{}}},bC=e=>{let[t,o,r]=e.split("/"),n=K4({page:t,component:o,element:r});return new Proxy({},{get(i,a){var s,l;for(let c of n)if((l=(s=Qo==null?void 0:Qo.customizations)==null?void 0:s[c])!=null&&l[a])return Qo.customizations[c][a]}})},IC=({children:e,initialConfig:t={}})=>{let [o,r]=useState(null);q4();useEffect(()=>{i()?a(t):console.error("Invalid configuration provided to CustomizationProvider");},[t]);let i=p=>!0,a=p=>{r(p);},c={config:o,parseConfig:a,isExcluded:p=>{var C;let[u,g,f]=p.split("/"),y=K4({page:u,component:g,element:f});return ((C=o==null?void 0:o.excludes)==null?void 0:C.some(v=>y.some(h=>h===v)))||!1},getConfig:p=>{let[u,g,f]=p.split("/"),y=K4({page:u,component:g,element:f}),C=v=>({get(h,x){var b,M,I,w,k,S,L,D,H,$,B,z,V,K,U;for(let j of y)if((w=(I=(M=(b=o==null?void 0:o.customizations)==null?void 0:b[j])==null?void 0:M.theme)==null?void 0:I[v])!=null&&w[x])return (S=(k=o.customizations[j].theme)==null?void 0:k[v])==null?void 0:S[x];if((D=(L=o==null?void 0:o.theme)==null?void 0:L[v])!=null&&D[x])return (H=o.theme[v])==null?void 0:H[x];for(let j of y)if((V=(z=(B=($=Qo.customizations)==null?void 0:$[j])==null?void 0:B.theme)==null?void 0:z[v])!=null&&V[x])return (U=(K=Qo.customizations[j].theme)==null?void 0:K[v])==null?void 0:U[x];return Qo.theme[v][x]}});return new Proxy({},{get(v,h){var x,b,M,I,w;if(h==="theme")return {light:new Proxy({},C("light")),dark:new Proxy({},C("dark"))};if(h==="preferred_theme")return (x=o==null?void 0:o.preferred_theme)!=null?x:Qo.preferred_theme;for(let k of y)if((M=(b=o==null?void 0:o.customizations)==null?void 0:b[k])!=null&&M[h])return o.customizations[k][h];for(let k of y)if((w=(I=Qo==null?void 0:Qo.customizations)==null?void 0:I[k])!=null&&w[h])return Qo.customizations[k][h]}})}};return te.createElement(xC.Provider,{value:c},e)};var A=({pageId:e,componentId:t,elementId:o})=>{let r=`${e}/${t}/${o}`,{getConfig:n,isExcluded:i}=x0(),a=n(r),s=bC(r),l=vC(a),c=i(r);return {config:a,defaultConfig:s,uiReference:r,accessibilityId:r,themeStyles:l,isExcluded:c}},re=({pageId:e,componentId:t})=>A({pageId:e,componentId:t,elementId:"*"}),Re=({pageId:e})=>A({pageId:e,componentId:"*",elementId:"*"});var Yz=({pageId:e="*",componentId:t="*",elementId:o="*",size:r="",onOverlayClick:n=()=>{},onCancel:i,title:a,footer:s,children:l})=>{let{accessibilityId:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:o}),u=useRef(null);return useEffect(()=>{var g;(g=u==null?void 0:u.current)==null||g.focus();},[u==null?void 0:u.current]),te.createElement("div",{className:Us.overlay,onClick:n,style:p},te.createElement("div",{className:gr(Us.modalWindow),"data-qa-anchor":c,ref:u,tabIndex:0},i&&te.createElement(R1,{className:Us.closeIcon,onClick:i}),a&&te.createElement("div",{className:Us.title},a),te.createElement("div",{className:gr(Us.content)},l),s&&te.createElement("div",{className:Us.footer},s)))},MC=Yz;var PC={button:"la"};var O=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return te.createElement(Button,d({className:gr(PC.button,e)},t))};var _C=createContext({confirmData:null,confirm:e=>{},info:e=>{},closeConfirm:()=>{}}),et=()=>useContext(_C),TC=({children:e})=>{let[t,o]=useState(null),r=()=>{o(null);},n=a=>{o(E(d({},a),{type:"confirm"}));},i=a=>o(E(d({},a),{type:"info",OkButton:ye}));return te.createElement(_C.Provider,{value:{confirmData:t,confirm:n,info:i,closeConfirm:r}},e)};var tl={modal:"sa",background:"ca",footer:"na",okButton:"da",cancelButton:"H"};var ze={typography:"pa","typography-headings":"ga","typography-titles":"ha","typography-sub-title":"fa","typography-body":"ba","typography-body-bold":"ua","typography-caption":"va","typography-caption-bold":"xa"};var $s=e=>e.renderer!==void 0,m$={Heading:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-headings"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("h1",d({className:gr(ze.typography,ze["typography-headings"],o),style:r},n),t)},Title:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-titles"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("h2",d({className:gr(ze.typography,ze["typography-titles"],o),style:r},n),t)},Subtitle:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-sub-title"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("h3",d({className:gr(ze.typography,ze["typography-sub-title"],o),style:r},n),t)},Body:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-body"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-body"],o),style:r},n),t)},BodyBold:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-body-bold"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-body-bold"],o),style:r},n),t)},Caption:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-caption"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-caption"],o),style:r},n),t)},CaptionBold:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-caption-bold"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-caption-bold"],o),style:r},n),t)}},N=m$;var c$=({pageId:e="*",componentId:t="*",elementId:o="*",className:r,title:n,content:i,okText:a="Ok",onOk:s,cancelText:l="Cancel",onCancel:c,type:p="confirm"})=>{let{accessibilityId:u,themeStyles:g}=A({pageId:e,componentId:t,elementId:o});return te.createElement(MC,{className:gr(r,tl.modal),pageId:e,componentId:t,elementId:o,"data-qa-anchor":`confirm-modal-${u}`,title:n,footer:te.createElement("div",{className:tl.footer},p==="confirm"&&te.createElement(O,{style:g,className:tl.cancelButton,"data-qa-anchor":"confirm-modal-cancel-button",onPress:c},te.createElement(N.BodyBold,null,l)),te.createElement(O,{style:g,className:tl.okButton,"data-qa-anchor":`confirm-modal-${u}-ok-button`,onPress:s},te.createElement(N.BodyBold,null,a))),onCancel:c},te.createElement("div",null,i))},kC=()=>{let{confirmData:e,closeConfirm:t}=et();if(!e)return null;let o=()=>{t(),e!=null&&e.onCancel&&e.onCancel();},r=()=>{t(),e!=null&&e.onOk&&e.onOk();};return te.createElement(c$,E(d({},e),{onCancel:o,onOk:r,className:tl.background}))};var SC={socialCommunityCreationButtonVisible:!0},NC=createContext(SC),EC=()=>useContext(NC);function J4({children:e,config:t}){let o=useMemo(()=>d(d({},SC),t),[t]);return te.createElement(NC.Provider,{value:o},e)}var BC={"general.action.cancel":"Cancel","general.action.accept":"Accept","general.action.decline":"Decline","general.action.discard":"Discard","general.action.ok":"Ok","general.error.tryAgainLater":"Something went wrong. Please try again later.","general.connection.waiting":"Waiting for connection...",hello:"Hello World","plural.like":"{amount, plural, one {like} other {likes}}",comment:"Comment","plural.comment":"{amount, plural, one {comment} other {comments}}","plural.member":"{amount, plural, one {member} other {members}}",selectACategory:"Select a category",todaysTrendingTitle:"Trending groups",loadMore:"Load More",categoryList:"Categories",recommendedList:"Groups you\u2019ll love","exploreHeader.searchCommunityTitle":"Explore groups","exploreHeader.searchCommunityPlaceholder":"Search groups...","exploreHeader.createCommunityTitle":"or create your own!","exploreHeader.createCommunityButton":"Create group",backTitle:"Back",createCommunity:"Create Group",moderator:"Moderator","moderatorMenu.promoteToModerator":"Promote to moderator","moderatorMenu.dismissModerator":"Dismiss moderator","moderatorMenu.removeFromCommunity":"Remove from group","post.readMore":"Read more","post.editPost":"Edit post","post.deletePost":"Delete post","post.editPostMobile":"Edit","post.deletePostMobile":"Delete","post.confirmDelete":"This post will be permanently deleted. You\u2019ll no longer to see and find this post. Continue?","post.confirmPendingDelete":"This post will be permanently deleted from the pending list","post.edited":"Edited","post.like":"Like","post.liked":"Liked","post.unknownPost.description":"We couldn\u2019t recognize this post.","post.unknownPost.title":"Something went wrong","post.renderingError.description":"We couldn\u2019t render this post.","post.renderingError.title":"Something went wrong","post.community":"Group","post.myTimeline":"My Timeline","post.wasLive":"was live","post.success.approved":"Post approved","post.success.declined":"Post declined","post.success.submittedToReview":"Your post has been submitted to review by moderator","post.error.cannotReview.title":"Post is not available","post.error.cannotReview.description":"The post has been reviewed by another moderator","post.discard.title":"Discard post?","post.discard.content":"Do you want to discard your post?","post.editDiscard.title":"Discard changes","post.editDiscard.content":"Do you want to discard your changes?","post.editDiscard.cancel":"Continue editing","collapsible.viewAll":"View all","collapsible.viewAllFiles":"View all files","collapsible.viewAllComments":"View all comments...","collapsible.viewMoreComments":"View more comments...","collapsible.viewMoreReplies":"View more replies","collapsible.viewReplies":"View replies","collapsible.viewMoreReply":"View {count, plural, one {# reply} other {# replies}}","community.createSuccess":"Your group was successfully created","community.updateSuccess":"Your group was successfully updated","community.editProfile":"Edit profile","community.join":"Join","community.communitySettings":"Group Settings","community.returnTo":"Return to {communityName}","community.leaveCommunityTitle":"Leave group?","community.leaveCommunityBody":"You will no longer be able to post or interact in this group after leaving.","community.leaveCommunityBodyLastMember":"As you\u2019re the last moderator and member, choose close group to leave.","community.leaveCommunityBodyOnlyModerator":"You\u2019re the only moderator in this group. Nominate other members before leaving group.","community.leaveCommunityButtonText":"Leave","community.leaveCommunityButtonOK":"OK","community.cannotInteract":"Join group to interact with all posts","community.removeUserFromCommunityTitle":"Remove user from group","community.removeUserFromCommunityBody":"This user won't no longer be able to search, post. Continue?","community.name":"Group name","community.about":"About","community.category":"Category","community.onlyadmincanpost":">Only admin can post","community.onlyadmins":"Choose to allow Only Admins to create posts in this group.","community.categorypermission":"Group permission","community.addmembers":"Add members","community.posts":"posts","community.members":"members","community.settings":"Settings","community.leaveCommunity":"Leave Group","CommunityMembers.members":"Members","CommunityMembers.moderators":"Moderators","EmptyFeed.TargetType.globalFeed":"This feed is empty","EmptyFeed.TargetType.communityFeed":"This group's feed is empty.","EmptyFeed.TargetType.userFeed":"This user's feed is empty.","EmptyFeed.TargetType.myFeed":"Your feed is empty. Start your first post","EmptyFeed.exploreCommunity":"Explore Group","UserFeed.tabs.timeline":"Timeline","community.exploreCommunities":"Explore Community","community.permissions.postReview":"Post review","community.permissions.storyComments":"Story comments","community.permissions.approvePosts":"Approve member posts","community.permissions.allowStoryComments":"Allow comments on group stories","community.permissions.approvePosts.prompt":"Posts by members have to be reviewed and approved by group moderator.","community.permissions.storyComments.prompt":"Turn on to receive comments on stories in this group.","community.permissions.error.needApprovalOnPostCreation.turnOn":"Unable to turn on post review","community.permissions.error.needApprovalOnPostCreation.turnOff":"Unable to turn off post review","community.permissions.error.storyComments.turnOn":"Unable to turn on post review","community.permissions.error.storyComments.turnOff":"Unable to turn off post review","community.review.declinePendingPosts":"Decline pending post will permanently delete the selected post from group.","community.pendingPostsBanner.title":"Pending posts","community.pendingPostsBanner.pendingForReview":"Your posts are pending for review","community.pendingPostsBanner.needApproval":"{formattedAmount} {amount, plural, one {post needs} other {posts need}} approval","communityCreatedModal.title":"Customize your community","communityCreatedModal.message":"You\u2019ve successfully created a community! Now let's manage permissions that work best for you","communityCreatedModal.goToSettings":"Group settings","communityCreatedModal.skip":"Skip for now",post:"Post","upload.attachmentLimit":"You reached the maximum attachment of {maxFiles}","upload.fileSizeLimit":"One of the selected file is larger than 1GB. Please select a new file.","user.editProfile":"Edit profile","user.message":"Message","follow.placeholder.noFollowings":"No following yet","follow.placeholder.noFollowers":"No followers yet","ProfileSettings.editProfile":"Edit profile","ProfileSettings.returnTo":"Return to ","SideSectionMyCommunity.myCommunity":"My groups","file.reUpload":"Click to re-upload the file","UserProfileForm.displayname":"Nickname","UserProfileForm.about":"About","UserProfileForm.title":"General","UserProfileForm.namePlaceholder":"Enter user display name","UserProfileForm.requiredDisplayName":"Display name is required","UserProfileForm.requiredDescription":"Enter something about yourself","UserSelector.placeholder":"Select user...","report.reportUser":"Report user","report.unreportUser":"Unreport user","report.reportComment":"Report comment","report.unreportComment":"Unreport comment","report.reportSent":"Report sent","report.unreportSent":"Unreport sent","comment.like":"Like","comment.liked":"Liked","comment.deleted":"This comment has been deleted","comment.delete":"Delete comment","comment.edit":"Edit comment","comment.deleteMobile":"Delete","comment.editMobile":"Edit","comment.deleteConfirmContent":"This comment will be permanently deleted. Continue?","comment.deleteConfirmCancelText":"Cancel","comment.deleteConfirmOkText":"Delete","dropdown.first":"First","dropdown.second":"Second","layout.logout":"Log Out","layout.username":"Jackies","chat.details.chatDetailes":"Chat Detail","chat.details.communityName":"Group Name","message.flag":"flag","message.unflag":"Unflag","message.edit":"Edit","message.delete":"Delete","message.deleted":"deleted","message.unsupportedFormat":"Unsupported message format","message.saveOptionsError":"There was an error processing your request","MessageComposeBar.placeholder":"Type your message...","RecentChat.chats":"Chats","AddMemberModal.addMembers":"Add members","AddMemberModal.membersValidationError":"Please select at least one member",add:"Add",save:"Save",close:"Close",reply:"Reply",delete:"Delete",create:"Create",cancel:"Cancel",loading:"Loading...","loading.chat":"Loading chat...",anonymous:"Anonymous","comment.edited":"Edited","comment.readmore":"Read more","communities.nocommunityfound":"No Group found","profile.setting":"Profile Settings","sidesectioncommunity.newfeed":"Feed","sidesectioncommunity.userProfile":"Profile","sidesectioncommunity.explore":"Explore","sidesectioncommunity.community":"Community","communityFeed.join":"Join community to interact with all posts","communityFeed.members":"Members","communityFeed.moderators":"Moderators","files.all":"View all files","sidebar.community":"Group","sidebar.explore":"Explore","sidebar.user":"User profile","CategoryCommunitiesList.emptyTitle":"It's empty here...","CategoryCommunitiesList.emptyDescription":"No community found in this category","CommentComposeBar.addComment":"Post","CommentComposeBar.replayTo":"Reply to ","CommentComposeBar.replayToUser":"Replying to {displayName}","CommentComposeBar.saySomething":"Say something nice...","CommentComposeBar.unableToPost":"Unable to post","CommentComposeBar.overCharacter":"You have reached maximum 50,000 characters in a post.","CommentComposeBar.done":"Done","CommentComposeBar.unableToMention":"Unable to mention","CommentComposeBar.overMentionees":"You have reached maximum 30 mentioned users in a post.","CommentComposeBar.okText":"OK","CommunityCreationModal.title":"Leave without finishing?","CommunityCreationModal.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","CommunityCreationModal.cancelText":"Continue editing","CommunityCreationModal.okText":"Leave","PostAsCommunity.title":"Post as group","PostAsCommunity.caption":"Enable this will publish the post on behalf of group account","AddMemberAction.title":"Add members","AddMemberAction.description":"Add your friends to this group to participate in group conversations","CloseCommunityAction.closeConfirm.title":"Close group?","CloseCommunityAction.closeConfirm.description":"All members will be removed from the community. All posts, messages, reactions and media shared in community will be deleted. This cannot be undone.","CloseCommunityAction.title":"Close group","CloseCommunityAction.description":"Closing this group will remove the group page and all its content and comments. This cannot be undone.","report.doReport":"Report","report.undoReport":"Undo Report","comment.deleteBody":"This comment will be permanently removed.","reply.delete":"Delete reply","reply.deleteBody":"This reply will be permanently deleted. Continue?","reply.edit":"Edit reply","reply.deleted":"This reply has been deleted","tabs.editProfile":"Edit profile","tabs.timeline":"Timeline","tabs.followers":"Followers","tabs.followings":"Following","tabs.pending":"Pending","tabs.members":"Members","tabs.moderators":"Moderators","tabs.pendingPosts":"Pending {amount, select, 0 {} other { ({formattedAmount})}}","tabs.permissions":"Permissions","tabs.gallery":"Gallery","tabs.images":"Photos","tabs.videos":"Videos","tabs.liveStreams":"Livestreams","feed.emptyFeed":"Your feed is empty.","feed.emptyCommunityPublicFeed":"This group's feed is empty.","feed.emptyCommunityReviewingFeed":"No pending posts","feed.emptyJoinedCommunityPublicFeedTitle":"Your feed is empty.","feed.emptyJoinedCommunityPublicFeedBody":"Share a post to start the conversation!","feed.emptyMyCommunitiesBody":"You have not joined any groups yet. Please join one to get started.","feed.emptyUserFeed":"No posts yet","feed.emptyMyFeed":"Your feed is empty. Start your first post","feed.emptyMyCommunities":"No groups available","chat.groupSetting":"Group settings","chat.message.deleted":"Message was deleted","chat.message.unsupported":"Unsupported message type","chat.chats":"Chats","chat.details.header":"Chat Details","chat.details.chatName":"Chat Name","chat.leaveChat":"Leave chat","chat.leaveChat.confirm.title":"Leave chat","chat.leaveChat.confirm.content":"Are you sure you want to leave the chat?","chat.leaveChat.confirm.okButton":"Leave","chat.leaveChat.success":"You successfully left chat","chat.leaveChat.error":"Attempt to leave a chat has failed","chat.members.return":"Return to controls","chat.members.count":"{count} members","chat.create.modalTitle":"Create new chat","chat.loading.error":"Couldn't load chat","userSelector.placeholder":"Enter name or email addresses","userSelector.emptyState.title":"It's empty here...","userSelector.emptyState.description":"No contact found here","groupChat.createPopup.fieldName":"Group name","groupChat.createPopup.placeholder":"Please input group name","general.cancel.capital":"Cancel","general.create.capital":"Create","general.done.capital":"Done","chat.member.addMore":"Add or Remove user","video.notReady":"The video is being processed. Please try again later.","liveStream.idle":"This stream is currently unavailable","liveStream.ended.caption":"This liveStream has ended.","liveStream.ended.message":"Playback will be available for you to watch shortly.","user.follow":"Follow","user.unfollow":"Unfollow","user.unfollow.confirm.title":"Unfollow {displayName}","user.unfollow.confirm.body":"You\u2019ll have to send a request again to follow {displayName}. Continue?","user.cancel_follow":"Cancel request","placeholder.noResults":"No results found","request.accept":"Accept","request.decline":"Decline","follower.title.removeUser":"Remove {displayName} from followers?","follower.body.removeUser":"We will not notify {displayName} that they've been removed from your followers","follower.menuItem.removeUser":"Remove user","follower.menuItem.unfollow":"Unfollow","buttonText.cancel":"Cancel","buttonText.remove":"Remove","follow.pendingNotification.title":"Pending requests","follow.pendingNotification.body":"Your requests are waiting for review","notification.done":"Done","counter.posts":"posts","counter.followings":"following","counter.followers":"followers","buttonText.unfollow":"Unfollow","privateFeed.title":"This account is private","privateFeed.body":"Follow this user to see all posts","navigationBlocker.title":"Unsaved changes","navigationBlocker.content":"Your changes won`t be saved. Are you sure you want to leave this page now?","user.unfollow.confirm.title.thisUser":"Unfollow this user","mediaGallery.images.empty":"No photos yet","mediaGallery.liveStreams.empty":"No liveStreams yet","mediaGallery.videos.empty":"No videos yet","user.unfollow.confirm.body.thisUser":"You\u2019ll have to send a request again to follow this user. Continue?","navigationBlocker.okText":"Leave","options_composer.button.add":"Add Option","options_composer.title":"Create at least 2 options","poll_modal.answer_type.title":"Selection type","poll_modal.answer_type.body":"Choose to vote with one or multiple options","poll_modal.closed_in.title":"Schedule poll (Optional)","poll_modal.closed_in.body":"Poll will be automatically closed at the end of chosen time frame (UTC)","select.answerType.item":"{answerType} selection","poll_composer.question.label":"Poll options","poll_composer.question.placeholder":"What\u2019s your poll question?","poll_composer.poll_options.label":"Options","poll_modal.title":"Create poll","poll.votes":"{voteCount} votes","poll.vote.closedIn":"Poll ends in {closedIn} days","poll.vote.finalResults":"Final results","poll.vote.submit":"Submit vote","poll.error.deletedOrClosed":"This poll has been closed or deleted.","poll.close":"Close poll","postCreator.unableToPost":"Unable to post","postCreator.overCharacter":"You have reached maximum 50,000 characters in a post.","postCreator.done":"Done","postCreator.unableToMention":"Unable to mention","postCreator.overMentionees":"You have reached maximum 30 mentioned users in a post.","postCreator.okText":"OK","pollComposer.unableToMention":"Unable to mention","pollComposer.overMentionees":"You have reached maximum 30 mentioned users in a post.","pollComposer.okText":"OK","storyCreation.hyperlink.bottomSheet.cancel":"Cancel","storyCreation.hyperlink.bottomSheet.title":"Add link","storyCreation.hyperlink.bottomSheet.submit":"Done","storyCreation.hyperlink.form.urlLabel":"URL","storyCreation.hyperlink.form.urlPlaceholder":"https://example.com","storyCreation.hyperlink.form.linkTextLabel":"Customize link text","storyCreation.hyperlink.form.linkTextPlaceholder":"Name your link","storyCreation.hyperlink.form.linkTextDescription":"This text will show on the link instead of URL.","storyCreation.hyperlink.form.removeButton":"Remove link","storyCreation.hyperlink.removeConfirm.title":"Remove link","storyCreation.hyperlink.removeConfirm.content":"This link will be removed from story.","storyCreation.hyperlink.removeConfirm.cancel":"Cancel","storyCreation.hyperlink.removeConfirm.confirm":"Remove","storyCreation.hyperlink.validation.error.invalidUrl":"Please enter a valid URL.","storyCreation.hyperlink.validation.error.whitelisted":"Please enter a whitelisted URL.","storyCreation.hyperlink.validation.error.blocked":"Your text contains a blocklisted word.","storyCreation.hyperlink.unsavedChanges.title":"Unsaved changes","storyCreation.hyperlink.unsavedChanges.content":"Are you sure you want to cancel? Your changes won't be saved.","storyCreation.hyperlink.unsavedChanges.cancel":"No","storyCreation.hyperlink.unsavedChanges.confirm":"Yes","storyViewer.actions.deleteStory":"Delete story","storyViewer.action.confirmModal.title":"Delete this story?","storyViewer.action.confirmModal.content":"This story will be permanently deleted. You\u2019ll no longer to see and find this story.","storyViewer.notification.deleted":"Story deleted","storyViewer.notification.success":"Successfully shared story","storyViewer.notification.error":"Failed to share story","storyViewer.footer.failed":"Failed to upload","storyViewer.footer.uploading":"Uploading...","storyViewer.commentSheet.title":"Comments","storyViewer.commentSheet.empty":"No comments yet","storyViewer.commentSheet.disabled":"Comments are disabled for this story","storyViewer.commentSheet.replyingTo":"Replying to","storyViewer.toast.like.disabled":"Join community to interact with all stories","storyViewer.toast.comment.reported":"Comment reported","storyViewer.toast.comment.unreported":"Comment unreported","storyViewer.toast.disable.react":"Join community to interact with all stories","storyViewer.commentComposeBar.submit":"Post","storyDraft.button.shareStory":"Share story","storyDraft.notification.hyperlink.error":"Can\u2019t add more than one link to your story.","storyTab.title":"Story","select.chatType.item":"{answerType} type","chatComposer.label.channelId":"Channel ID","chatComposer.label.displayName":"Display Name","chatComposer.label.type":"Channel Type","chatComposer.addUsers":"Add users","chat_modal.title":"Create chat","chat_composer.placeholder.displayName":"Enter display name here","chat_composer.placeholder.channelId":"Enter channel ID here","editChatMembersModal.title":"Add/Edit chat members","editChatMembersModal.confirm.title":"Leave without finishing?","editChatMembersModal.confirm.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","editChatMembersModal.confirm.cancelText":"Continue editing","editChatMembersModal.confirm.okText":"Leave","notification.error.blockedWord":"Text contain blocked word","notification.error.whitelistLink":"Data contain link that is not in whitelist","livechat.deleted.message":"This message was deleted","livechat.messageBubble.reply.button":"Reply","livechat.messageBubble.copy.button":"Copy","livechat.messageBubble.delete.button":"Delete","livechat.messageBubble.mention.button":"Mention","livechat.messageBubble.report.button":"Report","livechat.messageBubble.unReport.button":"Unreport","livechat.channel.muted":"This channel has been set to read-only by the channel moderator","livechat.modal.delete.message.title":"Delete this message?","livechat.modal.delete.message.content":"This message will also be removed from your friend\u2019s devices.","livechat.mention.all":"All","livechat.mention.all.description":"Notify everyone","livechat.notification.copy.message":"Message copied","livechat.composebar.placeholder":"Write a message","livechat.delete.message.error":"Unable to delete message. Please try again.","livechat.member.muted":"You\u2019ve been muted by the channel moderator","livechat.member.muted.error":"User is muted","livechat.member.banned.title":"You are banned from chat","livechat.member.banned.description":"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned.","livechat.report.message.success":"Message reported","livechat.report.message.error":"This message failed to be reported. Please try again.","livechat.unReport.message.success":"Message unreported","livechat.unReport.message.error":"This message failed to be unreported. Please try again.","livechat.error.tooLongMessage.title":"Unable to send message","livechat.error.tooLongMessage.description":"Your message is too long. Please shorten your message and try again.","livechat.error.sendingMessage.error":"Your message wasn't sent. Please try again.","livechat.error.sendingMessage.blockedWord":"Your message wasn't sent as it contains a blocked word.","livechat.error.sendingMessage.notAllowLink":"Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.","livechat.reaction.errorOnload":"Unable to load reactions","livechat.reaction.emptyState":"No reactions yet","livechat.reaction.emptyState.description":"Be the first to react to this message!","livechat.reaction.label.removeReaction":"Click to remove reaction"};var b0={en:BC};var LC="en",v$=({locale:e,children:t})=>{let o=b0[e]?b0[e]:b0[LC];return te.createElement(IntlProvider,{defaultLocale:LC,locale:e,messages:o},t)},AC=v$;var x$={palette:{alert:"#FA4D30",base:"#292B32",primary:"#000000",secondary:"#FFD400",tertiary:"#FF305A",neutral:"#17181C",highlight:"#1054DE",system:{borders:"#ebecef",background:"#fff"}},typography:{global:{fontFamily:"Circular, sans-serif",fontStyle:"normal"},headline:{fontWeight:600,fontSize:"20px"},title:{fontWeight:600,fontSize:"16px"},subTitle:{fontWight:400,fontSize:"13px"},body:{fontWeight:"normal",fontSize:"14px"},bodyBold:{fontWeight:600,fontSize:"14px"},caption:{fontWeight:"normal",fontSize:"12px"},captionBold:{fontWeight:600,fontSize:"12px"}}},DC=x$;function I0(e){return (e==null?void 0:e.communityMembership)==="member"}function w0(e){return (e==null?void 0:e.userPrivacySetting)==="private"}function HC(e){return (e||[]).map((t,o)=>{var r;return {id:t.userId,display:(r=t.displayName)!=null?r:t.userId,avatar:t.avatarCustomUrl,isLastItem:(e==null?void 0:e.length)===o+1}})}var M0=1;function I$(e,t,o){let r=o+M0,n=r+t;return e.substring(r,n)}function P0(e){return e?e.sort((o,r)=>o.index-r.index).map(({index:o,length:r})=>({start:o,end:o+r+M0,highlight:!0})):[]}function FC(e){let t={},o=[];return (e==null?void 0:e.length)>0?(t.mentioned=[...e.sort((r,n)=>r.plainTextIndex-n.plainTextIndex).map(({plainTextIndex:r,id:n,display:i})=>({index:r,length:i.length-M0,type:"user",userId:n}))],o.push({type:"user",userIds:e.map(({id:r})=>r)})):o.push({type:"user",userIds:[]}),{metadata:t,mentionees:o}}function OC(e,t){if(!e||b$(t==null?void 0:t.mentioned))return e;let o=e;return ((t||{}).mentioned||[]).sort((r,n)=>n.index-r.index).forEach(({userId:r,length:n,index:i})=>{let a=`@[${I$(e,n,i)}](${r})`;o=o.replace(new RegExp(`(.{${i}}).{${n+M0}}`),`$1${a}`);}),o}function Oe(e){return e!=null}var $C=e=>e.toFixed(1),UC=e=>{let t=Math.min(e*100,100);return $C(t)};function M$(e){return e.alpha!==void 0}var VC=e=>{let{hue:t,saturation:o,lightness:r}=e,n=[`${$C(t)}`,`${UC(o)}%`,`${UC(r)}%`];return M$(e)?`hsla(${[...n,e.alpha].filter(Oe).join(",")})`:`hsl(${n.filter(Oe).join(",")})`},P$=e=>{let t=parseToHsl(e);return VC(t)},_$=(e,t)=>{let o=parseToHsl(t),{lightness:r}=o,n=E(d({},o),{lightness:Math.min(1,r+e)});return VC(n)},T$=[.25,.4,.5,.75],jC=e=>{let i=e,{system:t}=i,o=P(i,["system"]),r=Object.keys(o).reduce((a,s)=>(a[s]={main:P$(o[s])},a),d({},o)),n=Object.keys(r).reduce((a,s)=>{let l=o[s],c=T$.reduce((u,g,f)=>{let y=`shade${f+1}`;return u[y]=_$(g,l),u},{}),p=r[s];return p&&typeof p=="object"?a[s]=d(d({},c),p):a[s]=E(d({},c),{main:p}),a},d({},r));return E(d({},n),{system:t})};var k$=["fontFamily","fontStyle","fontWeight","fontSize"],S$=e=>Object.keys(e).reduce((o,r)=>{let n=e[r];return r&&n&&k$.includes(r)&&(o[r]=n),o},{}),GC=e=>Object.keys(e).reduce((o,r)=>(o[r]=S$(d(d({},e.global),e[r])),o),{});var ZC={colors:{primary:{default:"#1054DE",shade1:"#4A82F2",shade2:"#A0BDF8",shade3:"#D9E5FC",shade4:"#FFFFFF"},secondary:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},base:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},baseInverse:{default:"#FFFFFF"},alert:{default:"#FA4D30"},highlight:"#1054DE",messageBubble:{default:"#1054DE",inverse:"#FFFFFF"},storyIndicator:{default:"#EBECEF",active:["#339AF9","#78FA58"]},hyperlink:{default:"#FFFFFFCC"},actionButton:{default:"#00000080"}},typography:{heading:{fontWeight:600,fontSize:"1.25rem",lineHeight:"1.5rem"},title:{fontWeight:600,fontSize:"1rem",lineHeight:"1.25rem"},subTitle:{fontWeight:400,fontSize:"0.8125rem",lineHeight:"1rem"},body:{fontWeight:"normal",fontSize:"0.875rem",lineHeight:"1.25rem"},bodyBold:{fontWeight:600,fontSize:"0.875rem",lineHeight:"1.25rem"},caption:{fontWeight:"normal",fontSize:"0.75rem",lineHeight:"1rem"},captionBold:{fontWeight:600,fontSize:"0.75rem",lineHeight:"1rem"}}};var E$=(e={})=>{let t=N$(DC,e),o=jC(t.palette),r=GC(t.typography);return E(d({},t),{palette:o,typography:r,v4:ZC})},QC=E$;var WC=m.div`
|
|
486
|
+
0-22.58L207.6 256z`})),R1=Fz;var CC=[.25,.4,.5,.75],jz=(e,t=!1)=>{if(!e)return Array(CC.length).fill("");if(t===!0&&e===Qo.theme.dark.primary_color)return ["#4a82f2","#a0bdf8","#d9e5fc","#ffffff"];if(t===!1&&e===Qo.theme.light.primary_color)return ["#4a82f2","#a0bdf8","#d9e5fc","#ffffff"];let o=parseToHsl(e);return CC.map(n=>t?darken(n,hslToColorString(o)):lighten(n,hslToColorString(o)))};function vC(e){let t=q4(),o=useMemo(()=>e!=null&&e.preferred_theme&&(e==null?void 0:e.preferred_theme)!=="default"?e.preferred_theme:"default",[e==null?void 0:e.preferred_theme,t]),r=o==="default"?t:o;return useMemo(()=>{var s;let i=((s=e==null?void 0:e.theme)==null?void 0:s[r])||{},a=jz(i.primary_color);return {"--asc-color-primary-default":i.primary_color,"--asc-color-primary-shade1":a[0],"--asc-color-primary-shade2":a[1],"--asc-color-primary-shade3":a[2],"--asc-color-primary-shade4":a[3],"--asc-color-secondary-default":i.secondary_color,"--asc-color-secondary-shade1":i.secondary_shade1_color,"--asc-color-secondary-shade2":i.secondary_shade2_color,"--asc-color-secondary-shade3":i.secondary_shade3_color,"--asc-color-secondary-shade4":i.secondary_shade4_color,"--asc-color-alert-default":i.alert_color,"--asc-color-base-inverse":i.base_inverse_color,"--asc-color-base-default":i.base_color,"--asc-color-base-shade1":i.base_shade1_color,"--asc-color-base-shade2":i.base_shade2_color,"--asc-color-base-shade3":i.base_shade3_color,"--asc-color-base-shade4":i.base_shade4_color,"--asc-color-base-shade5":i.base_shade5_color,"--asc-color-background-default":i.background_color}},[e,r])}var Gz=createContext({currentTheme:"light",toggleTheme:()=>{}});var q4=()=>{let{currentTheme:e}=useContext(Gz);return e};var K4=({page:e,component:t,element:o})=>o!=="*"?[`${e}/${t}/${o}`,`*/${t}/${o}`,`${e}/*/${o}`,`*/*/${o}`,`${e}/${t}/*`,`*/${t}/*`,`${e}/*/*`]:t!=="*"?[`${e}/${t}/*`,`${e}/*/*`,`*/${t}/*`]:e!=="*"?[`${e}/*/*`]:[],xC=createContext({config:null,parseConfig:()=>{},isExcluded:()=>!1,getConfig:()=>({})}),x0=()=>{let e=useContext(xC);if(!e)throw new Error("useCustomization must be used within a CustomizationProvider");return e},Qo={preferred_theme:"default",theme:{light:{primary_color:"#36486c",secondary_color:"#292b32",secondary_shade1_color:"#636878",secondary_shade2_color:"#898e9e",secondary_shade3_color:"#a5a9b5",secondary_shade4_color:"#ebecef",base_color:"#292b32",base_shade1_color:"#636878",base_shade2_color:"#898e9e",base_shade3_color:"#a5a9b5",base_shade4_color:"#ebecef",base_shade5_color:"#F9F9FA",alert_color:"#FA4D30",background_color:"#FFFFFF",base_inverse_color:"#000000"},dark:{primary_color:"#1054DE",secondary_color:"#ebecef",secondary_shade1_color:"#a5a9b5",secondary_shade2_color:"#898e9e",secondary_shade3_color:"#40434e",secondary_shade4_color:"#292b32",base_color:"#ebecef",base_shade1_color:"#a5a9b5",base_shade2_color:"#6e7487",base_shade3_color:"#40434e",base_shade4_color:"#292b32",base_shade5_color:"#f9f9fa",alert_color:"#FA4D30",background_color:"#191919",base_inverse_color:"#FFFFFF"}},excludes:[],customizations:{"select_target_page/*/*":{theme:{},title:"Share to"},"select_target_page/*/back_button":{back_icon:"back.png"},"camera_page/*/*":{resolution:"720p"},"camera_page/*/close_button":{close_icon:"close.png"},"create_story_page/*/*":{},"create_story_page/*/back_button":{back_icon:"back.png",background_color:"#1234DB"},"create_story_page/*/aspect_ratio_button":{aspect_ratio_icon:"aspect_ratio.png",background_color:"1234DB"},"create_story_page/*/story_hyperlink_button":{hyperlink_button_icon:"hyperlink_button.png",background_color:"#1234DB"},"create_story_page/*/hyper_link":{hyper_link_icon:"hyper_link.png",background_color:"#1234DB"},"create_story_page/*/share_story_button":{share_icon:"share_story_button.png",background_color:"#1234DB",hide_avatar:!1},"story_page/*/*":{},"story_page/*/progress_bar":{progress_color:"#UD1234",background_color:"#AB1234"},"story_page/*/overflow_menu":{overflow_menu_icon:"threeDot.png"},"story_page/*/close_button":{close_icon:"close.png"},"story_page/*/story_impression_button":{impression_icon:"impressionIcon.png"},"story_page/*/story_comment_button":{comment_icon:"comment.png",background_color:"#2b2b2b"},"story_page/*/story_reaction_button":{reaction_icon:"like.png",background_color:"#2b2b2b"},"story_page/*/create_new_story_button":{create_new_story_icon:"plus.png",background_color:"#ffffff"},"story_page/*/speaker_button":{mute_icon:"mute.png",unmute_icon:"unmute.png",background_color:"#1243EE"},"story_page/*/arrow_left_button":{arrow_left_icon:"arrow_left.png",background_color:"#1243EE"},"story_page/*/arrow_right_button":{arrow_right_icon:"arrow_right.png",background_color:"#1243EE"},"*/edit_comment_component/*":{theme:{}},"*/edit_comment_component/edit_cancel_button":{cancel_icon:"",cancel_button_text:"Cancel",background_color:""},"*/edit_comment_component/save_button":{save_icon:"",save_button_text:"Save",background_color:"#1243EE"},"*/hyper_link_config_component/*":{theme:{}},"*/hyper_link_config_component/done_button":{done_icon:"",done_button_text:"Done",background_color:"#1243EE"},"*/hyper_link_config_component/edit_cancel_button":{cancel_icon:"",cancel_button_text:"Cancel"},"*/comment_tray_component/*":{theme:{}},"*/comment_tray_component/comment_bubble_deleted_view":{comment_bubble_deleted_icon:"comment_bubble_deleted.png",text:"This reply has been deleted"},"*/story_tab_component/*":{},"*/story_tab_component/story_ring":{progress_color:["#339AF9","#78FA58"],background_color:"#AB1234"},"*/story_tab_component/create_new_story_button":{create_new_story_icon:"plus.png",background_color:"#1243EE"},"*/*/close_button":{close_icon:"close.png"},"social_home_page/top_navigation/header_label":{text:"Community"},"social_home_page/top_navigation/global_search_button":{icon:"searchButtonIcon"},"social_home_page/top_navigation/post_creation_button":{icon:"postCreationIcon"},"social_home_page/*/newsfeed_button":{text:"Newsfeed"},"social_home_page/*/explore_button":{text:"Explore"},"social_home_page/*/my_communities_button":{text:"My Communities"},"social_home_page/empty_newsfeed/illustration":{icon:"emptyFeedIcon"},"social_home_page/empty_newsfeed/title":{text:"Your Feed is empty"},"social_home_page/empty_newsfeed/description":{text:"Find community or create your own"},"social_home_page/empty_newsfeed/explore_communities_button":{icon:"exploreCommunityIcon",text:"Explore Community"},"social_home_page/empty_newsfeed/create_community_button":{icon:"createCommunityIcon",text:"Create Community"},"social_home_page/my_communities/community_avatar":{},"social_home_page/my_communities/community_display_name":{},"social_home_page/my_communities/community_private_badge":{icon:"lockIcon"},"social_home_page/my_communities/community_official_badge":{icon:"officalBadgeIcon"},"social_home_page/my_communities/community_category_name":{},"social_home_page/my_communities/community_members_count":{},"social_home_page/newsfeed_component/*":{},"social_home_page/global_feed_component/*":{},"global_search_page/*/*":{},"post_detail_page/*/back_button":{icon:"backButtonIcon"},"post_detail_page/*/menu_button":{icon:"menuIcon"},"*/*/moderator_badge":{icon:"badgeIcon",text:"Moderator"},"*/post_content/timestamp":{},"*/post_content/menu_button":{icon:"menuIcon"},"*/post_content/post_content_view_count":{},"*/post_content/reaction_button":{icon:"likeButtonIcon",text:"Like"},"*/post_content/comment_button":{icon:"commentButtonIcon",text:"Comment"},"*/post_content/share_button":{icon:"shareButtonIcon",text:"Share"},"post_composer_page/*/*":{},"post_composer_page/*/close_button":{image:"platformValue"},"post_composer_page/*/community_display_name":{},"post_composer_page/*/create_new_post_button":{text:"Post"},"post_composer_page/*/edit_post_button":{text:"Save"},"post_composer_page/*/edit_post_title":{text:"Edit post"},"post_composer_page/media_attachment/*":{},"post_composer_page/media_attachment/camera_button":{image:"platformValue"},"post_composer_page/media_attachment/image_button":{image:"platformValue"},"post_composer_page/media_attachment/video_button":{image:"platformValue"},"post_composer_page/media_attachment/file_button":{image:"platformValue"},"post_composer_page/media_attachment/detailed_button":{image:"platformValue"},"post_composer_page/detailed_media_attachment/*":{},"post_composer_page/detailed_media_attachment/camera_button":{text:"Camera",image:"platformValue"},"post_composer_page/detailed_media_attachment/image_button":{text:"Photo",image:"platformValue"},"post_composer_page/detailed_media_attachment/video_button":{text:"Video",image:"platformValue"},"post_composer_page/detailed_media_attachment/file_button":{text:"Attachment",image:"platformValue"},"social_home_page/*/*":{},"social_home_page/create_post_menu/*":{},"social_home_page/create_post_menu/create_post_button":{text:"Post",image:"Post"},"social_home_page/create_post_menu/create_story_button":{text:"Story",image:"Story"},"social_home_page/create_post_menu/create_poll_button":{text:"Poll",image:"Poll"},"social_home_page/create_post_menu/create_livestream_button":{text:"Livestream",image:"Livestream"},"select_post_target_page/*/close_button":{image:"platformValue"},"select_post_target_page/*/my_timeline_avatar":{},"select_post_target_page/*/title":{text:"Post to"},"select_post_target_page/*/my_timeline_text":{text:"My Timeline"},"select_story_target_page/*/close_button":{image:"platformValue"},"select_story_target_page/*/title":{text:"Share to"},"*/*/community_official_badge":{image:"platformValue"},"*/*/community_private_badge":{image:"platformValue"},"social_global_search_page/*/*":{},"social_global_search_page/top_search_bar/*":{text:"Search community and user"},"social_global_search_page/top_search_bar/search_icon":{icon:"search"},"social_global_search_page/top_search_bar/clear_button":{icon:"clear"},"social_global_search_page/top_search_bar/cancel_button":{text:"Cancel"},"social_global_search_page/community_search_result/community_avatar":{},"social_global_search_page/community_search_result/community_display_name":{},"social_global_search_page/community_search_result/community_private_badge":{icon:"lockIcon"},"social_global_search_page/community_search_result/community_official_badge":{icon:"officialBadgeIcon"},"social_global_search_page/community_search_result/community_category_name":{},"social_global_search_page/community_search_result/community_members_count":{},"my_communities_search_page/top_search_bar/*":{text:"Search my community"},"my_communities_search_page/*/community_avatar":{},"my_communities_search_page/*/community_display_name":{},"my_communities_search_page/*/community_private_badge":{icon:"lockIcon"},"my_communities_search_page/*/community_official_badge":{icon:"officialBadgeIcon"},"my_communities_search_page/*/community_category_name":{},"my_communities_search_page/*/community_members_count":{},"my_communities_search_page/top_search_bar/cancel_button":{text:"Cancel"},"community_profile_page/*/*":{},"community_profile_page/community_feed/*":{},"*/post_content/announcement_badge":{image:"value"},"*/post_content/pin_badge":{image:"value"},"*/post_content/non_member_section":{image:"value"},"community_profile_page/community_header/*":{},"community_profile_page/community_header/community_cover":{},"community_profile_page/community_header/community_name":{},"community_profile_page/community_header/community_verify_badge":{image:"value"},"community_profile_page/community_header/community_category":{},"community_profile_page/community_header/community_description":{},"community_profile_page/community_header/community_info":{},"community_profile_page/community_header/community_join_button":{image:"value"},"community_profile_page/community_header/community_pending_post":{image:"value"},"community_profile_page/community_header/back_button":{image:"value"},"community_profile_page/community_header/menu_button":{image:"value"},"community_profile_page/community_profile_tab/*":{},"community_profile_page/community_profile_tab/community_feed_tab_button":{image:"value"},"community_profile_page/community_profile_tab/community_pin_tab_button":{image:"value"},"community_profile_page/community_pin/*":{},"community_profile_page/community_pin/community_create_post_button":{image:"value"},"community_profile_page/post_content/*":{}}},bC=e=>{let[t,o,r]=e.split("/"),n=K4({page:t,component:o,element:r});return new Proxy({},{get(i,a){var s,l;for(let c of n)if((l=(s=Qo==null?void 0:Qo.customizations)==null?void 0:s[c])!=null&&l[a])return Qo.customizations[c][a]}})},IC=({children:e,initialConfig:t={}})=>{let [o,r]=useState(null);q4();useEffect(()=>{i()?a(t):console.error("Invalid configuration provided to CustomizationProvider");},[t]);let i=p=>!0,a=p=>{r(p);},c={config:o,parseConfig:a,isExcluded:p=>{var C;let[u,g,f]=p.split("/"),y=K4({page:u,component:g,element:f});return ((C=o==null?void 0:o.excludes)==null?void 0:C.some(v=>y.some(h=>h===v)))||!1},getConfig:p=>{let[u,g,f]=p.split("/"),y=K4({page:u,component:g,element:f}),C=v=>({get(h,x){var b,M,I,w,k,S,L,D,H,$,B,z,V,K,U;for(let j of y)if((w=(I=(M=(b=o==null?void 0:o.customizations)==null?void 0:b[j])==null?void 0:M.theme)==null?void 0:I[v])!=null&&w[x])return (S=(k=o.customizations[j].theme)==null?void 0:k[v])==null?void 0:S[x];if((D=(L=o==null?void 0:o.theme)==null?void 0:L[v])!=null&&D[x])return (H=o.theme[v])==null?void 0:H[x];for(let j of y)if((V=(z=(B=($=Qo.customizations)==null?void 0:$[j])==null?void 0:B.theme)==null?void 0:z[v])!=null&&V[x])return (U=(K=Qo.customizations[j].theme)==null?void 0:K[v])==null?void 0:U[x];return Qo.theme[v][x]}});return new Proxy({},{get(v,h){var x,b,M,I,w;if(h==="theme")return {light:new Proxy({},C("light")),dark:new Proxy({},C("dark"))};if(h==="preferred_theme")return (x=o==null?void 0:o.preferred_theme)!=null?x:Qo.preferred_theme;for(let k of y)if((M=(b=o==null?void 0:o.customizations)==null?void 0:b[k])!=null&&M[h])return o.customizations[k][h];for(let k of y)if((w=(I=Qo==null?void 0:Qo.customizations)==null?void 0:I[k])!=null&&w[h])return Qo.customizations[k][h]}})}};return te.createElement(xC.Provider,{value:c},e)};var A=({pageId:e,componentId:t,elementId:o})=>{let r=`${e}/${t}/${o}`,{getConfig:n,isExcluded:i}=x0(),a=n(r),s=bC(r),l=vC(a),c=i(r);return {config:a,defaultConfig:s,uiReference:r,accessibilityId:r,themeStyles:l,isExcluded:c}},re=({pageId:e,componentId:t})=>A({pageId:e,componentId:t,elementId:"*"}),Re=({pageId:e})=>A({pageId:e,componentId:"*",elementId:"*"});var Yz=({pageId:e="*",componentId:t="*",elementId:o="*",size:r="",onOverlayClick:n=()=>{},onCancel:i,title:a,footer:s,children:l})=>{let{accessibilityId:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:o}),u=useRef(null);return useEffect(()=>{var g;(g=u==null?void 0:u.current)==null||g.focus();},[u==null?void 0:u.current]),te.createElement("div",{className:Us.overlay,onClick:n,style:p},te.createElement("div",{className:gr(Us.modalWindow),"data-qa-anchor":c,ref:u,tabIndex:0},i&&te.createElement(R1,{className:Us.closeIcon,onClick:i}),a&&te.createElement("div",{className:Us.title},a),te.createElement("div",{className:gr(Us.content)},l),s&&te.createElement("div",{className:Us.footer},s)))},MC=Yz;var PC={button:"la"};var O=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return te.createElement(Button,d({className:gr(PC.button,e)},t))};var _C=createContext({confirmData:null,confirm:e=>{},info:e=>{},closeConfirm:()=>{}}),et=()=>useContext(_C),TC=({children:e})=>{let[t,o]=useState(null),r=()=>{o(null);},n=a=>{o(E(d({},a),{type:"confirm"}));},i=a=>o(E(d({},a),{type:"info",OkButton:ye}));return te.createElement(_C.Provider,{value:{confirmData:t,confirm:n,info:i,closeConfirm:r}},e)};var tl={modal:"sa",background:"ca",footer:"na",okButton:"da",cancelButton:"H"};var ze={typography:"pa","typography-headings":"ga","typography-titles":"ha","typography-sub-title":"fa","typography-body":"ba","typography-body-bold":"ua","typography-caption":"va","typography-caption-bold":"xa"};var $s=e=>e.renderer!==void 0,m$={Heading:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-headings"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("h1",d({className:gr(ze.typography,ze["typography-headings"],o),style:r},n),t)},Title:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-titles"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("h2",d({className:gr(ze.typography,ze["typography-titles"],o),style:r},n),t)},Subtitle:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-sub-title"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("h3",d({className:gr(ze.typography,ze["typography-sub-title"],o),style:r},n),t)},Body:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-body"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-body"],o),style:r},n),t)},BodyBold:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-body-bold"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-body-bold"],o),style:r},n),t)},Caption:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-caption"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-caption"],o),style:r},n),t)},CaptionBold:e=>{if($s(e))return e.renderer({typoClassName:gr(ze.typography,ze["typography-caption-bold"])});let i=e,{children:t,className:o,style:r}=i,n=P(i,["children","className","style"]);return te.createElement("span",d({className:gr(ze.typography,ze["typography-caption-bold"],o),style:r},n),t)}},N=m$;var c$=({pageId:e="*",componentId:t="*",elementId:o="*",className:r,title:n,content:i,okText:a="Ok",onOk:s,cancelText:l="Cancel",onCancel:c,type:p="confirm"})=>{let{accessibilityId:u,themeStyles:g}=A({pageId:e,componentId:t,elementId:o});return te.createElement(MC,{className:gr(r,tl.modal),pageId:e,componentId:t,elementId:o,"data-qa-anchor":`confirm-modal-${u}`,title:n,footer:te.createElement("div",{className:tl.footer},p==="confirm"&&te.createElement(O,{style:g,className:tl.cancelButton,"data-qa-anchor":"confirm-modal-cancel-button",onPress:c},te.createElement(N.BodyBold,null,l)),te.createElement(O,{style:g,className:tl.okButton,"data-qa-anchor":`confirm-modal-${u}-ok-button`,onPress:s},te.createElement(N.BodyBold,null,a))),onCancel:c},te.createElement("div",null,i))},kC=()=>{let{confirmData:e,closeConfirm:t}=et();if(!e)return null;let o=()=>{t(),e!=null&&e.onCancel&&e.onCancel();},r=()=>{t(),e!=null&&e.onOk&&e.onOk();};return te.createElement(c$,E(d({},e),{onCancel:o,onOk:r,className:tl.background}))};var SC={socialCommunityCreationButtonVisible:!0},NC=createContext(SC),EC=()=>useContext(NC);function J4({children:e,config:t}){let o=useMemo(()=>d(d({},SC),t),[t]);return te.createElement(NC.Provider,{value:o},e)}var BC={"general.action.cancel":"Cancel","general.action.accept":"Accept","general.action.decline":"Decline","general.action.discard":"Discard","general.action.ok":"Ok","general.error.tryAgainLater":"Something went wrong. Please try again later.","general.connection.waiting":"Waiting for connection...",hello:"Hello World","plural.like":"{amount, plural, one {like} other {likes}}",comment:"Comment","plural.comment":"{amount, plural, one {comment} other {comments}}","plural.member":"{amount, plural, one {member} other {members}}",selectACategory:"Select a category",todaysTrendingTitle:"Trending groups",loadMore:"Load More",categoryList:"Categories",recommendedList:"Groups you\u2019ll love","exploreHeader.searchCommunityTitle":"Explore groups","exploreHeader.searchCommunityPlaceholder":"Search groups...","exploreHeader.createCommunityTitle":"or create your own!","exploreHeader.createCommunityButton":"Create group",backTitle:"Back",createCommunity:"Create Group",moderator:"Moderator","moderatorMenu.promoteToModerator":"Promote to moderator","moderatorMenu.dismissModerator":"Dismiss moderator","moderatorMenu.removeFromCommunity":"Remove from group","post.readMore":"Read more","post.editPost":"Edit post","post.deletePost":"Delete post","post.editPostMobile":"Edit","post.deletePostMobile":"Delete","post.confirmDelete":"This post will be permanently deleted. You\u2019ll no longer to see and find this post. Continue?","post.confirmPendingDelete":"This post will be permanently deleted from the pending list","post.edited":"Edited","post.like":"Like","post.liked":"Liked","post.unknownPost.description":"We couldn\u2019t recognize this post.","post.unknownPost.title":"Something went wrong","post.renderingError.description":"We couldn\u2019t render this post.","post.renderingError.title":"Something went wrong","post.community":"Group","post.myTimeline":"My Timeline","post.wasLive":"was live","post.success.approved":"Post approved","post.success.declined":"Post declined","post.success.submittedToReview":"Your post has been submitted to review by moderator","post.error.cannotReview.title":"Post is not available","post.error.cannotReview.description":"The post has been reviewed by another moderator","post.discard.title":"Discard post?","post.discard.content":"Do you want to discard your post?","post.editDiscard.title":"Discard changes","post.editDiscard.content":"Do you want to discard your changes?","post.editDiscard.cancel":"Continue editing","collapsible.viewAll":"View all","collapsible.viewAllFiles":"View all files","collapsible.viewAllComments":"View all comments...","collapsible.viewMoreComments":"View more comments...","collapsible.viewMoreReplies":"View more replies","collapsible.viewReplies":"View replies","collapsible.viewMoreReply":"View {count, plural, one {# reply} other {# replies}}","community.createSuccess":"Your group was successfully created","community.updateSuccess":"Your group was successfully updated","community.editProfile":"Edit profile","community.join":"Join","community.communitySettings":"Group Settings","community.returnTo":"Return to {communityName}","community.leaveCommunityTitle":"Leave group?","community.leaveCommunityBody":"You will no longer be able to post or interact in this group after leaving.","community.leaveCommunityBodyLastMember":"As you\u2019re the last moderator and member, choose close group to leave.","community.leaveCommunityBodyOnlyModerator":"You\u2019re the only moderator in this group. Nominate other members before leaving group.","community.leaveCommunityButtonText":"Leave","community.leaveCommunityButtonOK":"OK","community.cannotInteract":"Join group to interact with all posts","community.removeUserFromCommunityTitle":"Remove user from group","community.removeUserFromCommunityBody":"This user won't no longer be able to search, post. Continue?","community.name":"Group name","community.about":"About","community.category":"Category","community.onlyadmincanpost":">Only admin can post","community.onlyadmins":"Choose to allow Only Admins to create posts in this group.","community.categorypermission":"Group permission","community.addmembers":"Add members","community.posts":"posts","community.members":"members","community.settings":"Settings","community.leaveCommunity":"Leave Group","CommunityMembers.members":"Members","CommunityMembers.moderators":"Moderators","EmptyFeed.TargetType.globalFeed":"This feed is empty","EmptyFeed.TargetType.communityFeed":"This group's feed is empty.","EmptyFeed.TargetType.userFeed":"This user's feed is empty.","EmptyFeed.TargetType.myFeed":"Your feed is empty. Start your first post","EmptyFeed.exploreCommunity":"Explore Group","UserFeed.tabs.timeline":"Timeline","community.exploreCommunities":"Explore Community","community.permissions.postReview":"Post review","community.permissions.storyComments":"Story comments","community.permissions.approvePosts":"Approve member posts","community.permissions.allowStoryComments":"Allow comments on group stories","community.permissions.approvePosts.prompt":"Posts by members have to be reviewed and approved by group moderator.","community.permissions.storyComments.prompt":"Turn on to receive comments on stories in this group.","community.permissions.error.needApprovalOnPostCreation.turnOn":"Unable to turn on post review","community.permissions.error.needApprovalOnPostCreation.turnOff":"Unable to turn off post review","community.permissions.error.storyComments.turnOn":"Unable to turn on post review","community.permissions.error.storyComments.turnOff":"Unable to turn off post review","community.review.declinePendingPosts":"Decline pending post will permanently delete the selected post from group.","community.pendingPostsBanner.title":"Pending posts","community.pendingPostsBanner.pendingForReview":"Your posts are pending for review","community.pendingPostsBanner.needApproval":"{formattedAmount} {amount, plural, one {post needs} other {posts need}} approval","communityCreatedModal.title":"Customize your community","communityCreatedModal.message":"You\u2019ve successfully created a community! Now let's manage permissions that work best for you","communityCreatedModal.goToSettings":"Group settings","communityCreatedModal.skip":"Skip for now",post:"Post","upload.attachmentLimit":"You reached the maximum attachment of {maxFiles}","upload.fileSizeLimit":"One of the selected file is larger than 1GB. Please select a new file.","user.editProfile":"Edit profile","user.message":"Message","follow.placeholder.noFollowings":"No following yet","follow.placeholder.noFollowers":"No followers yet","ProfileSettings.editProfile":"Edit profile","ProfileSettings.returnTo":"Return to ","SideSectionMyCommunity.myCommunity":"My groups","file.reUpload":"Click to re-upload the file","UserProfileForm.displayname":"Nickname","UserProfileForm.about":"About","UserProfileForm.title":"General","UserProfileForm.namePlaceholder":"Enter user display name","UserProfileForm.requiredDisplayName":"Display name is required","UserProfileForm.requiredDescription":"Enter something about yourself","UserSelector.placeholder":"Select user...","report.reportUser":"Report user","report.unreportUser":"Unreport user","report.reportComment":"Report comment","report.unreportComment":"Unreport comment","report.reportSent":"Report sent","report.unreportSent":"Unreport sent","comment.like":"Like","comment.liked":"Liked","comment.deleted":"This comment has been deleted","comment.delete":"Delete comment","comment.edit":"Edit comment","comment.deleteMobile":"Delete","comment.editMobile":"Edit","comment.deleteConfirmContent":"This comment will be permanently deleted. Continue?","comment.deleteConfirmCancelText":"Cancel","comment.deleteConfirmOkText":"Delete","dropdown.first":"First","dropdown.second":"Second","layout.logout":"Log Out","layout.username":"Jackies","chat.details.chatDetailes":"Chat Detail","chat.details.communityName":"Group Name","message.flag":"flag","message.unflag":"Unflag","message.edit":"Edit","message.delete":"Delete","message.deleted":"deleted","message.unsupportedFormat":"Unsupported message format","message.saveOptionsError":"There was an error processing your request","MessageComposeBar.placeholder":"Type your message...","RecentChat.chats":"Chats","AddMemberModal.addMembers":"Add members","AddMemberModal.membersValidationError":"Please select at least one member",add:"Add",save:"Save",close:"Close",reply:"Reply",delete:"Delete",create:"Create",cancel:"Cancel",loading:"Loading...","loading.chat":"Loading chat...",anonymous:"Anonymous","comment.edited":"Edited","comment.readmore":"Read more","communities.nocommunityfound":"No Group found","profile.setting":"Profile Settings","sidesectioncommunity.newfeed":"Feed","sidesectioncommunity.userProfile":"Profile","sidesectioncommunity.explore":"Explore","sidesectioncommunity.community":"Community","communityFeed.join":"Join community to interact with all posts","communityFeed.members":"Members","communityFeed.moderators":"Moderators","files.all":"View all files","sidebar.community":"Group","sidebar.explore":"Explore","sidebar.user":"User profile","CategoryCommunitiesList.emptyTitle":"It's empty here...","CategoryCommunitiesList.emptyDescription":"No community found in this category","CommentComposeBar.addComment":"Post","CommentComposeBar.replayTo":"Reply to ","CommentComposeBar.replayToUser":"Replying to {displayName}","CommentComposeBar.saySomething":"Say something nice...","CommentComposeBar.unableToPost":"Unable to post","CommentComposeBar.overCharacter":"You have reached maximum 50,000 characters in a post.","CommentComposeBar.done":"Done","CommentComposeBar.unableToMention":"Unable to mention","CommentComposeBar.overMentionees":"You have reached maximum 30 mentioned users in a post.","CommentComposeBar.okText":"OK","CommunityCreationModal.title":"Leave without finishing?","CommunityCreationModal.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","CommunityCreationModal.cancelText":"Continue editing","CommunityCreationModal.okText":"Leave","PostAsCommunity.title":"Post as group","PostAsCommunity.caption":"Enable this will publish the post on behalf of group account","AddMemberAction.title":"Add members","AddMemberAction.description":"Add your friends to this group to participate in group conversations","CloseCommunityAction.closeConfirm.title":"Close group?","CloseCommunityAction.closeConfirm.description":"All members will be removed from the community. All posts, messages, reactions and media shared in community will be deleted. This cannot be undone.","CloseCommunityAction.title":"Close group","CloseCommunityAction.description":"Closing this group will remove the group page and all its content and comments. This cannot be undone.","report.doReport":"Report","report.undoReport":"Undo Report","comment.deleteBody":"This comment will be permanently removed.","reply.delete":"Delete reply","reply.deleteBody":"This reply will be permanently deleted. Continue?","reply.edit":"Edit reply","reply.deleted":"This reply has been deleted","tabs.editProfile":"Edit profile","tabs.timeline":"Timeline","tabs.followers":"Followers","tabs.followings":"Following","tabs.pending":"Pending","tabs.members":"Members","tabs.moderators":"Moderators","tabs.pendingPosts":"Pending {amount, select, 0 {} other { ({formattedAmount})}}","tabs.permissions":"Permissions","tabs.gallery":"Gallery","tabs.images":"Photos","tabs.videos":"Videos","tabs.liveStreams":"Livestreams","feed.emptyFeed":"Your feed is empty.","feed.emptyCommunityPublicFeed":"This group's feed is empty.","feed.emptyCommunityReviewingFeed":"No pending posts","feed.emptyJoinedCommunityPublicFeedTitle":"Your feed is empty.","feed.emptyJoinedCommunityPublicFeedBody":"Share a post to start the conversation!","feed.emptyMyCommunitiesBody":"You have not joined any groups yet. Please join one to get started.","feed.emptyUserFeed":"No posts yet","feed.emptyMyFeed":"Your feed is empty. Start your first post","feed.emptyMyCommunities":"No groups available","chat.groupSetting":"Group settings","chat.message.deleted":"Message was deleted","chat.message.unsupported":"Unsupported message type","chat.chats":"Chats","chat.details.header":"Chat Details","chat.details.chatName":"Chat Name","chat.leaveChat":"Leave chat","chat.leaveChat.confirm.title":"Leave chat","chat.leaveChat.confirm.content":"Are you sure you want to leave the chat?","chat.leaveChat.confirm.okButton":"Leave","chat.leaveChat.success":"You successfully left chat","chat.leaveChat.error":"Attempt to leave a chat has failed","chat.members.return":"Return to controls","chat.members.count":"{count} members","chat.create.modalTitle":"Create new chat","chat.loading.error":"Couldn't load chat","userSelector.placeholder":"Enter name or email addresses","userSelector.emptyState.title":"It's empty here...","userSelector.emptyState.description":"No contact found here","groupChat.createPopup.fieldName":"Group name","groupChat.createPopup.placeholder":"Please input group name","general.cancel.capital":"Cancel","general.create.capital":"Create","general.done.capital":"Done","chat.member.addMore":"Add or Remove user","video.notReady":"The video is being processed. Please try again later.","liveStream.idle":"This stream is currently unavailable","liveStream.ended.caption":"This liveStream has ended.","liveStream.ended.message":"Playback will be available for you to watch shortly.","user.follow":"Follow","user.unfollow":"Unfollow","user.unfollow.confirm.title":"Unfollow {displayName}","user.unfollow.confirm.body":"You\u2019ll have to send a request again to follow {displayName}. Continue?","user.cancel_follow":"Cancel request","placeholder.noResults":"No results found","request.accept":"Accept","request.decline":"Decline","follower.title.removeUser":"Remove {displayName} from followers?","follower.body.removeUser":"We will not notify {displayName} that they've been removed from your followers","follower.menuItem.removeUser":"Remove user","follower.menuItem.unfollow":"Unfollow","buttonText.cancel":"Cancel","buttonText.remove":"Remove","follow.pendingNotification.title":"Pending requests","follow.pendingNotification.body":"Your requests are waiting for review","notification.done":"Done","counter.posts":"posts","counter.followings":"following","counter.followers":"followers","buttonText.unfollow":"Unfollow","privateFeed.title":"This account is private","privateFeed.body":"Follow this user to see all posts","navigationBlocker.title":"Unsaved changes","navigationBlocker.content":"Your changes won`t be saved. Are you sure you want to leave this page now?","user.unfollow.confirm.title.thisUser":"Unfollow this user","mediaGallery.images.empty":"No photos yet","mediaGallery.liveStreams.empty":"No liveStreams yet","mediaGallery.videos.empty":"No videos yet","user.unfollow.confirm.body.thisUser":"You\u2019ll have to send a request again to follow this user. Continue?","navigationBlocker.okText":"Leave","options_composer.button.add":"Add Option","options_composer.title":"Create at least 2 options","poll_modal.answer_type.title":"Selection type","poll_modal.answer_type.body":"Choose to vote with one or multiple options","poll_modal.closed_in.title":"Schedule poll (Optional)","poll_modal.closed_in.body":"Poll will be automatically closed at the end of chosen time frame (UTC)","select.answerType.item":"{answerType} selection","poll_composer.question.label":"Poll options","poll_composer.question.placeholder":"What\u2019s your poll question?","poll_composer.poll_options.label":"Options","poll_modal.title":"Create poll","poll.votes":"{voteCount} votes","poll.vote.closedIn":"Poll ends in {closedIn} days","poll.vote.finalResults":"Final results","poll.vote.submit":"Submit vote","poll.error.deletedOrClosed":"This poll has been closed or deleted.","poll.close":"Close poll","postCreator.unableToPost":"Unable to post","postCreator.overCharacter":"You have reached maximum 50,000 characters in a post.","postCreator.done":"Done","postCreator.unableToMention":"Unable to mention","postCreator.overMentionees":"You have reached maximum 30 mentioned users in a post.","postCreator.okText":"OK","pollComposer.unableToMention":"Unable to mention","pollComposer.overMentionees":"You have reached maximum 30 mentioned users in a post.","pollComposer.okText":"OK","storyCreation.hyperlink.bottomSheet.cancel":"Cancel","storyCreation.hyperlink.bottomSheet.title":"Add link","storyCreation.hyperlink.bottomSheet.submit":"Done","storyCreation.hyperlink.form.urlLabel":"URL","storyCreation.hyperlink.form.urlPlaceholder":"https://example.com","storyCreation.hyperlink.form.linkTextLabel":"Customize link text","storyCreation.hyperlink.form.linkTextPlaceholder":"Name your link","storyCreation.hyperlink.form.linkTextDescription":"This text will show on the link instead of URL.","storyCreation.hyperlink.form.removeButton":"Remove link","storyCreation.hyperlink.removeConfirm.title":"Remove link","storyCreation.hyperlink.removeConfirm.content":"This link will be removed from story.","storyCreation.hyperlink.removeConfirm.cancel":"Cancel","storyCreation.hyperlink.removeConfirm.confirm":"Remove","storyCreation.hyperlink.validation.error.invalidUrl":"Please enter a valid URL.","storyCreation.hyperlink.validation.error.whitelisted":"Please enter a whitelisted URL.","storyCreation.hyperlink.validation.error.blocked":"Your text contains a blocklisted word.","storyCreation.hyperlink.unsavedChanges.title":"Unsaved changes","storyCreation.hyperlink.unsavedChanges.content":"Are you sure you want to cancel? Your changes won't be saved.","storyCreation.hyperlink.unsavedChanges.cancel":"No","storyCreation.hyperlink.unsavedChanges.confirm":"Yes","storyViewer.actions.deleteStory":"Delete story","storyViewer.action.confirmModal.title":"Delete this story?","storyViewer.action.confirmModal.content":"This story will be permanently deleted. You\u2019ll no longer to see and find this story.","storyViewer.notification.deleted":"Story deleted","storyViewer.notification.success":"Successfully shared story","storyViewer.notification.error":"Failed to share story","storyViewer.footer.failed":"Failed to upload","storyViewer.footer.uploading":"Uploading...","storyViewer.commentSheet.title":"Comments","storyViewer.commentSheet.empty":"No comments yet","storyViewer.commentSheet.disabled":"Comments are disabled for this story","storyViewer.commentSheet.replyingTo":"Replying to","storyViewer.toast.like.disabled":"Join community to interact with all stories","storyViewer.toast.comment.reported":"Comment reported","storyViewer.toast.comment.unreported":"Comment unreported","storyViewer.toast.disable.react":"Join community to interact with all stories","storyViewer.commentComposeBar.submit":"Post","storyDraft.button.shareStory":"Share story","storyDraft.notification.hyperlink.error":"Can\u2019t add more than one link to your story.","storyTab.title":"Story","select.chatType.item":"{answerType} type","chatComposer.label.channelId":"Channel ID","chatComposer.label.displayName":"Display Name","chatComposer.label.type":"Channel Type","chatComposer.addUsers":"Add users","chat_modal.title":"Create chat","chat_composer.placeholder.displayName":"Enter display name here","chat_composer.placeholder.channelId":"Enter channel ID here","editChatMembersModal.title":"Add/Edit chat members","editChatMembersModal.confirm.title":"Leave without finishing?","editChatMembersModal.confirm.content":"Your progress won\u2019t be saved. Are you sure to leave this page now?","editChatMembersModal.confirm.cancelText":"Continue editing","editChatMembersModal.confirm.okText":"Leave","notification.error.blockedWord":"Text contain blocked word","notification.error.whitelistLink":"Data contain link that is not in whitelist","livechat.deleted.message":"This message was deleted","livechat.messageBubble.reply.button":"Reply","livechat.messageBubble.copy.button":"Copy","livechat.messageBubble.delete.button":"Delete","livechat.messageBubble.mention.button":"Mention","livechat.messageBubble.report.button":"Report","livechat.messageBubble.unReport.button":"Unreport","livechat.channel.muted":"This channel has been set to read-only by the channel moderator","livechat.modal.delete.message.title":"Delete this message?","livechat.modal.delete.message.content":"This message will also be removed from your friend\u2019s devices.","livechat.mention.all":"All","livechat.mention.all.description":"Notify everyone","livechat.notification.copy.message":"Message copied","livechat.composebar.placeholder":"Write a message","livechat.delete.message.error":"Unable to delete message. Please try again.","livechat.member.muted":"You\u2019ve been muted by the channel moderator","livechat.member.muted.error":"User is muted","livechat.member.banned.title":"You are banned from chat","livechat.member.banned.description":"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned.","livechat.report.message.success":"Message reported","livechat.report.message.error":"This message failed to be reported. Please try again.","livechat.unReport.message.success":"Message unreported","livechat.unReport.message.error":"This message failed to be unreported. Please try again.","livechat.error.tooLongMessage.title":"Unable to send message","livechat.error.tooLongMessage.description":"Your message is too long. Please shorten your message and try again.","livechat.error.sendingMessage.error":"Your message wasn't sent. Please try again.","livechat.error.sendingMessage.blockedWord":"Your message wasn't sent as it contains a blocked word.","livechat.error.sendingMessage.notAllowLink":"Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.","livechat.reaction.errorOnload":"Unable to load reactions","livechat.reaction.emptyState":"No reactions yet","livechat.reaction.emptyState.description":"Be the first to react to this message!","livechat.reaction.label.removeReaction":"Click to remove reaction"};var b0={en:BC};var LC="en",v$=({locale:e,children:t})=>{let o=b0[e]?b0[e]:b0[LC];return te.createElement(IntlProvider,{defaultLocale:LC,locale:e,messages:o},t)},AC=v$;var x$={palette:{alert:"#FA4D30",base:"#292B32",primary:"#000000",secondary:"#FFD400",tertiary:"#FF305A",neutral:"#17181C",highlight:"#1054DE",system:{borders:"#ebecef",background:"#fff"}},typography:{global:{fontFamily:"CircularStd-Book, sans-serif",fontStyle:"normal"},headline:{fontWeight:600,fontSize:"20px"},title:{fontWeight:600,fontSize:"16px"},subTitle:{fontWight:400,fontSize:"13px"},body:{fontWeight:"normal",fontSize:"14px"},bodyBold:{fontWeight:600,fontSize:"14px"},caption:{fontWeight:"normal",fontSize:"12px"},captionBold:{fontWeight:600,fontSize:"12px"}}},DC=x$;function I0(e){return (e==null?void 0:e.communityMembership)==="member"}function w0(e){return (e==null?void 0:e.userPrivacySetting)==="private"}function HC(e){return (e||[]).map((t,o)=>{var r;return {id:t.userId,display:(r=t.displayName)!=null?r:t.userId,avatar:t.avatarCustomUrl,isLastItem:(e==null?void 0:e.length)===o+1}})}var M0=1;function I$(e,t,o){let r=o+M0,n=r+t;return e.substring(r,n)}function P0(e){return e?e.sort((o,r)=>o.index-r.index).map(({index:o,length:r})=>({start:o,end:o+r+M0,highlight:!0})):[]}function FC(e){let t={},o=[];return (e==null?void 0:e.length)>0?(t.mentioned=[...e.sort((r,n)=>r.plainTextIndex-n.plainTextIndex).map(({plainTextIndex:r,id:n,display:i})=>({index:r,length:i.length-M0,type:"user",userId:n}))],o.push({type:"user",userIds:e.map(({id:r})=>r)})):o.push({type:"user",userIds:[]}),{metadata:t,mentionees:o}}function OC(e,t){if(!e||b$(t==null?void 0:t.mentioned))return e;let o=e;return ((t||{}).mentioned||[]).sort((r,n)=>n.index-r.index).forEach(({userId:r,length:n,index:i})=>{let a=`@[${I$(e,n,i)}](${r})`;o=o.replace(new RegExp(`(.{${i}}).{${n+M0}}`),`$1${a}`);}),o}function Oe(e){return e!=null}var $C=e=>e.toFixed(1),UC=e=>{let t=Math.min(e*100,100);return $C(t)};function M$(e){return e.alpha!==void 0}var VC=e=>{let{hue:t,saturation:o,lightness:r}=e,n=[`${$C(t)}`,`${UC(o)}%`,`${UC(r)}%`];return M$(e)?`hsla(${[...n,e.alpha].filter(Oe).join(",")})`:`hsl(${n.filter(Oe).join(",")})`},P$=e=>{let t=parseToHsl(e);return VC(t)},_$=(e,t)=>{let o=parseToHsl(t),{lightness:r}=o,n=E(d({},o),{lightness:Math.min(1,r+e)});return VC(n)},T$=[.25,.4,.5,.75],jC=e=>{let i=e,{system:t}=i,o=P(i,["system"]),r=Object.keys(o).reduce((a,s)=>(a[s]={main:P$(o[s])},a),d({},o)),n=Object.keys(r).reduce((a,s)=>{let l=o[s],c=T$.reduce((u,g,f)=>{let y=`shade${f+1}`;return u[y]=_$(g,l),u},{}),p=r[s];return p&&typeof p=="object"?a[s]=d(d({},c),p):a[s]=E(d({},c),{main:p}),a},d({},r));return E(d({},n),{system:t})};var k$=["fontFamily","fontStyle","fontWeight","fontSize"],S$=e=>Object.keys(e).reduce((o,r)=>{let n=e[r];return r&&n&&k$.includes(r)&&(o[r]=n),o},{}),GC=e=>Object.keys(e).reduce((o,r)=>(o[r]=S$(d(d({},e.global),e[r])),o),{});var ZC={colors:{primary:{default:"#1054DE",shade1:"#4A82F2",shade2:"#A0BDF8",shade3:"#D9E5FC",shade4:"#FFFFFF"},secondary:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},base:{default:"#292B32",shade1:"#636878",shade2:"#898E9E",shade3:"#A5A9B5",shade4:"#EBECEF"},baseInverse:{default:"#FFFFFF"},alert:{default:"#FA4D30"},highlight:"#1054DE",messageBubble:{default:"#1054DE",inverse:"#FFFFFF"},storyIndicator:{default:"#EBECEF",active:["#339AF9","#78FA58"]},hyperlink:{default:"#FFFFFFCC"},actionButton:{default:"#00000080"}},typography:{heading:{fontWeight:600,fontSize:"1.25rem",lineHeight:"1.5rem"},title:{fontWeight:600,fontSize:"1rem",lineHeight:"1.25rem"},subTitle:{fontWeight:400,fontSize:"0.8125rem",lineHeight:"1rem"},body:{fontWeight:"normal",fontSize:"0.875rem",lineHeight:"1.25rem"},bodyBold:{fontWeight:600,fontSize:"0.875rem",lineHeight:"1.25rem"},caption:{fontWeight:"normal",fontSize:"0.75rem",lineHeight:"1rem"},captionBold:{fontWeight:600,fontSize:"0.75rem",lineHeight:"1rem"}}};var E$=(e={})=>{let t=N$(DC,e),o=jC(t.palette),r=GC(t.typography);return E(d({},t),{palette:o,typography:r,v4:ZC})},QC=E$;var WC=m.div`
|
|
487
487
|
color-scheme: only light;
|
|
488
488
|
${({theme:e})=>e.typography.body};
|
|
489
489
|
color: ${({theme:e})=>e.palette.base.main};
|
|
@@ -730,7 +730,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Wc]+=1);var o0=`url("data:ima
|
|
|
730
730
|
`;var Rn={editorPlaceholder:"wa",editorParagraph:"ya",editorContainer:"x",editorEditableContent:"L",editorLink:"ka",commentInput__mentionInterceptor:"ja",commentInput__mentionMenu:"T",commentInput__mentionMenuItem:"za",commentInput__mentionMenuMobile:"V"};function Kj(e){return e.type==="linebreak"}function E2(e){return e.type==="text"}function I6(e){return e.type==="mention"}function w6(e){return e.type==="autolink"}function M6(e){return e.type==="link"}function Jj(){return {children:[],direction:"ltr",format:"",indent:0,type:"root",version:1}}function Xj(){return {textStyle:"",children:[],direction:"ltr",format:"",indent:0,type:"paragraph",version:1,textFormat:0}}function b6(e){return {detail:0,format:0,mode:"normal",style:"",text:e,type:"text",version:1}}function Yj({text:e,mention:t}){return {detail:0,format:0,mode:"normal",style:"",text:e.substring(t.index,t.index+t.length+1),type:"mention",version:1,data:{displayName:t.displayName||t.userId,userId:t.userId}}}function Rj({url:e,title:t}){return {children:[b6(t)],format:"",direction:"ltr",indent:0,type:"link",version:1,url:e,rel:null,target:null,title:null}}function eG(e){return (e==null?void 0:e.type)==="url"}function nl(e){var l,c;let t=Jj(),o=e.data.text.split(`
|
|
731
731
|
`),r=(c=(l=e.metadata)==null?void 0:l.mentioned)!=null?c:[],n=zv.find(e.data.text).filter(p=>p.type==="url").map(p=>({index:p.start,length:p.end-p.start,href:p.href,value:p.value,type:"url"})),i=[...r,...n].sort((p,u)=>p.index-u.index),a=0,s=0;for(let p=0;p<o.length;p+=1){let u=Xj(),g=0,f=o[p];for(;g<f.length;){let y=i[a];if(a<i.length&&y.index===s)eG(y)?(u.children.push(Rj({title:y.value,url:y.href})),g+=y.length,s+=y.length):(u.children.push(Yj({text:e.data.text,mention:y})),g+=y.length+1,s+=y.length+1),a+=1;else {let C=a<i.length?y.index:s+f.length,v=f.slice(g,C-s+g);v&&u.children.push(b6(v)),g+=v.length,s+=v.length;}}if(g<f.length){let y=f.slice(g);y&&u.children.push(b6(y)),s+=y.length;}t.children.push(u),s+=1;}return {root:t}}function il(e){let t=e.getEditorState().toJSON();return tG(t)}function tG(e){let t=[],o=e.root.children,r=[],n=!1,i=[],a=0;o.forEach(l=>{let c=l.children,p=[];c.forEach(u=>{if(Kj(u)&&p.push(`
|
|
732
732
|
`),E2(u)&&(p.push(u.text),a+=u.text.length),(w6(u)||M6(u))&&u.children.forEach(g=>{E2(g)&&(p.push(g.text),a+=g.text.length);}),I6(u)){let g=u.text.charAt(0)==="@";if(u.data.userId==="all")r.push({index:a,length:u.text.length,type:"channel"}),n=!0;else {let f=g?u.text.length-1:u.text.length;r.push({index:a,length:f,type:"user",userId:u.data.userId,displayName:u.data.displayName}),i.push(u.data.userId);}p.push(u.text),a+=u.text.length;}}),a+=1,t.push(p.join(""));});let s=[];return i.length>0&&s.push({type:"user",userIds:i}),n&&s.push({type:"channel"}),{mentioned:r,text:t.join(`
|
|
733
|
-
`),mentionees:s}}var oG={ltr:"ltr",rtl:"rtl"},al=({namespace:e,theme:t,nodes:o,editorState:r})=>({namespace:e,editable:!0,theme:d(d({},oG),t),onError(n){throw n},nodes:o,editorState:r});var $v={mention:"Xa"};function iG({domNode:e,data:t}){let o=e.textContent;return o!==null?{node:La({text:o,data:t})}:null}var Vi=class e extends TextNode{static getType(){return "mention"}static clone(t){return new e({data:t.__data,text:t.__text,key:t.__key})}static importJSON(t){let o=La({text:t.text,data:t.data});return o.setTextContent(t.text),o.setFormat(t.format),o.setDetail(t.detail),o.setMode(t.mode),o.setStyle(t.style),o}constructor({text:t,data:o,key:r}){super(t,r),this.__data=o;}exportJSON(){return E(d({},super.exportJSON()),{data:this.__data,type:"mention",version:1})}createDOM(t){let o=super.createDOM(t);return o.className=$v.mention,o}exportDOM(){let t=document.createElement("span");return t.setAttribute("data-lexical-mention","true"),t.setAttribute("data-mention-data",JSON.stringify(this.__data)),t.textContent=this.__text,{element:t}}isSegmented(){return !1}static importDOM(){return {span:t=>t.hasAttribute("data-lexical-mention")?{conversion:o=>{var r;return iG({domNode:o,data:JSON.parse((r=o.getAttribute("data-mention-data"))!=null?r:"{}")})},priority:1}:null}}isTextEntity(){return !0}isToken(){return !0}canInsertTextBefore(){return !1}canInsertTextAfter(){return !1}};function La({text:e,data:t}){return new Vi({data:t,text:e}).setMode("segmented").toggleDirectionless()}var lG=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,mG=[e=>{let t=lG.exec(e);if(t===null)return null;let o=t[0];return {index:t.index,length:o.length,text:o,url:o.startsWith("http")?o:`https://${o}`}}],sl=()=>te.createElement(AutoLinkPlugin,{matchers:mG});function rn(e){return e!=null}function Vv(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function jv(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var dG=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function Gv(e){return e==="https://"||dG.test(e)}var ll=()=>te.createElement(LinkPlugin,{validateUrl:Gv});var Qv=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,xG="\\b[A-Z][^\\s"+Qv+"]",bG={NAME:xG,PUNCTUATION:Qv},Wv=bG.PUNCTUATION,_6=["@"].join(""),qv="[^"+_6+Wv+"\\s]",IG="(?:\\.[ |$]| |["+Wv+"]|)",wG=75,MG=new RegExp("(^|\\s|\\()(["+_6+"]((?:"+qv+IG+"){0,"+wG+"}))$"),PG=50,_G=new RegExp("(^|\\s|\\()(["+_6+"]((?:"+qv+"){0,"+PG+"}))$");function TG(e,t){let o=MG.exec(e);if(o===null&&(o=_G.exec(e)),o!==null){let r=o[1],n=o[3];if(n.length>=t)return {leadOffset:o.index+r.length,matchingString:n,replaceableString:o[2]}}return null}function kG(e){return TG(e,0)}var P6=class extends MenuOption{constructor({data:t,dataId:o}){super(o),this.data=t;}};function ml({suggestions:e,getSuggestionId:t,onQueryChange:o,$createNode:r,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l}){let[c]=useLexicalComposerContext(),p=useMemo(()=>e.map(f=>new P6({data:f,dataId:t(f)})),[e]),u=useCallback((f,y,C)=>{c.update(()=>{let v=r(f.data,f.key),h=$createTextNode(" ");y&&($insertNodes([h]),h.insertBefore(y),y.replace(v)),h.select(),C();});},[c]),g=useCallback(f=>kG(f),[c]);return te.createElement(LexicalTypeaheadMenuPlugin,{onQueryChange:o,onSelectOption:u,triggerFn:g,options:p,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l})}function NG({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=N0(),[a,s]=useState(!1),[l,c]=useState(n||!0),[p,u]=useState([]),[g,f]=useState(null),[y,C]=useState(!1),v=useRef(null),h=useRef(null),x=useCallback(()=>{var I;v.current&&(s(!0),(I=v.current)==null||I.call(v));},[v,a,l,c]),b=useCallback(I=>{n&&(I.data&&u(I.data),c(I.loading),C(I.hasNextPage),f(I.error),v.current=I.onNextPage,o(I));},[n,v]);useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return h.current=I,()=>{I();}},[t,n]);let M=useCallback(()=>{h.current&&h.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return h.current=I,()=>I()},[]);return {items:p,hasMore:y,isLoading:l,loadMore:x,error:g,loadMoreHasBeenCalled:a,refresh:M}}var pt=NG;var dl=({displayName:e,limit:t,enabled:o=!0})=>{let[r,n]=useState([]),[i,a]=useState(!1),[s,l]=useState(!1),[c,p]=useState(!1),u=useRef(null),g=useRef(null),f=()=>{u.current&&(u.current(),p(!0));};return useEffect(()=>{if(g.current&&(g.current(),g.current=null),!o)return;let y=UserRepository.searchUserByDisplayName({displayName:e,limit:t},C=>{l(C.hasNextPage||!1),a(C.loading),u.current=C.onNextPage||null,n(C.data);});return g.current=y,()=>{var C;(C=g.current)==null||C.call(g),g.current=null;}},[e,t,o]),{users:r,isLoading:i,hasMore:s,loadMore:f,loadMoreHasBeenCalled:c}};var D0=({communityId:e,displayName:t,limit:o,enabled:r=!0})=>{let[n,i]=useState([]),[a,s]=useState(!1),[l,c]=useState(!1),[p,u]=useState(!1),g=useRef(null),f=useRef(null),y=()=>{g.current&&(g.current(),u(!0));};return useEffect(()=>{if(!r)return;f.current&&(f.current(),f.current=null);let C=CommunityRepository.Membership.searchMembers({communityId:e,search:t,limit:o,sortBy:"displayName",includeDeleted:!1},v=>{c(v.hasNextPage||!1),s(v.loading),g.current=v.onNextPage||null,i(v.data);});return f.current=C,()=>{var v;(v=f.current)==null||v.call(f),f.current=null;}},[e,t,r]),{members:n,isLoading:a,hasMore:l,loadMore:y,loadMoreHasBeenCalled:p}};function OG({fetcher:e,params:t,callback:o=()=>{},options:r,shouldCall:n=!0,getSubscribedTopic:i}){let{subscribe:a}=p6(),[s,l]=useState(null),[c,p]=useState(void 0),[u,g]=useState(!1),[f,y]=useState(null),C=useRef(null),v=useCallback(h=>{n&&t!=null&&(g(h.loading),h.data&&l(h.data),p(h.origin),y(h.error),o(h));},[n,o]);return useEffect(()=>(i&&(C.current=subscribeTopic(i())),()=>{var h;(h=C.current)==null||h.call(C);}),[i]),useEffect(()=>{if(t==null||!n)return;let{unsubscribe:h}=a({fetcher:e,params:t,callback:v,options:r});return ()=>{h();}},[t,n]),{item:s,origin:c,isLoading:u||s==null&&f==null,error:f}}var kn=OG;var zG=({communityId:e,shouldCall:t=!0})=>{let n=kn({fetcher:CommunityRepository.getCommunity,params:e,shouldCall:t&&!!e}),{item:o}=n,r=P(n,["item"]);return d({community:o},r)},_t=zG;var Cr=e=>{let r=kn({fetcher:UserRepository.getUser,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return d({user:t},o)};var GG=e=>{let{data:t}=useQuery({queryKey:["asc-uikit","FileRepository","getFile",e],queryFn:()=>FileRepository.getFile(e),enabled:!!e});return t==null?void 0:t.data},Rv=GG;var it=({fileId:e,imageSize:t="medium"})=>{let o=Rv(e),[r,n]=useState(void 0);return useEffect(()=>{if(o==null||e==null){n(void 0);return}function i(){return _(this,null,function*(){if((o==null?void 0:o.fileUrl)==null)return;let a=FileRepository.fileUrlWithSize(o==null?void 0:o.fileUrl,t);n(a);})}i();},[o,t]),r};var ex={userAvatar__text:"Ya",userAvatar__placeholder__path:"Ca",userAvatar__placeholder__rect:"Aa",userAvatar__placeholder:"Ma",userAvatar__img:"Sa"};var tx=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",className:e},t),te.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#F26B1C"}),te.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),te.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"}))};function Wo({userId:e,className:t}){var n;let{user:o}=Cr(e),r=it({fileId:(n=o==null?void 0:o.avatar)==null?void 0:n.fileId});return o==null||e==null||r==null?te.createElement(tx,{className:t}):te.createElement("object",{data:r,type:"image/png",className:gr(ex.userAvatar__img,t)},te.createElement(tx,{className:t}))}var Aa={userMentionItem__item:"w",allMentionItem__item:"y",userMentionItem__avatar:"Ea",allMentionItem__atSign:"Ia",userMentionItem__displayName:"Ra",allMentionItem__displayName:"Ua"};function Da({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return te.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.userMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},te.createElement(Wo,{className:Aa.userMentionItem__avatar,userId:e.data.userId}),te.createElement("p",{className:Aa.userMentionItem__displayName},e.data.displayName))}var YG=({node:e,onIntersect:t,options:o})=>{useEffect(()=>{if(e==null)return;let r=new IntersectionObserver(n=>{var i;return ((i=n[0])==null?void 0:i.isIntersecting)&&t()},o);return r.observe(e),()=>r.disconnect()},[e,t,o]);},Bo=YG;var vZ=e=>{let[t,o]=useState(null),{community:r,isLoading:n}=_t({communityId:e}),i=useMemo(()=>!!e&&!n&&!(r!=null&&r.isPublic),[e,n,r]),{members:a,hasMore:s,isLoading:l,loadMore:c}=D0({communityId:e||"",displayName:t||"",limit:10,enabled:i}),{users:p,hasMore:u,loadMore:g,isLoading:f}=dl({displayName:t||"",limit:10,enabled:!i}),y=b=>{o(b);},C=useMemo(()=>e&&n?[]:i?a.map(({user:b,userId:M})=>({userId:(b==null?void 0:b.userId)||M,displayName:b==null?void 0:b.displayName})):p.map(({displayName:b,userId:M})=>({userId:M,displayName:b})),[p,a,i,n]),v=useMemo(()=>i?s:u,[i,s,u]),h=()=>{x||!v||(i?c():g());},x=useMemo(()=>i?l:f,[l,f,i]);return {suggestions:C,queryString:t,onQueryChange:y,loadMore:h,hasMore:v,isLoading:x}},xZ=[AutoLinkNode,LinkNode,Vi],ei=forwardRef(({pageId:e="*",componentId:t="*",elementId:o="*",communityId:r,value:n,onChange:i,maxLines:a=10,placeholder:s,mentionContainer:l,targetId:c,targetType:p},u)=>{var z;let [g,f]=useState(null);A({pageId:e,componentId:t,elementId:o});let {onQueryChange:x,suggestions:b,isLoading:M,loadMore:I,hasMore:w}=vZ(r);Bo({onIntersect:()=>{M===!1&&I();},node:g,options:{threshold:.5}});let k=te.useRef(null),S=useMedia("(min-width: 768px)"),{refs:L,floatingStyles:D}=useFloating({placement:S?"bottom-start":"bottom",middleware:[offset(({rects:V,placement:K})=>S?K.includes("top")?V.reference.height*1.1:-V.reference.height:K.includes("top")?0:-10),flip(),shift()],whileElementsMounted:autoUpdate}),H=()=>{var V;(V=k.current)==null||V.dispatchCommand(CLEAR_EDITOR_COMMAND,void 0);};useImperativeHandle(u,()=>({clearEditorState:H}));let $=useMedia("(min-width: 768px)"),B=al({namespace:"CommentInput",theme:{placeholder:Rn.editorPlaceholder,paragraph:Rn.editorParagraph,link:Rn.editorLink},nodes:xZ});return te.createElement(LexicalComposer,{initialConfig:d(d({},B),(z=n==null?void 0:n.data)!=null&&z.text?{editorState:JSON.stringify(nl(n))}:{})},te.createElement("div",{className:Rn.editorContainer,style:{"--asc-max-lines":a}},te.createElement(RichTextPlugin,{contentEditable:te.createElement(ContentEditable,{className:Rn.editorEditableContent}),placeholder:s?te.createElement("span",{className:Rn.editorPlaceholder},s):null,ErrorBoundary:LexicalErrorBoundary}),te.createElement(OnChangePlugin,{onChange:(V,K)=>{i(il(K));}}),te.createElement(HistoryPlugin,null),te.createElement(AutoFocusPlugin,null),te.createElement(ll,null),te.createElement(sl,null),te.createElement(EditorRefPlugin,{editorRef:k}),te.createElement(ClearEditorPlugin,null),te.createElement(ml,{suggestions:b,getSuggestionId:V=>V.userId,onQueryChange:x,$createNode:V=>La({text:`@${(V==null?void 0:V.displayName)||""}`,data:V}),onOpen:V=>{L.setReference({getBoundingClientRect:V.getRect});},onClose:()=>{L.setReference(null);},menuRenderFn:(V,{options:K,selectedIndex:U,setHighlightedIndex:j,selectOptionAndCleanUp:Z})=>!l||K.length===0?null:$&&V.current?(L.setReference(V.current),ox.createPortal(te.createElement("div",{ref:G=>L.setFloating(G),style:d({},D),className:Rn.commentInput__mentionMenu},te.createElement("ul",{className:Rn.commentInput__mentionMenuItem},K.map((G,Q)=>te.createElement(Da,{isSelected:U===Q,onClick:()=>{j(Q),Z(G);},onMouseEnter:()=>{j(Q);},key:G.key,option:E(d({},G),{setRefElement:T=>{Q===K.length-1&&f(T),G.setRefElement(T);}})})))),V.current)):(L.setReference(l),ox.createPortal(te.createElement("div",{ref:G=>L.setFloating(G),className:Rn.commentInput__mentionMenuMobile,style:E(d({},D),{"--asc-mention-width":`${l.offsetWidth}px`})},K.map((G,Q)=>te.createElement(Da,{isSelected:U===Q,onClick:()=>{j(Q),Z(G);},onMouseEnter:()=>{j(Q);},key:G.key,option:E(d({},G),{setRefElement:T=>{Q===K.length-1&&f(T),G.setRefElement(T);}})}))),l)),commandPriority:COMMAND_PRIORITY_HIGH})))});var MZ=30,PZ=5e4,_Z=({className:e,userToReply:t,onSubmit:o,postId:r,textValue:n,isSubmitting:i})=>{let a=Xn(r),{currentUserId:s}=X(),{info:l}=we(),c=ne(s),p=le({fileId:c==null?void 0:c.avatarFileId,imageSize:"small"}),[u,g]=useState(n),{formatMessage:f}=useIntl(),y=useRef(null),C=useRef(null);useEffect(()=>{var M;(M=C.current)==null||M.focus();},[]);let v=()=>{var M,I;if((u==null?void 0:u.text)!==""){if(u!=null&&u.mentioned&&((M=u==null?void 0:u.mentioned)==null?void 0:M.length)>MZ)return l({title:te.createElement(FormattedMessage,{id:"CommentComposeBar.unableToMention"}),content:te.createElement(FormattedMessage,{id:"CommentComposeBar.overMentionees"}),okText:te.createElement(FormattedMessage,{id:"CommentComposeBar.okText"})});if(u!=null&&u.text&&((I=u.text)==null?void 0:I.length)>PZ)return l({title:te.createElement(FormattedMessage,{id:"CommentComposeBar.unableToPost"}),content:te.createElement(FormattedMessage,{id:"CommentComposeBar.overCharacter"}),okText:te.createElement(FormattedMessage,{id:"CommentComposeBar.done"})});o==null||o((u==null?void 0:u.text)||"",u==null?void 0:u.mentionees,{mentioned:u==null?void 0:u.mentioned});}},h=(u==null?void 0:u.text)==="";t?f({id:"CommentComposeBar.replayTo"})+t:f({id:"CommentComposeBar.saySomething"});let b=f(t?{id:"reply"}:{id:"CommentComposeBar.addComment"});return a==null?null:te.createElement(Fv,{className:e,ref:y},te.createElement(Hv,{avatar:p,backgroundImage:Ne}),te.createElement(Ov,null,te.createElement(ei,{placeholder:"Add a comment...",mentionContainer:y.current,onChange:({text:M,mentioned:I,mentionees:w})=>{g({text:M,mentioned:I,mentionees:w});}})),te.createElement(Uv,{"data-qa-anchor":t?"comment-compose-bar-reply-button":"comment-compose-bar-add-comment-button",disabled:h||i,onClick:v},b))},Ha=e=>{let t=W("CommentComposerBar");return t?t(e):te.createElement(_Z,d({},e))};var ax=m.div`
|
|
733
|
+
`),mentionees:s}}var oG={ltr:"ltr",rtl:"rtl"},al=({namespace:e,theme:t,nodes:o,editorState:r})=>({namespace:e,editable:!0,theme:d(d({},oG),t),onError(n){throw n},nodes:o,editorState:r});var $v={mention:"Xa"};function iG({domNode:e,data:t}){let o=e.textContent;return o!==null?{node:La({text:o,data:t})}:null}var Vi=class e extends TextNode{static getType(){return "mention"}static clone(t){return new e({data:t.__data,text:t.__text,key:t.__key})}static importJSON(t){let o=La({text:t.text,data:t.data});return o.setTextContent(t.text),o.setFormat(t.format),o.setDetail(t.detail),o.setMode(t.mode),o.setStyle(t.style),o}constructor({text:t,data:o,key:r}){super(t,r),this.__data=o;}exportJSON(){return E(d({},super.exportJSON()),{data:this.__data,type:"mention",version:1})}createDOM(t){let o=super.createDOM(t);return o.className=$v.mention,o}exportDOM(){let t=document.createElement("span");return t.setAttribute("data-lexical-mention","true"),t.setAttribute("data-mention-data",JSON.stringify(this.__data)),t.textContent=this.__text,{element:t}}isSegmented(){return !1}static importDOM(){return {span:t=>t.hasAttribute("data-lexical-mention")?{conversion:o=>{var r;return iG({domNode:o,data:JSON.parse((r=o.getAttribute("data-mention-data"))!=null?r:"{}")})},priority:1}:null}}isTextEntity(){return !0}isToken(){return !0}canInsertTextBefore(){return !1}canInsertTextAfter(){return !1}};function La({text:e,data:t}){return new Vi({data:t,text:e}).setMode("segmented").toggleDirectionless()}var lG=/((https?:\/\/(www\.)?)|(www\.))[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)/,mG=[e=>{let t=lG.exec(e);if(t===null)return null;let o=t[0];return {index:t.index,length:o.length,text:o,url:o.startsWith("http")?o:`https://${o}`}}],sl=()=>te.createElement(AutoLinkPlugin,{matchers:mG});function rn(e){return e!=null}function Vv(e){return getComputedStyle(document.documentElement).getPropertyValue(e)}function jv(e){return e*parseFloat(getComputedStyle(document.documentElement).fontSize)}var dG=new RegExp(/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/);function Gv(e){return e==="https://"||dG.test(e)}var ll=()=>te.createElement(LinkPlugin,{validateUrl:Gv});var Qv=`\\.,\\+\\*\\?\\$\\@\\|#{}\\(\\)\\^\\-\\[\\]\\\\/!%'"~=<>_:;`,xG="\\b[A-Z][^\\s"+Qv+"]",bG={NAME:xG,PUNCTUATION:Qv},Wv=bG.PUNCTUATION,_6=["@"].join(""),qv="[^"+_6+Wv+"\\s]",IG="(?:\\.[ |$]| |["+Wv+"]|)",wG=75,MG=new RegExp("(^|\\s|\\()(["+_6+"]((?:"+qv+IG+"){0,"+wG+"}))$"),PG=50,_G=new RegExp("(^|\\s|\\()(["+_6+"]((?:"+qv+"){0,"+PG+"}))$");function TG(e,t){let o=MG.exec(e);if(o===null&&(o=_G.exec(e)),o!==null){let r=o[1],n=o[3];if(n.length>=t)return {leadOffset:o.index+r.length,matchingString:n,replaceableString:o[2]}}return null}function kG(e){return TG(e,0)}var P6=class extends MenuOption{constructor({data:t,dataId:o}){super(o),this.data=t;}};function ml({suggestions:e,getSuggestionId:t,onQueryChange:o,$createNode:r,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l}){let[c]=useLexicalComposerContext(),p=useMemo(()=>e.map(f=>new P6({data:f,dataId:t(f)})),[e]),u=useCallback((f,y,C)=>{c.update(()=>{let v=r(f.data,f.key),h=$createTextNode(" ");y&&($insertNodes([h]),h.insertBefore(y),y.replace(v)),h.select(),C();});},[c]),g=useCallback(f=>kG(f),[c]);return te.createElement(LexicalTypeaheadMenuPlugin,{onQueryChange:o,onSelectOption:u,triggerFn:g,options:p,menuRenderFn:n,commandPriority:i,onOpen:a,onClose:s,anchorClassName:l})}function NG({fetcher:e,params:t,callback:o=()=>{},config:r,shouldCall:n=!0}){let{subscribe:i}=N0(),[a,s]=useState(!1),[l,c]=useState(n||!0),[p,u]=useState([]),[g,f]=useState(null),[y,C]=useState(!1),v=useRef(null),h=useRef(null),x=useCallback(()=>{var I;v.current&&(s(!0),(I=v.current)==null||I.call(v));},[v,a,l,c]),b=useCallback(I=>{n&&(I.data&&u(I.data),c(I.loading),C(I.hasNextPage),f(I.error),v.current=I.onNextPage,o(I));},[n,v]);useEffect(()=>{if(!n)return;let{unsubscribe:I}=i({fetcher:e,params:t,callback:b});return h.current=I,()=>{I();}},[t,n]);let M=useCallback(()=>{h.current&&h.current();let{unsubscribe:I}=i({fetcher:e,params:t,callback:b,refresh:!0});return h.current=I,()=>I()},[]);return {items:p,hasMore:y,isLoading:l,loadMore:x,error:g,loadMoreHasBeenCalled:a,refresh:M}}var pt=NG;var dl=({displayName:e,limit:t,enabled:o=!0})=>{let[r,n]=useState([]),[i,a]=useState(!1),[s,l]=useState(!1),[c,p]=useState(!1),u=useRef(null),g=useRef(null),f=()=>{u.current&&(u.current(),p(!0));};return useEffect(()=>{if(g.current&&(g.current(),g.current=null),!o)return;let y=UserRepository.searchUserByDisplayName({displayName:e,limit:t},C=>{l(C.hasNextPage||!1),a(C.loading),u.current=C.onNextPage||null,n(C.data);});return g.current=y,()=>{var C;(C=g.current)==null||C.call(g),g.current=null;}},[e,t,o]),{users:r,isLoading:i,hasMore:s,loadMore:f,loadMoreHasBeenCalled:c}};var D0=({communityId:e,displayName:t,limit:o,enabled:r=!0})=>{let[n,i]=useState([]),[a,s]=useState(!1),[l,c]=useState(!1),[p,u]=useState(!1),g=useRef(null),f=useRef(null),y=()=>{g.current&&(g.current(),u(!0));};return useEffect(()=>{if(!r)return;f.current&&(f.current(),f.current=null);let C=CommunityRepository.Membership.searchMembers({communityId:e,search:t,limit:o,sortBy:"displayName",includeDeleted:!1},v=>{c(v.hasNextPage||!1),s(v.loading),g.current=v.onNextPage||null,i(v.data);});return f.current=C,()=>{var v;(v=f.current)==null||v.call(f),f.current=null;}},[e,t,r]),{members:n,isLoading:a,hasMore:l,loadMore:y,loadMoreHasBeenCalled:p}};function OG({fetcher:e,params:t,callback:o=()=>{},options:r,shouldCall:n=!0,getSubscribedTopic:i}){let{subscribe:a}=p6(),[s,l]=useState(null),[c,p]=useState(void 0),[u,g]=useState(!1),[f,y]=useState(null),C=useRef(null),v=useCallback(h=>{n&&t!=null&&(g(h.loading),h.data&&l(h.data),p(h.origin),y(h.error),o(h));},[n,o]);return useEffect(()=>(i&&(C.current=subscribeTopic(i())),()=>{var h;(h=C.current)==null||h.call(C);}),[i]),useEffect(()=>{if(t==null||!n)return;let{unsubscribe:h}=a({fetcher:e,params:t,callback:v,options:r});return ()=>{h();}},[t,n]),{item:s,origin:c,isLoading:u||s==null&&f==null,error:f}}var kn=OG;var zG=({communityId:e,shouldCall:t=!0})=>{let n=kn({fetcher:CommunityRepository.getCommunity,params:e,shouldCall:t&&!!e}),{item:o}=n,r=P(n,["item"]);return d({community:o},r)},_t=zG;var Cr=e=>{let r=kn({fetcher:UserRepository.getUser,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return d({user:t},o)};var GG=e=>{let{data:t}=useQuery({queryKey:["asc-uikit","FileRepository","getFile",e],queryFn:()=>FileRepository.getFile(e),enabled:!!e});return t==null?void 0:t.data},Rv=GG;var it=({fileId:e,imageSize:t="medium"})=>{let o=Rv(e),[r,n]=useState(void 0);return useEffect(()=>{if(o==null||e==null){n(void 0);return}function i(){return _(this,null,function*(){if((o==null?void 0:o.fileUrl)==null)return;let a=FileRepository.fileUrlWithSize(o==null?void 0:o.fileUrl,t);n(a);})}i();},[o,t]),r};var ex={userAvatar__text:"Ya",userAvatar__placeholder__path:"Ca",userAvatar__placeholder__rect:"Sa",userAvatar__placeholder:"Aa",userAvatar__img:"Ma"};var tx=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",className:e},t),te.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#F26B1C"}),te.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),te.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"}))};function Wo({userId:e,className:t}){var n;let{user:o}=Cr(e),r=it({fileId:(n=o==null?void 0:o.avatar)==null?void 0:n.fileId});return o==null||e==null||r==null?te.createElement(tx,{className:t}):te.createElement("object",{data:r,type:"image/png",className:gr(ex.userAvatar__img,t)},te.createElement(tx,{className:t}))}var Aa={userMentionItem__item:"w",allMentionItem__item:"y",userMentionItem__avatar:"Ba",allMentionItem__atSign:"Ea",userMentionItem__displayName:"Ia",allMentionItem__displayName:"Ra"};function Da({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return te.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.userMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},te.createElement(Wo,{className:Aa.userMentionItem__avatar,userId:e.data.userId}),te.createElement("p",{className:Aa.userMentionItem__displayName},e.data.displayName))}var YG=({node:e,onIntersect:t,options:o})=>{useEffect(()=>{if(e==null)return;let r=new IntersectionObserver(n=>{var i;return ((i=n[0])==null?void 0:i.isIntersecting)&&t()},o);return r.observe(e),()=>r.disconnect()},[e,t,o]);},Bo=YG;var vZ=e=>{let[t,o]=useState(null),{community:r,isLoading:n}=_t({communityId:e}),i=useMemo(()=>!!e&&!n&&!(r!=null&&r.isPublic),[e,n,r]),{members:a,hasMore:s,isLoading:l,loadMore:c}=D0({communityId:e||"",displayName:t||"",limit:10,enabled:i}),{users:p,hasMore:u,loadMore:g,isLoading:f}=dl({displayName:t||"",limit:10,enabled:!i}),y=b=>{o(b);},C=useMemo(()=>e&&n?[]:i?a.map(({user:b,userId:M})=>({userId:(b==null?void 0:b.userId)||M,displayName:b==null?void 0:b.displayName})):p.map(({displayName:b,userId:M})=>({userId:M,displayName:b})),[p,a,i,n]),v=useMemo(()=>i?s:u,[i,s,u]),h=()=>{x||!v||(i?c():g());},x=useMemo(()=>i?l:f,[l,f,i]);return {suggestions:C,queryString:t,onQueryChange:y,loadMore:h,hasMore:v,isLoading:x}},xZ=[AutoLinkNode,LinkNode,Vi],ei=forwardRef(({pageId:e="*",componentId:t="*",elementId:o="*",communityId:r,value:n,onChange:i,maxLines:a=10,placeholder:s,mentionContainer:l,targetId:c,targetType:p},u)=>{var z;let [g,f]=useState(null);A({pageId:e,componentId:t,elementId:o});let {onQueryChange:x,suggestions:b,isLoading:M,loadMore:I,hasMore:w}=vZ(r);Bo({onIntersect:()=>{M===!1&&I();},node:g,options:{threshold:.5}});let k=te.useRef(null),S=useMedia("(min-width: 768px)"),{refs:L,floatingStyles:D}=useFloating({placement:S?"bottom-start":"bottom",middleware:[offset(({rects:V,placement:K})=>S?K.includes("top")?V.reference.height*1.1:-V.reference.height:K.includes("top")?0:-10),flip(),shift()],whileElementsMounted:autoUpdate}),H=()=>{var V;(V=k.current)==null||V.dispatchCommand(CLEAR_EDITOR_COMMAND,void 0);};useImperativeHandle(u,()=>({clearEditorState:H}));let $=useMedia("(min-width: 768px)"),B=al({namespace:"CommentInput",theme:{placeholder:Rn.editorPlaceholder,paragraph:Rn.editorParagraph,link:Rn.editorLink},nodes:xZ});return te.createElement(LexicalComposer,{initialConfig:d(d({},B),(z=n==null?void 0:n.data)!=null&&z.text?{editorState:JSON.stringify(nl(n))}:{})},te.createElement("div",{className:Rn.editorContainer,style:{"--asc-max-lines":a}},te.createElement(RichTextPlugin,{contentEditable:te.createElement(ContentEditable,{className:Rn.editorEditableContent}),placeholder:s?te.createElement("span",{className:Rn.editorPlaceholder},s):null,ErrorBoundary:LexicalErrorBoundary}),te.createElement(OnChangePlugin,{onChange:(V,K)=>{i(il(K));}}),te.createElement(HistoryPlugin,null),te.createElement(AutoFocusPlugin,null),te.createElement(ll,null),te.createElement(sl,null),te.createElement(EditorRefPlugin,{editorRef:k}),te.createElement(ClearEditorPlugin,null),te.createElement(ml,{suggestions:b,getSuggestionId:V=>V.userId,onQueryChange:x,$createNode:V=>La({text:`@${(V==null?void 0:V.displayName)||""}`,data:V}),onOpen:V=>{L.setReference({getBoundingClientRect:V.getRect});},onClose:()=>{L.setReference(null);},menuRenderFn:(V,{options:K,selectedIndex:U,setHighlightedIndex:j,selectOptionAndCleanUp:Z})=>!l||K.length===0?null:$&&V.current?(L.setReference(V.current),ox.createPortal(te.createElement("div",{ref:G=>L.setFloating(G),style:d({},D),className:Rn.commentInput__mentionMenu},te.createElement("ul",{className:Rn.commentInput__mentionMenuItem},K.map((G,Q)=>te.createElement(Da,{isSelected:U===Q,onClick:()=>{j(Q),Z(G);},onMouseEnter:()=>{j(Q);},key:G.key,option:E(d({},G),{setRefElement:T=>{Q===K.length-1&&f(T),G.setRefElement(T);}})})))),V.current)):(L.setReference(l),ox.createPortal(te.createElement("div",{ref:G=>L.setFloating(G),className:Rn.commentInput__mentionMenuMobile,style:E(d({},D),{"--asc-mention-width":`${l.offsetWidth}px`})},K.map((G,Q)=>te.createElement(Da,{isSelected:U===Q,onClick:()=>{j(Q),Z(G);},onMouseEnter:()=>{j(Q);},key:G.key,option:E(d({},G),{setRefElement:T=>{Q===K.length-1&&f(T),G.setRefElement(T);}})}))),l)),commandPriority:COMMAND_PRIORITY_HIGH})))});var MZ=30,PZ=5e4,_Z=({className:e,userToReply:t,onSubmit:o,postId:r,textValue:n,isSubmitting:i})=>{let a=Xn(r),{currentUserId:s}=X(),{info:l}=we(),c=ne(s),p=le({fileId:c==null?void 0:c.avatarFileId,imageSize:"small"}),[u,g]=useState(n),{formatMessage:f}=useIntl(),y=useRef(null),C=useRef(null);useEffect(()=>{var M;(M=C.current)==null||M.focus();},[]);let v=()=>{var M,I;if((u==null?void 0:u.text)!==""){if(u!=null&&u.mentioned&&((M=u==null?void 0:u.mentioned)==null?void 0:M.length)>MZ)return l({title:te.createElement(FormattedMessage,{id:"CommentComposeBar.unableToMention"}),content:te.createElement(FormattedMessage,{id:"CommentComposeBar.overMentionees"}),okText:te.createElement(FormattedMessage,{id:"CommentComposeBar.okText"})});if(u!=null&&u.text&&((I=u.text)==null?void 0:I.length)>PZ)return l({title:te.createElement(FormattedMessage,{id:"CommentComposeBar.unableToPost"}),content:te.createElement(FormattedMessage,{id:"CommentComposeBar.overCharacter"}),okText:te.createElement(FormattedMessage,{id:"CommentComposeBar.done"})});o==null||o((u==null?void 0:u.text)||"",u==null?void 0:u.mentionees,{mentioned:u==null?void 0:u.mentioned});}},h=(u==null?void 0:u.text)==="";t?f({id:"CommentComposeBar.replayTo"})+t:f({id:"CommentComposeBar.saySomething"});let b=f(t?{id:"reply"}:{id:"CommentComposeBar.addComment"});return a==null?null:te.createElement(Fv,{className:e,ref:y},te.createElement(Hv,{avatar:p,backgroundImage:Ne}),te.createElement(Ov,null,te.createElement(ei,{placeholder:"Add a comment...",mentionContainer:y.current,onChange:({text:M,mentioned:I,mentionees:w})=>{g({text:M,mentioned:I,mentionees:w});}})),te.createElement(Uv,{"data-qa-anchor":t?"comment-compose-bar-reply-button":"comment-compose-bar-add-comment-button",disabled:h||i,onClick:v},b))},Ha=e=>{let t=W("CommentComposerBar");return t?t(e):te.createElement(_Z,d({},e))};var ax=m.div`
|
|
734
734
|
color: ${({theme:e})=>e.palette.neutral.shade1};
|
|
735
735
|
${({theme:e})=>e.typography.body}
|
|
736
736
|
`,sx=m.div`
|
|
@@ -1786,7 +1786,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Wc]+=1);var o0=`url("data:ima
|
|
|
1786
1786
|
padding: 12px 24px;
|
|
1787
1787
|
margin-left: auto;
|
|
1788
1788
|
border-radius: 100px;
|
|
1789
|
-
`;var xK=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)o([]);else {let n=yield Promise.all(e.map(i=>new Promise(a=>{PostRepository.getPost(i,s=>{a(s.data);});})));o(n);}})}r();},[e]),t},Va=xK;var ew=({postId:e,onSave:t})=>{var w,k;let o=Xn(e),r=Va(o==null?void 0:o.children),{text:n,markup:i,mentions:a,mentionees:s,metadata:l,clearAll:c,onChange:p,queryMentionees:u}=wl({targetId:o==null?void 0:o.targetId,targetType:o==null?void 0:o.targetType,remoteText:typeof(o==null?void 0:o.data)=="string"?o==null?void 0:o.data:(w=o==null?void 0:o.data)==null?void 0:w.text,remoteMarkup:OC(typeof(o==null?void 0:o.data)=="string"?o==null?void 0:o.data:(k=o==null?void 0:o.data)==null?void 0:k.text,o==null?void 0:o.metadata)}),[g,f]=useState([]),y=useMemo(()=>r.filter(S=>!g.includes(S.postId)),[r,g]),C=S=>{f(L=>[...L,S]);},v=S=>{if(S.dataType==="file"||S.dataType==="image")return {type:S.dataType,fileId:S.data.fileId};if(S.dataType==="video")return {type:S.dataType,fileId:S.data.videoFileId.original}},h=()=>_(void 0,null,function*(){let{data:S}=yield PostRepository.updatePost(o.postId,{data:{text:n},mentionees:s,metadata:l,attachments:y.map(v).filter(Oe)});c(),t(S);}),x=(n==null?void 0:n.trim())===""&&!y.length,b=useMemo(()=>y.filter(S=>S.dataType==="file"),[y]),M=useMemo(()=>y.filter(S=>S.dataType==="image"),[y]),I=useMemo(()=>y.filter(S=>S.dataType==="video"),[y]);return {text:n,markup:i,mentions:a,post:o,childrenPosts:y,clearAll:c,onChange:p,queryMentionees:u,childVideoPosts:I,childFilePosts:b,childImagePosts:M,handleRemoveChild:C,isEmpty:x,handleSave:h,formattedAttachment:v}};var ni={editorPlaceholder:"
|
|
1789
|
+
`;var xK=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)o([]);else {let n=yield Promise.all(e.map(i=>new Promise(a=>{PostRepository.getPost(i,s=>{a(s.data);});})));o(n);}})}r();},[e]),t},Va=xK;var ew=({postId:e,onSave:t})=>{var w,k;let o=Xn(e),r=Va(o==null?void 0:o.children),{text:n,markup:i,mentions:a,mentionees:s,metadata:l,clearAll:c,onChange:p,queryMentionees:u}=wl({targetId:o==null?void 0:o.targetId,targetType:o==null?void 0:o.targetType,remoteText:typeof(o==null?void 0:o.data)=="string"?o==null?void 0:o.data:(w=o==null?void 0:o.data)==null?void 0:w.text,remoteMarkup:OC(typeof(o==null?void 0:o.data)=="string"?o==null?void 0:o.data:(k=o==null?void 0:o.data)==null?void 0:k.text,o==null?void 0:o.metadata)}),[g,f]=useState([]),y=useMemo(()=>r.filter(S=>!g.includes(S.postId)),[r,g]),C=S=>{f(L=>[...L,S]);},v=S=>{if(S.dataType==="file"||S.dataType==="image")return {type:S.dataType,fileId:S.data.fileId};if(S.dataType==="video")return {type:S.dataType,fileId:S.data.videoFileId.original}},h=()=>_(void 0,null,function*(){let{data:S}=yield PostRepository.updatePost(o.postId,{data:{text:n},mentionees:s,metadata:l,attachments:y.map(v).filter(Oe)});c(),t(S);}),x=(n==null?void 0:n.trim())===""&&!y.length,b=useMemo(()=>y.filter(S=>S.dataType==="file"),[y]),M=useMemo(()=>y.filter(S=>S.dataType==="image"),[y]),I=useMemo(()=>y.filter(S=>S.dataType==="video"),[y]);return {text:n,markup:i,mentions:a,post:o,childrenPosts:y,clearAll:c,onChange:p,queryMentionees:u,childVideoPosts:I,childFilePosts:b,childImagePosts:M,handleRemoveChild:C,isEmpty:x,handleSave:h,formattedAttachment:v}};var ni={editorPlaceholder:"Ua",editorParagraph:"Da",editorContainer:"k",editorRoot:"Fa",editorLink:"q",postTextField__mentionInterceptor:"Ha",postTextField__mentionContainerDesktop:"G",postTextField__mentionMenuItem:"La",postTextField__mentionMenu:"J",editor__content:"Ta"};var zK=e=>{let[t,o]=useState(null),{community:r,isLoading:n}=_t({communityId:e}),i=useMemo(()=>!!e&&!n&&!(r!=null&&r.isPublic),[e,n,r]),{members:a,hasMore:s,isLoading:l,loadMore:c}=D0({communityId:e||"",displayName:t||"",limit:10,enabled:i}),{users:p,hasMore:u,loadMore:g,isLoading:f}=dl({displayName:t||"",limit:10,enabled:!i}),y=b=>{o(b);},C=useMemo(()=>e&&n?[]:i?a.map(({user:b,userId:M})=>({userId:(b==null?void 0:b.userId)||M,displayName:b==null?void 0:b.displayName})):p.map(({displayName:b,userId:M})=>({userId:M,displayName:b})),[p,a,i,n]),v=useMemo(()=>i?s:u,[i,s,u]),h=()=>{x||!v||(i?c():g());},x=useMemo(()=>i?l:f,[l,f,i]);return {suggestions:C,queryString:t,onQueryChange:y,loadMore:h,hasMore:v,isLoading:x}},$K=[AutoLinkNode,LinkNode,Vi],qi=({editorRef:e,onChange:t,communityId:o,mentionContainer:r,dataValue:n,placeholder:i})=>{let[a,s]=useState(null),l=useMedia("(min-width: 768px)"),c=al({namespace:"PostTextField",theme:{link:ni.editorLink,placeholder:ni.editorPlaceholder,paragraph:ni.editorParagraph},nodes:$K}),{onQueryChange:p,suggestions:u,isLoading:g,loadMore:f}=zK(o);Bo({onIntersect:()=>{g===!1&&f();},node:a,options:{threshold:.7}});let y=useMedia("(min-width: 768px)"),{refs:C,floatingStyles:v}=useFloating({placement:y?"bottom-start":"bottom",middleware:[offset(({rects:h,placement:x})=>y?x.includes("top")?h.reference.height*1.1:-h.reference.height:0),flip(),shift()],whileElementsMounted:autoUpdate});return te.createElement(te.Fragment,null,te.createElement(LexicalComposer,{initialConfig:d(d({},c),n!=null&&n.data.text?{editorState:JSON.stringify(nl(n))}:{})},te.createElement("div",{className:ni.editorContainer},te.createElement(RichTextPlugin,{contentEditable:te.createElement(ContentEditable,{className:ni.editor__content}),placeholder:i?te.createElement("span",{className:ni.editorPlaceholder},i):null,ErrorBoundary:LexicalErrorBoundary}),te.createElement(OnChangePlugin,{onChange:(h,x)=>{t(il(x));}}),e?te.createElement(EditorRefPlugin,{editorRef:e}):null,te.createElement(ClearEditorPlugin,null),te.createElement(HistoryPlugin,null),te.createElement(ll,null),te.createElement(sl,null),te.createElement(ml,{suggestions:u,getSuggestionId:h=>h.userId,onQueryChange:p,$createNode:h=>La({text:`@${(h==null?void 0:h.displayName)||""}`,data:h}),onOpen:h=>{C.setReference({getBoundingClientRect:h.getRect});},onClose:()=>{C.setReference(null);},menuRenderFn:(h,{options:x,selectedIndex:b,setHighlightedIndex:M,selectOptionAndCleanUp:I})=>!r||x.length===0?null:l&&h.current?(C.setReference(h.current),ox.createPortal(te.createElement("div",{ref:w=>C.setFloating(w),className:ni.postTextField__mentionContainerDesktop,style:d({},v)},te.createElement("ul",{className:ni.postTextField__mentionMenuItem},x.map((w,k)=>te.createElement(Da,{isSelected:b===k,onClick:()=>{M(k),I(w);},onMouseEnter:()=>{M(k);},key:w.key,option:E(d({},w),{setRefElement:S=>{k===x.length-1&&s(S),w.setRefElement(S);}})})))),h.current)):(C.setReference(r),ox.createPortal(te.createElement("div",{ref:w=>C.setFloating(w),className:ni.postTextField__mentionMenu,style:d({},v)},x.map((w,k)=>te.createElement(Da,{isSelected:b===k,onClick:()=>{M(k),I(w);},onMouseEnter:()=>{M(k);},key:w.key,option:E(d({},w),{setRefElement:S=>{k===x.length-1&&s(S),w.setRefElement(S);}})}))),r)),commandPriority:COMMAND_PRIORITY_HIGH}))))};var QK=({postId:e,placeholder:t="What's going on...",className:o,onSave:r,onChangeText:n,hasChanged:i=!1})=>{var $,B,z,V,K;let{post:a,markup:s,onChange:l,childVideoPosts:c,childFilePosts:p,childImagePosts:u,childrenPosts:g,handleRemoveChild:f,isEmpty:y,handleSave:C,formattedAttachment:v}=ew({postId:e,onSave:r}),h=useRef(null),[x,b]=useState(null),M=useRef(null),I=ve(),[w,k]=useState(!1),[S,L]=useState({text:(B=($=a==null?void 0:a.data)==null?void 0:$.text)!=null?B:"",mentioned:((z=a==null?void 0:a.metadata)==null?void 0:z.mentioned)||[],mentionees:a==null?void 0:a.mentionees}),D=useCallback(()=>_(void 0,null,function*(){var U,j,Z;k(!0);try{let G={data:{text:S.text},metadata:{mentioned:(U=S.mentioned)!=null?U:[]},mentionees:(j=S.mentionees)!=null?j:[],attachments:g.map(T=>v(T)).filter(Oe)},{data:Q}=yield PostRepository.updatePost(a.postId,G);r&&r(Q);}catch(G){G instanceof Error&&(G.message===fo.CONTAIN_BLOCKED_WORD?I.error({content:te.createElement(FormattedMessage,{id:"notification.error.blockedWord"})}):G.message===fo.NOT_INCLUDE_WHITELIST_LINK?I.error({content:te.createElement(FormattedMessage,{id:"notification.error.whitelistLink"})}):I.error({content:((Z=G.message.split(":"))==null?void 0:Z[1])||G.message}));}finally{k(!1);}}),[S,p]),H=U=>{n(),L(j=>E(d({},j),{mentioned:U.mentioned,text:U.text,mentionees:U.mentionees}));};return useEffect(()=>{let U=new ResizeObserver(j=>{for(let Z of j)Z.target===h.current&&b(Z.contentRect.height);});return h.current&&U.observe(h.current),()=>{h.current&&U.unobserve(h.current);}},[u,c,p]),a==null?null:te.createElement(KI,{className:o},te.createElement(JI,{ref:h},te.createElement(qi,{communityId:a.targetType==="community"?a.targetId:void 0,onChange:H,mentionContainer:h.current,dataValue:{data:{text:(V=a==null?void 0:a.data)==null?void 0:V.text},metadata:{mentioned:((K=a==null?void 0:a.metadata)==null?void 0:K.mentioned)||[]},mentionees:a==null?void 0:a.mentionees}}),g?te.createElement("div",null,u.length>0&&te.createElement(dp,{data:u,dataType:"image",onRemoveChild:f}),c.length>0&&te.createElement(dp,{data:c,dataType:"video",onRemoveChild:f}),p.length>0&&te.createElement(dp,{data:p,dataType:"file",onRemoveChild:f})):null),te.createElement(XI,{ref:M,contentContainerHeight:x}),te.createElement(YI,null,te.createElement(RI,{"data-qa-anchor":"post-editor-save-button",disabled:y||!i||w,onClick:D},te.createElement(FormattedMessage,{id:"save"}))))},iw=memo(QK);var aw=m.div`
|
|
1790
1790
|
display: flex;
|
|
1791
1791
|
align-items: center;
|
|
1792
1792
|
width: 100%;
|
|
@@ -4802,7 +4802,7 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),te.cr
|
|
|
4802
4802
|
52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4
|
|
4803
4803
|
256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160
|
|
4804
4804
|
303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34
|
|
4805
|
-
0-22.58L207.6 256z`})),Nr=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="close_button",{isExcluded:a,config:s,uiReference:l,accessibilityId:c}=A({pageId:e,componentId:t,elementId:i});return a?null:te.createElement(O,{className:V8.closeButton,"data-qa-anchor":c,onPress:o},te.createElement(oe,{defaultIcon:()=>te.createElement(Gie,{className:gr(V8.closeButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:l,className:n}),configIconName:s.icon}))};var B3={bottomSheet__container:"Za",bottomSheet__header:"_a",bottomSheet__content:"eo",bottomSheet__backdrop:"ro"};var Er=r=>{var n=r,{children:e,headerTitle:t}=n,o=P(n,["children","headerTitle"]);return te.createElement(C1,d({},o),te.createElement(C1.Container,{className:B3.bottomSheet__container},te.createElement(C1.Header,null,te.createElement(C1.Header,null),t&&te.createElement(C1.Header,{className:B3.bottomSheet__header},te.createElement(N.Title,null,t))),te.createElement(C1.Content,{className:B3.bottomSheet__content},e)),te.createElement(C1.Backdrop,{onTap:o.onClose}))};var j8={avatarContainer:"P",avatarImage:"ao"};var bt=({avatarUrl:e,defaultImage:t,onClick:o})=>te.createElement("div",{className:j8.avatarContainer,"data-clickable":!!o,onClick:o},e?te.createElement("img",{className:j8.avatarImage,src:e,alt:"Avatar"}):t);var kd={button:"oo",disabled:"m",primary:"Q",secondary:"W",ghost:"Z",small:"to",medium:"io",large:"lo",icon:"so"};var Jie=a=>{var s=a,{children:e,variant:t="primary",size:o="medium",icon:r,className:n}=s,i=P(s,["children","variant","size","icon","className"]);let l=gr(kd.button,kd[t],kd[o],n);return te.createElement("button",d({className:l},i),r&&te.createElement("span",{className:kd.icon},r),e)},L3=Jie;var tE={cancelButton:"co"};var A3=({pageId:e="*",componentId:t="*",onPress:o=()=>{}})=>{let r="cancel_button",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:te.createElement(O,{"data-qa-anchor":n,className:tE.cancelButton,style:s,onPress:o},te.createElement(N.Body,null,i.text))};var D3={createStoryButton:"no",createStoryButton__text:"do",createStoryButton__icon:"mo"};var eae=e=>te.createElement("svg",d({width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.771159 12.2248C1.00906 12.7861 1.30474 13.3088 1.65819 13.7927C1.85468 14.0618 2.2428 14.0749 2.47778 13.8387L2.85238 13.4622C3.05585 13.2578 3.07242 12.9352 2.91359 12.6944C2.68511 12.3479 2.4918 11.9785 2.33366 11.5862C2.17162 11.1841 2.04651 10.7654 1.95831 10.33C1.90156 10.0497 1.66209 9.83785 1.37619 9.83785H0.7981C0.460143 9.83785 0.194237 10.1301 0.252477 10.463C0.359316 11.0737 0.53221 11.661 0.771159 12.2248ZM0.791992 5.77587C0.565717 6.33406 0.392758 6.91522 0.273115 7.51935C0.206005 7.85821 0.473794 8.1628 0.819238 8.1628H1.37619C1.66209 8.1628 1.90156 7.95091 1.95831 7.6707C2.04651 7.23526 2.17162 6.81652 2.33366 6.41448C2.4918 6.0221 2.68511 5.6527 2.91359 5.30628C3.07242 5.06546 3.05585 4.7429 2.85238 4.53841L2.47778 4.16192C2.2428 3.92576 1.85456 3.93884 1.65906 4.2086C1.30847 4.69235 1.01944 5.21477 0.791992 5.77587ZM5.26074 16.7265C5.81526 16.966 6.39491 17.1396 6.9997 17.247C7.33267 17.3061 7.62533 17.0401 7.62533 16.7019V16.1571C7.62533 15.8715 7.41372 15.6325 7.13436 15.5731C6.70488 15.4817 6.29562 15.3497 5.90658 15.177C5.52127 15.0061 5.14859 14.8025 4.78852 14.5662C4.5475 14.4081 4.22544 14.4327 4.02574 14.6406L3.64108 15.041C3.40868 15.2829 3.43286 15.6735 3.7084 15.8649C4.19354 16.2017 4.71098 16.4889 5.26074 16.7265ZM3.71752 2.12947C3.43846 2.32272 3.41731 2.71924 3.65673 2.95986L4.05715 3.36229C4.26214 3.56831 4.58771 3.58533 4.82847 3.42255C5.1704 3.19137 5.53324 2.99173 5.91699 2.82361C6.3137 2.64981 6.73277 2.5172 7.17418 2.42577C7.45449 2.3677 7.66699 2.12833 7.66699 1.84207V1.29669C7.66699 0.959243 7.37557 0.693429 7.04294 0.750218C6.41529 0.857371 5.82122 1.03203 5.26074 1.27419C4.71443 1.51024 4.20002 1.79533 3.71752 2.12947ZM9.82271 15.5735C9.54395 15.6315 9.33366 15.8703 9.33366 16.155V16.6953C9.33366 17.0359 9.63023 17.3024 9.96541 17.2422C11.8264 16.908 13.4005 16.0311 14.6878 14.6117C16.1184 13.0344 16.8337 11.1639 16.8337 9.00033C16.8337 6.83673 16.1184 4.96627 14.6878 3.38894C13.4005 1.96952 11.8264 1.09268 9.96541 0.758409C9.63023 0.698204 9.33366 0.964784 9.33366 1.30532V1.84562C9.33366 2.13035 9.54395 2.36916 9.82271 2.42716C11.2862 2.73166 12.5155 3.45008 13.5107 4.5824C14.6149 5.83868 15.167 7.31132 15.167 9.00033C15.167 10.6893 14.6149 12.162 13.5107 13.4182C12.5155 14.5506 11.2862 15.269 9.82271 15.5735Z"}),te.createElement("path",{d:"M12.7189 8.47933C12.9012 8.47933 13.0835 8.66162 13.0835 8.84391V9.57308C13.0835 9.77816 12.9012 9.93766 12.7189 9.93766H9.43766V13.2189C9.43766 13.424 9.25537 13.5835 9.07308 13.5835H8.34391C8.13883 13.5835 7.97933 13.424 7.97933 13.2189V9.93766H4.69808C4.493 9.93766 4.3335 9.77816 4.3335 9.57308V8.84391C4.3335 8.66162 4.493 8.47933 4.69808 8.47933H7.97933V5.19808C7.97933 5.01579 8.13883 4.8335 8.34391 4.8335H9.07308C9.25537 4.8335 9.43766 5.01579 9.43766 5.19808V8.47933H12.7189Z"}));function H3({pageId:e="*",componentId:t="*",onClick:o,defaultClassName:r}){let n="create_story_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(O,{className:D3.createStoryButton,"data-qa-anchor":i,style:p,onPress:()=>o==null?void 0:o()},te.createElement(oe,{defaultIcon:()=>te.createElement(eae,{className:gr(D3.createStoryButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:a.image,alt:c}),configIconName:a.image,defaultIconName:s.image}),te.createElement(N.Body,{className:D3.createStoryButton__text},a.text))}var G8={hyperLinkButton:"po"};var rae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"currentColor",d:"M18.04 14.21c1.792 1.794 1.898 4.677.316 6.575-.212.281-.07.14-2.954 3.024-1.933 1.933-5.062 1.933-6.96 0-1.934-1.899-1.934-5.028 0-6.961l2.214-2.215c.246-.246.703-.07.703.281.036.387.106.984.176 1.336.035.14 0 .281-.105.387l-1.617 1.617a2.95 2.95 0 000 4.183 2.95 2.95 0 004.183 0l2.637-2.636a2.95 2.95 0 000-4.184c-.176-.21-.563-.457-.809-.562-.14-.106-.246-.282-.21-.457.034-.387.21-.774.527-1.055l.14-.14a.435.435 0 01.492-.106c.457.246.88.527 1.266.914zm5.483-5.483c1.934 1.898 1.934 5.027 0 6.96l-2.214 2.215c-.247.246-.704.07-.704-.28a15.366 15.366 0 00-.175-1.337.397.397 0 01.105-.387l1.617-1.617a2.95 2.95 0 000-4.183 2.95 2.95 0 00-4.183 0l-2.637 2.636a2.95 2.95 0 000 4.184c.176.21.563.457.809.563.14.105.246.28.21.456a1.607 1.607 0 01-.527 1.055l-.14.14a.435.435 0 01-.493.106 5.265 5.265 0 01-1.265-.914c-1.793-1.793-1.899-4.676-.317-6.574.211-.281.07-.14 2.954-3.023 1.933-1.934 5.062-1.934 6.96 0z"})),F3=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n=()=>{}})=>{let i="story_hyperlink_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{className:G8.hyperLinkButton,onPress:n,"data-qa-anchor":a},te.createElement(oe,{defaultIcon:()=>te.createElement(rae,{className:gr(G8.hyperLinkButton,o)}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var rE={impressionButton:"go"};var aae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),te.createElement("path",{fill:"#A5A9B5",d:"M10 6.5c1.938 0 3.5 1.594 3.5 3.5 0 1.938-1.563 3.5-3.5 3.5A3.494 3.494 0 016.5 10c0-.281.063-.688.156-.969.188.125.594.219.844.219.938 0 1.75-.781 1.75-1.75-.031-.219-.125-.625-.25-.844.281-.062.719-.125 1-.156zm8.875 3.063a1.142 1.142 0 010 .906C17.187 13.78 13.812 16 10 16c-3.844 0-7.219-2.219-8.906-5.531a1.142 1.142 0 010-.906C2.78 6.25 6.156 4 10 4c3.813 0 7.188 2.25 8.875 5.563zM10 14.5c3.063 0 5.906-1.719 7.406-4.5-1.5-2.781-4.343-4.5-7.406-4.5-3.094 0-5.938 1.719-7.438 4.5 1.5 2.781 4.344 4.5 7.438 4.5z"}));function O3({pageId:e="*",componentId:t="*",reach:o=0,defaultIconClassName:r,imgIconClassName:n}){let i="story_impression_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(oe,{defaultIcon:()=>te.createElement("div",{className:gr(rE.impressionButton,r),"data-qa-anchor":a},te.createElement(aae,null),te.createElement(N.BodyBold,null,o)),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:n}),defaultIconName:l.icon,configIconName:s.icon})}var nE={overflowMenuButton:"ho"};var lae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),te.createElement("path",{fill:"#fff",d:"M13.688 12.25c0 .95-.774 1.688-1.688 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688a1.71 1.71 0 011.688 1.688zm4.218-1.688c.914 0 1.688.774 1.688 1.688 0 .95-.774 1.688-1.688 1.688-.949 0-1.687-.739-1.687-1.688 0-.914.738-1.688 1.687-1.688zm-11.812 0c.914 0 1.687.774 1.687 1.688 0 .95-.773 1.688-1.687 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688z"})),U3=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="overflow_menu",{config:a,defaultConfig:s,uiReference:l,themeStyles:c,accessibilityId:p}=A({pageId:e,componentId:t,elementId:i});return te.createElement(O,{style:c,"data-qa-anchor":p,className:nE.overflowMenuButton,onPress:o},te.createElement(oe,{defaultIcon:()=>te.createElement(lae,{className:r}),imgIcon:()=>te.createElement("img",{src:a.icon,alt:l,className:n}),defaultIconName:s.icon,configIconName:a.icon}))};var mae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{clipPath:"url(#clip0_1709_7904)"},te.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),te.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),te.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_7904"},te.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},iE=mae;var dae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),te.createElement("g",{clipPath:"url(#clip0_1709_7888)"},te.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),te.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),te.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),te.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),te.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#FFF09F"}),te.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),te.createElement("clipPath",{id:"clip0_1709_7888"},te.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},aE=dae;var cae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},te.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),te.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),te.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),te.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),te.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_1751"},te.createElement("rect",{width:"32",height:"32",fill:"white"}))))},sE=cae;var pae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),te.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#63A1FF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},z3=pae;var uae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions"},te.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),te.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#EE5C91"}),te.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},lE=uae;var ma={reactButton:"_",reactButton__icon:"ee",reactButton__reactionsText:"re",reactButton__panel:"fo",reactButton__panel__reaction:"r",reactButton__panel__reaction__text:"j","reaction-scale":"ae","reaction-click":"oe"};var hae=e=>te.createElement("svg",d({width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M15.9727 9.6543C16.1055 10.418 16.0059 11.1484 15.6738 11.7461C15.7734 12.543 15.541 13.373 15.0762 13.9707C15.043 15.8301 13.9141 17.125 11.3574 17.125C11.125 17.125 10.8594 17.125 10.5938 17.125C7.20703 17.125 6.17773 15.8633 4.68359 15.8301C4.58398 16.2617 4.15234 16.5938 3.6875 16.5938H1.5625C0.964844 16.5938 0.5 16.1289 0.5 15.5312V7.5625C0.5 6.99805 0.964844 6.5 1.5625 6.5H4.81641C5.44727 5.96875 6.34375 4.50781 7.10742 3.74414C7.57227 3.2793 7.43945 0.125 9.49805 0.125C11.3906 0.125 12.6523 1.1875 12.6523 3.61133C12.6523 4.24219 12.5195 4.74023 12.3535 5.17188H13.582C15.1758 5.17188 16.4375 6.5332 16.4375 7.99414C16.4375 8.625 16.2715 9.15625 15.9727 9.6543ZM13.9141 11.4473C14.6445 10.7832 14.5449 9.75391 14.0801 9.25586C14.4121 9.25586 14.8438 8.625 14.8438 8.02734C14.8105 7.39648 14.2793 6.76562 13.582 6.76562H10.1289C10.1289 5.50391 11.0586 4.90625 11.0586 3.61133C11.0586 2.81445 11.0586 1.71875 9.49805 1.71875C8.86719 2.34961 9.16602 3.94336 8.23633 4.87305C7.33984 5.76953 6.04492 8.09375 5.08203 8.09375H4.75V14.3027C6.50977 14.3027 8.07031 15.5312 10.4277 15.5312H11.6895C12.8516 15.5312 13.7148 14.9668 13.4492 13.373C13.9473 13.0742 14.3457 12.1445 13.9141 11.4473ZM3.42188 14.4688C3.42188 14.0371 3.05664 13.6719 2.625 13.6719C2.16016 13.6719 1.82812 14.0371 1.82812 14.4688C1.82812 14.9336 2.16016 15.2656 2.625 15.2656C3.05664 15.2656 3.42188 14.9336 3.42188 14.4688Z"}));function $3({pageId:e="*",componentId:t="*",myReaction:o,reactionsCount:r,defaultIconClassName:n,imgIconClassName:i,onReactionClick:a}){let s="reaction_button",{isExcluded:l,accessibilityId:c,config:p,defaultConfig:u,uiReference:g,themeStyles:f}=A({pageId:e,componentId:t,elementId:s}),y=o!=null;if(l)return null;let C=()=>{switch(o){case"like":return te.createElement(z3,{className:ma.reactButton__icon});case"love":return te.createElement(lE,{className:ma.reactButton__icon});case"fire":return te.createElement(aE,{className:ma.reactButton__icon});case"happy":return te.createElement(sE,{className:ma.reactButton__icon});case"crying":return te.createElement(iE,{className:ma.reactButton__icon});default:return null}};return te.createElement(O,{style:f,"data-qa-anchor":c,className:ma.reactButton,onPress:()=>{a("like");}},o?C():te.createElement(oe,{defaultIcon:()=>te.createElement(hae,{className:gr(ma.reactButton__icon,n),"data-has-my-reaction":"false"}),imgIcon:()=>te.createElement("img",{src:p.icon,alt:g,className:i}),defaultIconName:u.icon,configIconName:p.icon}),te.createElement(N.BodyBold,{className:ma.reactButton__reactionsText,"data-has-my-reaction":y},typeof r=="number"?lb(r):o||p.text))}var mE={saveButton:"te"};function I1({pageId:e="*",componentId:t="*",onPress:o,className:r}){let n="save_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:te.createElement(O,{className:gr(mE.saveButton,r),"data-qa-anchor":i,style:E(d({},l),{backgroundColor:a.background_color}),onPress:o},a.save_button_text)}var dE={shareStoryButton:"ie",shareStoryIcon:"bo"};var Sd={communityAvatar__text:"uo",communityAvatar__placeholder__path:"vo",communityAvatar__placeholder__rect:"xo",communityAvatar__placeholder:"wo",communityAvatar__image:"yo"};var cE=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",className:Sd.communityAvatar__placeholder},e),te.createElement("rect",{width:"64",height:"64",rx:"32",className:Sd.communityAvatar__placeholder__rect}),te.createElement("path",{d:"M31.7539 19.2C33.2201 19.2 34.6262 19.7696 35.6629 20.7836C36.6997 21.7976 37.2821 23.1728 37.2821 24.6068C37.2821 26.0408 36.6997 27.4161 35.6629 28.4301C34.6262 29.4441 33.2201 30.0137 31.7539 30.0137C30.2877 30.0137 28.8816 29.4441 27.8449 28.4301C26.8081 27.4161 26.2257 26.0408 26.2257 24.6068C26.2257 23.1728 26.8081 21.7976 27.8449 20.7836C28.8816 19.7696 30.2877 19.2 31.7539 19.2ZM20.6975 23.062C21.582 23.062 22.4033 23.2937 23.1141 23.7108C22.8772 25.92 23.5406 28.1136 24.8989 29.8284C24.1092 31.3114 22.5297 32.331 20.6975 32.331C19.4408 32.331 18.2355 31.8427 17.3469 30.9736C16.4583 30.1044 15.959 28.9256 15.959 27.6965C15.959 26.4674 16.4583 25.2886 17.3469 24.4194C18.2355 23.5503 19.4408 23.062 20.6975 23.062ZM42.8103 23.062C44.067 23.062 45.2723 23.5503 46.1609 24.4194C47.0495 25.2886 47.5488 26.4674 47.5488 27.6965C47.5488 28.9256 47.0495 30.1044 46.1609 30.9736C45.2723 31.8427 44.067 32.331 42.8103 32.331C40.9781 32.331 39.3986 31.3114 38.6089 29.8284C39.9672 28.1136 40.6306 25.92 40.3937 23.7108C41.1045 23.2937 41.9258 23.062 42.8103 23.062ZM21.4872 38.8965C21.4872 35.6987 26.0835 33.1034 31.7539 33.1034C37.4243 33.1034 42.0206 35.6987 42.0206 38.8965V41.5999H21.4872V38.8965ZM12.8 41.5999V39.2827C12.8 37.1354 15.7853 35.3279 19.8288 34.8027C18.8969 35.8532 18.3283 37.3053 18.3283 38.8965V41.5999H12.8ZM50.7077 41.5999H45.1795V38.8965C45.1795 37.3053 44.6109 35.8532 43.679 34.8027C47.7225 35.3279 50.7077 37.1354 50.7077 39.2827V41.5999Z",className:Sd.communityAvatar__placeholder__path}));function Zr({pageId:e="*",componentId:t="*",community:o}){let r="community_avatar",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=le({fileId:o==null?void 0:o.avatarFileId});return i?null:s==null?te.createElement(cE,{style:a}):te.createElement("object",{data:s,type:"image/png",className:Sd.communityAvatar__image,"data-qa-anchor":n,style:a},te.createElement(cE,null))}var Mae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"14",fill:"none",viewBox:"0 0 15 14"},e),te.createElement("path",{fill:"currentColor",d:"M6.813.219c.125-.157.375-.157.53 0l6.532 6.531a.36.36 0 010 .531l-6.531 6.532c-.157.156-.407.156-.532 0l-.625-.594c-.156-.156-.156-.406 0-.531l4.844-4.876H.375A.361.361 0 010 7.438v-.875a.38.38 0 01.375-.375h10.656L6.187 1.345c-.156-.125-.156-.375 0-.532L6.813.22z"})),V3=({pageId:e="*",componentId:t="*",community:o,onClick:r})=>{let n="share_story_button",{config:i,isExcluded:a}=A({pageId:e,componentId:t,elementId:n});return a?null:te.createElement("button",{role:"button",className:gr(dE.shareStoryButton),"data-qa-anchor":"share_story_button",onClick:r,"data-hideAvatar":i==null?void 0:i.hide_avatar},!(i!=null&&i.hide_avatar)&&te.createElement(Zr,{pageId:e,componentId:t,community:o}),te.createElement(N.BodyBold,null,(i==null?void 0:i.text)||"Share story"),te.createElement(Mae,null))};var j3={speakerButton:"ko",speakerButton__icon:"jo"};var _ae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"#fff",d:"M15.121 9.781c.527-.527 1.441-.176 1.441.598v11.777c0 .774-.914 1.125-1.44.598l-3.13-3.129H8.406c-.492 0-.844-.352-.844-.844V13.72c0-.457.352-.844.844-.844h3.586l3.13-3.094zm9.316 6.469c0 2.25-1.16 4.29-3.023 5.52-.422.246-.95.105-1.16-.282a.845.845 0 01.246-1.16 4.807 4.807 0 002.25-4.078 4.792 4.792 0 00-2.25-4.043.845.845 0 01-.246-1.16.824.824 0 011.16-.281c1.863 1.23 3.023 3.27 3.023 5.484zm-4.992-2.672c.985.527 1.617 1.582 1.617 2.672 0 1.125-.632 2.18-1.617 2.707-.422.246-.914.105-1.16-.316a.869.869 0 01.352-1.16c.422-.247.738-.704.738-1.231 0-.492-.316-.95-.738-1.195a.87.87 0 01-.352-1.16c.246-.422.738-.563 1.16-.317z"})),Tae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"#fff",d:"M25.781 22.344a.467.467 0 01.094.687l-.594.782c-.187.218-.5.28-.718.093L6.188 9.688A.468.468 0 016.093 9l.625-.781a.468.468 0 01.687-.094l4.75 3.656 1.563-1.531c.469-.469 1.281-.156 1.281.531v3.188l2.469 1.937a1.234 1.234 0 00-.625-.969.773.773 0 01-.313-1.03c.219-.376.657-.5 1.032-.282A2.739 2.739 0 0119 16c0 .344-.094.625-.188.938l1.22.937c.28-.563.468-1.188.468-1.875a4.26 4.26 0 00-2-3.594.75.75 0 01-.219-1.031c.219-.344.688-.469 1.032-.25C20.968 12.188 22 14.031 22 16a5.727 5.727 0 01-.75 2.813l1.188.937c.656-1.125 1.03-2.406 1.03-3.719 0-2.468-1.218-4.781-3.312-6.125-.343-.219-.437-.687-.218-1.062A.795.795 0 0121 8.625c2.5 1.656 4 4.406 4 7.375 0 1.688-.5 3.281-1.375 4.656l2.156 1.688zM7 13.75c0-.25.125-.469.344-.625L15 19.031v2.219c0 .688-.813 1-1.281.531L10.938 19H7.75a.722.722 0 01-.75-.75v-4.5z"}));function G3({isMuted:e,pageId:t="*",componentId:o="*",defaultIconClassName:r,imgIconClassName:n,onPress:i}){let a="speaker_button",{accessibilityId:s,config:l,defaultConfig:c,isExcluded:p,uiReference:u}=A({pageId:t,componentId:o,elementId:a});return p?null:te.createElement(O,{className:gr(j3.speakerButton),onPress:i},te.createElement(oe,{"data-qa-anchor":s,defaultIcon:()=>e?te.createElement(Tae,{className:j3.speakerButton__icon}):te.createElement(_ae,{className:j3.speakerButton__icon}),imgIcon:()=>te.createElement("img",{src:l.icon,alt:u,className:gr(n)}),defaultIconName:c.icon,configIconName:l.icon}))}var Nd={hyperlink:"zo",hyperlinkIcon:"Xo",hyperlinkText:"Yo",text:"Co"};var vi=r=>{var n=r,{href:e,children:t}=n,o=P(n,["href","children"]);return te.createElement("a",d({href:e,className:Nd.hyperlink},o),te.createElement(Md,{className:Nd.hyperlinkIcon}),te.createElement("div",{className:Nd.hyperlinkText},te.createElement("span",{className:Nd.text},t)))};var uE={editCancelButton:"Ao"};var ms=({pageId:e="*",componentId:t="*",className:o,onPress:r=()=>{}})=>{let n="edit_cancel_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:te.createElement(O,{"data-qa-anchor":i,className:gr(uE.editCancelButton,o),style:E(d({},l),{backgroundColor:a.background_color}),onPress:r},te.createElement(N.Body,null,a.cancel_button_text))};var Eae=e=>te.createElement("svg",d({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),te.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),te.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"})),ds=Eae;var Qr={commentComposer:"Mo",commentComposer__top:"So",commentComposer__mentionContainer:"Eo",commentComposer__container:"Io",commentComposer__avatar:"Ro",commentComposer__button:"z",commentComposer__input:"Uo",commentComposer__replyContainer:"Bo",commentComposer__replyContainer__text:"Do",commentComposer__replyContainer__username:"Fo",commentComposer__replyContainer__closeButton:"Ho",commentComposer__disableContainer:"Lo"};var Dae=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},te.createElement("path",{fill:"currentColor",d:"M15.5 8c.813 0 1.5.688 1.5 1.5v7a1.5 1.5 0 01-1.5 1.5h-11A1.48 1.48 0 013 16.5v-7A1.5 1.5 0 014.5 8h1V6.5C5.5 4.031 7.5 2 10 2c2.5.031 4.5 2.063 4.5 4.563V8h1zM7 6.5V8h6V6.5c0-1.625-1.375-3-3-3-1.656 0-3 1.375-3 3zm8.5 10v-7h-11v7h11z"})),Ed=({referenceId:e,referenceType:t,replyTo:o,onCancelReply:r,shouldAllowCreation:n=!0,community:i})=>{var h,x;let a=De().currentUserId,{user:s}=Cr(a),l=it({fileId:(h=s==null?void 0:s.avatar)==null?void 0:h.fileId,imageSize:"small"}),c=useRef(null),p=useRef(null),u=useRef(null),[g,f]=useState(0),[y,C]=useState({data:{text:""},mentionees:[{type:"user",userIds:[""]}],metadata:{}}),{mutateAsync:v}=useMutation({mutationFn:M=>_(void 0,[M],function*({params:b}){let I=o?o.commentId:void 0;yield CommentRepository.createComment(E(d({referenceId:o?o.referenceId:e,referenceType:t,parentId:I},b),{mentionees:b.mentionees}));}),onError:b=>{},onSuccess:()=>{var b;C({data:{text:""},mentionees:[],metadata:{}}),(b=c.current)==null||b.clearEditorState(),r();}});return n?te.createElement("div",{className:Qr.commentComposer},te.createElement("div",{className:Qr.commentComposer__top},te.createElement("div",{className:Qr.commentComposer__mentionContainer,ref:u}),o&&te.createElement("div",{className:Qr.commentComposer__replyContainer,style:{"--asc-reply-container-offset-bottom":`${g}px`}},te.createElement("div",{className:Qr.commentComposer__replyContainer__text},te.createElement("span",null,"Replying to "),te.createElement("span",{className:Qr.commentComposer__replyContainer__username},o==null?void 0:o.userId)),te.createElement(R1,{onClick:r,className:Qr.commentComposer__replyContainer__closeButton}))),te.createElement("div",{className:Qr.commentComposer__container},te.createElement("div",{className:Qr.commentComposer__avatar},te.createElement(bt,{avatarUrl:l,defaultImage:te.createElement(ds,null)})),te.createElement("div",{className:Qr.commentComposer__input,ref:p},te.createElement(ei,{ref:c,mentionContainer:u==null?void 0:u.current,onChange:({text:b,mentioned:M,mentionees:I})=>{C({data:{text:b},mentionees:I,metadata:{mentioned:M}});},targetType:t,targetId:e,value:y,placeholder:"Say something nice...",communityId:i==null?void 0:i.communityId})),te.createElement(O,{isDisabled:!((x=y==null?void 0:y.data)!=null&&x.text),className:Qr.commentComposer__button,onPress:()=>v({params:y})},te.createElement(N.Body,null,"Post")))):te.createElement("div",{className:Qr.commentComposer__disableContainer},te.createElement(Dae,null),te.createElement(N.Body,null,"Comments are disabled for this story"))};var W3={moderatorBadge:"To",moderatorBadge__icon:"Vo",moderatorBadge__text:"qo"};var Fae=e=>te.createElement("svg",d({width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M7.57031 1.3125C7.85156 1.4375 8.03906 1.70312 8.03906 2C8.03906 5.46875 5.91406 7.39062 4.57031 7.95312C4.38281 8.03125 4.17969 8.03125 3.99219 7.95312C2.32031 7.25 0.539062 5.10938 0.539062 2C0.539062 1.70312 0.710938 1.4375 0.992188 1.3125L3.99219 0.0625C4.07031 0.03125 4.19531 0.015625 4.28906 0.015625C4.36719 0.015625 4.49219 0.03125 4.57031 0.0625L7.57031 1.3125ZM6.83594 3.09375C6.92969 3 6.92969 2.84375 6.83594 2.75L6.47656 2.39062C6.38281 2.29688 6.22656 2.29688 6.13281 2.39062L3.78906 4.73438L2.67969 3.64062C2.58594 3.54688 2.42969 3.54688 2.33594 3.64062L1.97656 4C1.88281 4.09375 1.88281 4.25 1.97656 4.34375L3.60156 5.96875C3.69531 6.07812 3.86719 6.07812 3.96094 5.96875L6.83594 3.09375Z"}));function w1({pageId:e="*",componentId:t="*"}){let o="moderator_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement("div",{className:W3.moderatorBadge,style:l,"data-qa-anchor":r},te.createElement(Fae,{className:W3.moderatorBadge__icon}),te.createElement("div",{className:W3.moderatorBadge__text},n.text))}var yE={timestamp:"Go"};un.extend($ae);un.extend(zae);un.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"Just now",m:"1m",mm:"%dm",h:"1h",hh:"%dh",d:"1d",dd:"%dd",M:function(e,t,o,r){if(r)return e+"M";let n=un().subtract(e,"M"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},MM:function(e,t,o,r){if(r)return e+"M";let n=un().subtract(e,"M"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},y:function(e,t,o,r){if(r)return e+"y";let n=un().subtract(e,"y"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},yy:function(e,t,o,r){if(r)return e+"y";let n=un().subtract(e,"y"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")}}});function M1({pageId:e="*",componentId:t="*",timestamp:o}){let r="timestamp",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=un(o).fromNow();return i?null:te.createElement(N.Caption,{className:yE.timestamp,style:a,"data-qa-anchor":n},s)}var Xe={postComment:"Jo",postComment__deleteComment_container:"Ko",postComment__deleteComment_icon:"No",postComment__deleteComment_text:"Oo",postComment__avatar:"Po",postComment__details:"Qo",postComment__content:"Wo",postComment__content__username:"Zo",postComment__content__text:"_o",postComment__secondRow:"et",postComment__secondRow__leftPane:"rt",postComment__secondRow__timestamp:"at",postComment__secondRow__rightPane:"ot",postComment__secondRow__rightPane__like:"tt",postComment__secondRow__like:"le",postComment__secondRow__reply:"it",postComment__secondRow__actionButton:"lt",postComment__viewReply_button:"st",postComment__viewReply_icon:"ct",postComment__viewReply_text:"nt",postComment__edit:"dt",postComment__edit__inputWrap:"mt",postComment__edit__mentionContainer:"pt",postComment__edit__input:"gt",postComment__edit__buttonWrap:"ht",postComment__edit__button:"ft",postComment__edit__cancelButton:"bt",postComment__edit__saveButton:"ut",postComment__seeMore:"vt"};var jae=e=>te.createElement("svg",d({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M13.824 9.72708L10.6334 12.8479C10.3988 13.0544 10.0469 13.0544 9.83578 12.8249L9.31965 12.3201C9.08504 12.1136 9.08504 11.7464 9.31965 11.5399L10.7507 10.2549H2.56305C2.2346 10.2549 2 10.0024 2 9.70413V5.56C2 5.25072 2.25072 5 2.56 5L3.31683 5C3.62611 5.00001 3.87683 5.25073 3.87683 5.56V8.4191H10.7507L9.31965 7.11113C9.08504 6.9046 9.08504 6.53745 9.31965 6.33093L9.83578 5.8261C10.0469 5.59663 10.3988 5.59663 10.6334 5.80315L13.824 8.92393C14.0587 9.1534 14.0587 9.49761 13.824 9.72708Z",fill:"currentColor"})),q3=jae;var zn={postCommentSkeleton__container:"xt",postCommentSkeleton:"wt",postCommentSkeleton__avatar:"yt",postCommentSkeleton__details:"kt",postCommentSkeleton__content:"jt",postCommentSkeleton__content__bar:"zt",postCommentSkeleton__animation:"Xt","skeleton-pulse":"se"};var J3=({pageId:e="*",componentId:t="*",numberOfSkeletons:o=1})=>{let{accessibilityId:r,isExcluded:n,themeStyles:i}=re({pageId:e,componentId:t});if(n)return null;let a=Array.from({length:o},(s,l)=>te.createElement("div",{key:l,"data-qa-anchor":r,className:gr(zn.postCommentSkeleton,zn.postCommentSkeleton__animation),style:i},te.createElement("div",{className:gr(zn.postCommentSkeleton__avatar,zn.postCommentSkeleton__animation)}),te.createElement("div",{className:gr(zn.postCommentSkeleton__details,zn.postCommentSkeleton__animation)},te.createElement("div",{className:gr(zn.postCommentSkeleton__content,zn.postCommentSkeleton__animation)}),te.createElement("div",{className:zn.postCommentSkeleton__content__bar}))));return te.createElement("div",{className:zn.postCommentSkeleton__container},a)};function Q8({parentId:e,referenceId:t,referenceType:o,limit:r=10,shouldCall:n=!0,includeDeleted:i=!1}){let l=pt({fetcher:CommentRepository.getComments,params:{parentId:e,referenceId:t,referenceType:o,limit:r,includeDeleted:i},shouldCall:!!t&&!!o&&n}),{items:a}=l,s=P(l,["items"]);return d({comments:a},s)}function Ld({commentId:e,shouldSubscribe:t=!0,callback:o}){return oa({fetcher:CommentRepository.getComment,params:e,callback:o,shouldSubscribe:!!e&&t,getSubscribedTopic:({data:r})=>getCommentTopic(r)})}var $n="like";var xi={textWithMention__container:"Yt",textWithMention__clamp:"ce",textWithMention__paragraph:"Ct",textWithMention__fullContent:"ne",textWithMention__mention:"At",textWithMention__text:"Mt",textWithMention__link:"St",textWithMention__showMoreLess:"Et"};var Nm=({maxLines:e=8,data:t,mentionees:o,metadata:r})=>{let[n,i]=useState(!1),[a,s]=useState(!1),[l,c]=useState(!1),p=useRef(null),{goToUserProfilePage:u}=Be(),g=useMemo(()=>nl({data:t,mentionees:o,metadata:r}),[t,o,r]);useEffect(()=>{var h;let y=((h=p.current)==null?void 0:h.clientHeight)||0,C=parseInt(window.getComputedStyle(document.body).getPropertyValue("font-size"),10),v=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--asc-line-height-md"))*C;y>v*e&&s(!0),c(!0);},[]);let f=(y,C)=>y.children.map(v=>{var h;return I6(v)?te.createElement(O,{key:v.data.userId,className:gr(C,xi.textWithMention__mention),onPress:()=>u(v.data.userId)},v.text):w6(v)||M6(v)?te.createElement("a",{key:v.url,href:v.url,className:gr(C,xi.textWithMention__link)},E2(v.children[0])?(h=v.children[0])==null?void 0:h.text:v.url):E2(v)?te.createElement("span",{className:gr(C,xi.textWithMention__text)},v.text):null});return te.createElement("div",{className:xi.textWithMention__container},te.createElement("div",{ref:p,className:xi.textWithMention__fullContent,"data-hidden":l},g.root.children.map(y=>te.createElement("p",{className:xi.textWithMention__paragraph},y.children.length>0?te.createElement(N.Body,{renderer:({typoClassName:C})=>te.createElement(te.Fragment,null,f(y,C))}):te.createElement("br",null)))),te.createElement("div",{"data-expanded":n,className:xi.textWithMention__clamp,style:{"--asc-text-with-mention-max-lines":e}},a&&!n&&te.createElement("div",{onClick:()=>i(!0),className:xi.textWithMention__showMoreLess},te.createElement(N.Body,null,"...See more")),g.root.children.map((y,C)=>te.createElement("p",{className:xi.textWithMention__paragraph},y.children.length>0?te.createElement(N.Body,{renderer:({typoClassName:v})=>te.createElement(te.Fragment,null,f(y,v))}):te.createElement("br",null)))))};var Em={commentOptions__actionButton:"It",commentOptions__actionButton__icon:"Rt",commentOptions__actionButton__text:"Ut"};var X3=({comment:e,handleEditComment:t,handleDeleteComment:o,onCloseBottomSheet:r})=>{let{userRoles:n}=De(),{toggleFlagComment:i,isFlaggedByMe:a}=Y7(e.commentId),{canDelete:s,canEdit:l,canReport:c}=W0(e,!1,n),p=So(),u=()=>_(void 0,null,function*(){try{yield i({onFlagSuccess:()=>p.success({content:"Report sent"}),onUnFlagSuccss:()=>p.success({content:"Unreport sent"})});}catch(f){f instanceof Error&&p.error({content:f.message});}}),g=[l?{name:"Edit comment",action:t,icon:te.createElement(l8,{className:Em.commentOptions__actionButton__icon})}:null,c?{name:a?"Unreport comment":"Report comment",action:u,icon:te.createElement(m8,{className:Em.commentOptions__actionButton__icon})}:null,s?{name:"Delete comment",action:o,icon:te.createElement(u1,{className:Em.commentOptions__actionButton__icon})}:null].filter(rn);return te.createElement(te.Fragment,null,g.map((f,y)=>te.createElement("div",{className:Em.commentOptions__actionButton,key:y,onClick:()=>{r(),f.action();}},f.icon,te.createElement("div",{className:Em.commentOptions__actionButton__text},te.createElement(N.BodyBold,null,f.name)))))};var ut={postReplyComment:"Bt",postReplyComment__avatar:"Dt",postReplyComment__details:"Ft",postReplyComment__content:"Ht",postReplyComment__content__username:"Lt",postReplyComment__content__text:"Tt",postReplyComment__secondRow:"Vt",postReplyComment__secondRow__leftPane:"qt",postReplyComment__secondRow__rightPane:"Gt",postReplyComment__secondRow__rightPane__like:"Jt",postReplyComment__secondRow__like:"de",postReplyComment__secondRow__reply:"Kt",postReplyComment__secondRow__actionButton:"Nt",postReplyComment__viewReply_button:"Ot",postReplyComment__viewReply_icon:"Pt",postReplyComment__viewReply_text:"Qt",postReplyComment__actionButton:"Wt",postReplyComment__actionButton__icon:"Zt",postReplyComment__actionButton__text:"_t",postReplyComment__deleteComment_container:"ei",postReplyComment__deleteComment_icon:"ri",postReplyComment__deleteComment_text:"ai",postReplyComment__edit:"oi",postReplyComment__edit__inputWrap:"ti",postReplyComment__edit__input:"ii",postReplyComment__edit__buttonWrap:"li",postReplyComment__edit__button:"si",postReplyComment__edit__cancelButton:"ci",postReplyComment__edit__saveButton:"ni",postReplyComment__secondRow__timestamp:"di"};var ose=({pageId:e="*",community:t,comment:o})=>{var S;let r="post_comment",{confirm:n}=et(),{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=re({pageId:e,componentId:r}),[u,g]=useState(!1),[f,y]=useState(!1),[C,v]=useState(),h=(o.myReactions||[]).some(L=>L==="like"),x=()=>g(L=>!L),b=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),M=()=>{y(!0);},I=()=>{n({pageId:e,componentId:r,title:"Delete reply",content:"This reply will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:b});},w=()=>_(void 0,null,function*(){o&&(h?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,$n):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,$n));}),k=useCallback(()=>_(void 0,null,function*(){!C||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:C.data,mentionees:C.mentionees,metadata:C.metadata}),y(!1));}),[C]);return Ld({commentId:o.commentId}),l?null:te.createElement(te.Fragment,null,o.isDeleted?te.createElement("div",{className:ut.postReplyComment__deleteComment_container,style:p},te.createElement(Pd,{className:ut.postReplyComment__deleteComment_icon}),te.createElement(N.Caption,{className:ut.postReplyComment__deleteComment_text},"This reply has been deleted")):f?te.createElement("div",{className:ut.postReplyComment__edit},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:ut.postReplyComment__edit__inputWrap},te.createElement("div",{className:ut.postReplyComment__edit__input},te.createElement(ei,{placeholder:"Say something nice...",communityId:t==null?void 0:t.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:L=>{v({data:{text:L.text},mentionees:L.mentionees,metadata:{mentioned:L.mentioned}});}})),te.createElement("div",{className:ut.postReplyComment__edit__buttonWrap},te.createElement(ms,{componentId:"edit_comment_component",className:gr(ut.postReplyComment__edit__button,ut.postReplyComment__edit__cancelButton),onPress:()=>{y(!1);}}),te.createElement(I1,{className:gr(ut.postReplyComment__edit__button,ut.postReplyComment__edit__saveButton),componentId:"edit_comment_component",onPress:k})))):te.createElement("div",{className:ut.postReplyComment,style:p,"data-qa-anchor":i},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:ut.postReplyComment__details},te.createElement("div",{className:ut.postReplyComment__content},te.createElement(N.BodyBold,{className:ut.postReplyComment__content__username},(S=o.creator)==null?void 0:S.displayName),te.createElement(w1,{pageId:e,componentId:r}),te.createElement(Nm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),te.createElement("div",{className:ut.postReplyComment__secondRow},te.createElement("div",{className:ut.postReplyComment__secondRow__leftPane},te.createElement(N.Caption,{className:ut.postReplyComment__secondRow__timestamp},te.createElement(M1,{pageId:e,componentId:r,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),te.createElement("div",{onClick:w},te.createElement(N.CaptionBold,{className:ut.postReplyComment__secondRow__like,"data-is-liked":h},h?"Liked":"Like")),te.createElement(Sa,{className:ut.postReplyComment__secondRow__actionButton,onClick:()=>g(!0)})),o.reactionsCount>0&&te.createElement("div",{className:ut.postReplyComment__secondRow__rightPane},te.createElement(N.Caption,null,lb(o.reactionsCount)),te.createElement(z3,{className:ut.postReplyComment__secondRow__rightPane__like}))))),te.createElement(Er,{onClose:x,isOpen:u,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},te.createElement(X3,{comment:o,onCloseBottomSheet:x,handleEditComment:M,handleDeleteComment:I})))},bE=ose;var Y3={postReplyCommentList__viewReply_button:"mi",postReplyCommentList__viewReply_icon:"pi",postReplyCommentList__viewReply_text:"gi"};var IE=({referenceId:e,referenceType:t,community:o,parentId:r})=>{let{comments:n,hasMore:i,isLoading:a,loadMore:s}=Q8({referenceId:e,referenceType:t,parentId:r,limit:10,shouldCall:!0,includeDeleted:!0}),l=()=>{s();};return te.createElement("div",null,a&&te.createElement(J3,{numberOfSkeletons:3}),n.map(c=>te.createElement(bE,{community:o,comment:c})),i&&te.createElement("div",{className:Y3.postReplyCommentList__viewReply_button,onClick:l},te.createElement(q3,{className:Y3.postReplyCommentList__viewReply_icon}),te.createElement(N.CaptionBold,{className:Y3.postReplyCommentList__viewReply_text},"View more replies")))};var sse=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))},lse=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),te.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#63A1FF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},_E=({pageId:e="*",componentId:t="comment_bubble",comment:o,community:r,onClickReply:n,shouldAllowInteraction:i=!0})=>{var K;let {accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=re({pageId:e,componentId:t}),{confirm:g}=et(),[f,y]=useState(!1),[C,v]=useState(!1),[h,x]=useState(!1),[b,M]=useState(),I=useRef(null);useState(!1);let S=()=>y(U=>!U),L=(o.myReactions||[]).some(U=>U==="like"),D=o.childrenNumber;if(c)return null;let H=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),$=()=>{x(!0);},B=()=>{g({pageId:e,componentId:t,title:"Delete comment",content:"This comment will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:H});},z=()=>_(void 0,null,function*(){o&&(L?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,$n):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,$n));}),V=useCallback(()=>_(void 0,null,function*(){!b||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:b.data,mentionees:b.mentionees,metadata:b.metadata}),x(!1));}),[b]);return Ld({commentId:o.commentId}),te.createElement("div",{style:u,"data-qa-anchor":a},o.isDeleted?te.createElement("div",{className:Xe.postComment__deleteComment_container},te.createElement(Pd,{className:Xe.postComment__deleteComment_icon}),te.createElement(N.Body,{className:Xe.postComment__deleteComment_text},"This comment has been deleted")):h?te.createElement("div",{className:Xe.postComment__edit},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:Xe.postComment__edit__inputWrap,ref:I},te.createElement("div",{className:Xe.postComment__edit__input},te.createElement(ei,{placeholder:"Say something nice...",communityId:r==null?void 0:r.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:U=>{M({data:{text:U.text},mentionees:U.mentionees,metadata:{mentioned:U.mentioned}});},maxLines:5,mentionContainer:I==null?void 0:I.current})),te.createElement("div",{className:Xe.postComment__edit__buttonWrap},te.createElement(ms,{componentId:"edit_comment_component",className:gr(Xe.postComment__edit__button,Xe.postComment__edit__cancelButton),onPress:()=>{x(!1);}}),te.createElement(I1,{className:gr(Xe.postComment__edit__button,Xe.postComment__edit__saveButton),componentId:"edit_comment_component",onPress:V})))):te.createElement("div",{className:Xe.postComment},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:Xe.postComment__details},te.createElement("div",{className:Xe.postComment__content},te.createElement(N.BodyBold,{className:Xe.postComment__content__username},(K=o.creator)==null?void 0:K.displayName),te.createElement(w1,{pageId:e,componentId:t}),te.createElement(Nm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),te.createElement("div",{className:Xe.postComment__secondRow},i&&te.createElement("div",{className:Xe.postComment__secondRow__leftPane},te.createElement(N.Caption,{className:Xe.postComment__secondRow__timestamp},te.createElement(M1,{pageId:e,componentId:t,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),te.createElement("div",{onClick:z},te.createElement(N.CaptionBold,{className:Xe.postComment__secondRow__like,"data-is-liked":L},L?"Liked":"Like")),te.createElement("div",{onClick:()=>n(o)},te.createElement(N.CaptionBold,{className:Xe.postComment__secondRow__reply},"Reply")),te.createElement(sse,{className:Xe.postComment__secondRow__actionButton,onClick:()=>y(!0)})),o.reactionsCount>0&&te.createElement("div",{className:Xe.postComment__secondRow__rightPane},te.createElement(N.Caption,null,lb(o.reactionsCount)),te.createElement(lse,{className:Xe.postComment__secondRow__rightPane__like}))),D>0&&!C&&te.createElement("div",{className:Xe.postComment__viewReply_button,onClick:()=>v(!0)},te.createElement(q3,{className:Xe.postComment__viewReply_icon}),te.createElement(N.CaptionBold,{className:Xe.postComment__viewReply_text},"View ",D," ",D>1?"replies":"reply")),C&&te.createElement(IE,{community:r,referenceId:o.referenceId,referenceType:o.referenceType,parentId:o.commentId}))),te.createElement(Er,{onClose:S,isOpen:f,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},te.createElement(X3,{comment:o,handleEditComment:$,handleDeleteComment:B,onCloseBottomSheet:S})))};var $t={commentAd:"hi",commentAd__container:"fi",commentAd__details:"bi",commentAd__avatar:"ui",commentAd__content:"vi",commentAd__content__advertiserName__container:"xi",commentAd__content__advertiserName:"wi",commentAd__content__text:"yi",commentAd__adCard:"ki",commentAd__adCard__imageContainer:"ji",commentAd__adCard__image:"zi",commentAd__adCard__detail:"Xi",commentAd__adCard__textContainer:"Yi",commentAd__adCard__description:"Ci",commentAd__adCard__headline:"Ai",commentAd__adCard__button:"Mi",commentAd__adCard__button__text:"Si",infoIcon__button:"Ei",infoIcon:"Ii"};var dse=o=>{var r=o,{color:e="white"}=r,t=P(r,["color"]);return te.createElement("svg",d({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),te.createElement("path",{d:"M5.54688 1.78125C5.73438 1.40625 6.26562 1.42188 6.4375 1.78125L7.46875 3.85938L9.75 4.1875C10.1562 4.25 10.3125 4.75 10.0156 5.04688L8.375 6.65625L8.76562 8.92188C8.82812 9.32812 8.39062 9.64062 8.03125 9.45312L6 8.375L3.95312 9.45312C3.59375 9.64062 3.15625 9.32812 3.21875 8.92188L3.60938 6.65625L1.96875 5.04688C1.67188 4.75 1.82812 4.25 2.23438 4.1875L4.53125 3.85938L5.54688 1.78125Z",fill:e}))},kE=dse;var Dd={badge:"me",badge__icon:"Ri",badge__text:"Ui",badge__child:"Bi"};var Lm=()=>te.createElement("div",{className:Dd.badge},te.createElement("div",{className:Dd.badge__child},te.createElement(kE,{className:Dd.badge__icon}),te.createElement("div",{className:Dd.badge__text},"Sponsored")));var pse=e=>te.createElement("svg",d({width:"100%",height:"100%",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{width:"64",height:"64",rx:"32",fill:"#D9E5FC"}),te.createElement("path",{d:"M20 28.5358C20.5156 28.5358 20.9375 28.8639 21.2188 29.2858L41 23.2858V41.2858L34.8125 39.4576C34.2969 41.3795 32.5625 42.7858 30.5 42.7858C28.0156 42.7858 26 40.7701 26 38.2858C26 37.817 26.0938 37.3014 26.2344 36.8795L21.2188 35.3326C20.9375 35.7545 20.5156 36.0358 20 36.0358C19.1562 36.0358 18.5 35.3795 18.5 34.5358V30.0358C18.5 29.2389 19.1562 28.5358 20 28.5358ZM28.3906 37.4889C28.2969 37.7701 28.25 38.0045 28.25 38.2858C28.25 39.5514 29.2344 40.5358 30.5 40.5358C31.5312 40.5358 32.4219 39.7858 32.6562 38.8014L28.3906 37.4889ZM44.75 21.7858C45.125 21.7858 45.5 22.1608 45.5 22.5358V42.0358C45.5 42.4576 45.125 42.7858 44.75 42.7858H43.25C42.8281 42.7858 42.5 42.4576 42.5 42.0358V22.5358C42.5 22.1608 42.8281 21.7858 43.25 21.7858H44.75Z",fill:"white"})),Am=pse;var use=e=>te.createElement("svg",d({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M8 2.25006C4.25 2.25006 1.25 5.28131 1.25 9.00006C1.25 12.7501 4.25 15.7501 8 15.7501C11.7188 15.7501 14.75 12.7501 14.75 9.00006C14.75 5.28131 11.6875 2.25006 8 2.25006ZM8 1.25006C12.25 1.25006 15.75 4.75006 15.75 9.00006C15.75 13.2813 12.25 16.7501 8 16.7501C3.71875 16.7501 0.25 13.2813 0.25 9.00006C0.25 4.75006 3.71875 1.25006 8 1.25006ZM6.875 12.0001H7.25V8.25006H6.875C6.65625 8.25006 6.5 8.09381 6.5 7.87506V7.62506C6.5 7.43756 6.65625 7.25006 6.875 7.25006H8.375C8.5625 7.25006 8.75 7.43756 8.75 7.62506V12.0001H9.125C9.3125 12.0001 9.5 12.1876 9.5 12.3751V12.6251C9.5 12.8438 9.3125 13.0001 9.125 13.0001H6.875C6.65625 13.0001 6.5 12.8438 6.5 12.6251V12.3751C6.5 12.1876 6.65625 12.0001 6.875 12.0001ZM8 4.50006C8.53125 4.50006 9 4.96881 9 5.50006C9 6.06256 8.53125 6.50006 8 6.50006C7.4375 6.50006 7 6.06256 7 5.50006C7 4.96881 7.4375 4.50006 8 4.50006Z",fill:"#A5A9B5"})),gn=use;var Co={drawer__content:"pe",drawer__innerContent:"Di",drawer__placeholder:"Fi",drawer__overlay:"Hi",drawer__title:"Li",drawer__content__data:"Ti",drawer__content__data__title:"Vi",drawer__content__data__text:"qi",drawer__content__data__caption:"Gi",drawer__content__data__infoIcon:"Ji",drawer__content__emptySpace:"Ki"};var e5=({isOpen:e,onOpenChange:t,ad:o})=>{var r;return te.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:n=>n.stopPropagation()},te.createElement(Drawer.Portal,null,te.createElement(Drawer.Overlay,{className:Co.drawer__overlay}),te.createElement(Drawer.Content,{className:Co.drawer__content,onTouchStart:n=>n.stopPropagation(),onTouchMove:n=>n.stopPropagation(),onTouchEnd:n=>n.stopPropagation()},te.createElement("div",{className:Co.drawer__innerContent},te.createElement("div",{className:Co.drawer__placeholder}),te.createElement(Drawer.Title,{className:Co.drawer__title},te.createElement(N.Title,null,"About this advertisement")),te.createElement("div",{className:Co.drawer__content__data},te.createElement(N.BodyBold,{className:Co.drawer__content__data__title},"Why this advertisement?"),te.createElement("div",{className:Co.drawer__content__data__text},te.createElement(gn,{className:Co.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Co.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),te.createElement("div",{className:Co.drawer__content__data},te.createElement(N.BodyBold,{className:Co.drawer__content__data__title},"About this advertiser"),te.createElement("div",{className:Co.drawer__content__data__text},te.createElement(gn,{className:Co.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Co.drawer__content__data__caption},"Advertiser name: ",(r=o.advertiser)==null?void 0:r.companyName))),te.createElement("div",{className:Co.drawer__content__emptySpace})))))};var NE=({ad:e,themeStyles:t,avatarUrl:o,adImageUrl:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return te.createElement("div",{className:$t.commentAd,style:t},te.createElement(O,{className:$t.infoIcon__button,onPress:()=>a(!0)},te.createElement(gn,{className:$t.infoIcon})),te.createElement("div",{className:$t.commentAd__container},te.createElement("div",{className:$t.commentAd__avatar},te.createElement(bt,{avatarUrl:o,defaultImage:te.createElement(Am,null)})),te.createElement("div",{className:$t.commentAd__details},te.createElement("div",{className:$t.commentAd__content},te.createElement(N.BodyBold,{className:$t.commentAd__content__advertiserName__container},te.createElement("div",{className:$t.commentAd__content__advertiserName},(l=e.advertiser)==null?void 0:l.name)),te.createElement(Lm,null),te.createElement("div",null,te.createElement(N.Body,{className:$t.commentAd__content__text},e.body)),te.createElement("div",{className:$t.commentAd__adCard,onClick:s},te.createElement("div",{className:$t.commentAd__adCard__imageContainer},te.createElement("img",{className:$t.commentAd__adCard__image,src:r})),te.createElement("div",{className:$t.commentAd__adCard__detail},te.createElement("div",{className:$t.commentAd__adCard__textContainer},te.createElement(N.Caption,{renderer:({typoClassName:c})=>te.createElement("div",{className:gr(c,$t.commentAd__adCard__description)},e.description)}),te.createElement(N.BodyBold,{className:$t.commentAd__adCard__headline},e.headline)),e.callToActionUrl?te.createElement(O,{className:$t.commentAd__adCard__button,onPress:s},te.createElement(N.CaptionBold,{className:$t.commentAd__adCard__button__text},e.callToAction)):null))))),te.createElement(e5,{ad:e,isOpen:i,onOpenChange:c=>a(c)}))};var EE=({pageId:e="*",ad:t})=>{var c,p,u,g,f,y;let o="comment_tray_component",{themeStyles:r}=re({pageId:e,componentId:o}),i=it({fileId:(p=(c=t.advertiser)==null?void 0:c.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=it({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return te.createElement(NE,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:C=>{window==null||window.open(C,"_blank");}})};var t5={commentList__container:"Ni",commentList__viewAllComments__button:"Oi",commentList__container_intersection:"Pi",noCommentsContainer:"Qi"};function Fd({postId:e,level:t,shouldSubscribe:o=!0,callback:r}){return oa({fetcher:PostRepository.getPost,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getPostTopic(n,t)})}var Pse=e=>"adId"in e,Od=({referenceId:e,referenceType:t,pageId:o="*",onClickReply:r,limit:n=5,includeDeleted:i=!1,community:a,shouldAllowInteraction:s=!0})=>{let l="comment_tray_component",{themeStyles:c,accessibilityId:p}=re({componentId:l,pageId:o}),u=useRef(null),[g,f]=useState(null),{items:y,loadMore:C,hasMore:v,isLoading:h}=yd({fetcher:CommentRepository.getComments,params:{referenceId:e,referenceType:t,limit:n,includeDeleted:i},placement:"comment",pageSize:5,getItemId:x=>x.commentId,shouldCall:!0});return Bo({node:g,options:{threshold:.8},onIntersect:()=>{v&&h===!1&&C();}}),Fd({postId:e,level:SubscriptionLevels.COMMENT,shouldSubscribe:t==="post"}),Xa({targetId:e,targetType:t,shouldSubscribe:t==="story"&&!!e}),!h&&y.length===0?te.createElement("div",{className:t5.noCommentsContainer},te.createElement(N.Body,null,"No comments yet")):te.createElement("div",{className:t5.commentList__container,style:c,ref:u,"data-qa-anchor":p},y.map(x=>Pse(x)?te.createElement(EE,{key:x.adId,ad:x}):te.createElement(_E,{key:x.commentId,comment:x,onClickReply:b=>r==null?void 0:r(b),componentId:l,community:a,shouldAllowInteraction:s})),h&&te.createElement(J3,{pageId:o,componentId:l,numberOfSkeletons:3}),te.createElement("div",{ref:x=>f(x),className:t5.commentList__container_intersection}))};var X8={container:"Wi",header:"Zi",roundedHeader:"_i",content:"el",scroller:"rl",composeBarContainer:"al",nestedBackdrop:"ol",commentTrayContainer:"tl",commentListContainer:"il",mobileSheetComposeBarContainer:"ll"};var Dm=({pageId:e="*",referenceType:t,referenceId:o,community:r={},shouldAllowInteraction:n=!0,shouldAllowCreation:i=!0})=>{let a="comment_tray_component",{accessibilityId:s,themeStyles:l}=re({pageId:e,componentId:a}),[c,p]=useState(null),u=f=>{p(f);},g=()=>{p(null);};return te.createElement("div",{style:l,"data-qa-anchor":s,className:X8.commentTrayContainer},te.createElement("div",{className:X8.commentListContainer},te.createElement(Od,{pageId:e,referenceId:o,referenceType:t,community:r,includeDeleted:!0,onClickReply:u,shouldAllowInteraction:n})),te.createElement(Ed,{referenceId:o,referenceType:t,onCancelReply:g,replyTo:c,shouldAllowCreation:i}))};var Y8={doneButton:"sl",doneButton_text:"cl"};function R8(n){var i=n,{pageId:e="*",componentId:t="*",className:o}=i,r=P(i,["pageId","componentId","className"]);let a="done_button",{accessibilityId:s,config:l,isExcluded:c}=A({pageId:e,componentId:t,elementId:a});return c?null:te.createElement(O,d({className:`${Y8.doneButton} ${o||""}`,"data-qa-anchor":s},r),te.createElement(N.Body,{className:Y8.doneButton_text},l.done_button_text))}var gt={hyperlinkFormContainer:"nl",form:"dl",bottomSheet:"a","react-modal-sheet-backdrop":"ml","react-modal-sheet-container":"pl","react-modal-sheet-content":"gl","react-modal-sheet-header":"hl","react-modal-sheet-drag-indicator":"fl",inputContainer:"bl",input:"ge",hasError:"ul",label:"X",required:"vl",description:"xl",errorText:"wl",characterCount:"yl",headerContainer:"kl",labelContainer:"jl",headerTitle:"zl",cancelButton:"Xl",doneButton:"he",removeIcon:"Yl",removeLinkButton:"Cl",divider:"Al",removeLinkContainer:"Ml"};var LE=30,tg=({pageId:e="*",isOpen:t,isHaveHyperLink:o,onClose:r,onSubmit:n,onRemove:i})=>{var z$1,V,K;let a="hyper_link_config_component",{confirm:s}=et(),{accessibilityId:l,config:c,isExcluded:p,themeStyles:u}=re({pageId:e,componentId:a});if(p)return null;let{formatMessage:g}=useIntl(),{client:f}=De(),[y,C]=useState(!1),v="asc-story-hyperlink-form",h=z.object({url:z.string().refine(U=>{if(!U)return !0;try{let j=new URL(U);return ["http:","https:"].includes(j.protocol)}catch(j){if(U.startsWith("www."))try{let Z=new URL(`https://${U}`);return ["http:","https:"].includes(Z.protocol)}catch(Z){return !1}return !1}},{message:g({id:"storyCreation.hyperlink.validation.error.invalidUrl"})}).refine(U=>_(void 0,null,function*(){if(!U)return !0;let j=U.startsWith("www.")?`https://${U}`:U;return yield f==null?void 0:f.validateUrls([j]).catch(()=>!1)}),{message:g({id:"storyCreation.hyperlink.validation.error.whitelisted"})}),customText:z.string().optional().refine(U=>_(void 0,null,function*(){return U?yield f==null?void 0:f.validateTexts([U]).catch(()=>!1):!0}),g({id:"storyCreation.hyperlink.validation.error.blocked"}))}),{trigger:x,watch:b,register:M,handleSubmit:I,formState:{errors:w},reset:k}=useForm({resolver:zodResolver(h)}),{url:S,customText:L}=b();useEffect(()=>{C(S!==""||L!=="");},[S,L]);let D=U=>{n(U),r();},H=()=>{k(),i(),r();},$=()=>{s({title:g({id:"storyCreation.hyperlink.removeConfirm.title"}),content:g({id:"storyCreation.hyperlink.removeConfirm.content"}),cancelText:g({id:"storyCreation.hyperlink.removeConfirm.cancel"}),okText:g({id:"storyCreation.hyperlink.removeConfirm.confirm"}),onOk:H});},B=()=>{y?s({title:g({id:"storyCreation.hyperlink.unsavedChanges.title"}),content:g({id:"storyCreation.hyperlink.unsavedChanges.content"}),cancelText:g({id:"storyCreation.hyperlink.unsavedChanges.cancel"}),okText:g({id:"storyCreation.hyperlink.unsavedChanges.confirm"}),onOk:()=>{k(),r();}}):r();};return te.createElement(Er,{"data-qa-anchor":l,detent:"full-height",mountPoint:document.getElementById("asc-uikit-create-story"),rootId:"asc-uikit-create-story",isOpen:t,onClose:B,className:gt.bottomSheet,style:u},te.createElement("div",{className:gt.headerContainer},te.createElement(ms,{pageId:e,componentId:a,onPress:B}),te.createElement(N.Title,null,g({id:"storyCreation.hyperlink.bottomSheet.title"})),te.createElement(R8,{type:"submit",pageId:e,componentId:a,form:v})),te.createElement("div",{className:gt.divider}),te.createElement("div",{className:gt.hyperlinkFormContainer},te.createElement("form",{onSubmit:I(D),id:v,className:gt.form},te.createElement("div",{className:gt.inputContainer},te.createElement(N.Title,null,te.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-url",className:gr(gt.label,gt.required)},g({id:"storyCreation.hyperlink.form.urlLabel"}))),te.createElement("input",d({id:"asc-uikit-hyperlink-input-url",placeholder:g({id:"storyCreation.hyperlink.form.urlPlaceholder"}),className:gr(gt.input,(w==null?void 0:w.url)&>.hasError)},M("url",{onChange:()=>x("url")}))),(w==null?void 0:w.url)&&te.createElement("span",{className:gt.errorText},(z$1=w==null?void 0:w.url)==null?void 0:z$1.message)),te.createElement("div",{className:gt.inputContainer},te.createElement("div",{className:gt.labelContainer},te.createElement(N.Title,null,te.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-link-text",className:gt.label},g({id:"storyCreation.hyperlink.form.linkTextLabel"}))),te.createElement("div",{className:gt.characterCount},((V=b("customText"))==null?void 0:V.length)||0," / ",LE)),te.createElement("input",E(d({id:"asc-uikit-hyperlink-input-link-text",placeholder:g({id:"storyCreation.hyperlink.form.linkTextPlaceholder"}),className:gr(gt.input,(w==null?void 0:w.customText)&>.hasError)},M("customText")),{maxLength:LE})),(w==null?void 0:w.customText)&&te.createElement("span",{className:gt.errorText},(K=w==null?void 0:w.customText)==null?void 0:K.message),te.createElement(N.Caption,null,te.createElement("label",{className:gt.description},g({id:"storyCreation.hyperlink.form.linkTextDescription"}))))),o&&te.createElement("div",{className:gt.removeLinkContainer},te.createElement(L3,{variant:"secondary",onClick:$,className:gr(gt.removeLinkButton)},te.createElement(u1,{className:gt.removeIcon}),g({id:"storyCreation.hyperlink.form.removeButton"})))))};var Fse=createContext([]),bi=()=>({config:useContext(Fse)});var Hm=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e;var n5=({reactionConfigItem:e,className:t})=>te.createElement("img",{"data-qa-anchor":"reaction_image_view",key:e.name,src:e.image,alt:e.name,className:t});var Use=o=>{var r=o,{backgroundColor:e}=r,t=P(r,["backgroundColor"]);return te.createElement("svg",d({width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),te.createElement("path",{d:"M19.6035 10.5C19.6035 15.7467 15.3502 20 10.1035 20C4.85681 20 0.603516 15.7467 0.603516 10.5C0.603516 5.25329 4.85681 1 10.1035 1C15.3502 1 19.6035 5.25329 19.6035 10.5Z",stroke:"currentColor",fill:e}),te.createElement("path",{d:"M10.2723 6.71429C11.6786 6.71429 13.202 7.83595 13.202 9.29242C13.202 11.2344 11.1094 11.2679 11.1094 11.9877V12.0714C11.1094 12.3058 10.9252 12.4732 10.7076 12.4732H9.48549C9.26786 12.4732 9.08371 12.3058 9.08371 12.0714V11.9208C9.08371 10.8828 9.87054 10.4643 10.4732 10.1295C10.9754 9.84487 11.2935 9.66072 11.2935 9.27568C11.2935 8.77345 10.6574 8.45537 10.1384 8.45537C9.48549 8.45537 9.16741 8.75671 8.74888 9.27568C8.61496 9.44309 8.36384 9.47657 8.19643 9.34264L7.47656 8.79019C7.29241 8.673 7.25893 8.42188 7.37612 8.25447C8.0625 7.26675 8.93304 6.71429 10.2723 6.71429ZM10.1049 12.9755C10.7411 12.9755 11.26 13.4944 11.26 14.1306C11.26 14.7667 10.7411 15.2857 10.1049 15.2857C9.45201 15.2857 8.93304 14.7667 8.93304 14.1306C8.93304 13.4944 9.45201 12.9755 10.1049 12.9755Z",fill:"currentColor"}))},Fm=Use;var Se={reactionListContainer:"Sl",tabListContainer:"fe",tabList:"El",tabItem:"be",reactionEmoji:"Il",userList:"Rl",userItem:"Ul",userDetailsContainer:"Bl",userDetailsProfile:"Dl",userDetailsReaction:"Fl",reactionItem:"Hl",reactionIcon:"Ll",reactionCustomStateContainer:"ue",loadingState:"Tl","skeleton-pulse":"ve",reactionState:"Vl",reactionState2Line:"ql",removeBtn:"Gl",infiniteScrollContainer:"Jl",reactionPanel:"Kl",avatar:"Nl"};var AE=({filteredReactions:e,removeReaction:t,hasMore:o,loadMore:r,isLoading:n,currentRef:i})=>{let{currentUserId:a}=De(),{config:s}=bi(),l=useMemo(()=>s.map(({name:c})=>c),[s]);return !i||!e?null:te.createElement("div",{className:Se.infiniteScrollContainer},te.createElement(eR,{scrollableTarget:i,scrollThreshold:.7,hasMore:o,next:r,loader:n?te.createElement("span",{key:0},"Loading..."):null,dataLength:e.length||0,style:{display:"flex",width:"100%"},height:i.clientHeight},te.createElement("div",{className:Se.userList},e.map(c=>{var p,u,g,f;return te.createElement(Fragment,{key:c.reactionId},te.createElement("div",{className:Se.userItem},te.createElement("div",{className:Se.userDetailsContainer},te.createElement("div",{className:Se.userDetailsProfile},te.createElement("div",{className:Se.avatar},te.createElement(bt,{"data-qa-anchor":"user_avatar_view",avatarUrl:(u=(p=c.user)==null?void 0:p.avatar)==null?void 0:u.fileUrl,defaultImage:te.createElement(ds,null)})),te.createElement(N.BodyBold,{"data-qa-anchor":"user_display_name"},(g=c.user)==null?void 0:g.displayName,a===((f=c.user)==null?void 0:f.userId)&&te.createElement(te.Fragment,null,te.createElement("br",null),te.createElement("div",{onClick:()=>t(c.reactionName)},te.createElement(N.Caption,{className:Se.removeBtn},"Click to remove reaction"))))),te.createElement("div",{className:Se.userDetailsReaction},l.includes(c.reactionName)?te.createElement(n5,{reactionConfigItem:s.find(({name:y})=>y===c.reactionName),className:Se.reactionIcon}):te.createElement(Fm,{className:Se.reactionIcon})))))}))))};var Gse=e=>te.createElement("svg",d({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M18.8672 1.63086C19.1797 1.31836 19.6875 1.55273 19.6875 1.94336V7.5293C19.6875 7.80273 19.4531 7.99805 19.2188 7.99805H13.5938C13.2031 7.99805 12.9688 7.5293 13.2812 7.2168L15.3906 5.10742C14.0234 3.70117 12.1094 2.8418 10 2.8418C5.74219 2.8418 2.34375 6.2793 2.34375 10.498C2.34375 14.7559 5.74219 18.1543 10 18.1543C11.9531 18.1543 13.7109 17.4512 15.0781 16.2402C15.2734 16.084 15.5469 16.084 15.7031 16.2402L16.4844 17.0215C16.6797 17.2168 16.6797 17.5293 16.4844 17.7246C14.7656 19.248 12.4609 20.1855 10 20.1855C4.64844 20.1855 0.3125 15.8887 0.3125 10.5371C0.273438 5.18555 4.64844 0.810547 10 0.810547C12.6562 0.810547 15.0781 1.9043 16.8359 3.66211L18.8672 1.63086Z",fill:"#6E7487"})),i5=Gse;var HE=()=>te.createElement("div",{className:Se.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},te.createElement("div",{className:Se.reactionState},te.createElement(i5,null),te.createElement(N.Body,null,te.createElement(FormattedMessage,{id:"livechat.reaction.errorOnload"}))));var Qse=e=>te.createElement("svg",d({width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M11.25 9.28613C16.5938 9.28613 21 13.6924 21 19.0361C21 24.4268 16.5938 28.7861 11.25 28.7861C5.85938 28.7861 1.5 24.4268 1.5 19.0361C1.5 13.6924 5.85938 9.28613 11.25 9.28613ZM11.25 26.5361C15.375 26.5361 18.75 23.208 18.75 19.0361C18.75 14.9111 15.375 11.5361 11.25 11.5361C7.07812 11.5361 3.75 14.9111 3.75 19.0361C3.75 23.208 7.07812 26.5361 11.25 26.5361ZM14.1094 20.7236C14.5312 20.2549 15.2344 20.208 15.7031 20.6299C16.1719 21.0049 16.2188 21.708 15.8438 22.1768C14.6719 23.5361 13.0312 24.2861 11.25 24.2861C9.46875 24.2861 7.78125 23.5361 6.60938 22.1768C6.23438 21.708 6.28125 21.0049 6.75 20.6299C7.21875 20.208 7.92188 20.2549 8.34375 20.7236C9.75 22.4111 12.7031 22.4111 14.1094 20.7236ZM8.25 18.2861C7.40625 18.2861 6.75 17.6299 6.75 16.7861C6.75 15.9893 7.40625 15.2861 8.25 15.2861C9.04688 15.2861 9.75 15.9893 9.75 16.7861C9.75 17.6299 9.04688 18.2861 8.25 18.2861ZM14.25 18.2861C13.4062 18.2861 12.75 17.6299 12.75 16.7861C12.75 15.9893 13.4062 15.2861 14.25 15.2861C15.0469 15.2861 15.75 15.9893 15.75 16.7861C15.75 17.6299 15.0469 18.2861 14.25 18.2861ZM30.75 8.91113C31.125 8.91113 31.5 9.28613 31.5 9.66113V10.4111C31.5 10.833 31.125 11.1611 30.75 11.1611H27.375V14.5361C27.375 14.958 27 15.2861 26.625 15.2861H25.875C25.4531 15.2861 25.125 14.958 25.125 14.5361V11.1611H21.75C21.3281 11.1611 21 10.833 21 10.4111V9.66113C21 9.28613 21.3281 8.91113 21.75 8.91113H25.125V5.53613C25.125 5.16113 25.4531 4.78613 25.875 4.78613H26.625C27 4.78613 27.375 5.16113 27.375 5.53613V8.91113H30.75Z",fill:"#A5A9B5"})),OE=Qse;var zE=()=>te.createElement("div",{className:Se.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},te.createElement("div",{className:Se.reactionState},te.createElement(OE,null),te.createElement("div",{className:Se.reactionState2Line},te.createElement(N.Body,null,te.createElement(FormattedMessage,{id:"livechat.reaction.emptyState"})),te.createElement(N.Caption,null,te.createElement(FormattedMessage,{id:"livechat.reaction.emptyState.description"})))));var Wse=e=>te.createElement("svg",d({width:"375",height:"56",viewBox:"0 0 375 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{x:"16",y:"8",width:"40",height:"40",rx:"20",fill:"#292B32"}),te.createElement("rect",{x:"64",y:"24",width:"140",height:"8",rx:"4",fill:"#292B32"})),$E=Wse;var ng=()=>te.createElement("div",{className:gr(Se.reactionCustomStateContainer,Se.loadingState),"data-qa-anchor":"reaction_list"},Array.from({length:8}).map((e,t)=>te.createElement($E,{key:`loading_${t}`})));var Kse=(e,t)=>({addReaction:n=>_(void 0,null,function*(){yield ReactionRepository.addReaction(e,t,n);}),removeReaction:n=>_(void 0,null,function*(){yield ReactionRepository.removeReaction(e,t,n);})}),GE=Kse;var t1e=(e,t)=>{let[o,r]=useState(0),[n,i]=useState({}),[a,s]=useState(null),l=({data:c,loading:p,error:u})=>{p||u||(r(c.reactionsCount),i(c.reactions),s(c.myReaction));};return useEffect(()=>{if(e==="message")MessageRepository.getMessage(t,l);else if(e==="story")StoryRepository.getStoryByStoryId(t,l);else if(e==="comment")CommentRepository.getComment(t,l);else if(e==="post")PostRepository.getPost(t,l);else throw new Error("Unsupported reference type")},[t,e]),{reactions:n,reactionCount:o,myReaction:a}},ZE=t1e;var s5="unknown",n1e=(e,t,o)=>t==="All"?e:t===s5?e.filter(r=>!o.includes(r.reactionName)):e.filter(r=>r.reactionName===t.toLowerCase()),i1e=({filteredReactions:e,hasMore:t,loadMore:o,isLoading:r,removeReaction:n,error:i,currentRef:a})=>r?te.createElement(ng,null):i?te.createElement(HE,null):e.length===0?r?te.createElement(ng,null):te.createElement(zE,null):te.createElement(AE,{currentRef:a,hasMore:t,loadMore:o,isLoading:r,filteredReactions:e,removeReaction:n}),Om=({pageId:e="*",referenceId:t,referenceType:o})=>{let r="reaction_list",{accessibilityId:n}=re({pageId:e,componentId:r}),{reactions:i,error:a,isLoading:s,hasMore:l,loadMore:c}=jT({referenceId:t,referenceType:o,limit:25}),{reactions:p,reactionCount:u}=ZE(o,t),[g,f]=useState("All"),y=useRef(null),{config:C}=bi(),{removeReaction:v}=GE(o,t),h=w=>{f(w);};if(i==null||!C)return null;let x=useMemo(()=>C.map(w=>w.name),[C]),b=useMemo(()=>Object.keys(p).filter(w=>!x.includes(w)),[p]),M=useMemo(()=>b.reduce((w,k)=>w+p[k],0),[p]),I=useMemo(()=>n1e(i,g,x),[i,g]);return te.createElement("div",{className:Se.reactionListContainer,"data-qa-anchor":`${n}_header`},te.createElement("div",{className:Se.tabListContainer},te.createElement("div",{className:Se.tabList,"data-qa-anchor":`${n}_tab`},te.createElement("div",{"data-active":g==="All",className:Se.tabItem,onClick:()=>h("All")},te.createElement(N.Body,null,te.createElement("span",{className:Se.reactionEmoji},"All ",Hm(u)))),C.map(w=>{let{name:k,image:S}=w;return p[k]?te.createElement("div",{key:k,"data-active":g===k,className:Se.tabItem,onClick:()=>h(k)},te.createElement(N.Body,null,te.createElement("span",{className:Se.reactionEmoji},te.createElement(n5,{className:Se.reactionItem,reactionConfigItem:w}),Hm(p[k])))):null}),b.length>0&&te.createElement("div",{key:s5,"data-active":g===s5,className:Se.tabItem,onClick:()=>h(s5)},te.createElement(N.Body,null,te.createElement("span",{className:Se.reactionEmoji},te.createElement(Fm,{className:Se.reactionIcon}),Hm(M)))))),te.createElement("div",{ref:y,className:Se.reactionPanel},te.createElement(i1e,{currentRef:y.current,hasMore:l,loadMore:c,error:a,isLoading:s,filteredReactions:I,removeReaction:v})))};var l1e=te.createContext(void 0);var It=()=>{let e=useContext(l1e);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var ag={emptyStateRing:"Ol",errorRing:"Pl",uploadingProgressRing:"Ql","upload-progress":"xe"};var d1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},te.createElement("defs",null,te.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:i[0]}),te.createElement("stop",{offset:1,stopColor:i[1]}))),te.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,className:ag.emptyStateRing}))},c1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},te.createElement("defs",null,te.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:i[0]}),te.createElement("stop",{offset:1,stopColor:i[1]}))),te.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none",strokeDasharray:339,strokeDashoffset:0}))},p1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},te.createElement("defs",null,te.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:i[0]}),te.createElement("stop",{offset:1,stopColor:i[1]}))),te.createElement("circle",{className:ag.uploadingProgressRing,cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none"}))},zd=s=>{var l=s,{pageId:e="*",componentId:t="*",hasUnseen:o=!1,uploading:r=!1,isErrored:n=!1,size:i=64}=l,a=P(l,["pageId","componentId","hasUnseen","uploading","isErrored","size"]);let c="story_ring",{isExcluded:p}=A({pageId:e,componentId:t,elementId:c});return p?null:n?te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:"none",viewBox:`0 0 ${i} ${i}`},a),te.createElement("circle",{cx:i/2,cy:i/2,r:i/2-1,stroke:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-alert-default"),strokeWidth:"2"})):r?te.createElement(p1e,{pageId:e,componentId:t,elementId:c,size:i}):o?te.createElement(c1e,{pageId:e,componentId:t,elementId:c,size:i}):te.createElement(d1e,{pageId:e,componentId:t,elementId:c,size:i})};var u1e="global-admin";var WE=e=>e!=null&&e.length?e.includes(u1e):!1;var g1e="global-admin",{COMMUNITY_MODERATOR:f1e,CHANNEL_MODERATOR:y1e,MODERATOR:h1e,SUPER_MODERATOR:C1e}=hd,l5=e=>{if(!(e!=null&&e.length))return !1;let t=[f1e,y1e,h1e,C1e];return e.some(o=>t.includes(o))},m5=e=>e!=null&&e.length?e.includes(g1e):!1;var us=(e,t)=>e&&t?e.hasPermission("MANAGE_COMMUNITY_STORY").community(t):!1;function d5(e){if(!e)return;let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"Just now":r>=60&&r<3600?`${Math.floor(r/60)}m`:`${Math.floor(r/3600)}h`}var Um={errorIcon:"Wl",addStoryButton:"Zl",hiddenInput:"_l",storyWrapper:"es",storyTabContainer:"rs",storyAvatarContainer:"as",storyAvatar:"os",storyTitle:"ts","animate-ring":"we",progressRing:"is",progressRingStatic:"ls"};var I1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),te.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),te.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),qE=({pageId:e="*",componentId:t="*",communityId:o,onFileChange:r,onStoryClick:n})=>{let{isExcluded:i,accessibilityId:a,themeStyles:s}=re({pageId:e,componentId:t}),{stories:l}=ta({targetId:o,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),{community:c}=vd(o),{currentUserId:p,client:u}=De(),{user:g}=Cr(p),y=WE(g==null?void 0:g.roles)||us(u,o),C=(l==null?void 0:l.length)>0,v=l.some(M=>!(M!=null&&M.isSeen)),h=l.some(M=>(M==null?void 0:M.syncState)==="syncing"),x=l.some(M=>(M==null?void 0:M.syncState)==="error"),b=()=>{Array.isArray(l)&&l.length===0||n();};return i||!C&&!y?null:te.createElement("div",{"data-qa-anchor":a,style:s,className:gr(Um.storyTabContainer)},te.createElement("div",{className:gr(Um.storyWrapper)},C&&te.createElement(zd,{pageId:e,componentId:t,hasUnseen:v,uploading:h,isErrored:x,size:48}),te.createElement("button",{className:gr(Um.storyAvatarContainer),onClick:b},te.createElement(Zr,{pageId:e,componentId:t,community:c})),y&&te.createElement(FileTrigger,{onSelect:M=>{let I=Array.from(M);r(I[0]);}},te.createElement(is,{pageId:e,componentId:t})),x&&te.createElement(I1e,{className:gr(Um.errorIcon)})),te.createElement(yw,{lines:1},te.createElement("div",{className:gr(Um.storyTitle)},"Story")))};var Vd={storyTabContainer:"ss",storyTab:"cs",storyTabImage:"ns",storyTabContent:"ds",storyTabTitle:"ms",storyTabIcons:"ye",storyTabSkeleton:"ps",storyTabSkeletonAvatar:"gs","skeleton-pulse":"Y",storyTabSkeletonUsername:"hs"};var M1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M20.4187 17.2429V15.4838L21.6578 14.2365C21.6585 14.2358 21.6591 14.2351 21.6598 14.2345C22.3179 13.5807 22.7516 12.8355 22.75 11.9942C22.7484 11.1537 22.3123 10.4094 21.6598 9.75682L20.4187 8.51578V6.7571C20.4187 5.82907 20.1982 4.99346 19.6024 4.39762C19.0065 3.80179 18.1709 3.58128 17.2429 3.58128H15.4842L14.2432 2.34024L13.7265 2.85697L14.2432 2.34024C13.5864 1.68348 12.8389 1.24622 11.9953 1.24784C11.1522 1.24946 10.4079 1.68897 9.75583 2.34991L8.51619 3.58128H6.75709C5.8332 3.58128 4.99652 3.79543 4.39906 4.38966C3.80081 4.98466 3.58127 5.82245 3.58127 6.7571V8.51578L2.34222 9.75484C2.34186 9.75519 2.3415 9.75555 2.34114 9.75591C1.68254 10.4099 1.24839 11.1554 1.25 11.9971C1.25162 12.8372 1.68721 13.5812 2.33924 14.2335C2.33957 14.2338 2.3399 14.2342 2.34023 14.2345L3.58127 15.4838V17.2429C3.58127 18.1709 3.80178 19.0066 4.39761 19.6024C4.99345 20.1982 5.82907 20.4187 6.75709 20.4187H8.51577L9.75483 21.6578C9.75525 21.6582 9.75567 21.6586 9.75609 21.6591C10.4102 22.3177 11.1557 22.7516 11.9982 22.75C12.8389 22.7484 13.5848 22.3133 14.2412 21.6618L14.2432 21.6598L15.4842 20.4187H17.2429C18.1709 20.4187 19.0065 20.1982 19.6024 19.6024C20.1982 19.0066 20.4187 18.1709 20.4187 17.2429ZM11.1362 14.6127L15.3255 8.63293C15.3257 8.63263 15.3259 8.63232 15.3261 8.63202C15.3555 8.59049 15.3769 8.56736 15.3897 8.55517C15.3961 8.54919 15.4003 8.54586 15.4025 8.54426L15.4048 8.54269L15.4054 8.54234L15.4054 8.54232L15.4062 8.542C15.4072 8.54166 15.4101 8.54065 15.4157 8.53942C15.4272 8.53692 15.4517 8.53308 15.4953 8.53308C15.5882 8.53308 15.6273 8.563 15.6388 8.57409C15.649 8.58379 15.6664 8.60504 15.6669 8.65903C15.6668 8.65902 15.6656 8.67471 15.6559 8.70306C15.6448 8.73553 15.6277 8.7697 15.6066 8.79916L15.6062 8.79975L10.738 15.6292C10.7079 15.6666 10.6872 15.6779 10.6764 15.6829C10.6626 15.6894 10.6288 15.7017 10.5567 15.7017C10.4668 15.7017 10.4177 15.6786 10.3664 15.6272L7.5945 12.5262L7.58765 12.5185L7.58058 12.511C7.58023 12.5106 7.57454 12.5043 7.5688 12.489C7.56299 12.4736 7.55926 12.4545 7.55926 12.4347C7.55926 12.3583 7.58347 12.332 7.59029 12.3253C7.59747 12.3182 7.63028 12.2892 7.72221 12.2892C7.78716 12.2892 7.81058 12.2992 7.8149 12.3011L7.81503 12.3012C7.81882 12.3028 7.8367 12.3105 7.87134 12.3478L9.9633 14.6828L10.5939 15.3867L11.1362 14.6127Z",fill:"#1054DE",stroke:"white",strokeWidth:"1.5"})),JE=M1e;var gs={container:"fs",avatarContainer:"bs",verifiedIcon:"us",avatarBackground:"vs",avatar:"xs",displayName:"ws",errorIcon:"ys"};var _1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),te.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),te.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),T1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),te.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 0c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8z"}),te.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 2c2.21 0 4 1.79 4 4v1h-1V6c0-1.104-.896-2-2-2s-2 .896-2 2v1H4V6c0-2.21 1.79-4 4-4z"})),YE=({pageId:e,componentId:t,targetId:o,hasUnseen:r,onClick:n,isErrored:i})=>{let{community:a}=_t({communityId:o}),s=it({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return te.createElement("div",{className:gr(gs.container),onClick:n},te.createElement("div",{className:gs.avatarContainer},te.createElement(zd,{pageId:e,componentId:t,hasUnseen:r,isErrored:i}),te.createElement("div",{className:gs.avatarBackground},s&&te.createElement("img",{className:gs.avatar,src:s,alt:a==null?void 0:a.displayName})),i&&te.createElement(_1e,{className:gs.errorIcon}),(a==null?void 0:a.isOfficial)&&!i&&te.createElement(JE,{className:gs.verifiedIcon})),te.createElement(N.Caption,{className:gr(gs.displayName)},!(a!=null&&a.isPublic)&&te.createElement(T1e,null),a==null?void 0:a.displayName))};var c5=e=>{let s=pt({fetcher:StoryRepository.getGlobalStoryTargets,params:e,shouldCall:!0}),{items:t,hasMore:o,loadMore:r,isLoading:n}=s,i=P(s,["items","hasMore","loadMore","isLoading"]);return d({stories:t,hasMore:o,isLoading:n,loadMoreStories:()=>{o&&!n&&r();}},i)};var N1e=10,eB=({pageId:e="*",componentId:t="*",goToViewStoryPage:o})=>{let{isExcluded:r,accessibilityId:n,themeStyles:i}=re({pageId:e,componentId:t}),{stories:a,isLoading:s,hasMore:l,loadMoreStories:c}=c5({seenState:"smart",limit:N1e}),p=useRef(null),u=useRef(null);return useEffect(()=>{if(!p.current)return;let g=new IntersectionObserver(f=>{f[0].isIntersecting&&l&&c();},{root:p.current,rootMargin:"0px",threshold:.9});return ()=>{g&&g.disconnect();}},[p==null?void 0:p.current]),r||(a==null?void 0:a.length)===0?null:te.createElement("div",{"data-qa-anchor":n,style:i,className:Vd.storyTabContainer,ref:p},s?Array.from({length:10}).map((g,f)=>te.createElement("div",{key:f,className:Vd.storyTabSkeleton},te.createElement("div",{className:Vd.storyTabSkeletonAvatar}),te.createElement("div",{className:Vd.storyTabSkeletonUsername}))):a.map(g=>te.createElement(YE,{pageId:e,componentId:t,key:g.targetId,targetId:g.targetId,hasUnseen:g.hasUnseen,isErrored:g.failedStoriesCount>0,onClick:()=>o({storyTargets:a,storyTarget:g}),size:64})),te.createElement("div",{ref:u,style:{height:"1px",width:"1px"}}))};var $m=o=>{var r=o,{pageId:e="*"}=r,t=P(r,["pageId"]);let n="story_tab_component",{AmityGlobalFeedComponentBehavior:i}=It(),{goToViewStoryPage:a,goToDraftStoryPage:s}=Be(),{setFile:l}=yi();return (()=>{switch(t.type){case"communityFeed":return te.createElement(qE,{pageId:e,componentId:n,communityId:t.communityId||"",onFileChange:p=>{l(p),p&&s(t.communityId||"","community",p.type.includes("image")?{type:"image",url:URL.createObjectURL(p)}:{type:"video",url:URL.createObjectURL(p)},"communityFeed");},onStoryClick:()=>a({targetId:t.communityId||"",targetType:"community",storyType:"communityFeed"})});case"globalFeed":return te.createElement(eB,{pageId:e,componentId:n,goToViewStoryPage:({storyTarget:p,storyTargets:u})=>{var g;(g=i==null?void 0:i.goToViewStoryPage)==null||g.call(i,{targetId:p.targetId,targetType:p.targetType,storyType:"globalFeed",targetIds:u.map(f=>f.targetId)});}});default:return null}})()};var oB={createPostMenu:"ks"};var p5={createPostButton:"js",createPostButton__text:"zs",createPostButton__icon:"Xs"};var A1e=e=>te.createElement("svg",d({width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M14.0625 12.7812L15.0625 11.7812C15.2188 11.625 15.5 11.75 15.5 11.9688V16.5C15.5 17.3438 14.8125 18 14 18H3C2.15625 18 1.5 17.3438 1.5 16.5V5.5C1.5 4.6875 2.15625 4 3 4H11.5312C11.75 4 11.875 4.28125 11.7188 4.4375L10.7188 5.4375C10.6562 5.5 10.5938 5.5 10.5312 5.5H3V16.5H14V12.9688C14 12.9062 14 12.8438 14.0625 12.7812ZM18.9375 6.5L10.75 14.6875L7.90625 15C7.09375 15.0938 6.40625 14.4062 6.5 13.5938L6.8125 10.75L15 2.5625C15.7188 1.84375 16.875 1.84375 17.5938 2.5625L18.9375 3.90625C19.6562 4.625 19.6562 5.78125 18.9375 6.5ZM15.875 7.4375L14.0625 5.625L8.25 11.4375L8 13.5L10.0625 13.25L15.875 7.4375ZM17.875 4.96875L16.5312 3.625C16.4062 3.46875 16.1875 3.46875 16.0625 3.625L15.125 4.5625L16.9375 6.40625L17.9062 5.4375C18.0312 5.28125 18.0312 5.09375 17.875 4.96875Z"}));function sg({pageId:e="*",componentId:t="*",defaultClassName:o,onClick:r}){let n="create_post_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(O,{className:p5.createPostButton,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i,style:p},te.createElement(oe,{defaultIcon:()=>te.createElement(A1e,{className:gr(p5.createPostButton__icon,o)}),imgIcon:()=>te.createElement("img",{src:a.image,alt:c}),configIconName:a.image,defaultIconName:s.image}),te.createElement(N.Body,{className:p5.createPostButton__text},a.text))}function u5({pageId:e}){let t="create_post_menu",{AmityCreatePostMenuComponentBehavior:o}=It();return te.createElement("div",{className:oB.createPostMenu},te.createElement(sg,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToSelectPostTargetPage)==null?void 0:r.call(o)}}),te.createElement(H3,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToStoryTargetSelectionPage)==null?void 0:r.call(o)}}))}var jd={mediaAttachment:"Ys",mediaAttachment__swipeDown:"Cs",mediaAttachment__wrapMedia:"As",mediaAttachment__wrapMedia_2items:"Ms"};var g5={cameraButton:"Ss",cameraButton__icon:"Es",cameraButton_input:"Is"};var U1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M19.5 19.5H4.5C4.10218 19.5 3.72064 19.342 3.43934 19.0607C3.15804 18.7794 3 18.3978 3 18V7.5C3 7.10218 3.15804 6.72064 3.43934 6.43934C3.72064 6.15804 4.10218 6 4.5 6H7.49945L8.99945 3.75H14.9995L16.4995 6H19.5C19.8978 6 20.2794 6.15804 20.5607 6.43934C20.842 6.72064 21 7.10218 21 7.5V18C21 18.3978 20.842 18.7794 20.5607 19.0607C20.2794 19.342 19.8978 19.5 19.5 19.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),te.createElement("path",{d:"M12 15.75C13.864 15.75 15.375 14.239 15.375 12.375C15.375 10.511 13.864 9 12 9C10.136 9 8.625 10.511 8.625 12.375C8.625 14.239 10.136 15.75 12 15.75Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}));function Gd({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,isVisibleImage:n,isVisibleVideo:i,onVideoFileChange:a,onImageFileChange:s}){let l="camera_button",{themeStyles:c,isExcluded:p,config:u,accessibilityId:g,uiReference:f,defaultConfig:y}=A({pageId:e,componentId:t,elementId:l});if(p)return null;let C=()=>{document.getElementById("upload").click();},v=useCallback(h=>{h.preventDefault(),h.stopPropagation();let x=h.target.files?[...h.target.files]:[],b=x.some(I=>I.type.startsWith("image/")),M=x.some(I=>I.type.startsWith("video/"));b?s==null||s(x):M&&(a==null||a(x));},[s,a]);return te.createElement(O,{style:c,"data-qa-anchor":g,className:g5.cameraButton,onPress:C},te.createElement(oe,{defaultIcon:()=>te.createElement(U1e,{className:gr(g5.cameraButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:u.icon,alt:f,className:o}),defaultIconName:y.icon,configIconName:u.icon}),u.text&&te.createElement(N.BodyBold,null,u.text),te.createElement("input",{type:"file",onChange:v,id:"upload",accept:n&&i?"image/*,video/*":n?"image/*":"video/*",className:g5.cameraButton_input}))}var f5={imageButton:"Rs",imageButton__icon:"Us",imageButton_input:"Bs"};var V1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M20.25 4.5H3.75C3.33579 4.5 3 4.83579 3 5.25V18.75C3 19.1642 3.33579 19.5 3.75 19.5H20.25C20.6642 19.5 21 19.1642 21 18.75V5.25C21 4.83579 20.6642 4.5 20.25 4.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),te.createElement("path",{d:"M3 15.7499L7.71966 11.0302C7.7893 10.9606 7.87198 10.9053 7.96297 10.8676C8.05397 10.8299 8.1515 10.8105 8.24999 10.8105C8.34848 10.8105 8.44601 10.8299 8.537 10.8676C8.62799 10.9053 8.71067 10.9606 8.78032 11.0302L12.9697 15.2196C13.0393 15.2892 13.122 15.3444 13.213 15.3821C13.304 15.4198 13.4015 15.4392 13.5 15.4392C13.5985 15.4392 13.696 15.4198 13.787 15.3821C13.878 15.3444 13.9607 15.2892 14.0303 15.2196L15.9697 13.2802C16.0393 13.2106 16.122 13.1553 16.213 13.1176C16.304 13.0799 16.4015 13.0605 16.5 13.0605C16.5985 13.0605 16.696 13.0799 16.787 13.1176C16.878 13.1553 16.9607 13.2106 17.0303 13.2802L21 17.2499",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),te.createElement("path",{d:"M14.625 10.5C15.2463 10.5 15.75 9.99632 15.75 9.375C15.75 8.75368 15.2463 8.25 14.625 8.25C14.0037 8.25 13.5 8.75368 13.5 9.375C13.5 9.99632 14.0037 10.5 14.625 10.5Z"}));function Zd({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onImageFileChange:n}){let i="image_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:c,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;let g=()=>{document.getElementById("image-upload").click();},f=y=>{y.preventDefault(),y.stopPropagation(),n==null||n(y.target.files?[...y.target.files]:[]);};return te.createElement(O,{type:"button",style:a,"data-qa-anchor":c,className:f5.imageButton,onPress:g},te.createElement(oe,{defaultIcon:()=>te.createElement(V1e,{className:gr(f5.imageButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&te.createElement(N.BodyBold,null,l.text),te.createElement("input",{type:"file",onChange:f,multiple:!0,id:"image-upload",accept:"image/*",className:f5.imageButton_input}))}var y5={videoButton:"Ds",videoButton__icon:"Fs",videoButton__input:"Hs"};var Z1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:e.stroke,strokeWidth:"1.3",strokeMiterlimit:"10"}),te.createElement("path",{d:"M16 12L10 8V16L16 12Z",stroke:e.stroke,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}));function Qd({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onVideoFileChange:n}){let i="video_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:c,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;et();let f=()=>{document.getElementById("video-upload").click();},y=C=>{C.preventDefault(),C.stopPropagation(),n==null||n(C.target.files?[...C.target.files]:[]);};return te.createElement(O,{style:a,"data-qa-anchor":c,className:y5.videoButton,onPress:f},te.createElement(oe,{defaultIcon:()=>te.createElement(Z1e,{className:gr(y5.videoButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&te.createElement(N.BodyBold,null,l.text),te.createElement("input",{type:"file",accept:"video/*",onChange:y,multiple:!0,id:"video-upload",className:y5.videoButton__input}))}function h5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:c}=re({pageId:e,componentId:a});return c?null:te.createElement("div",{style:s,"data-qa-anchor":l,className:jd.mediaAttachment},te.createElement("div",{className:jd.mediaAttachment__swipeDown}),te.createElement("div",{className:gr(!o||!r||!t?jd.mediaAttachment__wrapMedia_2items:jd.mediaAttachment__wrapMedia)},t&&te.createElement(Gd,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&te.createElement(Zd,{pageId:e,componentId:a,onImageFileChange:i}),r&&te.createElement(Qd,{pageId:e,componentId:a,onVideoFileChange:n})))}var mg={detailedMediaAttachment:"Ls",detailedMediaAttachment__swipeDown:"Ts"};function C5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="detailed_media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:c}=re({pageId:e,componentId:a});return c?null:te.createElement("div",{style:s,"data-qa-anchor":l,className:mg.detailedMediaAttachment},te.createElement("div",{className:mg.detailedMediaAttachment__swipeDown}),t&&te.createElement(Gd,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&te.createElement(Zd,{pageId:e,componentId:a,onImageFileChange:i}),r&&te.createElement(Qd,{pageId:e,componentId:a,onVideoFileChange:n}))}var rB={userSearchResult:"Vs"};var fs={userItem:"qs",userItem__leftPane:"Gs",userItem__rightPane:"Js",userItem__avatar:"Ks",userItem__brandIcon:"Ns",userItem__userName:"Os",userItem__userName__text:"Ps"};var J1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M13.6435 20.7628C12.5251 21.8728 11.4652 21.8812 10.3552 20.7628L9.10328 19.5109C8.98644 19.394 8.88629 19.3607 8.73606 19.3607H6.9667C5.38931 19.3607 4.63817 18.6095 4.63817 17.0321V15.2628C4.63817 15.1125 4.59644 15.004 4.48794 14.8955L3.23604 13.6353C2.12602 12.5253 2.11767 11.4653 3.23604 10.3553L4.48794 9.10342C4.59644 8.99492 4.63817 8.88642 4.63817 8.73619V6.96684C4.63817 5.37275 5.38931 4.6383 6.9667 4.6383H8.73606C8.88629 4.6383 8.99478 4.59657 9.10328 4.48807L10.3552 3.24452C11.4652 2.11781 12.5251 2.11781 13.6435 3.23617L14.8954 4.48807C15.0039 4.59657 15.1124 4.6383 15.2626 4.6383H17.032C18.6094 4.6383 19.3605 5.38944 19.3605 6.96684V8.73619C19.3605 8.88642 19.4023 8.98657 19.5108 9.10342L20.7627 10.3553C21.8727 11.4653 21.881 12.5253 20.7627 13.6353L19.5108 14.8955C19.4023 15.004 19.3605 15.1125 19.3605 15.2628V17.0321C19.3605 18.6095 18.6094 19.3607 17.032 19.3607H15.2626C15.1124 19.3607 15.0123 19.394 14.8954 19.5109L13.6435 20.7628Z",fill:"url(#paint0_linear_482_20867)"}),te.createElement("path",{d:"M9.90432 15.9736C10.0879 16.1656 10.3216 16.2741 10.6137 16.2741C10.9225 16.2741 11.1729 16.1656 11.3649 15.9152L16.047 9.34691C16.1722 9.17164 16.2389 8.96299 16.2389 8.79607C16.2389 8.312 15.8717 7.95312 15.3543 7.95312C15.0204 7.95312 14.8034 8.06997 14.6031 8.35373L10.5803 14.0958L8.56896 11.8507C8.38535 11.6504 8.1767 11.5586 7.89293 11.5586C7.37548 11.5586 7.0166 11.9175 7.0166 12.4182C7.0166 12.6269 7.09172 12.8355 7.2336 12.9858L9.90432 15.9736Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_482_20867",x1:"5.40039",y1:"4.79844",x2:"5.40039",y2:"23.3984",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#FFDB7D"}),te.createElement("stop",{offset:"1",stopColor:"#D49900"})))),nB=J1e;var qd=({className:e})=>te.createElement(nB,{className:e});var iB=({user:e})=>{let{onClickUser:t}=Be();return te.createElement(O,{key:e.userId,className:fs.userItem,onPress:()=>t(e.userId)},te.createElement("div",{className:fs.userItem__leftPane},te.createElement(Wo,{userId:e.userId,className:fs.userItem__avatar})),te.createElement("div",{className:fs.userItem__rightPane},te.createElement("div",{className:fs.userItem__userName},te.createElement(N.BodyBold,{className:fs.userItem__userName__text},e.displayName)),e.isBrand?te.createElement(qd,{className:fs.userItem__brandIcon}):null))};var fn={userSearchItemSkeleton:"ke",userSearchItemSkeleton__leftPane:"Qs",userSearchItemSkeleton__information:"Ws",userSearchItemSkeleton__content:"Zs",userSearchItemSkeleton__animation:"_s","skeleton-pulse":"je",userSearchItemSkeleton__userAvatar:"ec",userSearchItemSkeleton__information__title:"rc",userSearchItemSkeleton__information__subtitle:"ac"};var aB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o}=re({pageId:e,componentId:t});return te.createElement("div",{"data-qa-anchor":o,className:gr(fn.userSearchItemSkeleton,fn.userSearchItemSkeleton__animation)},te.createElement("div",{className:fn.userSearchItemSkeleton__leftPane},te.createElement("div",{className:gr(fn.userSearchItemSkeleton__userAvatar,fn.userSearchItemSkeleton__animation)})),te.createElement("div",{className:gr(fn.userSearchItemSkeleton__information,fn.userSearchItemSkeleton__animation)},te.createElement("div",{className:gr(fn.userSearchItemSkeleton__information__title,fn.userSearchItemSkeleton__animation)}),te.createElement("div",{className:gr(fn.userSearchItemSkeleton__information__subtitle,fn.userSearchItemSkeleton__animation)})))};var x5=({pageId:e="*",userCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="user_search_result",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=re({pageId:e,componentId:n}),[u,g]=useState(null);return Bo({onIntersect:()=>r(),node:u}),te.createElement("div",{className:rB.userSearchResult,style:p},t.map(f=>te.createElement(iB,{key:f.userId,user:f})),o?Array.from({length:5}).map((f,y)=>te.createElement(aB,{key:y,pageId:e,componentId:n})):null,te.createElement("div",{ref:f=>g(f)}))};var sB={communitySearchResult:"oc",communitySearchResult__communityItem:"ze",communitySearchResult__communityItem__leftPane:"tc",communitySearchResult__communityItem__rightPane:"ic",communityItem__communityName:"lc",communityItem__communityName__private:"sc",communityItem__communityCategory:"cc",communityItem__communityMemberCount:"nc"};var lB={communityDisplayName:"dc"};function pa({pageId:e="*",componentId:t="*",community:o}){var s;let r="community_display_name",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement(N.BodyBold,{className:lB.communityDisplayName,style:a,"data-qa-anchor":n},(s=o==null?void 0:o.displayName)!=null?s:"My Timeline")}var b5={communityOfficialBadge:"mc",communityOfficialBadge__iconSvg:"pc"};var ile=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),te.createElement("path",{d:"M9.58112 15.4777C10.2749 16.1767 10.9373 16.1715 11.6363 15.4777L12.4188 14.6953C12.4918 14.6223 12.5544 14.6014 12.6483 14.6014H13.7541C14.74 14.6014 15.2095 14.1319 15.2095 13.1461V12.0402C15.2095 11.9463 15.2355 11.8785 15.3034 11.8107L16.0858 11.023C16.7848 10.3293 16.7796 9.66681 16.0858 8.97305L15.3034 8.19061C15.2355 8.11758 15.2095 8.05499 15.2095 7.9611V6.85525C15.2095 5.86938 14.74 5.39991 13.7541 5.39991H12.6483C12.5544 5.39991 12.4866 5.37383 12.4188 5.30602L11.6363 4.52358C10.9373 3.82461 10.2749 3.82461 9.58112 4.5288L8.79868 5.30602C8.73087 5.37383 8.66306 5.39991 8.56917 5.39991H7.46332C6.47745 5.39991 6.00799 5.85894 6.00799 6.85525V7.9611C6.00799 8.05499 5.9819 8.1228 5.91409 8.19061L5.13165 8.97305C4.43268 9.66681 4.43789 10.3293 5.13165 11.023L5.91409 11.8107C5.9819 11.8785 6.00799 11.9463 6.00799 12.0402V13.1461C6.00799 14.1319 6.47745 14.6014 7.46332 14.6014H8.56917C8.66306 14.6014 8.72565 14.6223 8.79868 14.6953L9.58112 15.4777ZM9.74282 12.6714C9.56026 12.6714 9.4142 12.6036 9.29944 12.4836L7.63024 10.6162C7.54156 10.5223 7.49462 10.3919 7.49462 10.2615C7.49462 9.94849 7.71892 9.72419 8.04232 9.72419C8.21968 9.72419 8.35008 9.78157 8.46484 9.90676L9.72196 11.3099L12.2362 7.72115C12.3614 7.5438 12.497 7.47077 12.7057 7.47077C13.0291 7.47077 13.2586 7.69507 13.2586 7.99761C13.2586 8.10193 13.2169 8.23234 13.1386 8.34188L10.2123 12.4471C10.0923 12.6036 9.93583 12.6714 9.74282 12.6714Z"}));function S1({pageId:e="*",componentId:t="*"}){let o="community_official_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(oe,{defaultIcon:()=>te.createElement(ile,{style:l,className:gr(b5.communityOfficialBadge,b5.communityOfficialBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>te.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:b5.communityOfficialBadge}),configIconName:n.icon,defaultIconName:i.icon})}var I5={communityPrivateBadge:"gc",communityPrivateBadge__iconSvg:"hc"};var lle=e=>te.createElement("svg",d({width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M5.60938 9.72656C5.26562 9.72656 5.00781 9.46875 5.00781 9.125V7.75C5.00781 7.42773 5.26562 7.14844 5.60938 7.14844C5.93164 7.14844 6.21094 7.42773 6.21094 7.75V9.125C6.21094 9.46875 5.93164 9.72656 5.60938 9.72656ZM10.4219 6.03125V10.8438C10.4219 11.4238 9.94922 11.875 9.39062 11.875H1.82812C1.24805 11.875 0.796875 11.4238 0.796875 10.8438V6.03125C0.796875 5.47266 1.24805 5 1.82812 5H2.51562V3.96875C2.51562 2.27148 3.89062 0.875 5.60938 0.875C7.32812 0.896484 8.70312 2.29297 8.70312 4.01172V5H9.39062C9.94922 5 10.4219 5.47266 10.4219 6.03125ZM3.54688 5H7.67188V3.96875C7.67188 2.85156 6.72656 1.90625 5.60938 1.90625C4.4707 1.90625 3.54688 2.85156 3.54688 3.96875V5ZM9.39062 6.03125H1.82812V10.8438H9.39062V6.03125Z"}));function N1({pageId:e="*",componentId:t="*"}){let o="community_private_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(oe,{defaultIcon:()=>te.createElement(lle,{style:l,className:gr(I5.communityPrivateBadge,I5.communityPrivateBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>te.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:I5.communityPrivateBadge}),configIconName:n.icon,defaultIconName:i.icon})}var mB={communityMembersCount:"fc"};function dg({pageId:e="*",componentId:t="*",memberCount:o}){let r="community_members_count",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:r});return s?null:te.createElement(N.Caption,{className:mB.communityMembersCount,style:c,"data-qa-anchor":n},`${lb(o)||0} ${o!==1?"members":"member"}`)}var ys={communityItem:"Xe",communityItem__leftPane:"bc",communityItem__rightPane:"uc",communityItem__communityName:"vc",communityItem__communityName__private:"xc",communityItem__communityCategory:"wc",communityItem__communityMemberCount:"yc"};var ule=({community:e,pageId:t,componentId:o})=>{let r=Ra(e.categoryIds),i=r.length-3;return te.createElement(te.Fragment,null,r.slice(0,3).map(a=>te.createElement(Ka,{pageId:t,componentId:o,categoryName:a.name})),i>0&&te.createElement(Ka,{pageId:t,componentId:o,categoryName:`+${i}`}))},dB=({community:e,pageId:t="*",componentId:o="*"})=>{let{onClickCommunity:r}=Be();return te.createElement(O,{key:e.communityId,className:ys.communityItem,onPress:()=>{r(e.communityId);}},te.createElement("div",{className:ys.communityItem__leftPane},te.createElement(Zr,{pageId:t,componentId:o,community:e})),te.createElement("div",{className:ys.communityItem__rightPane},te.createElement("div",{className:ys.communityItem__communityName},!e.isPublic&&te.createElement("div",{className:ys.communityItem__communityName__private},te.createElement(N1,{pageId:t,componentId:o})),te.createElement(pa,{pageId:t,componentId:o,community:e}),e.isOfficial&&te.createElement(S1,{pageId:t,componentId:o})),te.createElement("div",{className:ys.communityItem__communityCategory},te.createElement(ule,{pageId:t,componentId:o,community:e})),te.createElement("div",{className:ys.communityItem__communityMemberCount},te.createElement(dg,{pageId:t,componentId:o,memberCount:e.membersCount}))))};var yn={communityItemSkeleton:"Ye",communityItemSkeleton__leftPane:"kc",communityItemSkeleton__information:"jc",communityItemSkeleton__content:"zc",communityItemSkeleton__animation:"Xc","skeleton-pulse":"Ce",communityItemSkeleton__userAvatar:"Yc",communityItemSkeleton__information__title:"Cc",communityItemSkeleton__information__subtitle:"Ac"};var cB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=re({pageId:e,componentId:t});return te.createElement("div",{"data-qa-anchor":o,style:s,className:gr(yn.communityItemSkeleton,yn.communityItemSkeleton__animation)},te.createElement("div",{className:yn.communityItemSkeleton__leftPane},te.createElement("div",{className:gr(yn.communityItemSkeleton__userAvatar,yn.communityItemSkeleton__animation)})),te.createElement("div",{className:gr(yn.communityItemSkeleton__information,yn.communityItemSkeleton__animation)},te.createElement("div",{className:gr(yn.communityItemSkeleton__information__title,yn.communityItemSkeleton__animation)}),te.createElement("div",{className:gr(yn.communityItemSkeleton__information__subtitle,yn.communityItemSkeleton__animation)})))};var hs=({pageId:e="*",communityCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="community_search_result",{themeStyles:i}=re({pageId:e,componentId:n}),[a,s]=useState(null);return Bo({onIntersect:()=>r(),node:a}),te.createElement("div",{className:sB.communitySearchResult,style:i},t.map(l=>te.createElement(dB,{key:l.communityId,community:l,pageId:e,componentId:n})),o?Array.from({length:5}).map((l,c)=>te.createElement(cB,{key:c,pageId:e,componentId:n})):null,te.createElement("div",{ref:l=>s(l)}))};var pB={clearButton:"Mc"};function hle(e){return te.createElement("svg",d({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M8.82715 17.3906C13.4238 17.3906 17.2119 13.5938 17.2119 9.00586C17.2119 4.40918 13.415 0.612305 8.82715 0.612305C4.23047 0.612305 0.442383 4.40918 0.442383 9.00586C0.442383 13.5938 4.23926 17.3906 8.82715 17.3906ZM5.88281 12.5479C5.54883 12.5479 5.28516 12.2842 5.28516 11.9502C5.28516 11.792 5.34668 11.6514 5.46973 11.5283L7.9834 9.01465L5.46973 6.49219C5.34668 6.37793 5.28516 6.22852 5.28516 6.07031C5.28516 5.74512 5.54883 5.49023 5.88281 5.49023C6.0498 5.49023 6.19043 5.54297 6.2959 5.66602L8.82715 8.17969L11.3584 5.65723C11.4902 5.52539 11.6221 5.47266 11.7803 5.47266C12.1055 5.47266 12.3691 5.73633 12.3691 6.06152C12.3691 6.22852 12.3164 6.36035 12.1934 6.4834L9.6709 9.01465L12.1846 11.5283C12.3076 11.6514 12.3691 11.7832 12.3691 11.9502C12.3691 12.2842 12.1055 12.5479 11.7627 12.5479C11.5957 12.5479 11.4551 12.4863 11.332 12.3721L8.82715 9.84961L6.32227 12.3721C6.19922 12.4863 6.0498 12.5479 5.88281 12.5479Z"}))}var E1=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="clear_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{"data-qa-anchor":a,className:pB.clearButton,style:u,onPress:n},te.createElement(oe,{defaultIcon:()=>te.createElement(hle,{className:o}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var Cle=e=>te.createElement("svg",d({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M16.7109 14.6562C16.8672 14.8125 16.8672 15.0625 16.7109 15.1875L15.9922 15.9062C15.8672 16.0625 15.6172 16.0625 15.4609 15.9062L11.6797 12.125C11.6172 12.0312 11.5859 11.9375 11.5859 11.8438V11.4375C10.4297 12.4062 8.96094 13 7.33594 13C3.74219 13 0.835938 10.0938 0.835938 6.5C0.835938 2.9375 3.74219 0 7.33594 0C10.8984 0 13.8359 2.9375 13.8359 6.5C13.8359 8.125 13.2109 9.625 12.2422 10.75H12.6484C12.7422 10.75 12.8359 10.8125 12.9297 10.875L16.7109 14.6562ZM7.33594 11.5C10.0859 11.5 12.3359 9.28125 12.3359 6.5C12.3359 3.75 10.0859 1.5 7.33594 1.5C4.55469 1.5 2.33594 3.75 2.33594 6.5C2.33594 9.28125 4.55469 11.5 7.33594 11.5Z"}));function cg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r}){let n="search_icon",{config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:n});return s?null:te.createElement(oe,{defaultIcon:()=>te.createElement(Cle,{className:o,style:c}),imgIcon:()=>te.createElement("img",{src:i.icon,alt:l,className:r,style:c}),defaultIconName:a.icon,configIconName:i.icon})}var Cs={topSearchBar:"Sc",topSearchBar__inputBar:"Ec",topSearchBar__textInput:"Ic",topSearchBar__searchIcon:"Rc",topSearchBar__searchIcon_img:"Uc",topSearchBar__clearButton:"Bc",topSearchBar__clearButton__img:"Dc"};function Wm({pageId:e="*",search:t}){let o="top_search_bar",{config:r,isExcluded:n,themeStyles:i}=re({pageId:e,componentId:o}),{onBack:a}=Be(),[s,l]=useState("");return useEffect(()=>{t(s);},[s]),n?null:te.createElement("div",{className:Cs.topSearchBar,style:i},te.createElement("div",{className:Cs.topSearchBar__inputBar},te.createElement(cg,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__searchIcon,imgClassName:Cs.topSearchBar__searchIcon_img}),te.createElement("input",{className:Cs.topSearchBar__textInput,type:"text",value:s,placeholder:r.text,onChange:c=>l(c.target.value)}),s!=""?te.createElement(E1,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__clearButton,imgClassName:Cs.topSearchBar__clearButton__img,onPress:()=>{l("");}}):null),te.createElement(A3,{pageId:e,componentId:o,onPress:()=>a()}))}var pg={menuButton:"Fc",menuButton__button:"Hc"};var M5=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))};function ec({pageId:e="*",componentId:t="*",onClick:o}){let r="menu_button",{isExcluded:n,accessibilityId:i,themeStyles:a,config:s,defaultConfig:l,uiReference:c}=A({pageId:e,componentId:t,elementId:r});return n?null:te.createElement(O,{onPress:o,"data-qa-anchor":i,className:pg.menuButton__button},te.createElement(oe,{defaultIcon:()=>te.createElement(M5,{className:pg.menuButton,style:a}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:c}),defaultIconName:l.icon,configIconName:s.icon}))}function ug({pageId:e="*",componentId:t="*",defaultIconClassName:o,imgIconClassName:r}){let n="share_button";A({pageId:e,componentId:t,elementId:n});return null}var wle=e=>te.createElement("svg",d({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"})),tc=wle;var _5={commentButton:"Lc",commentButton__icon:"Tc",commentButton__text:"Vc"};var Ple=e=>te.createElement("svg",d({width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9 0.1875C13.6816 0.1875 17.4668 3.30859 17.4668 7.09375C17.4668 10.9121 13.6816 14 9 14C7.9043 14 6.8418 13.834 5.91211 13.5352C4.91602 14.2324 3.32227 15.0625 1.29688 15.0625C0.964844 15.0625 0.666016 14.8965 0.533203 14.5977C0.433594 14.2988 0.466797 13.9668 0.699219 13.7344C0.732422 13.7344 1.76172 12.6055 2.22656 11.3105C1.13086 10.1484 0.5 8.6875 0.5 7.09375C0.5 3.30859 4.28516 0.1875 9 0.1875ZM9 12.4062C12.7852 12.4062 15.9062 10.0488 15.9062 7.09375C15.9062 4.17188 12.7852 1.78125 9 1.78125C5.18164 1.78125 2.09375 4.17188 2.09375 7.09375C2.09375 8.52148 2.79102 9.58398 3.38867 10.2148L4.08594 10.9453L3.7207 11.875C3.55469 12.3398 3.32227 12.8047 3.05664 13.2031C3.85352 12.9375 4.51758 12.5723 4.98242 12.2402L5.61328 11.7754L6.37695 12.0078C7.20703 12.2734 8.10352 12.4062 9 12.4062Z"}));function gg({pageId:e="*",componentId:t="*",commentsCount:o,defaultIconClassName:r,imgIconClassName:n,onPress:i=()=>{}}){let a="comment_button",{accessibilityId:s,config:l,defaultConfig:c,isExcluded:p,uiReference:u}=A({pageId:e,componentId:t,elementId:a});return p?null:te.createElement(O,{onPress:i},te.createElement(oe,{"data-qa-anchor":s,defaultIcon:()=>te.createElement("div",{className:gr(_5.commentButton)},te.createElement(Ple,{className:gr(_5.commentButton__icon,r)}),te.createElement(N.BodyBold,{className:_5.commentButton__text},typeof o=="number"?o:l.text)),imgIcon:()=>te.createElement("img",{src:l.icon,alt:u,className:n}),defaultIconName:c.icon,configIconName:l.icon}))}var kle=createContext({drawerData:null,setDrawerData:()=>{},removeDrawerData:()=>{}});var qm=()=>{let{setDrawerData:e,removeDrawerData:t}=useContext(kle);return {setDrawerData:e,removeDrawerData:t}};var he={postContent:"qc",postContent__bar:"Gc",postContent__bar__userAvatar:"Jc",postContent__bar__detail:"Kc",postContent__bar__information__subtitle:"Nc",postContent__bar__information__subtitle__moderator:"Oc",postContent__bar__information__subtitle__brand:"Pc",postContent__bar__information__subtitle__separator:"Qc",postContent__bar__actionButton:"Wc",postContent__content_and_reactions:"Zc",postContent__content:"_c",postContent__divider:"en",postContent__reactionBar:"rn",postContent__reactionBar__leftPane:"an",postContent__reactionBar__rightPane:"on",postContent__reactionBar__leftPane__icon:"tn",postContent__reactionBar__leftPane__iconImg:"in",postTitle:"ln",postTitle__text:"sn",postTitle__icon:"cn",postTitle__user__container:"nn",postTitle__brandIcon:"dn",postContent__comment:"mn",postContent__reactions_and_comments:"pn",postContent__reactionsBar:"gn",postContent__commentsCount:"hn",postContent__reactionsBar__reactions:"fn",postContent__reactionsBar__reactions__icon:"e",postContent__reactionsBar__reactions__count:"bn",postContent__bar__information__editedTag:"un",button:"p",popover:"C","fade-in":"Ae","zoom-in":"Me","fade-out":"Se","zoom-out":"Ee",menu:"vn",menuItem:"Ie",separator:"xn",postContent__notMember:"wn",postContent__wrapRightMenu:"yn"};var Nle=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{clipPath:"url(#clip0_1709_7904)"},te.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),te.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),te.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_7904"},te.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},yB=Nle;var Ele=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},te.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),te.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),te.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),te.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),te.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_1751"},te.createElement("rect",{width:"32",height:"32",fill:"white"}))))},hB=Ele;var Ble=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),te.createElement("g",{clipPath:"url(#clip0_1709_7888)"},te.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),te.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),te.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),te.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),te.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#FFF09F"}),te.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),te.createElement("clipPath",{id:"clip0_1709_7888"},te.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},CB=Ble;var Lle=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions"},te.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),te.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#EE5C91"}),te.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},vB=Lle;var Ale=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),te.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#63A1FF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},xB=Ale;var fg=te.forwardRef((i,n)=>{var a=i,{src:e,mimeType:t,mediaFit:o}=a,r=P(a,["src","mimeType","mediaFit"]);return te.createElement("video",E(d({controls:!0,controlsList:"nodownload"},r),{ref:n,"data-qa-anchor":"video-preview"}),te.createElement("source",{src:e,type:t}),te.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});var ua={linkPreviewSkeleton:"kn",linkPreviewSkeleton__bottom:"jn",linkPreviewSkeleton__bar1:"zn",linkPreviewSkeleton__bar2:"Xn",linkPreviewSkeleton__image:"Yn",linkPreviewSkeleton__animation:"Cn","skeleton-pulse":"Re"};function bB(){return te.createElement("div",{className:ua.linkPreviewSkeleton},te.createElement("div",{className:gr(ua.linkPreviewSkeleton__image,ua.linkPreviewSkeleton__animation)}),te.createElement("div",{className:ua.linkPreviewSkeleton__bottom},te.createElement("div",{className:gr(ua.linkPreviewSkeleton__bar1,ua.linkPreviewSkeleton__animation)}),te.createElement("div",{className:gr(ua.linkPreviewSkeleton__bar2,ua.linkPreviewSkeleton__animation)})))}var Pi={linkPreview:"An",linkPreview__top:"Mn",linkPreview__bottom:"Sn",linkPreview__object:"En",linkPreview__unableToPreview:"In",linkPreview__unableToPreview__icon:"Rn"};var Ole=e=>te.createElement("svg",d({width:"36",height:"27",viewBox:"0 0 36 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M32.625 0C34.4531 0 36 1.54688 36 3.375V23.625C36 25.5234 34.4531 27 32.625 27H3.375C1.47656 27 0 25.5234 0 23.625V3.375C0 1.54688 1.47656 0 3.375 0H32.625ZM32.2031 23.625C32.4141 23.625 32.625 23.4844 32.625 23.2031V3.79688C32.625 3.58594 32.4141 3.375 32.2031 3.375H3.79688C3.51562 3.375 3.375 3.58594 3.375 3.79688V23.2031C3.375 23.4844 3.51562 23.625 3.79688 23.625H32.2031ZM9 6.1875C10.5469 6.1875 11.8125 7.45312 11.8125 9C11.8125 10.6172 10.5469 11.8125 9 11.8125C7.38281 11.8125 6.1875 10.6172 6.1875 9C6.1875 7.45312 7.38281 6.1875 9 6.1875ZM6.75 20.25V16.875L9.49219 14.1328C9.84375 13.7812 10.3359 13.7812 10.6875 14.1328L13.5 16.875L21.8672 8.50781C22.2188 8.15625 22.7109 8.15625 23.0625 8.50781L29.25 14.625V20.25H6.75Z"})),hg=()=>te.createElement("div",{className:Pi.linkPreview__unableToPreview},te.createElement(Ole,{className:Pi.linkPreview__unableToPreview__icon})),Ule=({url:e})=>{let{client:t}=De();return useQuery({enabled:!!t,queryKey:["asc-uikit","previewLink",e],queryFn:()=>_(void 0,null,function*(){let o=yield t==null?void 0:t.http.get("/api/v1/link-preview",{params:{url:e}});return o==null?void 0:o.data}),retry:!1})};function IB({url:e}){var n,i,a;let t=new URL(e),o=Ule({url:e});if(o.isLoading)return te.createElement(bB,null);let r=()=>{window.open(e,"_blank");};return o.isError?te.createElement(O,{onPress:r,className:Pi.linkPreview},te.createElement("div",{className:Pi.linkPreview__top},te.createElement(hg,null)),te.createElement("div",{className:Pi.linkPreview__bottom},te.createElement(N.Caption,null,t.hostname))):te.createElement(O,{onPress:r,className:Pi.linkPreview},te.createElement("div",{className:Pi.linkPreview__top},(n=o.data)!=null&&n.image?te.createElement("object",{data:o.data.image,className:Pi.linkPreview__object},te.createElement(hg,null)):(i=o.data)!=null&&i.video?te.createElement(fg,{src:o.data.video}):te.createElement(hg,null)),te.createElement("div",{className:Pi.linkPreview__bottom},te.createElement(N.Caption,null,t.hostname),te.createElement(N.BodyBold,null,((a=o.data)==null?void 0:a.title)||"")))}var Cg=({text:e="",mentionees:t=[],mentioned:o})=>{if(!e)return null;let r=zv.find(e).filter(n=>n.type==="url");return te.createElement(te.Fragment,null,te.createElement(Nm,{data:{text:e},mentionees:t,metadata:{mentioned:o}}),r&&r.length>0&&te.createElement(IB,{url:r[0].href}))};var rc={imageContent:"o",imageContent__img:"Fn",imageContent__imgContainer:"t",imageContent__imgCover:"Hn"};var Vle=e=>{let r=kn({fetcher:PostRepository.getPost,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return d({post:t},o)},_i=Vle;var jle=({fileId:e})=>{let t=it({fileId:e});return te.createElement("img",{loading:"lazy",className:rc.imageContent__img,src:t,alt:e})},Gle=({postId:e,index:t,imageLeftCount:o,postAmount:r,onImageClick:n})=>{let{post:i,isLoading:a}=_i(e);return a?null:te.createElement(O,{key:i.postId,className:rc.imageContent__imgContainer,onPress:()=>n()},te.createElement(jle,{fileId:i.data.fileId}),o>0&&t===r-1&&te.createElement(N.Heading,{className:rc.imageContent__imgCover},"+ ",o))},vg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onImageClick:n=()=>{}})=>{var p;let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),s=Math.max(0,r.children.length-4),{post:l,isLoading:c}=_i((p=r.children)==null?void 0:p[0]);return c||(l==null?void 0:l.dataType)!=="image"?null:te.createElement("div",{className:rc.imageContent,style:i,"data-images-amount":Math.min(r.children.length,4)},a.map((u,g)=>te.createElement(Gle,{key:u,postId:u,index:g,imageLeftCount:s,postAmount:r.children.length,onImageClick:()=>n(g)})))};var ga={videoContent:"i",videoContent__video:"Ln",videoContent__videoContainer:"l",videoContent__videoCover:"Tn",videoContent__playButtonCover:"Vn",videoContent__playButton:"qn",videoContent__playButton__svg:"Gn"};var Qle=e=>te.createElement("svg",d({width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Icon ",clipPath:"url(#clip0_1936_14348)"},te.createElement("path",{id:"Vector",d:"M8.95117 5V19L19.9512 12L8.95117 5Z"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1936_14348"},te.createElement("rect",{width:"24",height:"24",transform:"translate(0.951172)"})))),Wle=({fileId:e})=>{let t=it({fileId:e});return te.createElement("img",{className:ga.videoContent__video,src:t,alt:e})},qle=({postId:e,postAmount:t,videoLeftCount:o,index:r,onVideoClick:n})=>{let{post:i,isLoading:a}=_i(e);return a?null:te.createElement(O,{className:ga.videoContent__videoContainer,"data-videos-amount":Math.min(t,4),onPress:()=>n()},te.createElement(Wle,{fileId:i.data.thumbnailFileId}),o>0&&r===t-1&&te.createElement(N.Heading,{className:ga.videoContent__videoCover},"+ ",o),o===0||r<t-1?te.createElement("div",{className:ga.videoContent__playButtonCover},te.createElement("div",{className:ga.videoContent__playButton,onClick:()=>n()},te.createElement(Qle,{className:ga.videoContent__playButton__svg}))):null)},xg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onVideoClick:n})=>{let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),{post:s}=_i(r.children[0]),l=Math.max(0,r.children.length-4);return (s==null?void 0:s.dataType)!=="video"?null:te.createElement("div",{className:ga.videoContent,style:i},te.createElement("div",{className:ga.videoContent,style:i,"data-videos-amount":Math.min(r.children.length,4)},a.map((c,p)=>te.createElement(qle,{key:c,index:p,postId:c,videoLeftCount:l,postAmount:r.children.length,onVideoClick:()=>n(p)}))))};var qr={modal:"Jn",modalContent:"Kn",closeButton:"Nn",fullImage:"On",nextButton:"Pn",prevButton:"Qn",overlayPanel:"Wn",overlayPanel__prev:"Ue",overlayPanel__next:"Be",overlayPanel__prevButton:"De",overlayPanel__nextButton:"Zn",overlayPanel__middle:"_n",imageViewer__clearButton:"ed",imageViewer__clearButton__img:"rd"};var MB=e=>te.createElement("svg",d({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"}));function PB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialImageIndex:n,onClose:i}){var h,x;let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(b=>b.dataType==="image"),u=p[s],g=le({fileId:(h=u==null?void 0:u.data)==null?void 0:h.fileId}),f=s<p.length-1,y=s>0,C=()=>{f&&l(b=>b+1);},v=()=>{y&&l(b=>b-1);};return te.createElement("div",{style:a},te.createElement("div",{className:qr.modal,onClick:i},te.createElement("div",{className:qr.modalContent,onClick:b=>b.stopPropagation()},te.createElement("img",{src:g,alt:((x=u==null?void 0:u.data)==null?void 0:x.fileId)||"",className:qr.fullImage}),te.createElement("div",{className:qr.overlayPanel},y&&te.createElement("div",{className:qr.overlayPanel__prev,onClick:v},te.createElement(MB,{className:qr.overlayPanel__prevButton})),te.createElement("div",{className:qr.overlayPanel__middle}),f&&te.createElement("div",{className:qr.overlayPanel__next,onClick:C},te.createElement(MB,{className:qr.overlayPanel__nextButton}))),te.createElement("span",{className:qr.closeButton},te.createElement(E1,{pageId:e,componentId:t,defaultClassName:qr.imageViewer__clearButton,imgClassName:qr.imageViewer__clearButton__img,onPress:i})))))}var Kr={modal:"ad",modalContent:"od",closeButton:"td",fullImage:"id",nextButton:"ld",prevButton:"sd",overlayPanel:"cd",overlayPanel__prev:"Fe",overlayPanel__next:"He",overlayPanel__prevButton:"Le",overlayPanel__nextButton:"nd",overlayPanel__middle:"dd",videoViewer__clearButton:"md",videoViewer__clearButton__img:"pd"};var ome=memo(({videoPost:e})=>{let t=useMemo(()=>(e==null?void 0:e.data.videoFileId.high)||(e==null?void 0:e.data.videoFileId.medium)||(e==null?void 0:e.data.videoFileId.low)||(e==null?void 0:e.data.videoFileId.original)||void 0,[e]),o=Ht(t),r=Ht(e==null?void 0:e.data.thumbnailFileId),n=useRef(null),i=useMemo(()=>{if(o==null)return null;if(o.status===S0.Transcoded){let{videoUrl:a}=o;return (a==null?void 0:a["1080p"])||(a==null?void 0:a["720p"])||(a==null?void 0:a["480p"])||(a==null?void 0:a["360p"])||(a==null?void 0:a.original)||o.fileUrl}return o.fileUrl},[o]);return useEffect(()=>{var a;(a=n.current)==null||a.load();},[i]),i==null?te.createElement(te.Fragment,null):te.createElement("video",{controls:!0,controlsList:"nodownload",autoPlay:!0,className:Kr.fullImage,ref:n,poster:r==null?void 0:r.fileUrl},te.createElement("source",{src:i,type:"video/mp4"}),te.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});function TB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialVideoIndex:n,onClose:i}){let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(v=>v.dataType==="video"),u=p[s],g=s<p.length-1,f=s>0,y=()=>{g&&l(v=>v+1);},C=()=>{f&&l(v=>v-1);};return te.createElement("div",{style:a},te.createElement("div",{className:Kr.modal,onClick:i},te.createElement("div",{className:Kr.modalContent,onClick:v=>v.stopPropagation()},te.createElement(ome,{videoPost:u}),te.createElement("div",{className:Kr.overlayPanel},f&&te.createElement("div",{className:Kr.overlayPanel__prev,onClick:C},te.createElement(tc,{className:Kr.overlayPanel__prevButton})),te.createElement("div",{className:Kr.overlayPanel__middle}),g&&te.createElement("div",{className:Kr.overlayPanel__next,onClick:y},te.createElement(tc,{className:Kr.overlayPanel__nextButton}))),te.createElement("span",{className:Kr.closeButton},te.createElement(E1,{pageId:e,componentId:t,defaultClassName:Kr.videoViewer__clearButton,imgClassName:Kr.videoViewer__clearButton__img,onPress:i})))))}var SB=({post:e,community:t})=>{let{currentUserId:o}=De(),r=useMemo(()=>e.targetType==="community"&&e.targetId===(t==null?void 0:t.communityId),[e.targetType,t==null?void 0:t.communityId]),{moderators:n}=rm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===o):!1,[n,r,o]),a=e.postedUserId===o;return {isCommunityModerator:i,isOwner:a}};var Vn={postMenu:"gd",postMenu__item:"g",postMenu__editPost__text:"hd",postMenu__editPost__icon:"fd",postMenu__reportPost__text:"bd",postMenu__reportPost__icon:"ud",postMenu__deletePost__text:"vd",postMenu__deletePost__icon:"xd"};var EB=({post:e,isFlaggable:t,onReportSuccess:o,onReportError:r,onUnreportSuccess:n,onUnreportError:i})=>{let a=useQueryClient(),s=(e==null?void 0:e.postId)||void 0,{data:l,isLoading:c}=useQuery({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s],queryFn:()=>PostRepository.isPostFlaggedByMe(s),enabled:s!=null&&t}),{mutateAsync:p}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.flagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!0);}),onSuccess:()=>{o==null||o();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),r==null||r(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}}),{mutateAsync:u}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.unflagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!1);}),onSuccess:()=>{n==null||n();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),i==null||i(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}});return {isLoading:c,isFlaggedByMe:l||!1,mutateReportPost:p,mutateUnReportPost:u}};var jn={createPost:"wd",createPost__topBar:"yd",createPost__status:"kd",createPost_infoIcon:"jd",createPost__notiWrap:"Te",createPost__formMediaAttachment:"Ve",drawer__content:"zd",mentionTextInput_item:"qe",drawerContentContainer:"A"};var mme=createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),bs=()=>{let e=useContext(mme);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e};var BB=()=>/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var LB=e=>new Promise((t,o)=>{let r=document.createElement("video"),n=document.createElement("canvas"),i=n.getContext("2d");r.src=URL.createObjectURL(e);let a=()=>{r.currentTime=10;},s=()=>{try{n.width=r.videoWidth,n.height=r.videoHeight,i==null||i.drawImage(r,0,0,n.width,n.height);let c=n.toDataURL("image/png");t(c);}catch(c){o(c);}finally{r.removeEventListener("canplay",a),r.removeEventListener("seeked",s),r.removeEventListener("error",l),URL.revokeObjectURL(r.src);}},l=c=>{o(new Error(`Error loading video: ${c}`));};r.addEventListener("canplay",a),r.addEventListener("seeked",s),r.addEventListener("error",l),r.load();});var AB={createNewPostButton:"Ge"};function Ig({pageId:e="*",componentId:t="*",isValid:o,onSubmit:r}){let n="create_new_post_button",{config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return a?null:te.createElement("button",{onSubmit:r,style:s,disabled:!o,className:AB.createNewPostButton,type:"submit"},i.text)}var L1={thumbnail__container:"h",thumbnail__wrapper:"Je",thumbnail:"Xd",closeIcon:"Yd",icon__status:"Cd"};var ume=ka`
|
|
4805
|
+
0-22.58L207.6 256z`})),Nr=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="close_button",{isExcluded:a,config:s,uiReference:l,accessibilityId:c}=A({pageId:e,componentId:t,elementId:i});return a?null:te.createElement(O,{className:V8.closeButton,"data-qa-anchor":c,onPress:o},te.createElement(oe,{defaultIcon:()=>te.createElement(Gie,{className:gr(V8.closeButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:l,className:n}),configIconName:s.icon}))};var B3={bottomSheet__container:"Za",bottomSheet__header:"_a",bottomSheet__content:"eo",bottomSheet__backdrop:"ro"};var Er=r=>{var n=r,{children:e,headerTitle:t}=n,o=P(n,["children","headerTitle"]);return te.createElement(C1,d({},o),te.createElement(C1.Container,{className:B3.bottomSheet__container},te.createElement(C1.Header,null,te.createElement(C1.Header,null),t&&te.createElement(C1.Header,{className:B3.bottomSheet__header},te.createElement(N.Title,null,t))),te.createElement(C1.Content,{className:B3.bottomSheet__content},e)),te.createElement(C1.Backdrop,{onTap:o.onClose}))};var j8={avatarContainer:"P",avatarImage:"ao"};var bt=({avatarUrl:e,defaultImage:t,onClick:o})=>te.createElement("div",{className:j8.avatarContainer,"data-clickable":!!o,onClick:o},e?te.createElement("img",{className:j8.avatarImage,src:e,alt:"Avatar"}):t);var kd={button:"oo",disabled:"m",primary:"Q",secondary:"W",ghost:"Z",small:"to",medium:"io",large:"lo",icon:"so"};var Jie=a=>{var s=a,{children:e,variant:t="primary",size:o="medium",icon:r,className:n}=s,i=P(s,["children","variant","size","icon","className"]);let l=gr(kd.button,kd[t],kd[o],n);return te.createElement("button",d({className:l},i),r&&te.createElement("span",{className:kd.icon},r),e)},L3=Jie;var tE={cancelButton:"co"};var A3=({pageId:e="*",componentId:t="*",onPress:o=()=>{}})=>{let r="cancel_button",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:te.createElement(O,{"data-qa-anchor":n,className:tE.cancelButton,style:s,onPress:o},te.createElement(N.Body,null,i.text))};var D3={createStoryButton:"no",createStoryButton__text:"do",createStoryButton__icon:"mo"};var eae=e=>te.createElement("svg",d({width:"17",height:"18",viewBox:"0 0 17 18",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.771159 12.2248C1.00906 12.7861 1.30474 13.3088 1.65819 13.7927C1.85468 14.0618 2.2428 14.0749 2.47778 13.8387L2.85238 13.4622C3.05585 13.2578 3.07242 12.9352 2.91359 12.6944C2.68511 12.3479 2.4918 11.9785 2.33366 11.5862C2.17162 11.1841 2.04651 10.7654 1.95831 10.33C1.90156 10.0497 1.66209 9.83785 1.37619 9.83785H0.7981C0.460143 9.83785 0.194237 10.1301 0.252477 10.463C0.359316 11.0737 0.53221 11.661 0.771159 12.2248ZM0.791992 5.77587C0.565717 6.33406 0.392758 6.91522 0.273115 7.51935C0.206005 7.85821 0.473794 8.1628 0.819238 8.1628H1.37619C1.66209 8.1628 1.90156 7.95091 1.95831 7.6707C2.04651 7.23526 2.17162 6.81652 2.33366 6.41448C2.4918 6.0221 2.68511 5.6527 2.91359 5.30628C3.07242 5.06546 3.05585 4.7429 2.85238 4.53841L2.47778 4.16192C2.2428 3.92576 1.85456 3.93884 1.65906 4.2086C1.30847 4.69235 1.01944 5.21477 0.791992 5.77587ZM5.26074 16.7265C5.81526 16.966 6.39491 17.1396 6.9997 17.247C7.33267 17.3061 7.62533 17.0401 7.62533 16.7019V16.1571C7.62533 15.8715 7.41372 15.6325 7.13436 15.5731C6.70488 15.4817 6.29562 15.3497 5.90658 15.177C5.52127 15.0061 5.14859 14.8025 4.78852 14.5662C4.5475 14.4081 4.22544 14.4327 4.02574 14.6406L3.64108 15.041C3.40868 15.2829 3.43286 15.6735 3.7084 15.8649C4.19354 16.2017 4.71098 16.4889 5.26074 16.7265ZM3.71752 2.12947C3.43846 2.32272 3.41731 2.71924 3.65673 2.95986L4.05715 3.36229C4.26214 3.56831 4.58771 3.58533 4.82847 3.42255C5.1704 3.19137 5.53324 2.99173 5.91699 2.82361C6.3137 2.64981 6.73277 2.5172 7.17418 2.42577C7.45449 2.3677 7.66699 2.12833 7.66699 1.84207V1.29669C7.66699 0.959243 7.37557 0.693429 7.04294 0.750218C6.41529 0.857371 5.82122 1.03203 5.26074 1.27419C4.71443 1.51024 4.20002 1.79533 3.71752 2.12947ZM9.82271 15.5735C9.54395 15.6315 9.33366 15.8703 9.33366 16.155V16.6953C9.33366 17.0359 9.63023 17.3024 9.96541 17.2422C11.8264 16.908 13.4005 16.0311 14.6878 14.6117C16.1184 13.0344 16.8337 11.1639 16.8337 9.00033C16.8337 6.83673 16.1184 4.96627 14.6878 3.38894C13.4005 1.96952 11.8264 1.09268 9.96541 0.758409C9.63023 0.698204 9.33366 0.964784 9.33366 1.30532V1.84562C9.33366 2.13035 9.54395 2.36916 9.82271 2.42716C11.2862 2.73166 12.5155 3.45008 13.5107 4.5824C14.6149 5.83868 15.167 7.31132 15.167 9.00033C15.167 10.6893 14.6149 12.162 13.5107 13.4182C12.5155 14.5506 11.2862 15.269 9.82271 15.5735Z"}),te.createElement("path",{d:"M12.7189 8.47933C12.9012 8.47933 13.0835 8.66162 13.0835 8.84391V9.57308C13.0835 9.77816 12.9012 9.93766 12.7189 9.93766H9.43766V13.2189C9.43766 13.424 9.25537 13.5835 9.07308 13.5835H8.34391C8.13883 13.5835 7.97933 13.424 7.97933 13.2189V9.93766H4.69808C4.493 9.93766 4.3335 9.77816 4.3335 9.57308V8.84391C4.3335 8.66162 4.493 8.47933 4.69808 8.47933H7.97933V5.19808C7.97933 5.01579 8.13883 4.8335 8.34391 4.8335H9.07308C9.25537 4.8335 9.43766 5.01579 9.43766 5.19808V8.47933H12.7189Z"}));function H3({pageId:e="*",componentId:t="*",onClick:o,defaultClassName:r}){let n="create_story_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(O,{className:D3.createStoryButton,"data-qa-anchor":i,style:p,onPress:()=>o==null?void 0:o()},te.createElement(oe,{defaultIcon:()=>te.createElement(eae,{className:gr(D3.createStoryButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:a.image,alt:c}),configIconName:a.image,defaultIconName:s.image}),te.createElement(N.Body,{className:D3.createStoryButton__text},a.text))}var G8={hyperLinkButton:"po"};var rae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"currentColor",d:"M18.04 14.21c1.792 1.794 1.898 4.677.316 6.575-.212.281-.07.14-2.954 3.024-1.933 1.933-5.062 1.933-6.96 0-1.934-1.899-1.934-5.028 0-6.961l2.214-2.215c.246-.246.703-.07.703.281.036.387.106.984.176 1.336.035.14 0 .281-.105.387l-1.617 1.617a2.95 2.95 0 000 4.183 2.95 2.95 0 004.183 0l2.637-2.636a2.95 2.95 0 000-4.184c-.176-.21-.563-.457-.809-.562-.14-.106-.246-.282-.21-.457.034-.387.21-.774.527-1.055l.14-.14a.435.435 0 01.492-.106c.457.246.88.527 1.266.914zm5.483-5.483c1.934 1.898 1.934 5.027 0 6.96l-2.214 2.215c-.247.246-.704.07-.704-.28a15.366 15.366 0 00-.175-1.337.397.397 0 01.105-.387l1.617-1.617a2.95 2.95 0 000-4.183 2.95 2.95 0 00-4.183 0l-2.637 2.636a2.95 2.95 0 000 4.184c.176.21.563.457.809.563.14.105.246.28.21.456a1.607 1.607 0 01-.527 1.055l-.14.14a.435.435 0 01-.493.106 5.265 5.265 0 01-1.265-.914c-1.793-1.793-1.899-4.676-.317-6.574.211-.281.07-.14 2.954-3.023 1.933-1.934 5.062-1.934 6.96 0z"})),F3=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n=()=>{}})=>{let i="story_hyperlink_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{className:G8.hyperLinkButton,onPress:n,"data-qa-anchor":a},te.createElement(oe,{defaultIcon:()=>te.createElement(rae,{className:gr(G8.hyperLinkButton,o)}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var rE={impressionButton:"go"};var aae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),te.createElement("path",{fill:"#A5A9B5",d:"M10 6.5c1.938 0 3.5 1.594 3.5 3.5 0 1.938-1.563 3.5-3.5 3.5A3.494 3.494 0 016.5 10c0-.281.063-.688.156-.969.188.125.594.219.844.219.938 0 1.75-.781 1.75-1.75-.031-.219-.125-.625-.25-.844.281-.062.719-.125 1-.156zm8.875 3.063a1.142 1.142 0 010 .906C17.187 13.78 13.812 16 10 16c-3.844 0-7.219-2.219-8.906-5.531a1.142 1.142 0 010-.906C2.78 6.25 6.156 4 10 4c3.813 0 7.188 2.25 8.875 5.563zM10 14.5c3.063 0 5.906-1.719 7.406-4.5-1.5-2.781-4.343-4.5-7.406-4.5-3.094 0-5.938 1.719-7.438 4.5 1.5 2.781 4.344 4.5 7.438 4.5z"}));function O3({pageId:e="*",componentId:t="*",reach:o=0,defaultIconClassName:r,imgIconClassName:n}){let i="story_impression_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(oe,{defaultIcon:()=>te.createElement("div",{className:gr(rE.impressionButton,r),"data-qa-anchor":a},te.createElement(aae,null),te.createElement(N.BodyBold,null,o)),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:n}),defaultIconName:l.icon,configIconName:s.icon})}var nE={overflowMenuButton:"ho"};var lae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),te.createElement("path",{fill:"#fff",d:"M13.688 12.25c0 .95-.774 1.688-1.688 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688a1.71 1.71 0 011.688 1.688zm4.218-1.688c.914 0 1.688.774 1.688 1.688 0 .95-.774 1.688-1.688 1.688-.949 0-1.687-.739-1.687-1.688 0-.914.738-1.688 1.687-1.688zm-11.812 0c.914 0 1.687.774 1.687 1.688 0 .95-.773 1.688-1.687 1.688-.95 0-1.688-.739-1.688-1.688 0-.914.739-1.688 1.688-1.688z"})),U3=({pageId:e="*",componentId:t="*",onPress:o=()=>{},defaultClassName:r,imgClassName:n})=>{let i="overflow_menu",{config:a,defaultConfig:s,uiReference:l,themeStyles:c,accessibilityId:p}=A({pageId:e,componentId:t,elementId:i});return te.createElement(O,{style:c,"data-qa-anchor":p,className:nE.overflowMenuButton,onPress:o},te.createElement(oe,{defaultIcon:()=>te.createElement(lae,{className:r}),imgIcon:()=>te.createElement("img",{src:a.icon,alt:l,className:n}),defaultIconName:s.icon,configIconName:a.icon}))};var mae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{clipPath:"url(#clip0_1709_7904)"},te.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),te.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),te.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_7904"},te.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},iE=mae;var dae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),te.createElement("g",{clipPath:"url(#clip0_1709_7888)"},te.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),te.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),te.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),te.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),te.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#FFF09F"}),te.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),te.createElement("clipPath",{id:"clip0_1709_7888"},te.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},aE=dae;var cae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},te.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),te.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),te.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),te.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),te.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_1751"},te.createElement("rect",{width:"32",height:"32",fill:"white"}))))},sE=cae;var pae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),te.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#63A1FF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},z3=pae;var uae=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions"},te.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),te.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#EE5C91"}),te.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},lE=uae;var ma={reactButton:"_",reactButton__icon:"ee",reactButton__reactionsText:"re",reactButton__panel:"fo",reactButton__panel__reaction:"r",reactButton__panel__reaction__text:"j","reaction-scale":"ae","reaction-click":"oe"};var hae=e=>te.createElement("svg",d({width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M15.9727 9.6543C16.1055 10.418 16.0059 11.1484 15.6738 11.7461C15.7734 12.543 15.541 13.373 15.0762 13.9707C15.043 15.8301 13.9141 17.125 11.3574 17.125C11.125 17.125 10.8594 17.125 10.5938 17.125C7.20703 17.125 6.17773 15.8633 4.68359 15.8301C4.58398 16.2617 4.15234 16.5938 3.6875 16.5938H1.5625C0.964844 16.5938 0.5 16.1289 0.5 15.5312V7.5625C0.5 6.99805 0.964844 6.5 1.5625 6.5H4.81641C5.44727 5.96875 6.34375 4.50781 7.10742 3.74414C7.57227 3.2793 7.43945 0.125 9.49805 0.125C11.3906 0.125 12.6523 1.1875 12.6523 3.61133C12.6523 4.24219 12.5195 4.74023 12.3535 5.17188H13.582C15.1758 5.17188 16.4375 6.5332 16.4375 7.99414C16.4375 8.625 16.2715 9.15625 15.9727 9.6543ZM13.9141 11.4473C14.6445 10.7832 14.5449 9.75391 14.0801 9.25586C14.4121 9.25586 14.8438 8.625 14.8438 8.02734C14.8105 7.39648 14.2793 6.76562 13.582 6.76562H10.1289C10.1289 5.50391 11.0586 4.90625 11.0586 3.61133C11.0586 2.81445 11.0586 1.71875 9.49805 1.71875C8.86719 2.34961 9.16602 3.94336 8.23633 4.87305C7.33984 5.76953 6.04492 8.09375 5.08203 8.09375H4.75V14.3027C6.50977 14.3027 8.07031 15.5312 10.4277 15.5312H11.6895C12.8516 15.5312 13.7148 14.9668 13.4492 13.373C13.9473 13.0742 14.3457 12.1445 13.9141 11.4473ZM3.42188 14.4688C3.42188 14.0371 3.05664 13.6719 2.625 13.6719C2.16016 13.6719 1.82812 14.0371 1.82812 14.4688C1.82812 14.9336 2.16016 15.2656 2.625 15.2656C3.05664 15.2656 3.42188 14.9336 3.42188 14.4688Z"}));function $3({pageId:e="*",componentId:t="*",myReaction:o,reactionsCount:r,defaultIconClassName:n,imgIconClassName:i,onReactionClick:a}){let s="reaction_button",{isExcluded:l,accessibilityId:c,config:p,defaultConfig:u,uiReference:g,themeStyles:f}=A({pageId:e,componentId:t,elementId:s}),y=o!=null;if(l)return null;let C=()=>{switch(o){case"like":return te.createElement(z3,{className:ma.reactButton__icon});case"love":return te.createElement(lE,{className:ma.reactButton__icon});case"fire":return te.createElement(aE,{className:ma.reactButton__icon});case"happy":return te.createElement(sE,{className:ma.reactButton__icon});case"crying":return te.createElement(iE,{className:ma.reactButton__icon});default:return null}};return te.createElement(O,{style:f,"data-qa-anchor":c,className:ma.reactButton,onPress:()=>{a("like");}},o?C():te.createElement(oe,{defaultIcon:()=>te.createElement(hae,{className:gr(ma.reactButton__icon,n),"data-has-my-reaction":"false"}),imgIcon:()=>te.createElement("img",{src:p.icon,alt:g,className:i}),defaultIconName:u.icon,configIconName:p.icon}),te.createElement(N.BodyBold,{className:ma.reactButton__reactionsText,"data-has-my-reaction":y},typeof r=="number"?lb(r):o||p.text))}var mE={saveButton:"te"};function I1({pageId:e="*",componentId:t="*",onPress:o,className:r}){let n="save_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:te.createElement(O,{className:gr(mE.saveButton,r),"data-qa-anchor":i,style:E(d({},l),{backgroundColor:a.background_color}),onPress:o},a.save_button_text)}var dE={shareStoryButton:"ie",shareStoryIcon:"bo"};var Sd={communityAvatar__text:"uo",communityAvatar__placeholder__path:"vo",communityAvatar__placeholder__rect:"xo",communityAvatar__placeholder:"wo",communityAvatar__image:"yo"};var cE=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",viewBox:"0 0 64 64",fill:"none",className:Sd.communityAvatar__placeholder},e),te.createElement("rect",{width:"64",height:"64",rx:"32",className:Sd.communityAvatar__placeholder__rect}),te.createElement("path",{d:"M31.7539 19.2C33.2201 19.2 34.6262 19.7696 35.6629 20.7836C36.6997 21.7976 37.2821 23.1728 37.2821 24.6068C37.2821 26.0408 36.6997 27.4161 35.6629 28.4301C34.6262 29.4441 33.2201 30.0137 31.7539 30.0137C30.2877 30.0137 28.8816 29.4441 27.8449 28.4301C26.8081 27.4161 26.2257 26.0408 26.2257 24.6068C26.2257 23.1728 26.8081 21.7976 27.8449 20.7836C28.8816 19.7696 30.2877 19.2 31.7539 19.2ZM20.6975 23.062C21.582 23.062 22.4033 23.2937 23.1141 23.7108C22.8772 25.92 23.5406 28.1136 24.8989 29.8284C24.1092 31.3114 22.5297 32.331 20.6975 32.331C19.4408 32.331 18.2355 31.8427 17.3469 30.9736C16.4583 30.1044 15.959 28.9256 15.959 27.6965C15.959 26.4674 16.4583 25.2886 17.3469 24.4194C18.2355 23.5503 19.4408 23.062 20.6975 23.062ZM42.8103 23.062C44.067 23.062 45.2723 23.5503 46.1609 24.4194C47.0495 25.2886 47.5488 26.4674 47.5488 27.6965C47.5488 28.9256 47.0495 30.1044 46.1609 30.9736C45.2723 31.8427 44.067 32.331 42.8103 32.331C40.9781 32.331 39.3986 31.3114 38.6089 29.8284C39.9672 28.1136 40.6306 25.92 40.3937 23.7108C41.1045 23.2937 41.9258 23.062 42.8103 23.062ZM21.4872 38.8965C21.4872 35.6987 26.0835 33.1034 31.7539 33.1034C37.4243 33.1034 42.0206 35.6987 42.0206 38.8965V41.5999H21.4872V38.8965ZM12.8 41.5999V39.2827C12.8 37.1354 15.7853 35.3279 19.8288 34.8027C18.8969 35.8532 18.3283 37.3053 18.3283 38.8965V41.5999H12.8ZM50.7077 41.5999H45.1795V38.8965C45.1795 37.3053 44.6109 35.8532 43.679 34.8027C47.7225 35.3279 50.7077 37.1354 50.7077 39.2827V41.5999Z",className:Sd.communityAvatar__placeholder__path}));function Zr({pageId:e="*",componentId:t="*",community:o}){let r="community_avatar",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=le({fileId:o==null?void 0:o.avatarFileId});return i?null:s==null?te.createElement(cE,{style:a}):te.createElement("object",{data:s,type:"image/png",className:Sd.communityAvatar__image,"data-qa-anchor":n,style:a},te.createElement(cE,null))}var Mae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"15",height:"14",fill:"none",viewBox:"0 0 15 14"},e),te.createElement("path",{fill:"currentColor",d:"M6.813.219c.125-.157.375-.157.53 0l6.532 6.531a.36.36 0 010 .531l-6.531 6.532c-.157.156-.407.156-.532 0l-.625-.594c-.156-.156-.156-.406 0-.531l4.844-4.876H.375A.361.361 0 010 7.438v-.875a.38.38 0 01.375-.375h10.656L6.187 1.345c-.156-.125-.156-.375 0-.532L6.813.22z"})),V3=({pageId:e="*",componentId:t="*",community:o,onClick:r})=>{let n="share_story_button",{config:i,isExcluded:a}=A({pageId:e,componentId:t,elementId:n});return a?null:te.createElement("button",{role:"button",className:gr(dE.shareStoryButton),"data-qa-anchor":"share_story_button",onClick:r,"data-hideAvatar":i==null?void 0:i.hide_avatar},!(i!=null&&i.hide_avatar)&&te.createElement(Zr,{pageId:e,componentId:t,community:o}),te.createElement(N.BodyBold,null,(i==null?void 0:i.text)||"Share story"),te.createElement(Mae,null))};var j3={speakerButton:"ko",speakerButton__icon:"jo"};var _ae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"#fff",d:"M15.121 9.781c.527-.527 1.441-.176 1.441.598v11.777c0 .774-.914 1.125-1.44.598l-3.13-3.129H8.406c-.492 0-.844-.352-.844-.844V13.72c0-.457.352-.844.844-.844h3.586l3.13-3.094zm9.316 6.469c0 2.25-1.16 4.29-3.023 5.52-.422.246-.95.105-1.16-.282a.845.845 0 01.246-1.16 4.807 4.807 0 002.25-4.078 4.792 4.792 0 00-2.25-4.043.845.845 0 01-.246-1.16.824.824 0 011.16-.281c1.863 1.23 3.023 3.27 3.023 5.484zm-4.992-2.672c.985.527 1.617 1.582 1.617 2.672 0 1.125-.632 2.18-1.617 2.707-.422.246-.914.105-1.16-.316a.869.869 0 01.352-1.16c.422-.247.738-.704.738-1.231 0-.492-.316-.95-.738-1.195a.87.87 0 01-.352-1.16c.246-.422.738-.563 1.16-.317z"})),Tae=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"#fff",d:"M25.781 22.344a.467.467 0 01.094.687l-.594.782c-.187.218-.5.28-.718.093L6.188 9.688A.468.468 0 016.093 9l.625-.781a.468.468 0 01.687-.094l4.75 3.656 1.563-1.531c.469-.469 1.281-.156 1.281.531v3.188l2.469 1.937a1.234 1.234 0 00-.625-.969.773.773 0 01-.313-1.03c.219-.376.657-.5 1.032-.282A2.739 2.739 0 0119 16c0 .344-.094.625-.188.938l1.22.937c.28-.563.468-1.188.468-1.875a4.26 4.26 0 00-2-3.594.75.75 0 01-.219-1.031c.219-.344.688-.469 1.032-.25C20.968 12.188 22 14.031 22 16a5.727 5.727 0 01-.75 2.813l1.188.937c.656-1.125 1.03-2.406 1.03-3.719 0-2.468-1.218-4.781-3.312-6.125-.343-.219-.437-.687-.218-1.062A.795.795 0 0121 8.625c2.5 1.656 4 4.406 4 7.375 0 1.688-.5 3.281-1.375 4.656l2.156 1.688zM7 13.75c0-.25.125-.469.344-.625L15 19.031v2.219c0 .688-.813 1-1.281.531L10.938 19H7.75a.722.722 0 01-.75-.75v-4.5z"}));function G3({isMuted:e,pageId:t="*",componentId:o="*",defaultIconClassName:r,imgIconClassName:n,onPress:i}){let a="speaker_button",{accessibilityId:s,config:l,defaultConfig:c,isExcluded:p,uiReference:u}=A({pageId:t,componentId:o,elementId:a});return p?null:te.createElement(O,{className:gr(j3.speakerButton),onPress:i},te.createElement(oe,{"data-qa-anchor":s,defaultIcon:()=>e?te.createElement(Tae,{className:j3.speakerButton__icon}):te.createElement(_ae,{className:j3.speakerButton__icon}),imgIcon:()=>te.createElement("img",{src:l.icon,alt:u,className:gr(n)}),defaultIconName:c.icon,configIconName:l.icon}))}var Nd={hyperlink:"zo",hyperlinkIcon:"Xo",hyperlinkText:"Yo",text:"Co"};var vi=r=>{var n=r,{href:e,children:t}=n,o=P(n,["href","children"]);return te.createElement("a",d({href:e,className:Nd.hyperlink},o),te.createElement(Md,{className:Nd.hyperlinkIcon}),te.createElement("div",{className:Nd.hyperlinkText},te.createElement("span",{className:Nd.text},t)))};var uE={editCancelButton:"So"};var ms=({pageId:e="*",componentId:t="*",className:o,onPress:r=()=>{}})=>{let n="edit_cancel_button",{accessibilityId:i,config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:n});return s?null:te.createElement(O,{"data-qa-anchor":i,className:gr(uE.editCancelButton,o),style:E(d({},l),{backgroundColor:a.background_color}),onPress:r},te.createElement(N.Body,null,a.cancel_button_text))};var Eae=e=>te.createElement("svg",d({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),te.createElement("path",{d:"M23.1255 13.1312C22.385 12.4069 21.3806 12 20.3333 12C19.2861 12 18.2817 12.4069 17.5412 13.1312C16.8006 13.8555 16.3846 14.8378 16.3846 15.8621C16.3846 16.8864 16.8006 17.8687 17.5412 18.593C18.2817 19.3172 19.2861 19.7241 20.3333 19.7241C21.3806 19.7241 22.385 19.3172 23.1255 18.593C23.866 17.8687 24.2821 16.8864 24.2821 15.8621C24.2821 14.8378 23.866 13.8555 23.1255 13.1312Z",fill:"white"}),te.createElement("path",{d:"M20.3333 21.931C16.2831 21.931 13 23.7848 13 26.069V28H27.6667V26.069C27.6667 23.7848 24.3836 21.931 20.3333 21.931Z",fill:"white"})),ds=Eae;var Qr={commentComposer:"Ao",commentComposer__top:"Mo",commentComposer__mentionContainer:"Bo",commentComposer__container:"Eo",commentComposer__avatar:"Io",commentComposer__button:"z",commentComposer__input:"Ro",commentComposer__replyContainer:"Uo",commentComposer__replyContainer__text:"Do",commentComposer__replyContainer__username:"Fo",commentComposer__replyContainer__closeButton:"Ho",commentComposer__disableContainer:"Lo"};var Dae=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},te.createElement("path",{fill:"currentColor",d:"M15.5 8c.813 0 1.5.688 1.5 1.5v7a1.5 1.5 0 01-1.5 1.5h-11A1.48 1.48 0 013 16.5v-7A1.5 1.5 0 014.5 8h1V6.5C5.5 4.031 7.5 2 10 2c2.5.031 4.5 2.063 4.5 4.563V8h1zM7 6.5V8h6V6.5c0-1.625-1.375-3-3-3-1.656 0-3 1.375-3 3zm8.5 10v-7h-11v7h11z"})),Ed=({referenceId:e,referenceType:t,replyTo:o,onCancelReply:r,shouldAllowCreation:n=!0,community:i})=>{var h,x;let a=De().currentUserId,{user:s}=Cr(a),l=it({fileId:(h=s==null?void 0:s.avatar)==null?void 0:h.fileId,imageSize:"small"}),c=useRef(null),p=useRef(null),u=useRef(null),[g,f]=useState(0),[y,C]=useState({data:{text:""},mentionees:[{type:"user",userIds:[""]}],metadata:{}}),{mutateAsync:v}=useMutation({mutationFn:M=>_(void 0,[M],function*({params:b}){let I=o?o.commentId:void 0;yield CommentRepository.createComment(E(d({referenceId:o?o.referenceId:e,referenceType:t,parentId:I},b),{mentionees:b.mentionees}));}),onError:b=>{},onSuccess:()=>{var b;C({data:{text:""},mentionees:[],metadata:{}}),(b=c.current)==null||b.clearEditorState(),r();}});return n?te.createElement("div",{className:Qr.commentComposer},te.createElement("div",{className:Qr.commentComposer__top},te.createElement("div",{className:Qr.commentComposer__mentionContainer,ref:u}),o&&te.createElement("div",{className:Qr.commentComposer__replyContainer,style:{"--asc-reply-container-offset-bottom":`${g}px`}},te.createElement("div",{className:Qr.commentComposer__replyContainer__text},te.createElement("span",null,"Replying to "),te.createElement("span",{className:Qr.commentComposer__replyContainer__username},o==null?void 0:o.userId)),te.createElement(R1,{onClick:r,className:Qr.commentComposer__replyContainer__closeButton}))),te.createElement("div",{className:Qr.commentComposer__container},te.createElement("div",{className:Qr.commentComposer__avatar},te.createElement(bt,{avatarUrl:l,defaultImage:te.createElement(ds,null)})),te.createElement("div",{className:Qr.commentComposer__input,ref:p},te.createElement(ei,{ref:c,mentionContainer:u==null?void 0:u.current,onChange:({text:b,mentioned:M,mentionees:I})=>{C({data:{text:b},mentionees:I,metadata:{mentioned:M}});},targetType:t,targetId:e,value:y,placeholder:"Say something nice...",communityId:i==null?void 0:i.communityId})),te.createElement(O,{isDisabled:!((x=y==null?void 0:y.data)!=null&&x.text),className:Qr.commentComposer__button,onPress:()=>v({params:y})},te.createElement(N.Body,null,"Post")))):te.createElement("div",{className:Qr.commentComposer__disableContainer},te.createElement(Dae,null),te.createElement(N.Body,null,"Comments are disabled for this story"))};var W3={moderatorBadge:"To",moderatorBadge__icon:"Vo",moderatorBadge__text:"qo"};var Fae=e=>te.createElement("svg",d({width:"9",height:"9",viewBox:"0 0 9 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M7.57031 1.3125C7.85156 1.4375 8.03906 1.70312 8.03906 2C8.03906 5.46875 5.91406 7.39062 4.57031 7.95312C4.38281 8.03125 4.17969 8.03125 3.99219 7.95312C2.32031 7.25 0.539062 5.10938 0.539062 2C0.539062 1.70312 0.710938 1.4375 0.992188 1.3125L3.99219 0.0625C4.07031 0.03125 4.19531 0.015625 4.28906 0.015625C4.36719 0.015625 4.49219 0.03125 4.57031 0.0625L7.57031 1.3125ZM6.83594 3.09375C6.92969 3 6.92969 2.84375 6.83594 2.75L6.47656 2.39062C6.38281 2.29688 6.22656 2.29688 6.13281 2.39062L3.78906 4.73438L2.67969 3.64062C2.58594 3.54688 2.42969 3.54688 2.33594 3.64062L1.97656 4C1.88281 4.09375 1.88281 4.25 1.97656 4.34375L3.60156 5.96875C3.69531 6.07812 3.86719 6.07812 3.96094 5.96875L6.83594 3.09375Z"}));function w1({pageId:e="*",componentId:t="*"}){let o="moderator_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement("div",{className:W3.moderatorBadge,style:l,"data-qa-anchor":r},te.createElement(Fae,{className:W3.moderatorBadge__icon}),te.createElement("div",{className:W3.moderatorBadge__text},n.text))}var yE={timestamp:"Go"};un.extend($ae);un.extend(zae);un.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"Just now",m:"1m",mm:"%dm",h:"1h",hh:"%dh",d:"1d",dd:"%dd",M:function(e,t,o,r){if(r)return e+"M";let n=un().subtract(e,"M"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},MM:function(e,t,o,r){if(r)return e+"M";let n=un().subtract(e,"M"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},y:function(e,t,o,r){if(r)return e+"y";let n=un().subtract(e,"y"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")},yy:function(e,t,o,r){if(r)return e+"y";let n=un().subtract(e,"y"),i=un();return n.get("year")===i.get("year")?n.format("D MMM"):n.format("D MMM YYYY")}}});function M1({pageId:e="*",componentId:t="*",timestamp:o}){let r="timestamp",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r}),s=un(o).fromNow();return i?null:te.createElement(N.Caption,{className:yE.timestamp,style:a,"data-qa-anchor":n},s)}var Xe={postComment:"Jo",postComment__deleteComment_container:"Ko",postComment__deleteComment_icon:"No",postComment__deleteComment_text:"Oo",postComment__avatar:"Po",postComment__details:"Qo",postComment__content:"Wo",postComment__content__username:"Zo",postComment__content__text:"_o",postComment__secondRow:"et",postComment__secondRow__leftPane:"rt",postComment__secondRow__timestamp:"at",postComment__secondRow__rightPane:"ot",postComment__secondRow__rightPane__like:"tt",postComment__secondRow__like:"le",postComment__secondRow__reply:"it",postComment__secondRow__actionButton:"lt",postComment__viewReply_button:"st",postComment__viewReply_icon:"ct",postComment__viewReply_text:"nt",postComment__edit:"dt",postComment__edit__inputWrap:"mt",postComment__edit__mentionContainer:"pt",postComment__edit__input:"gt",postComment__edit__buttonWrap:"ht",postComment__edit__button:"ft",postComment__edit__cancelButton:"bt",postComment__edit__saveButton:"ut",postComment__seeMore:"vt"};var jae=e=>te.createElement("svg",d({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M13.824 9.72708L10.6334 12.8479C10.3988 13.0544 10.0469 13.0544 9.83578 12.8249L9.31965 12.3201C9.08504 12.1136 9.08504 11.7464 9.31965 11.5399L10.7507 10.2549H2.56305C2.2346 10.2549 2 10.0024 2 9.70413V5.56C2 5.25072 2.25072 5 2.56 5L3.31683 5C3.62611 5.00001 3.87683 5.25073 3.87683 5.56V8.4191H10.7507L9.31965 7.11113C9.08504 6.9046 9.08504 6.53745 9.31965 6.33093L9.83578 5.8261C10.0469 5.59663 10.3988 5.59663 10.6334 5.80315L13.824 8.92393C14.0587 9.1534 14.0587 9.49761 13.824 9.72708Z",fill:"currentColor"})),q3=jae;var zn={postCommentSkeleton__container:"xt",postCommentSkeleton:"wt",postCommentSkeleton__avatar:"yt",postCommentSkeleton__details:"kt",postCommentSkeleton__content:"jt",postCommentSkeleton__content__bar:"zt",postCommentSkeleton__animation:"Xt","skeleton-pulse":"se"};var J3=({pageId:e="*",componentId:t="*",numberOfSkeletons:o=1})=>{let{accessibilityId:r,isExcluded:n,themeStyles:i}=re({pageId:e,componentId:t});if(n)return null;let a=Array.from({length:o},(s,l)=>te.createElement("div",{key:l,"data-qa-anchor":r,className:gr(zn.postCommentSkeleton,zn.postCommentSkeleton__animation),style:i},te.createElement("div",{className:gr(zn.postCommentSkeleton__avatar,zn.postCommentSkeleton__animation)}),te.createElement("div",{className:gr(zn.postCommentSkeleton__details,zn.postCommentSkeleton__animation)},te.createElement("div",{className:gr(zn.postCommentSkeleton__content,zn.postCommentSkeleton__animation)}),te.createElement("div",{className:zn.postCommentSkeleton__content__bar}))));return te.createElement("div",{className:zn.postCommentSkeleton__container},a)};function Q8({parentId:e,referenceId:t,referenceType:o,limit:r=10,shouldCall:n=!0,includeDeleted:i=!1}){let l=pt({fetcher:CommentRepository.getComments,params:{parentId:e,referenceId:t,referenceType:o,limit:r,includeDeleted:i},shouldCall:!!t&&!!o&&n}),{items:a}=l,s=P(l,["items"]);return d({comments:a},s)}function Ld({commentId:e,shouldSubscribe:t=!0,callback:o}){return oa({fetcher:CommentRepository.getComment,params:e,callback:o,shouldSubscribe:!!e&&t,getSubscribedTopic:({data:r})=>getCommentTopic(r)})}var $n="like";var xi={textWithMention__container:"Yt",textWithMention__clamp:"ce",textWithMention__paragraph:"Ct",textWithMention__fullContent:"ne",textWithMention__mention:"St",textWithMention__text:"At",textWithMention__link:"Mt",textWithMention__showMoreLess:"Bt"};var Nm=({maxLines:e=8,data:t,mentionees:o,metadata:r})=>{let[n,i]=useState(!1),[a,s]=useState(!1),[l,c]=useState(!1),p=useRef(null),{goToUserProfilePage:u}=Be(),g=useMemo(()=>nl({data:t,mentionees:o,metadata:r}),[t,o,r]);useEffect(()=>{var h;let y=((h=p.current)==null?void 0:h.clientHeight)||0,C=parseInt(window.getComputedStyle(document.body).getPropertyValue("font-size"),10),v=parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--asc-line-height-md"))*C;y>v*e&&s(!0),c(!0);},[]);let f=(y,C)=>y.children.map(v=>{var h;return I6(v)?te.createElement(O,{key:v.data.userId,className:gr(C,xi.textWithMention__mention),onPress:()=>u(v.data.userId)},v.text):w6(v)||M6(v)?te.createElement("a",{key:v.url,href:v.url,className:gr(C,xi.textWithMention__link)},E2(v.children[0])?(h=v.children[0])==null?void 0:h.text:v.url):E2(v)?te.createElement("span",{className:gr(C,xi.textWithMention__text)},v.text):null});return te.createElement("div",{className:xi.textWithMention__container},te.createElement("div",{ref:p,className:xi.textWithMention__fullContent,"data-hidden":l},g.root.children.map(y=>te.createElement("p",{className:xi.textWithMention__paragraph},y.children.length>0?te.createElement(N.Body,{renderer:({typoClassName:C})=>te.createElement(te.Fragment,null,f(y,C))}):te.createElement("br",null)))),te.createElement("div",{"data-expanded":n,className:xi.textWithMention__clamp,style:{"--asc-text-with-mention-max-lines":e}},a&&!n&&te.createElement("div",{onClick:()=>i(!0),className:xi.textWithMention__showMoreLess},te.createElement(N.Body,null,"...See more")),g.root.children.map((y,C)=>te.createElement("p",{className:xi.textWithMention__paragraph},y.children.length>0?te.createElement(N.Body,{renderer:({typoClassName:v})=>te.createElement(te.Fragment,null,f(y,v))}):te.createElement("br",null)))))};var Em={commentOptions__actionButton:"Et",commentOptions__actionButton__icon:"It",commentOptions__actionButton__text:"Rt"};var X3=({comment:e,handleEditComment:t,handleDeleteComment:o,onCloseBottomSheet:r})=>{let{userRoles:n}=De(),{toggleFlagComment:i,isFlaggedByMe:a}=Y7(e.commentId),{canDelete:s,canEdit:l,canReport:c}=W0(e,!1,n),p=So(),u=()=>_(void 0,null,function*(){try{yield i({onFlagSuccess:()=>p.success({content:"Report sent"}),onUnFlagSuccss:()=>p.success({content:"Unreport sent"})});}catch(f){f instanceof Error&&p.error({content:f.message});}}),g=[l?{name:"Edit comment",action:t,icon:te.createElement(l8,{className:Em.commentOptions__actionButton__icon})}:null,c?{name:a?"Unreport comment":"Report comment",action:u,icon:te.createElement(m8,{className:Em.commentOptions__actionButton__icon})}:null,s?{name:"Delete comment",action:o,icon:te.createElement(u1,{className:Em.commentOptions__actionButton__icon})}:null].filter(rn);return te.createElement(te.Fragment,null,g.map((f,y)=>te.createElement("div",{className:Em.commentOptions__actionButton,key:y,onClick:()=>{r(),f.action();}},f.icon,te.createElement("div",{className:Em.commentOptions__actionButton__text},te.createElement(N.BodyBold,null,f.name)))))};var ut={postReplyComment:"Ut",postReplyComment__avatar:"Dt",postReplyComment__details:"Ft",postReplyComment__content:"Ht",postReplyComment__content__username:"Lt",postReplyComment__content__text:"Tt",postReplyComment__secondRow:"Vt",postReplyComment__secondRow__leftPane:"qt",postReplyComment__secondRow__rightPane:"Gt",postReplyComment__secondRow__rightPane__like:"Jt",postReplyComment__secondRow__like:"de",postReplyComment__secondRow__reply:"Kt",postReplyComment__secondRow__actionButton:"Nt",postReplyComment__viewReply_button:"Ot",postReplyComment__viewReply_icon:"Pt",postReplyComment__viewReply_text:"Qt",postReplyComment__actionButton:"Wt",postReplyComment__actionButton__icon:"Zt",postReplyComment__actionButton__text:"_t",postReplyComment__deleteComment_container:"ei",postReplyComment__deleteComment_icon:"ri",postReplyComment__deleteComment_text:"ai",postReplyComment__edit:"oi",postReplyComment__edit__inputWrap:"ti",postReplyComment__edit__input:"ii",postReplyComment__edit__buttonWrap:"li",postReplyComment__edit__button:"si",postReplyComment__edit__cancelButton:"ci",postReplyComment__edit__saveButton:"ni",postReplyComment__secondRow__timestamp:"di"};var ose=({pageId:e="*",community:t,comment:o})=>{var S;let r="post_comment",{confirm:n}=et(),{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=re({pageId:e,componentId:r}),[u,g]=useState(!1),[f,y]=useState(!1),[C,v]=useState(),h=(o.myReactions||[]).some(L=>L==="like"),x=()=>g(L=>!L),b=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),M=()=>{y(!0);},I=()=>{n({pageId:e,componentId:r,title:"Delete reply",content:"This reply will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:b});},w=()=>_(void 0,null,function*(){o&&(h?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,$n):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,$n));}),k=useCallback(()=>_(void 0,null,function*(){!C||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:C.data,mentionees:C.mentionees,metadata:C.metadata}),y(!1));}),[C]);return Ld({commentId:o.commentId}),l?null:te.createElement(te.Fragment,null,o.isDeleted?te.createElement("div",{className:ut.postReplyComment__deleteComment_container,style:p},te.createElement(Pd,{className:ut.postReplyComment__deleteComment_icon}),te.createElement(N.Caption,{className:ut.postReplyComment__deleteComment_text},"This reply has been deleted")):f?te.createElement("div",{className:ut.postReplyComment__edit},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:ut.postReplyComment__edit__inputWrap},te.createElement("div",{className:ut.postReplyComment__edit__input},te.createElement(ei,{placeholder:"Say something nice...",communityId:t==null?void 0:t.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:L=>{v({data:{text:L.text},mentionees:L.mentionees,metadata:{mentioned:L.mentioned}});}})),te.createElement("div",{className:ut.postReplyComment__edit__buttonWrap},te.createElement(ms,{componentId:"edit_comment_component",className:gr(ut.postReplyComment__edit__button,ut.postReplyComment__edit__cancelButton),onPress:()=>{y(!1);}}),te.createElement(I1,{className:gr(ut.postReplyComment__edit__button,ut.postReplyComment__edit__saveButton),componentId:"edit_comment_component",onPress:k})))):te.createElement("div",{className:ut.postReplyComment,style:p,"data-qa-anchor":i},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:ut.postReplyComment__details},te.createElement("div",{className:ut.postReplyComment__content},te.createElement(N.BodyBold,{className:ut.postReplyComment__content__username},(S=o.creator)==null?void 0:S.displayName),te.createElement(w1,{pageId:e,componentId:r}),te.createElement(Nm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),te.createElement("div",{className:ut.postReplyComment__secondRow},te.createElement("div",{className:ut.postReplyComment__secondRow__leftPane},te.createElement(N.Caption,{className:ut.postReplyComment__secondRow__timestamp},te.createElement(M1,{pageId:e,componentId:r,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),te.createElement("div",{onClick:w},te.createElement(N.CaptionBold,{className:ut.postReplyComment__secondRow__like,"data-is-liked":h},h?"Liked":"Like")),te.createElement(Sa,{className:ut.postReplyComment__secondRow__actionButton,onClick:()=>g(!0)})),o.reactionsCount>0&&te.createElement("div",{className:ut.postReplyComment__secondRow__rightPane},te.createElement(N.Caption,null,lb(o.reactionsCount)),te.createElement(z3,{className:ut.postReplyComment__secondRow__rightPane__like}))))),te.createElement(Er,{onClose:x,isOpen:u,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},te.createElement(X3,{comment:o,onCloseBottomSheet:x,handleEditComment:M,handleDeleteComment:I})))},bE=ose;var Y3={postReplyCommentList__viewReply_button:"mi",postReplyCommentList__viewReply_icon:"pi",postReplyCommentList__viewReply_text:"gi"};var IE=({referenceId:e,referenceType:t,community:o,parentId:r})=>{let{comments:n,hasMore:i,isLoading:a,loadMore:s}=Q8({referenceId:e,referenceType:t,parentId:r,limit:10,shouldCall:!0,includeDeleted:!0}),l=()=>{s();};return te.createElement("div",null,a&&te.createElement(J3,{numberOfSkeletons:3}),n.map(c=>te.createElement(bE,{community:o,comment:c})),i&&te.createElement("div",{className:Y3.postReplyCommentList__viewReply_button,onClick:l},te.createElement(q3,{className:Y3.postReplyCommentList__viewReply_icon}),te.createElement(N.CaptionBold,{className:Y3.postReplyCommentList__viewReply_text},"View more replies")))};var sse=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))},lse=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),te.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#63A1FF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},_E=({pageId:e="*",componentId:t="comment_bubble",comment:o,community:r,onClickReply:n,shouldAllowInteraction:i=!0})=>{var K;let {accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=re({pageId:e,componentId:t}),{confirm:g}=et(),[f,y]=useState(!1),[C,v]=useState(!1),[h,x]=useState(!1),[b,M]=useState(),I=useRef(null);useState(!1);let S=()=>y(U=>!U),L=(o.myReactions||[]).some(U=>U==="like"),D=o.childrenNumber;if(c)return null;let H=()=>_(void 0,null,function*(){return o.commentId&&CommentRepository.deleteComment(o.commentId)}),$=()=>{x(!0);},B=()=>{g({pageId:e,componentId:t,title:"Delete comment",content:"This comment will be permanently removed.",cancelText:"Cancel",okText:"Delete",onOk:H});},z=()=>_(void 0,null,function*(){o&&(L?yield ReactionRepository.removeReaction("comment",o==null?void 0:o.commentId,$n):yield ReactionRepository.addReaction("comment",o==null?void 0:o.commentId,$n));}),V=useCallback(()=>_(void 0,null,function*(){!b||!o.commentId||(yield CommentRepository.updateComment(o.commentId,{data:b.data,mentionees:b.mentionees,metadata:b.metadata}),x(!1));}),[b]);return Ld({commentId:o.commentId}),te.createElement("div",{style:u,"data-qa-anchor":a},o.isDeleted?te.createElement("div",{className:Xe.postComment__deleteComment_container},te.createElement(Pd,{className:Xe.postComment__deleteComment_icon}),te.createElement(N.Body,{className:Xe.postComment__deleteComment_text},"This comment has been deleted")):h?te.createElement("div",{className:Xe.postComment__edit},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:Xe.postComment__edit__inputWrap,ref:I},te.createElement("div",{className:Xe.postComment__edit__input},te.createElement(ei,{placeholder:"Say something nice...",communityId:r==null?void 0:r.communityId,value:{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata||{}},onChange:U=>{M({data:{text:U.text},mentionees:U.mentionees,metadata:{mentioned:U.mentioned}});},maxLines:5,mentionContainer:I==null?void 0:I.current})),te.createElement("div",{className:Xe.postComment__edit__buttonWrap},te.createElement(ms,{componentId:"edit_comment_component",className:gr(Xe.postComment__edit__button,Xe.postComment__edit__cancelButton),onPress:()=>{x(!1);}}),te.createElement(I1,{className:gr(Xe.postComment__edit__button,Xe.postComment__edit__saveButton),componentId:"edit_comment_component",onPress:V})))):te.createElement("div",{className:Xe.postComment},te.createElement(Wo,{userId:o.userId}),te.createElement("div",{className:Xe.postComment__details},te.createElement("div",{className:Xe.postComment__content},te.createElement(N.BodyBold,{className:Xe.postComment__content__username},(K=o.creator)==null?void 0:K.displayName),te.createElement(w1,{pageId:e,componentId:t}),te.createElement(Nm,{data:{text:o.data.text},mentionees:o.mentionees,metadata:o.metadata})),te.createElement("div",{className:Xe.postComment__secondRow},i&&te.createElement("div",{className:Xe.postComment__secondRow__leftPane},te.createElement(N.Caption,{className:Xe.postComment__secondRow__timestamp},te.createElement(M1,{pageId:e,componentId:t,timestamp:o.createdAt}),o.createdAt!==o.editedAt&&" (edited)"),te.createElement("div",{onClick:z},te.createElement(N.CaptionBold,{className:Xe.postComment__secondRow__like,"data-is-liked":L},L?"Liked":"Like")),te.createElement("div",{onClick:()=>n(o)},te.createElement(N.CaptionBold,{className:Xe.postComment__secondRow__reply},"Reply")),te.createElement(sse,{className:Xe.postComment__secondRow__actionButton,onClick:()=>y(!0)})),o.reactionsCount>0&&te.createElement("div",{className:Xe.postComment__secondRow__rightPane},te.createElement(N.Caption,null,lb(o.reactionsCount)),te.createElement(lse,{className:Xe.postComment__secondRow__rightPane__like}))),D>0&&!C&&te.createElement("div",{className:Xe.postComment__viewReply_button,onClick:()=>v(!0)},te.createElement(q3,{className:Xe.postComment__viewReply_icon}),te.createElement(N.CaptionBold,{className:Xe.postComment__viewReply_text},"View ",D," ",D>1?"replies":"reply")),C&&te.createElement(IE,{community:r,referenceId:o.referenceId,referenceType:o.referenceType,parentId:o.commentId}))),te.createElement(Er,{onClose:S,isOpen:f,mountPoint:document.getElementById("asc-uikit-post-comment"),detent:"content-height"},te.createElement(X3,{comment:o,handleEditComment:$,handleDeleteComment:B,onCloseBottomSheet:S})))};var $t={commentAd:"hi",commentAd__container:"fi",commentAd__details:"bi",commentAd__avatar:"ui",commentAd__content:"vi",commentAd__content__advertiserName__container:"xi",commentAd__content__advertiserName:"wi",commentAd__content__text:"yi",commentAd__adCard:"ki",commentAd__adCard__imageContainer:"ji",commentAd__adCard__image:"zi",commentAd__adCard__detail:"Xi",commentAd__adCard__textContainer:"Yi",commentAd__adCard__description:"Ci",commentAd__adCard__headline:"Si",commentAd__adCard__button:"Ai",commentAd__adCard__button__text:"Mi",infoIcon__button:"Bi",infoIcon:"Ei"};var dse=o=>{var r=o,{color:e="white"}=r,t=P(r,["color"]);return te.createElement("svg",d({width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),te.createElement("path",{d:"M5.54688 1.78125C5.73438 1.40625 6.26562 1.42188 6.4375 1.78125L7.46875 3.85938L9.75 4.1875C10.1562 4.25 10.3125 4.75 10.0156 5.04688L8.375 6.65625L8.76562 8.92188C8.82812 9.32812 8.39062 9.64062 8.03125 9.45312L6 8.375L3.95312 9.45312C3.59375 9.64062 3.15625 9.32812 3.21875 8.92188L3.60938 6.65625L1.96875 5.04688C1.67188 4.75 1.82812 4.25 2.23438 4.1875L4.53125 3.85938L5.54688 1.78125Z",fill:e}))},kE=dse;var Dd={badge:"me",badge__icon:"Ii",badge__text:"Ri",badge__child:"Ui"};var Lm=()=>te.createElement("div",{className:Dd.badge},te.createElement("div",{className:Dd.badge__child},te.createElement(kE,{className:Dd.badge__icon}),te.createElement("div",{className:Dd.badge__text},"Sponsored")));var pse=e=>te.createElement("svg",d({width:"100%",height:"100%",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{width:"64",height:"64",rx:"32",fill:"#D9E5FC"}),te.createElement("path",{d:"M20 28.5358C20.5156 28.5358 20.9375 28.8639 21.2188 29.2858L41 23.2858V41.2858L34.8125 39.4576C34.2969 41.3795 32.5625 42.7858 30.5 42.7858C28.0156 42.7858 26 40.7701 26 38.2858C26 37.817 26.0938 37.3014 26.2344 36.8795L21.2188 35.3326C20.9375 35.7545 20.5156 36.0358 20 36.0358C19.1562 36.0358 18.5 35.3795 18.5 34.5358V30.0358C18.5 29.2389 19.1562 28.5358 20 28.5358ZM28.3906 37.4889C28.2969 37.7701 28.25 38.0045 28.25 38.2858C28.25 39.5514 29.2344 40.5358 30.5 40.5358C31.5312 40.5358 32.4219 39.7858 32.6562 38.8014L28.3906 37.4889ZM44.75 21.7858C45.125 21.7858 45.5 22.1608 45.5 22.5358V42.0358C45.5 42.4576 45.125 42.7858 44.75 42.7858H43.25C42.8281 42.7858 42.5 42.4576 42.5 42.0358V22.5358C42.5 22.1608 42.8281 21.7858 43.25 21.7858H44.75Z",fill:"white"})),Am=pse;var use=e=>te.createElement("svg",d({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M8 2.25006C4.25 2.25006 1.25 5.28131 1.25 9.00006C1.25 12.7501 4.25 15.7501 8 15.7501C11.7188 15.7501 14.75 12.7501 14.75 9.00006C14.75 5.28131 11.6875 2.25006 8 2.25006ZM8 1.25006C12.25 1.25006 15.75 4.75006 15.75 9.00006C15.75 13.2813 12.25 16.7501 8 16.7501C3.71875 16.7501 0.25 13.2813 0.25 9.00006C0.25 4.75006 3.71875 1.25006 8 1.25006ZM6.875 12.0001H7.25V8.25006H6.875C6.65625 8.25006 6.5 8.09381 6.5 7.87506V7.62506C6.5 7.43756 6.65625 7.25006 6.875 7.25006H8.375C8.5625 7.25006 8.75 7.43756 8.75 7.62506V12.0001H9.125C9.3125 12.0001 9.5 12.1876 9.5 12.3751V12.6251C9.5 12.8438 9.3125 13.0001 9.125 13.0001H6.875C6.65625 13.0001 6.5 12.8438 6.5 12.6251V12.3751C6.5 12.1876 6.65625 12.0001 6.875 12.0001ZM8 4.50006C8.53125 4.50006 9 4.96881 9 5.50006C9 6.06256 8.53125 6.50006 8 6.50006C7.4375 6.50006 7 6.06256 7 5.50006C7 4.96881 7.4375 4.50006 8 4.50006Z",fill:"#A5A9B5"})),gn=use;var Co={drawer__content:"pe",drawer__innerContent:"Di",drawer__placeholder:"Fi",drawer__overlay:"Hi",drawer__title:"Li",drawer__content__data:"Ti",drawer__content__data__title:"Vi",drawer__content__data__text:"qi",drawer__content__data__caption:"Gi",drawer__content__data__infoIcon:"Ji",drawer__content__emptySpace:"Ki"};var e5=({isOpen:e,onOpenChange:t,ad:o})=>{var r;return te.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:n=>n.stopPropagation()},te.createElement(Drawer.Portal,null,te.createElement(Drawer.Overlay,{className:Co.drawer__overlay}),te.createElement(Drawer.Content,{className:Co.drawer__content,onTouchStart:n=>n.stopPropagation(),onTouchMove:n=>n.stopPropagation(),onTouchEnd:n=>n.stopPropagation()},te.createElement("div",{className:Co.drawer__innerContent},te.createElement("div",{className:Co.drawer__placeholder}),te.createElement(Drawer.Title,{className:Co.drawer__title},te.createElement(N.Title,null,"About this advertisement")),te.createElement("div",{className:Co.drawer__content__data},te.createElement(N.BodyBold,{className:Co.drawer__content__data__title},"Why this advertisement?"),te.createElement("div",{className:Co.drawer__content__data__text},te.createElement(gn,{className:Co.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Co.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),te.createElement("div",{className:Co.drawer__content__data},te.createElement(N.BodyBold,{className:Co.drawer__content__data__title},"About this advertiser"),te.createElement("div",{className:Co.drawer__content__data__text},te.createElement(gn,{className:Co.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Co.drawer__content__data__caption},"Advertiser name: ",(r=o.advertiser)==null?void 0:r.companyName))),te.createElement("div",{className:Co.drawer__content__emptySpace})))))};var NE=({ad:e,themeStyles:t,avatarUrl:o,adImageUrl:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return te.createElement("div",{className:$t.commentAd,style:t},te.createElement(O,{className:$t.infoIcon__button,onPress:()=>a(!0)},te.createElement(gn,{className:$t.infoIcon})),te.createElement("div",{className:$t.commentAd__container},te.createElement("div",{className:$t.commentAd__avatar},te.createElement(bt,{avatarUrl:o,defaultImage:te.createElement(Am,null)})),te.createElement("div",{className:$t.commentAd__details},te.createElement("div",{className:$t.commentAd__content},te.createElement(N.BodyBold,{className:$t.commentAd__content__advertiserName__container},te.createElement("div",{className:$t.commentAd__content__advertiserName},(l=e.advertiser)==null?void 0:l.name)),te.createElement(Lm,null),te.createElement("div",null,te.createElement(N.Body,{className:$t.commentAd__content__text},e.body)),te.createElement("div",{className:$t.commentAd__adCard,onClick:s},te.createElement("div",{className:$t.commentAd__adCard__imageContainer},te.createElement("img",{className:$t.commentAd__adCard__image,src:r})),te.createElement("div",{className:$t.commentAd__adCard__detail},te.createElement("div",{className:$t.commentAd__adCard__textContainer},te.createElement(N.Caption,{renderer:({typoClassName:c})=>te.createElement("div",{className:gr(c,$t.commentAd__adCard__description)},e.description)}),te.createElement(N.BodyBold,{className:$t.commentAd__adCard__headline},e.headline)),e.callToActionUrl?te.createElement(O,{className:$t.commentAd__adCard__button,onPress:s},te.createElement(N.CaptionBold,{className:$t.commentAd__adCard__button__text},e.callToAction)):null))))),te.createElement(e5,{ad:e,isOpen:i,onOpenChange:c=>a(c)}))};var EE=({pageId:e="*",ad:t})=>{var c,p,u,g,f,y;let o="comment_tray_component",{themeStyles:r}=re({pageId:e,componentId:o}),i=it({fileId:(p=(c=t.advertiser)==null?void 0:c.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=it({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return te.createElement(NE,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:C=>{window==null||window.open(C,"_blank");}})};var t5={commentList__container:"Ni",commentList__viewAllComments__button:"Oi",commentList__container_intersection:"Pi",noCommentsContainer:"Qi"};function Fd({postId:e,level:t,shouldSubscribe:o=!0,callback:r}){return oa({fetcher:PostRepository.getPost,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getPostTopic(n,t)})}var Pse=e=>"adId"in e,Od=({referenceId:e,referenceType:t,pageId:o="*",onClickReply:r,limit:n=5,includeDeleted:i=!1,community:a,shouldAllowInteraction:s=!0})=>{let l="comment_tray_component",{themeStyles:c,accessibilityId:p}=re({componentId:l,pageId:o}),u=useRef(null),[g,f]=useState(null),{items:y,loadMore:C,hasMore:v,isLoading:h}=yd({fetcher:CommentRepository.getComments,params:{referenceId:e,referenceType:t,limit:n,includeDeleted:i},placement:"comment",pageSize:5,getItemId:x=>x.commentId,shouldCall:!0});return Bo({node:g,options:{threshold:.8},onIntersect:()=>{v&&h===!1&&C();}}),Fd({postId:e,level:SubscriptionLevels.COMMENT,shouldSubscribe:t==="post"}),Xa({targetId:e,targetType:t,shouldSubscribe:t==="story"&&!!e}),!h&&y.length===0?te.createElement("div",{className:t5.noCommentsContainer},te.createElement(N.Body,null,"No comments yet")):te.createElement("div",{className:t5.commentList__container,style:c,ref:u,"data-qa-anchor":p},y.map(x=>Pse(x)?te.createElement(EE,{key:x.adId,ad:x}):te.createElement(_E,{key:x.commentId,comment:x,onClickReply:b=>r==null?void 0:r(b),componentId:l,community:a,shouldAllowInteraction:s})),h&&te.createElement(J3,{pageId:o,componentId:l,numberOfSkeletons:3}),te.createElement("div",{ref:x=>f(x),className:t5.commentList__container_intersection}))};var X8={container:"Wi",header:"Zi",roundedHeader:"_i",content:"el",scroller:"rl",composeBarContainer:"al",nestedBackdrop:"ol",commentTrayContainer:"tl",commentListContainer:"il",mobileSheetComposeBarContainer:"ll"};var Dm=({pageId:e="*",referenceType:t,referenceId:o,community:r={},shouldAllowInteraction:n=!0,shouldAllowCreation:i=!0})=>{let a="comment_tray_component",{accessibilityId:s,themeStyles:l}=re({pageId:e,componentId:a}),[c,p]=useState(null),u=f=>{p(f);},g=()=>{p(null);};return te.createElement("div",{style:l,"data-qa-anchor":s,className:X8.commentTrayContainer},te.createElement("div",{className:X8.commentListContainer},te.createElement(Od,{pageId:e,referenceId:o,referenceType:t,community:r,includeDeleted:!0,onClickReply:u,shouldAllowInteraction:n})),te.createElement(Ed,{referenceId:o,referenceType:t,onCancelReply:g,replyTo:c,shouldAllowCreation:i}))};var Y8={doneButton:"sl",doneButton_text:"cl"};function R8(n){var i=n,{pageId:e="*",componentId:t="*",className:o}=i,r=P(i,["pageId","componentId","className"]);let a="done_button",{accessibilityId:s,config:l,isExcluded:c}=A({pageId:e,componentId:t,elementId:a});return c?null:te.createElement(O,d({className:`${Y8.doneButton} ${o||""}`,"data-qa-anchor":s},r),te.createElement(N.Body,{className:Y8.doneButton_text},l.done_button_text))}var gt={hyperlinkFormContainer:"nl",form:"dl",bottomSheet:"a","react-modal-sheet-backdrop":"ml","react-modal-sheet-container":"pl","react-modal-sheet-content":"gl","react-modal-sheet-header":"hl","react-modal-sheet-drag-indicator":"fl",inputContainer:"bl",input:"ge",hasError:"ul",label:"X",required:"vl",description:"xl",errorText:"wl",characterCount:"yl",headerContainer:"kl",labelContainer:"jl",headerTitle:"zl",cancelButton:"Xl",doneButton:"he",removeIcon:"Yl",removeLinkButton:"Cl",divider:"Sl",removeLinkContainer:"Al"};var LE=30,tg=({pageId:e="*",isOpen:t,isHaveHyperLink:o,onClose:r,onSubmit:n,onRemove:i})=>{var z$1,V,K;let a="hyper_link_config_component",{confirm:s}=et(),{accessibilityId:l,config:c,isExcluded:p,themeStyles:u}=re({pageId:e,componentId:a});if(p)return null;let{formatMessage:g}=useIntl(),{client:f}=De(),[y,C]=useState(!1),v="asc-story-hyperlink-form",h=z.object({url:z.string().refine(U=>{if(!U)return !0;try{let j=new URL(U);return ["http:","https:"].includes(j.protocol)}catch(j){if(U.startsWith("www."))try{let Z=new URL(`https://${U}`);return ["http:","https:"].includes(Z.protocol)}catch(Z){return !1}return !1}},{message:g({id:"storyCreation.hyperlink.validation.error.invalidUrl"})}).refine(U=>_(void 0,null,function*(){if(!U)return !0;let j=U.startsWith("www.")?`https://${U}`:U;return yield f==null?void 0:f.validateUrls([j]).catch(()=>!1)}),{message:g({id:"storyCreation.hyperlink.validation.error.whitelisted"})}),customText:z.string().optional().refine(U=>_(void 0,null,function*(){return U?yield f==null?void 0:f.validateTexts([U]).catch(()=>!1):!0}),g({id:"storyCreation.hyperlink.validation.error.blocked"}))}),{trigger:x,watch:b,register:M,handleSubmit:I,formState:{errors:w},reset:k}=useForm({resolver:zodResolver(h)}),{url:S,customText:L}=b();useEffect(()=>{C(S!==""||L!=="");},[S,L]);let D=U=>{n(U),r();},H=()=>{k(),i(),r();},$=()=>{s({title:g({id:"storyCreation.hyperlink.removeConfirm.title"}),content:g({id:"storyCreation.hyperlink.removeConfirm.content"}),cancelText:g({id:"storyCreation.hyperlink.removeConfirm.cancel"}),okText:g({id:"storyCreation.hyperlink.removeConfirm.confirm"}),onOk:H});},B=()=>{y?s({title:g({id:"storyCreation.hyperlink.unsavedChanges.title"}),content:g({id:"storyCreation.hyperlink.unsavedChanges.content"}),cancelText:g({id:"storyCreation.hyperlink.unsavedChanges.cancel"}),okText:g({id:"storyCreation.hyperlink.unsavedChanges.confirm"}),onOk:()=>{k(),r();}}):r();};return te.createElement(Er,{"data-qa-anchor":l,detent:"full-height",mountPoint:document.getElementById("asc-uikit-create-story"),rootId:"asc-uikit-create-story",isOpen:t,onClose:B,className:gt.bottomSheet,style:u},te.createElement("div",{className:gt.headerContainer},te.createElement(ms,{pageId:e,componentId:a,onPress:B}),te.createElement(N.Title,null,g({id:"storyCreation.hyperlink.bottomSheet.title"})),te.createElement(R8,{type:"submit",pageId:e,componentId:a,form:v})),te.createElement("div",{className:gt.divider}),te.createElement("div",{className:gt.hyperlinkFormContainer},te.createElement("form",{onSubmit:I(D),id:v,className:gt.form},te.createElement("div",{className:gt.inputContainer},te.createElement(N.Title,null,te.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-url",className:gr(gt.label,gt.required)},g({id:"storyCreation.hyperlink.form.urlLabel"}))),te.createElement("input",d({id:"asc-uikit-hyperlink-input-url",placeholder:g({id:"storyCreation.hyperlink.form.urlPlaceholder"}),className:gr(gt.input,(w==null?void 0:w.url)&>.hasError)},M("url",{onChange:()=>x("url")}))),(w==null?void 0:w.url)&&te.createElement("span",{className:gt.errorText},(z$1=w==null?void 0:w.url)==null?void 0:z$1.message)),te.createElement("div",{className:gt.inputContainer},te.createElement("div",{className:gt.labelContainer},te.createElement(N.Title,null,te.createElement("label",{htmlFor:"asc-uikit-hyperlink-input-link-text",className:gt.label},g({id:"storyCreation.hyperlink.form.linkTextLabel"}))),te.createElement("div",{className:gt.characterCount},((V=b("customText"))==null?void 0:V.length)||0," / ",LE)),te.createElement("input",E(d({id:"asc-uikit-hyperlink-input-link-text",placeholder:g({id:"storyCreation.hyperlink.form.linkTextPlaceholder"}),className:gr(gt.input,(w==null?void 0:w.customText)&>.hasError)},M("customText")),{maxLength:LE})),(w==null?void 0:w.customText)&&te.createElement("span",{className:gt.errorText},(K=w==null?void 0:w.customText)==null?void 0:K.message),te.createElement(N.Caption,null,te.createElement("label",{className:gt.description},g({id:"storyCreation.hyperlink.form.linkTextDescription"}))))),o&&te.createElement("div",{className:gt.removeLinkContainer},te.createElement(L3,{variant:"secondary",onClick:$,className:gr(gt.removeLinkButton)},te.createElement(u1,{className:gt.removeIcon}),g({id:"storyCreation.hyperlink.form.removeButton"})))))};var Fse=createContext([]),bi=()=>({config:useContext(Fse)});var Hm=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":e;var n5=({reactionConfigItem:e,className:t})=>te.createElement("img",{"data-qa-anchor":"reaction_image_view",key:e.name,src:e.image,alt:e.name,className:t});var Use=o=>{var r=o,{backgroundColor:e}=r,t=P(r,["backgroundColor"]);return te.createElement("svg",d({width:"21",height:"21",viewBox:"0 0 21 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),te.createElement("path",{d:"M19.6035 10.5C19.6035 15.7467 15.3502 20 10.1035 20C4.85681 20 0.603516 15.7467 0.603516 10.5C0.603516 5.25329 4.85681 1 10.1035 1C15.3502 1 19.6035 5.25329 19.6035 10.5Z",stroke:"currentColor",fill:e}),te.createElement("path",{d:"M10.2723 6.71429C11.6786 6.71429 13.202 7.83595 13.202 9.29242C13.202 11.2344 11.1094 11.2679 11.1094 11.9877V12.0714C11.1094 12.3058 10.9252 12.4732 10.7076 12.4732H9.48549C9.26786 12.4732 9.08371 12.3058 9.08371 12.0714V11.9208C9.08371 10.8828 9.87054 10.4643 10.4732 10.1295C10.9754 9.84487 11.2935 9.66072 11.2935 9.27568C11.2935 8.77345 10.6574 8.45537 10.1384 8.45537C9.48549 8.45537 9.16741 8.75671 8.74888 9.27568C8.61496 9.44309 8.36384 9.47657 8.19643 9.34264L7.47656 8.79019C7.29241 8.673 7.25893 8.42188 7.37612 8.25447C8.0625 7.26675 8.93304 6.71429 10.2723 6.71429ZM10.1049 12.9755C10.7411 12.9755 11.26 13.4944 11.26 14.1306C11.26 14.7667 10.7411 15.2857 10.1049 15.2857C9.45201 15.2857 8.93304 14.7667 8.93304 14.1306C8.93304 13.4944 9.45201 12.9755 10.1049 12.9755Z",fill:"currentColor"}))},Fm=Use;var Se={reactionListContainer:"Ml",tabListContainer:"fe",tabList:"Bl",tabItem:"be",reactionEmoji:"El",userList:"Il",userItem:"Rl",userDetailsContainer:"Ul",userDetailsProfile:"Dl",userDetailsReaction:"Fl",reactionItem:"Hl",reactionIcon:"Ll",reactionCustomStateContainer:"ue",loadingState:"Tl","skeleton-pulse":"ve",reactionState:"Vl",reactionState2Line:"ql",removeBtn:"Gl",infiniteScrollContainer:"Jl",reactionPanel:"Kl",avatar:"Nl"};var AE=({filteredReactions:e,removeReaction:t,hasMore:o,loadMore:r,isLoading:n,currentRef:i})=>{let{currentUserId:a}=De(),{config:s}=bi(),l=useMemo(()=>s.map(({name:c})=>c),[s]);return !i||!e?null:te.createElement("div",{className:Se.infiniteScrollContainer},te.createElement(eR,{scrollableTarget:i,scrollThreshold:.7,hasMore:o,next:r,loader:n?te.createElement("span",{key:0},"Loading..."):null,dataLength:e.length||0,style:{display:"flex",width:"100%"},height:i.clientHeight},te.createElement("div",{className:Se.userList},e.map(c=>{var p,u,g,f;return te.createElement(Fragment,{key:c.reactionId},te.createElement("div",{className:Se.userItem},te.createElement("div",{className:Se.userDetailsContainer},te.createElement("div",{className:Se.userDetailsProfile},te.createElement("div",{className:Se.avatar},te.createElement(bt,{"data-qa-anchor":"user_avatar_view",avatarUrl:(u=(p=c.user)==null?void 0:p.avatar)==null?void 0:u.fileUrl,defaultImage:te.createElement(ds,null)})),te.createElement(N.BodyBold,{"data-qa-anchor":"user_display_name"},(g=c.user)==null?void 0:g.displayName,a===((f=c.user)==null?void 0:f.userId)&&te.createElement(te.Fragment,null,te.createElement("br",null),te.createElement("div",{onClick:()=>t(c.reactionName)},te.createElement(N.Caption,{className:Se.removeBtn},"Click to remove reaction"))))),te.createElement("div",{className:Se.userDetailsReaction},l.includes(c.reactionName)?te.createElement(n5,{reactionConfigItem:s.find(({name:y})=>y===c.reactionName),className:Se.reactionIcon}):te.createElement(Fm,{className:Se.reactionIcon})))))}))))};var Gse=e=>te.createElement("svg",d({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M18.8672 1.63086C19.1797 1.31836 19.6875 1.55273 19.6875 1.94336V7.5293C19.6875 7.80273 19.4531 7.99805 19.2188 7.99805H13.5938C13.2031 7.99805 12.9688 7.5293 13.2812 7.2168L15.3906 5.10742C14.0234 3.70117 12.1094 2.8418 10 2.8418C5.74219 2.8418 2.34375 6.2793 2.34375 10.498C2.34375 14.7559 5.74219 18.1543 10 18.1543C11.9531 18.1543 13.7109 17.4512 15.0781 16.2402C15.2734 16.084 15.5469 16.084 15.7031 16.2402L16.4844 17.0215C16.6797 17.2168 16.6797 17.5293 16.4844 17.7246C14.7656 19.248 12.4609 20.1855 10 20.1855C4.64844 20.1855 0.3125 15.8887 0.3125 10.5371C0.273438 5.18555 4.64844 0.810547 10 0.810547C12.6562 0.810547 15.0781 1.9043 16.8359 3.66211L18.8672 1.63086Z",fill:"#6E7487"})),i5=Gse;var HE=()=>te.createElement("div",{className:Se.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},te.createElement("div",{className:Se.reactionState},te.createElement(i5,null),te.createElement(N.Body,null,te.createElement(FormattedMessage,{id:"livechat.reaction.errorOnload"}))));var Qse=e=>te.createElement("svg",d({width:"33",height:"33",viewBox:"0 0 33 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M11.25 9.28613C16.5938 9.28613 21 13.6924 21 19.0361C21 24.4268 16.5938 28.7861 11.25 28.7861C5.85938 28.7861 1.5 24.4268 1.5 19.0361C1.5 13.6924 5.85938 9.28613 11.25 9.28613ZM11.25 26.5361C15.375 26.5361 18.75 23.208 18.75 19.0361C18.75 14.9111 15.375 11.5361 11.25 11.5361C7.07812 11.5361 3.75 14.9111 3.75 19.0361C3.75 23.208 7.07812 26.5361 11.25 26.5361ZM14.1094 20.7236C14.5312 20.2549 15.2344 20.208 15.7031 20.6299C16.1719 21.0049 16.2188 21.708 15.8438 22.1768C14.6719 23.5361 13.0312 24.2861 11.25 24.2861C9.46875 24.2861 7.78125 23.5361 6.60938 22.1768C6.23438 21.708 6.28125 21.0049 6.75 20.6299C7.21875 20.208 7.92188 20.2549 8.34375 20.7236C9.75 22.4111 12.7031 22.4111 14.1094 20.7236ZM8.25 18.2861C7.40625 18.2861 6.75 17.6299 6.75 16.7861C6.75 15.9893 7.40625 15.2861 8.25 15.2861C9.04688 15.2861 9.75 15.9893 9.75 16.7861C9.75 17.6299 9.04688 18.2861 8.25 18.2861ZM14.25 18.2861C13.4062 18.2861 12.75 17.6299 12.75 16.7861C12.75 15.9893 13.4062 15.2861 14.25 15.2861C15.0469 15.2861 15.75 15.9893 15.75 16.7861C15.75 17.6299 15.0469 18.2861 14.25 18.2861ZM30.75 8.91113C31.125 8.91113 31.5 9.28613 31.5 9.66113V10.4111C31.5 10.833 31.125 11.1611 30.75 11.1611H27.375V14.5361C27.375 14.958 27 15.2861 26.625 15.2861H25.875C25.4531 15.2861 25.125 14.958 25.125 14.5361V11.1611H21.75C21.3281 11.1611 21 10.833 21 10.4111V9.66113C21 9.28613 21.3281 8.91113 21.75 8.91113H25.125V5.53613C25.125 5.16113 25.4531 4.78613 25.875 4.78613H26.625C27 4.78613 27.375 5.16113 27.375 5.53613V8.91113H30.75Z",fill:"#A5A9B5"})),OE=Qse;var zE=()=>te.createElement("div",{className:Se.reactionCustomStateContainer,"data-qa-anchor":"reaction_list"},te.createElement("div",{className:Se.reactionState},te.createElement(OE,null),te.createElement("div",{className:Se.reactionState2Line},te.createElement(N.Body,null,te.createElement(FormattedMessage,{id:"livechat.reaction.emptyState"})),te.createElement(N.Caption,null,te.createElement(FormattedMessage,{id:"livechat.reaction.emptyState.description"})))));var Wse=e=>te.createElement("svg",d({width:"375",height:"56",viewBox:"0 0 375 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{x:"16",y:"8",width:"40",height:"40",rx:"20",fill:"#292B32"}),te.createElement("rect",{x:"64",y:"24",width:"140",height:"8",rx:"4",fill:"#292B32"})),$E=Wse;var ng=()=>te.createElement("div",{className:gr(Se.reactionCustomStateContainer,Se.loadingState),"data-qa-anchor":"reaction_list"},Array.from({length:8}).map((e,t)=>te.createElement($E,{key:`loading_${t}`})));var Kse=(e,t)=>({addReaction:n=>_(void 0,null,function*(){yield ReactionRepository.addReaction(e,t,n);}),removeReaction:n=>_(void 0,null,function*(){yield ReactionRepository.removeReaction(e,t,n);})}),GE=Kse;var t1e=(e,t)=>{let[o,r]=useState(0),[n,i]=useState({}),[a,s]=useState(null),l=({data:c,loading:p,error:u})=>{p||u||(r(c.reactionsCount),i(c.reactions),s(c.myReaction));};return useEffect(()=>{if(e==="message")MessageRepository.getMessage(t,l);else if(e==="story")StoryRepository.getStoryByStoryId(t,l);else if(e==="comment")CommentRepository.getComment(t,l);else if(e==="post")PostRepository.getPost(t,l);else throw new Error("Unsupported reference type")},[t,e]),{reactions:n,reactionCount:o,myReaction:a}},ZE=t1e;var s5="unknown",n1e=(e,t,o)=>t==="All"?e:t===s5?e.filter(r=>!o.includes(r.reactionName)):e.filter(r=>r.reactionName===t.toLowerCase()),i1e=({filteredReactions:e,hasMore:t,loadMore:o,isLoading:r,removeReaction:n,error:i,currentRef:a})=>r?te.createElement(ng,null):i?te.createElement(HE,null):e.length===0?r?te.createElement(ng,null):te.createElement(zE,null):te.createElement(AE,{currentRef:a,hasMore:t,loadMore:o,isLoading:r,filteredReactions:e,removeReaction:n}),Om=({pageId:e="*",referenceId:t,referenceType:o})=>{let r="reaction_list",{accessibilityId:n}=re({pageId:e,componentId:r}),{reactions:i,error:a,isLoading:s,hasMore:l,loadMore:c}=jT({referenceId:t,referenceType:o,limit:25}),{reactions:p,reactionCount:u}=ZE(o,t),[g,f]=useState("All"),y=useRef(null),{config:C}=bi(),{removeReaction:v}=GE(o,t),h=w=>{f(w);};if(i==null||!C)return null;let x=useMemo(()=>C.map(w=>w.name),[C]),b=useMemo(()=>Object.keys(p).filter(w=>!x.includes(w)),[p]),M=useMemo(()=>b.reduce((w,k)=>w+p[k],0),[p]),I=useMemo(()=>n1e(i,g,x),[i,g]);return te.createElement("div",{className:Se.reactionListContainer,"data-qa-anchor":`${n}_header`},te.createElement("div",{className:Se.tabListContainer},te.createElement("div",{className:Se.tabList,"data-qa-anchor":`${n}_tab`},te.createElement("div",{"data-active":g==="All",className:Se.tabItem,onClick:()=>h("All")},te.createElement(N.Body,null,te.createElement("span",{className:Se.reactionEmoji},"All ",Hm(u)))),C.map(w=>{let{name:k,image:S}=w;return p[k]?te.createElement("div",{key:k,"data-active":g===k,className:Se.tabItem,onClick:()=>h(k)},te.createElement(N.Body,null,te.createElement("span",{className:Se.reactionEmoji},te.createElement(n5,{className:Se.reactionItem,reactionConfigItem:w}),Hm(p[k])))):null}),b.length>0&&te.createElement("div",{key:s5,"data-active":g===s5,className:Se.tabItem,onClick:()=>h(s5)},te.createElement(N.Body,null,te.createElement("span",{className:Se.reactionEmoji},te.createElement(Fm,{className:Se.reactionIcon}),Hm(M)))))),te.createElement("div",{ref:y,className:Se.reactionPanel},te.createElement(i1e,{currentRef:y.current,hasMore:l,loadMore:c,error:a,isLoading:s,filteredReactions:I,removeReaction:v})))};var l1e=te.createContext(void 0);var It=()=>{let e=useContext(l1e);if(!e)throw new Error("usePageBehavior must be used within a PageBehaviorProvider");return e};var ag={emptyStateRing:"Ol",errorRing:"Pl",uploadingProgressRing:"Ql","upload-progress":"xe"};var d1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},te.createElement("defs",null,te.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:i[0]}),te.createElement("stop",{offset:1,stopColor:i[1]}))),te.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,className:ag.emptyStateRing}))},c1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},te.createElement("defs",null,te.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:i[0]}),te.createElement("stop",{offset:1,stopColor:i[1]}))),te.createElement("circle",{cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none",strokeDasharray:339,strokeDashoffset:0}))},p1e=({pageId:e,componentId:t,elementId:o,size:r})=>{let{config:n}=A({pageId:e,componentId:t,elementId:o}),i=n==null?void 0:n.progress_color;return te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:r,height:r,fill:"none",viewBox:`0 0 ${r} ${r}`},te.createElement("defs",null,te.createElement("linearGradient",{id:"story-ring-gradient",x1:"35.4004",y1:"1.875",x2:"10.6504",y2:"45.75",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:i[0]}),te.createElement("stop",{offset:1,stopColor:i[1]}))),te.createElement("circle",{className:ag.uploadingProgressRing,cx:r/2,cy:r/2,r:r/2-1,strokeWidth:"2",strokeLinecap:"round",stroke:"url(#story-ring-gradient)",fill:"none"}))},zd=s=>{var l=s,{pageId:e="*",componentId:t="*",hasUnseen:o=!1,uploading:r=!1,isErrored:n=!1,size:i=64}=l,a=P(l,["pageId","componentId","hasUnseen","uploading","isErrored","size"]);let c="story_ring",{isExcluded:p}=A({pageId:e,componentId:t,elementId:c});return p?null:n?te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:i,height:i,fill:"none",viewBox:`0 0 ${i} ${i}`},a),te.createElement("circle",{cx:i/2,cy:i/2,r:i/2-1,stroke:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-alert-default"),strokeWidth:"2"})):r?te.createElement(p1e,{pageId:e,componentId:t,elementId:c,size:i}):o?te.createElement(c1e,{pageId:e,componentId:t,elementId:c,size:i}):te.createElement(d1e,{pageId:e,componentId:t,elementId:c,size:i})};var u1e="global-admin";var WE=e=>e!=null&&e.length?e.includes(u1e):!1;var g1e="global-admin",{COMMUNITY_MODERATOR:f1e,CHANNEL_MODERATOR:y1e,MODERATOR:h1e,SUPER_MODERATOR:C1e}=hd,l5=e=>{if(!(e!=null&&e.length))return !1;let t=[f1e,y1e,h1e,C1e];return e.some(o=>t.includes(o))},m5=e=>e!=null&&e.length?e.includes(g1e):!1;var us=(e,t)=>e&&t?e.hasPermission("MANAGE_COMMUNITY_STORY").community(t):!1;function d5(e){if(!e)return;let t=new Date(e),r=Math.floor((new Date().getTime()-t.getTime())/1e3);return r<60?"Just now":r>=60&&r<3600?`${Math.floor(r/60)}m`:`${Math.floor(r/3600)}h`}var Um={errorIcon:"Wl",addStoryButton:"Zl",hiddenInput:"_l",storyWrapper:"es",storyTabContainer:"rs",storyAvatarContainer:"as",storyAvatar:"os",storyTitle:"ts","animate-ring":"we",progressRing:"is",progressRingStatic:"ls"};var I1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),te.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),te.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),qE=({pageId:e="*",componentId:t="*",communityId:o,onFileChange:r,onStoryClick:n})=>{let{isExcluded:i,accessibilityId:a,themeStyles:s}=re({pageId:e,componentId:t}),{stories:l}=ta({targetId:o,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),{community:c}=vd(o),{currentUserId:p,client:u}=De(),{user:g}=Cr(p),y=WE(g==null?void 0:g.roles)||us(u,o),C=(l==null?void 0:l.length)>0,v=l.some(M=>!(M!=null&&M.isSeen)),h=l.some(M=>(M==null?void 0:M.syncState)==="syncing"),x=l.some(M=>(M==null?void 0:M.syncState)==="error"),b=()=>{Array.isArray(l)&&l.length===0||n();};return i||!C&&!y?null:te.createElement("div",{"data-qa-anchor":a,style:s,className:gr(Um.storyTabContainer)},te.createElement("div",{className:gr(Um.storyWrapper)},C&&te.createElement(zd,{pageId:e,componentId:t,hasUnseen:v,uploading:h,isErrored:x,size:48}),te.createElement("button",{className:gr(Um.storyAvatarContainer),onClick:b},te.createElement(Zr,{pageId:e,componentId:t,community:c})),y&&te.createElement(FileTrigger,{onSelect:M=>{let I=Array.from(M);r(I[0]);}},te.createElement(is,{pageId:e,componentId:t})),x&&te.createElement(I1e,{className:gr(Um.errorIcon)})),te.createElement(yw,{lines:1},te.createElement("div",{className:gr(Um.storyTitle)},"Story")))};var Vd={storyTabContainer:"ss",storyTab:"cs",storyTabImage:"ns",storyTabContent:"ds",storyTabTitle:"ms",storyTabIcons:"ye",storyTabSkeleton:"ps",storyTabSkeletonAvatar:"gs","skeleton-pulse":"Y",storyTabSkeletonUsername:"hs"};var M1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M20.4187 17.2429V15.4838L21.6578 14.2365C21.6585 14.2358 21.6591 14.2351 21.6598 14.2345C22.3179 13.5807 22.7516 12.8355 22.75 11.9942C22.7484 11.1537 22.3123 10.4094 21.6598 9.75682L20.4187 8.51578V6.7571C20.4187 5.82907 20.1982 4.99346 19.6024 4.39762C19.0065 3.80179 18.1709 3.58128 17.2429 3.58128H15.4842L14.2432 2.34024L13.7265 2.85697L14.2432 2.34024C13.5864 1.68348 12.8389 1.24622 11.9953 1.24784C11.1522 1.24946 10.4079 1.68897 9.75583 2.34991L8.51619 3.58128H6.75709C5.8332 3.58128 4.99652 3.79543 4.39906 4.38966C3.80081 4.98466 3.58127 5.82245 3.58127 6.7571V8.51578L2.34222 9.75484C2.34186 9.75519 2.3415 9.75555 2.34114 9.75591C1.68254 10.4099 1.24839 11.1554 1.25 11.9971C1.25162 12.8372 1.68721 13.5812 2.33924 14.2335C2.33957 14.2338 2.3399 14.2342 2.34023 14.2345L3.58127 15.4838V17.2429C3.58127 18.1709 3.80178 19.0066 4.39761 19.6024C4.99345 20.1982 5.82907 20.4187 6.75709 20.4187H8.51577L9.75483 21.6578C9.75525 21.6582 9.75567 21.6586 9.75609 21.6591C10.4102 22.3177 11.1557 22.7516 11.9982 22.75C12.8389 22.7484 13.5848 22.3133 14.2412 21.6618L14.2432 21.6598L15.4842 20.4187H17.2429C18.1709 20.4187 19.0065 20.1982 19.6024 19.6024C20.1982 19.0066 20.4187 18.1709 20.4187 17.2429ZM11.1362 14.6127L15.3255 8.63293C15.3257 8.63263 15.3259 8.63232 15.3261 8.63202C15.3555 8.59049 15.3769 8.56736 15.3897 8.55517C15.3961 8.54919 15.4003 8.54586 15.4025 8.54426L15.4048 8.54269L15.4054 8.54234L15.4054 8.54232L15.4062 8.542C15.4072 8.54166 15.4101 8.54065 15.4157 8.53942C15.4272 8.53692 15.4517 8.53308 15.4953 8.53308C15.5882 8.53308 15.6273 8.563 15.6388 8.57409C15.649 8.58379 15.6664 8.60504 15.6669 8.65903C15.6668 8.65902 15.6656 8.67471 15.6559 8.70306C15.6448 8.73553 15.6277 8.7697 15.6066 8.79916L15.6062 8.79975L10.738 15.6292C10.7079 15.6666 10.6872 15.6779 10.6764 15.6829C10.6626 15.6894 10.6288 15.7017 10.5567 15.7017C10.4668 15.7017 10.4177 15.6786 10.3664 15.6272L7.5945 12.5262L7.58765 12.5185L7.58058 12.511C7.58023 12.5106 7.57454 12.5043 7.5688 12.489C7.56299 12.4736 7.55926 12.4545 7.55926 12.4347C7.55926 12.3583 7.58347 12.332 7.59029 12.3253C7.59747 12.3182 7.63028 12.2892 7.72221 12.2892C7.78716 12.2892 7.81058 12.2992 7.8149 12.3011L7.81503 12.3012C7.81882 12.3028 7.8367 12.3105 7.87134 12.3478L9.9633 14.6828L10.5939 15.3867L11.1362 14.6127Z",fill:"#1054DE",stroke:"white",strokeWidth:"1.5"})),JE=M1e;var gs={container:"fs",avatarContainer:"bs",verifiedIcon:"us",avatarBackground:"vs",avatar:"xs",displayName:"ws",errorIcon:"ys"};var _1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),te.createElement("circle",{cx:"8",cy:"8",r:"7.25",fill:"#FA4D30",stroke:"#fff",strokeWidth:"1.5"}),te.createElement("path",{fill:"#fff",d:"M9.25 10.75C9.25 11.453 8.687 12 8 12c-.703 0-1.25-.547-1.25-1.25 0-.688.547-1.25 1.25-1.25.688 0 1.25.563 1.25 1.25zM6.89 4.406A.378.378 0 017.267 4h1.453c.219 0 .39.188.375.406l-.203 4.25A.387.387 0 018.516 9H7.469a.387.387 0 01-.375-.344l-.203-4.25z"})),T1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none",viewBox:"0 0 16 16"},e),te.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 0c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8z"}),te.createElement("path",{fill:"#000",fillOpacity:".2",d:"M8 2c2.21 0 4 1.79 4 4v1h-1V6c0-1.104-.896-2-2-2s-2 .896-2 2v1H4V6c0-2.21 1.79-4 4-4z"})),YE=({pageId:e,componentId:t,targetId:o,hasUnseen:r,onClick:n,isErrored:i})=>{let{community:a}=_t({communityId:o}),s=it({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return te.createElement("div",{className:gr(gs.container),onClick:n},te.createElement("div",{className:gs.avatarContainer},te.createElement(zd,{pageId:e,componentId:t,hasUnseen:r,isErrored:i}),te.createElement("div",{className:gs.avatarBackground},s&&te.createElement("img",{className:gs.avatar,src:s,alt:a==null?void 0:a.displayName})),i&&te.createElement(_1e,{className:gs.errorIcon}),(a==null?void 0:a.isOfficial)&&!i&&te.createElement(JE,{className:gs.verifiedIcon})),te.createElement(N.Caption,{className:gr(gs.displayName)},!(a!=null&&a.isPublic)&&te.createElement(T1e,null),a==null?void 0:a.displayName))};var c5=e=>{let s=pt({fetcher:StoryRepository.getGlobalStoryTargets,params:e,shouldCall:!0}),{items:t,hasMore:o,loadMore:r,isLoading:n}=s,i=P(s,["items","hasMore","loadMore","isLoading"]);return d({stories:t,hasMore:o,isLoading:n,loadMoreStories:()=>{o&&!n&&r();}},i)};var N1e=10,eB=({pageId:e="*",componentId:t="*",goToViewStoryPage:o})=>{let{isExcluded:r,accessibilityId:n,themeStyles:i}=re({pageId:e,componentId:t}),{stories:a,isLoading:s,hasMore:l,loadMoreStories:c}=c5({seenState:"smart",limit:N1e}),p=useRef(null),u=useRef(null);return useEffect(()=>{if(!p.current)return;let g=new IntersectionObserver(f=>{f[0].isIntersecting&&l&&c();},{root:p.current,rootMargin:"0px",threshold:.9});return ()=>{g&&g.disconnect();}},[p==null?void 0:p.current]),r||(a==null?void 0:a.length)===0?null:te.createElement("div",{"data-qa-anchor":n,style:i,className:Vd.storyTabContainer,ref:p},s?Array.from({length:10}).map((g,f)=>te.createElement("div",{key:f,className:Vd.storyTabSkeleton},te.createElement("div",{className:Vd.storyTabSkeletonAvatar}),te.createElement("div",{className:Vd.storyTabSkeletonUsername}))):a.map(g=>te.createElement(YE,{pageId:e,componentId:t,key:g.targetId,targetId:g.targetId,hasUnseen:g.hasUnseen,isErrored:g.failedStoriesCount>0,onClick:()=>o({storyTargets:a,storyTarget:g}),size:64})),te.createElement("div",{ref:u,style:{height:"1px",width:"1px"}}))};var $m=o=>{var r=o,{pageId:e="*"}=r,t=P(r,["pageId"]);let n="story_tab_component",{AmityGlobalFeedComponentBehavior:i}=It(),{goToViewStoryPage:a,goToDraftStoryPage:s}=Be(),{setFile:l}=yi();return (()=>{switch(t.type){case"communityFeed":return te.createElement(qE,{pageId:e,componentId:n,communityId:t.communityId||"",onFileChange:p=>{l(p),p&&s(t.communityId||"","community",p.type.includes("image")?{type:"image",url:URL.createObjectURL(p)}:{type:"video",url:URL.createObjectURL(p)},"communityFeed");},onStoryClick:()=>a({targetId:t.communityId||"",targetType:"community",storyType:"communityFeed"})});case"globalFeed":return te.createElement(eB,{pageId:e,componentId:n,goToViewStoryPage:({storyTarget:p,storyTargets:u})=>{var g;(g=i==null?void 0:i.goToViewStoryPage)==null||g.call(i,{targetId:p.targetId,targetType:p.targetType,storyType:"globalFeed",targetIds:u.map(f=>f.targetId)});}});default:return null}})()};var oB={createPostMenu:"ks"};var p5={createPostButton:"js",createPostButton__text:"zs",createPostButton__icon:"Xs"};var A1e=e=>te.createElement("svg",d({width:"21",height:"20",viewBox:"0 0 21 20",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M14.0625 12.7812L15.0625 11.7812C15.2188 11.625 15.5 11.75 15.5 11.9688V16.5C15.5 17.3438 14.8125 18 14 18H3C2.15625 18 1.5 17.3438 1.5 16.5V5.5C1.5 4.6875 2.15625 4 3 4H11.5312C11.75 4 11.875 4.28125 11.7188 4.4375L10.7188 5.4375C10.6562 5.5 10.5938 5.5 10.5312 5.5H3V16.5H14V12.9688C14 12.9062 14 12.8438 14.0625 12.7812ZM18.9375 6.5L10.75 14.6875L7.90625 15C7.09375 15.0938 6.40625 14.4062 6.5 13.5938L6.8125 10.75L15 2.5625C15.7188 1.84375 16.875 1.84375 17.5938 2.5625L18.9375 3.90625C19.6562 4.625 19.6562 5.78125 18.9375 6.5ZM15.875 7.4375L14.0625 5.625L8.25 11.4375L8 13.5L10.0625 13.25L15.875 7.4375ZM17.875 4.96875L16.5312 3.625C16.4062 3.46875 16.1875 3.46875 16.0625 3.625L15.125 4.5625L16.9375 6.40625L17.9062 5.4375C18.0312 5.28125 18.0312 5.09375 17.875 4.96875Z"}));function sg({pageId:e="*",componentId:t="*",defaultClassName:o,onClick:r}){let n="create_post_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(O,{className:p5.createPostButton,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i,style:p},te.createElement(oe,{defaultIcon:()=>te.createElement(A1e,{className:gr(p5.createPostButton__icon,o)}),imgIcon:()=>te.createElement("img",{src:a.image,alt:c}),configIconName:a.image,defaultIconName:s.image}),te.createElement(N.Body,{className:p5.createPostButton__text},a.text))}function u5({pageId:e}){let t="create_post_menu",{AmityCreatePostMenuComponentBehavior:o}=It();return te.createElement("div",{className:oB.createPostMenu},te.createElement(sg,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToSelectPostTargetPage)==null?void 0:r.call(o)}}),te.createElement(H3,{pageId:e,componentId:t,onClick:()=>{var r;return (r=o==null?void 0:o.goToStoryTargetSelectionPage)==null?void 0:r.call(o)}}))}var jd={mediaAttachment:"Ys",mediaAttachment__swipeDown:"Cs",mediaAttachment__wrapMedia:"Ss",mediaAttachment__wrapMedia_2items:"As"};var g5={cameraButton:"Ms",cameraButton__icon:"Bs",cameraButton_input:"Es"};var U1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M19.5 19.5H4.5C4.10218 19.5 3.72064 19.342 3.43934 19.0607C3.15804 18.7794 3 18.3978 3 18V7.5C3 7.10218 3.15804 6.72064 3.43934 6.43934C3.72064 6.15804 4.10218 6 4.5 6H7.49945L8.99945 3.75H14.9995L16.4995 6H19.5C19.8978 6 20.2794 6.15804 20.5607 6.43934C20.842 6.72064 21 7.10218 21 7.5V18C21 18.3978 20.842 18.7794 20.5607 19.0607C20.2794 19.342 19.8978 19.5 19.5 19.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),te.createElement("path",{d:"M12 15.75C13.864 15.75 15.375 14.239 15.375 12.375C15.375 10.511 13.864 9 12 9C10.136 9 8.625 10.511 8.625 12.375C8.625 14.239 10.136 15.75 12 15.75Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}));function Gd({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,isVisibleImage:n,isVisibleVideo:i,onVideoFileChange:a,onImageFileChange:s}){let l="camera_button",{themeStyles:c,isExcluded:p,config:u,accessibilityId:g,uiReference:f,defaultConfig:y}=A({pageId:e,componentId:t,elementId:l});if(p)return null;let C=()=>{document.getElementById("upload").click();},v=useCallback(h=>{h.preventDefault(),h.stopPropagation();let x=h.target.files?[...h.target.files]:[],b=x.some(I=>I.type.startsWith("image/")),M=x.some(I=>I.type.startsWith("video/"));b?s==null||s(x):M&&(a==null||a(x));},[s,a]);return te.createElement(O,{style:c,"data-qa-anchor":g,className:g5.cameraButton,onPress:C},te.createElement(oe,{defaultIcon:()=>te.createElement(U1e,{className:gr(g5.cameraButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:u.icon,alt:f,className:o}),defaultIconName:y.icon,configIconName:u.icon}),u.text&&te.createElement(N.BodyBold,null,u.text),te.createElement("input",{type:"file",onChange:v,id:"upload",accept:n&&i?"image/*,video/*":n?"image/*":"video/*",className:g5.cameraButton_input}))}var f5={imageButton:"Is",imageButton__icon:"Rs",imageButton_input:"Us"};var V1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M20.25 4.5H3.75C3.33579 4.5 3 4.83579 3 5.25V18.75C3 19.1642 3.33579 19.5 3.75 19.5H20.25C20.6642 19.5 21 19.1642 21 18.75V5.25C21 4.83579 20.6642 4.5 20.25 4.5Z",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),te.createElement("path",{d:"M3 15.7499L7.71966 11.0302C7.7893 10.9606 7.87198 10.9053 7.96297 10.8676C8.05397 10.8299 8.1515 10.8105 8.24999 10.8105C8.34848 10.8105 8.44601 10.8299 8.537 10.8676C8.62799 10.9053 8.71067 10.9606 8.78032 11.0302L12.9697 15.2196C13.0393 15.2892 13.122 15.3444 13.213 15.3821C13.304 15.4198 13.4015 15.4392 13.5 15.4392C13.5985 15.4392 13.696 15.4198 13.787 15.3821C13.878 15.3444 13.9607 15.2892 14.0303 15.2196L15.9697 13.2802C16.0393 13.2106 16.122 13.1553 16.213 13.1176C16.304 13.0799 16.4015 13.0605 16.5 13.0605C16.5985 13.0605 16.696 13.0799 16.787 13.1176C16.878 13.1553 16.9607 13.2106 17.0303 13.2802L21 17.2499",stroke:e.stroke,strokeWidth:"1.3","stroke-linecap":"round","stroke-linejoin":"round"}),te.createElement("path",{d:"M14.625 10.5C15.2463 10.5 15.75 9.99632 15.75 9.375C15.75 8.75368 15.2463 8.25 14.625 8.25C14.0037 8.25 13.5 8.75368 13.5 9.375C13.5 9.99632 14.0037 10.5 14.625 10.5Z"}));function Zd({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onImageFileChange:n}){let i="image_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:c,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;let g=()=>{document.getElementById("image-upload").click();},f=y=>{y.preventDefault(),y.stopPropagation(),n==null||n(y.target.files?[...y.target.files]:[]);};return te.createElement(O,{type:"button",style:a,"data-qa-anchor":c,className:f5.imageButton,onPress:g},te.createElement(oe,{defaultIcon:()=>te.createElement(V1e,{className:gr(f5.imageButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&te.createElement(N.BodyBold,null,l.text),te.createElement("input",{type:"file",onChange:f,multiple:!0,id:"image-upload",accept:"image/*",className:f5.imageButton_input}))}var y5={videoButton:"Ds",videoButton__icon:"Fs",videoButton__input:"Hs"};var Z1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M12 21C16.9706 21 21 16.9706 21 12C21 7.02944 16.9706 3 12 3C7.02944 3 3 7.02944 3 12C3 16.9706 7.02944 21 12 21Z",stroke:e.stroke,strokeWidth:"1.3",strokeMiterlimit:"10"}),te.createElement("path",{d:"M16 12L10 8V16L16 12Z",stroke:e.stroke,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"}));function Qd({pageId:e="*",componentId:t="*",imgIconClassName:o,defaultIconClassName:r,onVideoFileChange:n}){let i="video_button",{themeStyles:a,isExcluded:s,config:l,accessibilityId:c,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});if(s)return null;et();let f=()=>{document.getElementById("video-upload").click();},y=C=>{C.preventDefault(),C.stopPropagation(),n==null||n(C.target.files?[...C.target.files]:[]);};return te.createElement(O,{style:a,"data-qa-anchor":c,className:y5.videoButton,onPress:f},te.createElement(oe,{defaultIcon:()=>te.createElement(Z1e,{className:gr(y5.videoButton__icon,r)}),imgIcon:()=>te.createElement("img",{src:l.icon,alt:p,className:o}),defaultIconName:u.icon,configIconName:l.icon}),l.text&&te.createElement(N.BodyBold,null,l.text),te.createElement("input",{type:"file",accept:"video/*",onChange:y,multiple:!0,id:"video-upload",className:y5.videoButton__input}))}function h5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:c}=re({pageId:e,componentId:a});return c?null:te.createElement("div",{style:s,"data-qa-anchor":l,className:jd.mediaAttachment},te.createElement("div",{className:jd.mediaAttachment__swipeDown}),te.createElement("div",{className:gr(!o||!r||!t?jd.mediaAttachment__wrapMedia_2items:jd.mediaAttachment__wrapMedia)},t&&te.createElement(Gd,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&te.createElement(Zd,{pageId:e,componentId:a,onImageFileChange:i}),r&&te.createElement(Qd,{pageId:e,componentId:a,onVideoFileChange:n})))}var mg={detailedMediaAttachment:"Ls",detailedMediaAttachment__swipeDown:"Ts"};function C5({pageId:e,isVisibleCamera:t,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}){let a="detailed_media_attachment",{themeStyles:s,accessibilityId:l,isExcluded:c}=re({pageId:e,componentId:a});return c?null:te.createElement("div",{style:s,"data-qa-anchor":l,className:mg.detailedMediaAttachment},te.createElement("div",{className:mg.detailedMediaAttachment__swipeDown}),t&&te.createElement(Gd,{pageId:e,componentId:a,isVisibleImage:o,isVisibleVideo:r,onVideoFileChange:n,onImageFileChange:i}),o&&te.createElement(Zd,{pageId:e,componentId:a,onImageFileChange:i}),r&&te.createElement(Qd,{pageId:e,componentId:a,onVideoFileChange:n}))}var rB={userSearchResult:"Vs"};var fs={userItem:"qs",userItem__leftPane:"Gs",userItem__rightPane:"Js",userItem__avatar:"Ks",userItem__brandIcon:"Ns",userItem__userName:"Os",userItem__userName__text:"Ps"};var J1e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},e),te.createElement("path",{d:"M13.6435 20.7628C12.5251 21.8728 11.4652 21.8812 10.3552 20.7628L9.10328 19.5109C8.98644 19.394 8.88629 19.3607 8.73606 19.3607H6.9667C5.38931 19.3607 4.63817 18.6095 4.63817 17.0321V15.2628C4.63817 15.1125 4.59644 15.004 4.48794 14.8955L3.23604 13.6353C2.12602 12.5253 2.11767 11.4653 3.23604 10.3553L4.48794 9.10342C4.59644 8.99492 4.63817 8.88642 4.63817 8.73619V6.96684C4.63817 5.37275 5.38931 4.6383 6.9667 4.6383H8.73606C8.88629 4.6383 8.99478 4.59657 9.10328 4.48807L10.3552 3.24452C11.4652 2.11781 12.5251 2.11781 13.6435 3.23617L14.8954 4.48807C15.0039 4.59657 15.1124 4.6383 15.2626 4.6383H17.032C18.6094 4.6383 19.3605 5.38944 19.3605 6.96684V8.73619C19.3605 8.88642 19.4023 8.98657 19.5108 9.10342L20.7627 10.3553C21.8727 11.4653 21.881 12.5253 20.7627 13.6353L19.5108 14.8955C19.4023 15.004 19.3605 15.1125 19.3605 15.2628V17.0321C19.3605 18.6095 18.6094 19.3607 17.032 19.3607H15.2626C15.1124 19.3607 15.0123 19.394 14.8954 19.5109L13.6435 20.7628Z",fill:"url(#paint0_linear_482_20867)"}),te.createElement("path",{d:"M9.90432 15.9736C10.0879 16.1656 10.3216 16.2741 10.6137 16.2741C10.9225 16.2741 11.1729 16.1656 11.3649 15.9152L16.047 9.34691C16.1722 9.17164 16.2389 8.96299 16.2389 8.79607C16.2389 8.312 15.8717 7.95312 15.3543 7.95312C15.0204 7.95312 14.8034 8.06997 14.6031 8.35373L10.5803 14.0958L8.56896 11.8507C8.38535 11.6504 8.1767 11.5586 7.89293 11.5586C7.37548 11.5586 7.0166 11.9175 7.0166 12.4182C7.0166 12.6269 7.09172 12.8355 7.2336 12.9858L9.90432 15.9736Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_482_20867",x1:"5.40039",y1:"4.79844",x2:"5.40039",y2:"23.3984",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#FFDB7D"}),te.createElement("stop",{offset:"1",stopColor:"#D49900"})))),nB=J1e;var qd=({className:e})=>te.createElement(nB,{className:e});var iB=({user:e})=>{let{onClickUser:t}=Be();return te.createElement(O,{key:e.userId,className:fs.userItem,onPress:()=>t(e.userId)},te.createElement("div",{className:fs.userItem__leftPane},te.createElement(Wo,{userId:e.userId,className:fs.userItem__avatar})),te.createElement("div",{className:fs.userItem__rightPane},te.createElement("div",{className:fs.userItem__userName},te.createElement(N.BodyBold,{className:fs.userItem__userName__text},e.displayName)),e.isBrand?te.createElement(qd,{className:fs.userItem__brandIcon}):null))};var fn={userSearchItemSkeleton:"ke",userSearchItemSkeleton__leftPane:"Qs",userSearchItemSkeleton__information:"Ws",userSearchItemSkeleton__content:"Zs",userSearchItemSkeleton__animation:"_s","skeleton-pulse":"je",userSearchItemSkeleton__userAvatar:"ec",userSearchItemSkeleton__information__title:"rc",userSearchItemSkeleton__information__subtitle:"ac"};var aB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o}=re({pageId:e,componentId:t});return te.createElement("div",{"data-qa-anchor":o,className:gr(fn.userSearchItemSkeleton,fn.userSearchItemSkeleton__animation)},te.createElement("div",{className:fn.userSearchItemSkeleton__leftPane},te.createElement("div",{className:gr(fn.userSearchItemSkeleton__userAvatar,fn.userSearchItemSkeleton__animation)})),te.createElement("div",{className:gr(fn.userSearchItemSkeleton__information,fn.userSearchItemSkeleton__animation)},te.createElement("div",{className:gr(fn.userSearchItemSkeleton__information__title,fn.userSearchItemSkeleton__animation)}),te.createElement("div",{className:gr(fn.userSearchItemSkeleton__information__subtitle,fn.userSearchItemSkeleton__animation)})))};var x5=({pageId:e="*",userCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="user_search_result",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=re({pageId:e,componentId:n}),[u,g]=useState(null);return Bo({onIntersect:()=>r(),node:u}),te.createElement("div",{className:rB.userSearchResult,style:p},t.map(f=>te.createElement(iB,{key:f.userId,user:f})),o?Array.from({length:5}).map((f,y)=>te.createElement(aB,{key:y,pageId:e,componentId:n})):null,te.createElement("div",{ref:f=>g(f)}))};var sB={communitySearchResult:"oc",communitySearchResult__communityItem:"ze",communitySearchResult__communityItem__leftPane:"tc",communitySearchResult__communityItem__rightPane:"ic",communityItem__communityName:"lc",communityItem__communityName__private:"sc",communityItem__communityCategory:"cc",communityItem__communityMemberCount:"nc"};var lB={communityDisplayName:"dc"};function pa({pageId:e="*",componentId:t="*",community:o}){var s;let r="community_display_name",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement(N.BodyBold,{className:lB.communityDisplayName,style:a,"data-qa-anchor":n},(s=o==null?void 0:o.displayName)!=null?s:"My Timeline")}var b5={communityOfficialBadge:"mc",communityOfficialBadge__iconSvg:"pc"};var ile=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),te.createElement("path",{d:"M9.58112 15.4777C10.2749 16.1767 10.9373 16.1715 11.6363 15.4777L12.4188 14.6953C12.4918 14.6223 12.5544 14.6014 12.6483 14.6014H13.7541C14.74 14.6014 15.2095 14.1319 15.2095 13.1461V12.0402C15.2095 11.9463 15.2355 11.8785 15.3034 11.8107L16.0858 11.023C16.7848 10.3293 16.7796 9.66681 16.0858 8.97305L15.3034 8.19061C15.2355 8.11758 15.2095 8.05499 15.2095 7.9611V6.85525C15.2095 5.86938 14.74 5.39991 13.7541 5.39991H12.6483C12.5544 5.39991 12.4866 5.37383 12.4188 5.30602L11.6363 4.52358C10.9373 3.82461 10.2749 3.82461 9.58112 4.5288L8.79868 5.30602C8.73087 5.37383 8.66306 5.39991 8.56917 5.39991H7.46332C6.47745 5.39991 6.00799 5.85894 6.00799 6.85525V7.9611C6.00799 8.05499 5.9819 8.1228 5.91409 8.19061L5.13165 8.97305C4.43268 9.66681 4.43789 10.3293 5.13165 11.023L5.91409 11.8107C5.9819 11.8785 6.00799 11.9463 6.00799 12.0402V13.1461C6.00799 14.1319 6.47745 14.6014 7.46332 14.6014H8.56917C8.66306 14.6014 8.72565 14.6223 8.79868 14.6953L9.58112 15.4777ZM9.74282 12.6714C9.56026 12.6714 9.4142 12.6036 9.29944 12.4836L7.63024 10.6162C7.54156 10.5223 7.49462 10.3919 7.49462 10.2615C7.49462 9.94849 7.71892 9.72419 8.04232 9.72419C8.21968 9.72419 8.35008 9.78157 8.46484 9.90676L9.72196 11.3099L12.2362 7.72115C12.3614 7.5438 12.497 7.47077 12.7057 7.47077C13.0291 7.47077 13.2586 7.69507 13.2586 7.99761C13.2586 8.10193 13.2169 8.23234 13.1386 8.34188L10.2123 12.4471C10.0923 12.6036 9.93583 12.6714 9.74282 12.6714Z"}));function S1({pageId:e="*",componentId:t="*"}){let o="community_official_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(oe,{defaultIcon:()=>te.createElement(ile,{style:l,className:gr(b5.communityOfficialBadge,b5.communityOfficialBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>te.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:b5.communityOfficialBadge}),configIconName:n.icon,defaultIconName:i.icon})}var I5={communityPrivateBadge:"gc",communityPrivateBadge__iconSvg:"hc"};var lle=e=>te.createElement("svg",d({width:"11",height:"12",viewBox:"0 0 11 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M5.60938 9.72656C5.26562 9.72656 5.00781 9.46875 5.00781 9.125V7.75C5.00781 7.42773 5.26562 7.14844 5.60938 7.14844C5.93164 7.14844 6.21094 7.42773 6.21094 7.75V9.125C6.21094 9.46875 5.93164 9.72656 5.60938 9.72656ZM10.4219 6.03125V10.8438C10.4219 11.4238 9.94922 11.875 9.39062 11.875H1.82812C1.24805 11.875 0.796875 11.4238 0.796875 10.8438V6.03125C0.796875 5.47266 1.24805 5 1.82812 5H2.51562V3.96875C2.51562 2.27148 3.89062 0.875 5.60938 0.875C7.32812 0.896484 8.70312 2.29297 8.70312 4.01172V5H9.39062C9.94922 5 10.4219 5.47266 10.4219 6.03125ZM3.54688 5H7.67188V3.96875C7.67188 2.85156 6.72656 1.90625 5.60938 1.90625C4.4707 1.90625 3.54688 2.85156 3.54688 3.96875V5ZM9.39062 6.03125H1.82812V10.8438H9.39062V6.03125Z"}));function N1({pageId:e="*",componentId:t="*"}){let o="community_private_badge",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(oe,{defaultIcon:()=>te.createElement(lle,{style:l,className:gr(I5.communityPrivateBadge,I5.communityPrivateBadge__iconSvg),"data-qa-anchor":r}),imgIcon:()=>te.createElement("img",{"data-qa-anchor":r,src:n.icon,alt:s,className:I5.communityPrivateBadge}),configIconName:n.icon,defaultIconName:i.icon})}var mB={communityMembersCount:"fc"};function dg({pageId:e="*",componentId:t="*",memberCount:o}){let r="community_members_count",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:r});return s?null:te.createElement(N.Caption,{className:mB.communityMembersCount,style:c,"data-qa-anchor":n},`${lb(o)||0} ${o!==1?"members":"member"}`)}var ys={communityItem:"Xe",communityItem__leftPane:"bc",communityItem__rightPane:"uc",communityItem__communityName:"vc",communityItem__communityName__private:"xc",communityItem__communityCategory:"wc",communityItem__communityMemberCount:"yc"};var ule=({community:e,pageId:t,componentId:o})=>{let r=Ra(e.categoryIds),i=r.length-3;return te.createElement(te.Fragment,null,r.slice(0,3).map(a=>te.createElement(Ka,{pageId:t,componentId:o,categoryName:a.name})),i>0&&te.createElement(Ka,{pageId:t,componentId:o,categoryName:`+${i}`}))},dB=({community:e,pageId:t="*",componentId:o="*"})=>{let{onClickCommunity:r}=Be();return te.createElement(O,{key:e.communityId,className:ys.communityItem,onPress:()=>{r(e.communityId);}},te.createElement("div",{className:ys.communityItem__leftPane},te.createElement(Zr,{pageId:t,componentId:o,community:e})),te.createElement("div",{className:ys.communityItem__rightPane},te.createElement("div",{className:ys.communityItem__communityName},!e.isPublic&&te.createElement("div",{className:ys.communityItem__communityName__private},te.createElement(N1,{pageId:t,componentId:o})),te.createElement(pa,{pageId:t,componentId:o,community:e}),e.isOfficial&&te.createElement(S1,{pageId:t,componentId:o})),te.createElement("div",{className:ys.communityItem__communityCategory},te.createElement(ule,{pageId:t,componentId:o,community:e})),te.createElement("div",{className:ys.communityItem__communityMemberCount},te.createElement(dg,{pageId:t,componentId:o,memberCount:e.membersCount}))))};var yn={communityItemSkeleton:"Ye",communityItemSkeleton__leftPane:"kc",communityItemSkeleton__information:"jc",communityItemSkeleton__content:"zc",communityItemSkeleton__animation:"Xc","skeleton-pulse":"Ce",communityItemSkeleton__userAvatar:"Yc",communityItemSkeleton__information__title:"Cc",communityItemSkeleton__information__subtitle:"Sc"};var cB=({pageId:e="*",componentId:t="*"})=>{let{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=re({pageId:e,componentId:t});return te.createElement("div",{"data-qa-anchor":o,style:s,className:gr(yn.communityItemSkeleton,yn.communityItemSkeleton__animation)},te.createElement("div",{className:yn.communityItemSkeleton__leftPane},te.createElement("div",{className:gr(yn.communityItemSkeleton__userAvatar,yn.communityItemSkeleton__animation)})),te.createElement("div",{className:gr(yn.communityItemSkeleton__information,yn.communityItemSkeleton__animation)},te.createElement("div",{className:gr(yn.communityItemSkeleton__information__title,yn.communityItemSkeleton__animation)}),te.createElement("div",{className:gr(yn.communityItemSkeleton__information__subtitle,yn.communityItemSkeleton__animation)})))};var hs=({pageId:e="*",communityCollection:t=[],isLoading:o,onLoadMore:r})=>{let n="community_search_result",{themeStyles:i}=re({pageId:e,componentId:n}),[a,s]=useState(null);return Bo({onIntersect:()=>r(),node:a}),te.createElement("div",{className:sB.communitySearchResult,style:i},t.map(l=>te.createElement(dB,{key:l.communityId,community:l,pageId:e,componentId:n})),o?Array.from({length:5}).map((l,c)=>te.createElement(cB,{key:c,pageId:e,componentId:n})):null,te.createElement("div",{ref:l=>s(l)}))};var pB={clearButton:"Ac"};function hle(e){return te.createElement("svg",d({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M8.82715 17.3906C13.4238 17.3906 17.2119 13.5938 17.2119 9.00586C17.2119 4.40918 13.415 0.612305 8.82715 0.612305C4.23047 0.612305 0.442383 4.40918 0.442383 9.00586C0.442383 13.5938 4.23926 17.3906 8.82715 17.3906ZM5.88281 12.5479C5.54883 12.5479 5.28516 12.2842 5.28516 11.9502C5.28516 11.792 5.34668 11.6514 5.46973 11.5283L7.9834 9.01465L5.46973 6.49219C5.34668 6.37793 5.28516 6.22852 5.28516 6.07031C5.28516 5.74512 5.54883 5.49023 5.88281 5.49023C6.0498 5.49023 6.19043 5.54297 6.2959 5.66602L8.82715 8.17969L11.3584 5.65723C11.4902 5.52539 11.6221 5.47266 11.7803 5.47266C12.1055 5.47266 12.3691 5.73633 12.3691 6.06152C12.3691 6.22852 12.3164 6.36035 12.1934 6.4834L9.6709 9.01465L12.1846 11.5283C12.3076 11.6514 12.3691 11.7832 12.3691 11.9502C12.3691 12.2842 12.1055 12.5479 11.7627 12.5479C11.5957 12.5479 11.4551 12.4863 11.332 12.3721L8.82715 9.84961L6.32227 12.3721C6.19922 12.4863 6.0498 12.5479 5.88281 12.5479Z"}))}var E1=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="clear_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{"data-qa-anchor":a,className:pB.clearButton,style:u,onPress:n},te.createElement(oe,{defaultIcon:()=>te.createElement(hle,{className:o}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var Cle=e=>te.createElement("svg",d({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M16.7109 14.6562C16.8672 14.8125 16.8672 15.0625 16.7109 15.1875L15.9922 15.9062C15.8672 16.0625 15.6172 16.0625 15.4609 15.9062L11.6797 12.125C11.6172 12.0312 11.5859 11.9375 11.5859 11.8438V11.4375C10.4297 12.4062 8.96094 13 7.33594 13C3.74219 13 0.835938 10.0938 0.835938 6.5C0.835938 2.9375 3.74219 0 7.33594 0C10.8984 0 13.8359 2.9375 13.8359 6.5C13.8359 8.125 13.2109 9.625 12.2422 10.75H12.6484C12.7422 10.75 12.8359 10.8125 12.9297 10.875L16.7109 14.6562ZM7.33594 11.5C10.0859 11.5 12.3359 9.28125 12.3359 6.5C12.3359 3.75 10.0859 1.5 7.33594 1.5C4.55469 1.5 2.33594 3.75 2.33594 6.5C2.33594 9.28125 4.55469 11.5 7.33594 11.5Z"}));function cg({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r}){let n="search_icon",{config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:n});return s?null:te.createElement(oe,{defaultIcon:()=>te.createElement(Cle,{className:o,style:c}),imgIcon:()=>te.createElement("img",{src:i.icon,alt:l,className:r,style:c}),defaultIconName:a.icon,configIconName:i.icon})}var Cs={topSearchBar:"Mc",topSearchBar__inputBar:"Bc",topSearchBar__textInput:"Ec",topSearchBar__searchIcon:"Ic",topSearchBar__searchIcon_img:"Rc",topSearchBar__clearButton:"Uc",topSearchBar__clearButton__img:"Dc"};function Wm({pageId:e="*",search:t}){let o="top_search_bar",{config:r,isExcluded:n,themeStyles:i}=re({pageId:e,componentId:o}),{onBack:a}=Be(),[s,l]=useState("");return useEffect(()=>{t(s);},[s]),n?null:te.createElement("div",{className:Cs.topSearchBar,style:i},te.createElement("div",{className:Cs.topSearchBar__inputBar},te.createElement(cg,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__searchIcon,imgClassName:Cs.topSearchBar__searchIcon_img}),te.createElement("input",{className:Cs.topSearchBar__textInput,type:"text",value:s,placeholder:r.text,onChange:c=>l(c.target.value)}),s!=""?te.createElement(E1,{pageId:e,componentId:o,defaultClassName:Cs.topSearchBar__clearButton,imgClassName:Cs.topSearchBar__clearButton__img,onPress:()=>{l("");}}):null),te.createElement(A3,{pageId:e,componentId:o,onPress:()=>a()}))}var pg={menuButton:"Fc",menuButton__button:"Hc"};var M5=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"16",height:"4",viewBox:"0 0 16 4",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9.6875 2.25C9.6875 3.19922 8.91406 3.9375 8 3.9375C7.05078 3.9375 6.3125 3.19922 6.3125 2.25C6.3125 1.33594 7.05078 0.5625 8 0.5625C8.91406 0.5625 9.6875 1.33594 9.6875 2.25ZM13.9062 0.5625C14.8203 0.5625 15.5938 1.33594 15.5938 2.25C15.5938 3.19922 14.8203 3.9375 13.9062 3.9375C12.957 3.9375 12.2188 3.19922 12.2188 2.25C12.2188 1.33594 12.957 0.5625 13.9062 0.5625ZM2.09375 0.5625C3.00781 0.5625 3.78125 1.33594 3.78125 2.25C3.78125 3.19922 3.00781 3.9375 2.09375 3.9375C1.14453 3.9375 0.40625 3.19922 0.40625 2.25C0.40625 1.33594 1.14453 0.5625 2.09375 0.5625Z"}))};function ec({pageId:e="*",componentId:t="*",onClick:o}){let r="menu_button",{isExcluded:n,accessibilityId:i,themeStyles:a,config:s,defaultConfig:l,uiReference:c}=A({pageId:e,componentId:t,elementId:r});return n?null:te.createElement(O,{onPress:o,"data-qa-anchor":i,className:pg.menuButton__button},te.createElement(oe,{defaultIcon:()=>te.createElement(M5,{className:pg.menuButton,style:a}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:c}),defaultIconName:l.icon,configIconName:s.icon}))}function ug({pageId:e="*",componentId:t="*",defaultIconClassName:o,imgIconClassName:r}){let n="share_button";A({pageId:e,componentId:t,elementId:n});return null}var wle=e=>te.createElement("svg",d({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"})),tc=wle;var _5={commentButton:"Lc",commentButton__icon:"Tc",commentButton__text:"Vc"};var Ple=e=>te.createElement("svg",d({width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M9 0.1875C13.6816 0.1875 17.4668 3.30859 17.4668 7.09375C17.4668 10.9121 13.6816 14 9 14C7.9043 14 6.8418 13.834 5.91211 13.5352C4.91602 14.2324 3.32227 15.0625 1.29688 15.0625C0.964844 15.0625 0.666016 14.8965 0.533203 14.5977C0.433594 14.2988 0.466797 13.9668 0.699219 13.7344C0.732422 13.7344 1.76172 12.6055 2.22656 11.3105C1.13086 10.1484 0.5 8.6875 0.5 7.09375C0.5 3.30859 4.28516 0.1875 9 0.1875ZM9 12.4062C12.7852 12.4062 15.9062 10.0488 15.9062 7.09375C15.9062 4.17188 12.7852 1.78125 9 1.78125C5.18164 1.78125 2.09375 4.17188 2.09375 7.09375C2.09375 8.52148 2.79102 9.58398 3.38867 10.2148L4.08594 10.9453L3.7207 11.875C3.55469 12.3398 3.32227 12.8047 3.05664 13.2031C3.85352 12.9375 4.51758 12.5723 4.98242 12.2402L5.61328 11.7754L6.37695 12.0078C7.20703 12.2734 8.10352 12.4062 9 12.4062Z"}));function gg({pageId:e="*",componentId:t="*",commentsCount:o,defaultIconClassName:r,imgIconClassName:n,onPress:i=()=>{}}){let a="comment_button",{accessibilityId:s,config:l,defaultConfig:c,isExcluded:p,uiReference:u}=A({pageId:e,componentId:t,elementId:a});return p?null:te.createElement(O,{onPress:i},te.createElement(oe,{"data-qa-anchor":s,defaultIcon:()=>te.createElement("div",{className:gr(_5.commentButton)},te.createElement(Ple,{className:gr(_5.commentButton__icon,r)}),te.createElement(N.BodyBold,{className:_5.commentButton__text},typeof o=="number"?o:l.text)),imgIcon:()=>te.createElement("img",{src:l.icon,alt:u,className:n}),defaultIconName:c.icon,configIconName:l.icon}))}var kle=createContext({drawerData:null,setDrawerData:()=>{},removeDrawerData:()=>{}});var qm=()=>{let{setDrawerData:e,removeDrawerData:t}=useContext(kle);return {setDrawerData:e,removeDrawerData:t}};var he={postContent:"qc",postContent__bar:"Gc",postContent__bar__userAvatar:"Jc",postContent__bar__detail:"Kc",postContent__bar__information__subtitle:"Nc",postContent__bar__information__subtitle__moderator:"Oc",postContent__bar__information__subtitle__brand:"Pc",postContent__bar__information__subtitle__separator:"Qc",postContent__bar__actionButton:"Wc",postContent__content_and_reactions:"Zc",postContent__content:"_c",postContent__divider:"en",postContent__reactionBar:"rn",postContent__reactionBar__leftPane:"an",postContent__reactionBar__rightPane:"on",postContent__reactionBar__leftPane__icon:"tn",postContent__reactionBar__leftPane__iconImg:"in",postTitle:"ln",postTitle__text:"sn",postTitle__icon:"cn",postTitle__user__container:"nn",postTitle__brandIcon:"dn",postContent__comment:"mn",postContent__reactions_and_comments:"pn",postContent__reactionsBar:"gn",postContent__commentsCount:"hn",postContent__reactionsBar__reactions:"fn",postContent__reactionsBar__reactions__icon:"e",postContent__reactionsBar__reactions__count:"bn",postContent__bar__information__editedTag:"un",button:"p",popover:"C","fade-in":"Se","zoom-in":"Ae","fade-out":"Me","zoom-out":"Be",menu:"vn",menuItem:"Ee",separator:"xn",postContent__notMember:"wn",postContent__wrapRightMenu:"yn"};var Nle=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{clipPath:"url(#clip0_1709_7904)"},te.createElement("path",{d:"M16 32.5C24.8366 32.5 32 25.3366 32 16.5C32 7.66344 24.8366 0.5 16 0.5C7.16344 0.5 0 7.66344 0 16.5C0 25.3366 7.16344 32.5 16 32.5Z",fill:"#FFD54F"}),te.createElement("path",{d:"M9.33317 15.1667C10.8059 15.1667 11.9998 13.9728 11.9998 12.5C11.9998 11.0273 10.8059 9.83337 9.33317 9.83337C7.86041 9.83337 6.6665 11.0273 6.6665 12.5C6.6665 13.9728 7.86041 15.1667 9.33317 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M22.6667 15.1667C24.1394 15.1667 25.3333 13.9728 25.3333 12.5C25.3333 11.0273 24.1394 9.83337 22.6667 9.83337C21.1939 9.83337 20 11.0273 20 12.5C20 13.9728 21.1939 15.1667 22.6667 15.1667Z",fill:"#6D4C41"}),te.createElement("path",{d:"M21.0248 27.3372C20.674 27.3372 20.3232 27.2038 20.0564 26.9352C17.8894 24.7682 14.1108 24.7682 11.9456 26.9352C11.4103 27.4705 10.5423 27.4705 10.007 26.9352C9.47163 26.4016 9.47163 25.5319 10.007 24.9966C11.6076 23.396 13.7362 22.5153 16.0001 22.5153C18.264 22.5153 20.3926 23.396 21.9932 24.9984C22.5286 25.5337 22.5286 26.4016 21.9932 26.937C21.7264 27.2038 21.3756 27.3372 21.0248 27.3372Z",fill:"#6D4C41"}),te.createElement("path",{d:"M24.8228 16.5987C24.4495 16.0587 23.5508 16.0587 23.1775 16.5987C22.6228 17.4014 21.3335 19.3881 21.3335 20.5001C21.3335 21.9707 22.5295 23.1667 24.0002 23.1667C25.4708 23.1667 26.6668 21.9707 26.6668 20.5001C26.6668 19.3881 25.3775 17.4014 24.8228 16.5987Z",fill:"#00BCD4"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_7904"},te.createElement("rect",{width:"32",height:"32",fill:"white",transform:"translate(0 0.5)"}))))},yB=Nle;var Ele=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions",clipPath:"url(#clip0_1709_1751)"},te.createElement("path",{id:"Vector",d:"M16 32C24.8366 32 32 24.8366 32 16C32 7.16344 24.8366 0 16 0C7.16344 0 0 7.16344 0 16C0 24.8366 7.16344 32 16 32Z",fill:"#FFD54F"}),te.createElement("path",{id:"Vector_2",d:"M27.2933 19.9601C26.9867 20.9334 26.5867 21.8267 26.0667 22.6667H5.93332C5.41332 21.8267 5.01332 20.9334 4.70665 19.9601C4.61332 19.6534 4.66665 19.3334 4.86665 19.0801C5.05332 18.8134 5.34665 18.6667 5.66665 18.6667H26.3333C26.6533 18.6667 26.9467 18.8134 27.1333 19.0801C27.3333 19.3334 27.3867 19.6534 27.2933 19.9601Z",fill:"white"}),te.createElement("path",{id:"Vector_3",d:"M26.0664 22.6667C23.9598 26.1201 20.1864 28.2934 15.9998 28.2934C11.8131 28.2934 8.03977 26.1201 5.93311 22.6667H26.0664Z",fill:"#E53935"}),te.createElement("path",{id:"Vector_4",d:"M12.3332 13.6668C11.7812 13.6668 11.3332 13.2188 11.3332 12.6668C11.3332 11.9322 10.7358 11.3335 9.99984 11.3335C9.26384 11.3335 8.6665 11.9322 8.6665 12.6668C8.6665 13.2188 8.2185 13.6668 7.6665 13.6668C7.1145 13.6668 6.6665 13.2188 6.6665 12.6668C6.6665 10.8295 8.16117 9.3335 9.99984 9.3335C11.8385 9.3335 13.3332 10.8295 13.3332 12.6668C13.3332 13.2188 12.8852 13.6668 12.3332 13.6668Z",fill:"#6D4C41"}),te.createElement("path",{id:"Vector_5",d:"M24.3332 13.6668C23.7812 13.6668 23.3332 13.2188 23.3332 12.6668C23.3332 11.9322 22.7358 11.3335 21.9998 11.3335C21.2638 11.3335 20.6665 11.9322 20.6665 12.6668C20.6665 13.2188 20.2185 13.6668 19.6665 13.6668C19.1145 13.6668 18.6665 13.2188 18.6665 12.6668C18.6665 10.8295 20.1612 9.3335 21.9998 9.3335C23.8385 9.3335 25.3332 10.8295 25.3332 12.6668C25.3332 13.2188 24.8852 13.6668 24.3332 13.6668Z",fill:"#6D4C41"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1709_1751"},te.createElement("rect",{width:"32",height:"32",fill:"white"}))))},hB=Ele;var Ble=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"33",viewBox:"0 0 32 33",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16.5",r:"16",fill:"url(#paint0_linear_1709_7888)"}),te.createElement("g",{clipPath:"url(#clip0_1709_7888)"},te.createElement("path",{d:"M21.8752 10.2903C21.3417 9.70788 20.5123 8.92173 20.1595 10.6968C20.0395 11.3004 19.7591 11.7656 19.5189 12.1402C19.2599 10.8296 18.4808 9.47308 17.7467 8.55843C17.472 8.21623 16.4973 6.85588 16.3101 4.58008C16.2821 4.24043 15.8787 4.08093 15.6263 4.31003C13.2147 6.49923 11.891 9.51013 11.8419 12.8998C11.8419 12.8998 10.8377 12.0533 10.2921 10.4786C10.1452 10.0546 9.57671 9.97368 9.33006 10.3486C9.28271 10.4206 9.23881 10.4927 9.19921 10.5627C7.33856 13.8527 6.44351 17.848 7.27096 21.565C8.65446 27.7898 17.8062 29.5301 22.6511 25.6177C27.3914 21.7899 25.8846 14.6654 21.8752 10.2903Z",fill:"#ED694A"}),te.createElement("path",{d:"M20.4125 14.8409C20.0185 14.4107 19.4058 13.83 19.1452 15.1411C19.0566 15.5869 18.8495 15.9306 18.6721 16.2073C18.4809 15.2392 17.9054 14.2372 17.3632 13.5617C17.1603 13.3089 16.4404 12.3042 16.302 10.6231C16.2814 10.3722 15.9834 10.2545 15.797 10.4237C14.0158 12.0406 13.038 14.2646 13.0018 16.7682C13.0018 16.7682 12.26 16.143 11.8571 14.9799C11.7486 14.6667 11.3287 14.607 11.1465 14.8839C11.1116 14.9371 11.0791 14.9904 11.0499 15.0421C9.67554 17.4721 9.01444 20.4231 9.62559 23.1686C10.6475 27.7664 17.4071 29.0518 20.9857 26.162C24.4869 23.3347 23.3739 18.0725 20.4125 14.8409Z",fill:"#F4A32C"}),te.createElement("path",{d:"M19.077 18.9949C18.8103 18.7037 18.3955 18.3106 18.2191 19.1982C18.1592 19.5 18.0189 19.7326 17.8988 19.9199C17.7693 19.2645 17.3798 18.5863 17.0127 18.129C16.8754 17.9579 16.3881 17.2777 16.2944 16.1398C16.2804 15.9699 16.0787 15.8902 15.9525 16.0048C14.7467 17.0994 14.0849 18.6049 14.0603 20.2996C14.0603 20.2996 13.5582 19.8764 13.2855 19.0891C13.212 18.8771 12.9278 18.8366 12.8045 19.0241C12.7808 19.06 12.7589 19.0961 12.739 19.1311C11.8087 20.7761 11.3612 22.7737 11.7749 24.6323C12.4666 27.7447 17.0425 28.6149 19.4649 26.6586C20.2945 25.9887 20.8088 25.0448 20.9131 24.0006C21.0706 22.4191 20.4619 20.5062 19.077 18.9949Z",fill:"#F4D44E"}),te.createElement("path",{d:"M17.838 22.85C17.6894 22.6878 17.4583 22.4688 17.36 22.9632C17.3266 23.1314 17.2485 23.261 17.1816 23.3653C17.1094 23.0002 16.8924 22.6223 16.6879 22.3676C16.6114 22.2722 16.3399 21.8933 16.2877 21.2593C16.2799 21.1647 16.1675 21.1203 16.0972 21.1841C15.4255 21.7939 15.0567 22.6327 15.043 23.5769C15.043 23.5769 14.7633 23.3411 14.6113 22.9024C14.5704 22.7843 14.412 22.7617 14.3434 22.8662C14.3302 22.8863 14.318 22.9064 14.307 22.9259C13.7887 23.8424 13.5393 24.9553 13.7698 25.9907C14.2947 28.3523 18.5971 28.2807 18.861 25.6388C18.9486 24.7577 18.6095 23.6919 17.838 22.85Z",fill:"#EAE9E8"}),te.createElement("path",{d:"M14.7688 26.4597C14.5383 25.5334 14.7876 24.5379 15.3059 23.7181C15.3169 23.7006 15.3292 23.6827 15.3423 23.6647C15.411 23.5713 15.5694 23.5914 15.6103 23.6971C15.7622 24.0895 16.042 24.3004 16.042 24.3004C16.0532 23.6064 16.3046 22.9764 16.7664 22.4711C16.6631 22.3281 16.3472 21.9833 16.2877 21.2597C16.2799 21.165 16.1675 21.1207 16.0972 21.1844C15.4255 21.7943 15.0567 22.633 15.043 23.5772C15.043 23.5772 14.7633 23.3414 14.6113 22.9028C14.5704 22.7847 14.412 22.7621 14.3434 22.8666C14.3302 22.8867 14.318 22.9068 14.307 22.9263C13.7887 23.8427 13.5393 24.9557 13.7698 25.9911C13.9831 26.9509 14.8594 27.5277 15.8282 27.6669C15.3056 27.4102 14.904 27.0038 14.7688 26.4597Z",fill:"#F7E7A1"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_7888",x1:"7.2",y1:"7.7",x2:"24.8",y2:"29.3",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#FFF09F"}),te.createElement("stop",{offset:"1",stopColor:"#FCCF5A"})),te.createElement("clipPath",{id:"clip0_1709_7888"},te.createElement("rect",{width:"25.6",height:"25.6",fill:"white",transform:"translate(3.2002 2.09998)"}))))},CB=Ble;var Lle=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Reactions"},te.createElement("circle",{id:"Ellipse 2",cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1738)"}),te.createElement("path",{id:"circle",d:"M22.4466 10.5836C20.7296 9.07415 18.2009 9.36319 16.6088 11.0332L16.0156 11.6755L15.3912 11.0332C13.8303 9.36319 11.2704 9.07415 9.55338 10.5836C7.58661 12.3179 7.49295 15.401 9.24119 17.2637L15.2976 23.687C15.6722 24.1045 16.3278 24.1045 16.7024 23.687L22.7588 17.2637C24.507 15.401 24.4134 12.3179 22.4466 10.5836Z",fill:"white"})),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1738",x1:"7.2",y1:"7.2",x2:"28",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#EE5C91"}),te.createElement("stop",{offset:"0.833333",stopColor:"#E02222"}))))},vB=Lle;var Ale=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"url(#paint0_linear_1709_1733)"}),te.createElement("path",{d:"M10.7752 12.1C11.2221 12.1 11.6002 12.4782 11.6002 12.925V21.175C11.6002 21.6563 11.2221 22 10.7752 22H8.0252C7.54395 22 7.2002 21.6563 7.2002 21.175V12.925C7.2002 12.4782 7.54395 12.1 8.0252 12.1H10.7752ZM9.4002 20.625C9.84707 20.625 10.2252 20.2813 10.2252 19.8C10.2252 19.3532 9.84707 18.975 9.4002 18.975C8.91895 18.975 8.5752 19.3532 8.5752 19.8C8.5752 20.2813 8.91895 20.625 9.4002 20.625ZM20.4002 7.2188C20.4002 8.66255 19.5064 9.48755 19.2314 10.45H22.7377C23.8721 10.45 24.7658 11.4125 24.7658 12.4782C24.8002 13.0969 24.5252 13.75 24.1127 14.1625C24.4564 14.9532 24.3877 16.0875 23.8033 16.8782C24.0783 17.7719 23.8033 18.8719 23.2189 19.4563C23.3908 20.075 23.3221 20.5907 23.0127 21.0032C22.3252 22 20.5721 22 19.0939 22H18.9908C17.3408 22 16.0002 21.4157 14.9002 20.9344C14.3502 20.6938 13.6283 20.3844 13.0783 20.3844C12.8721 20.35 12.7002 20.1782 12.7002 19.9719V12.6157C12.7002 12.5125 12.7346 12.4094 12.8033 12.3063C14.1783 10.9657 14.7627 9.5563 15.8627 8.42192C16.3783 7.9063 16.5502 7.15005 16.7564 6.3938C16.8939 5.77505 17.2033 4.40005 17.9252 4.40005C18.7502 4.40005 20.4002 4.67505 20.4002 7.2188Z",fill:"white"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_1709_1733",x1:"12",y1:"3.2",x2:"26.4",y2:"39.2",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#63A1FF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"}))))},xB=Ale;var fg=te.forwardRef((i,n)=>{var a=i,{src:e,mimeType:t,mediaFit:o}=a,r=P(a,["src","mimeType","mediaFit"]);return te.createElement("video",E(d({controls:!0,controlsList:"nodownload"},r),{ref:n,"data-qa-anchor":"video-preview"}),te.createElement("source",{src:e,type:t}),te.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});var ua={linkPreviewSkeleton:"kn",linkPreviewSkeleton__bottom:"jn",linkPreviewSkeleton__bar1:"zn",linkPreviewSkeleton__bar2:"Xn",linkPreviewSkeleton__image:"Yn",linkPreviewSkeleton__animation:"Cn","skeleton-pulse":"Ie"};function bB(){return te.createElement("div",{className:ua.linkPreviewSkeleton},te.createElement("div",{className:gr(ua.linkPreviewSkeleton__image,ua.linkPreviewSkeleton__animation)}),te.createElement("div",{className:ua.linkPreviewSkeleton__bottom},te.createElement("div",{className:gr(ua.linkPreviewSkeleton__bar1,ua.linkPreviewSkeleton__animation)}),te.createElement("div",{className:gr(ua.linkPreviewSkeleton__bar2,ua.linkPreviewSkeleton__animation)})))}var Pi={linkPreview:"Sn",linkPreview__top:"An",linkPreview__bottom:"Mn",linkPreview__object:"Bn",linkPreview__unableToPreview:"En",linkPreview__unableToPreview__icon:"In"};var Ole=e=>te.createElement("svg",d({width:"36",height:"27",viewBox:"0 0 36 27",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M32.625 0C34.4531 0 36 1.54688 36 3.375V23.625C36 25.5234 34.4531 27 32.625 27H3.375C1.47656 27 0 25.5234 0 23.625V3.375C0 1.54688 1.47656 0 3.375 0H32.625ZM32.2031 23.625C32.4141 23.625 32.625 23.4844 32.625 23.2031V3.79688C32.625 3.58594 32.4141 3.375 32.2031 3.375H3.79688C3.51562 3.375 3.375 3.58594 3.375 3.79688V23.2031C3.375 23.4844 3.51562 23.625 3.79688 23.625H32.2031ZM9 6.1875C10.5469 6.1875 11.8125 7.45312 11.8125 9C11.8125 10.6172 10.5469 11.8125 9 11.8125C7.38281 11.8125 6.1875 10.6172 6.1875 9C6.1875 7.45312 7.38281 6.1875 9 6.1875ZM6.75 20.25V16.875L9.49219 14.1328C9.84375 13.7812 10.3359 13.7812 10.6875 14.1328L13.5 16.875L21.8672 8.50781C22.2188 8.15625 22.7109 8.15625 23.0625 8.50781L29.25 14.625V20.25H6.75Z"})),hg=()=>te.createElement("div",{className:Pi.linkPreview__unableToPreview},te.createElement(Ole,{className:Pi.linkPreview__unableToPreview__icon})),Ule=({url:e})=>{let{client:t}=De();return useQuery({enabled:!!t,queryKey:["asc-uikit","previewLink",e],queryFn:()=>_(void 0,null,function*(){let o=yield t==null?void 0:t.http.get("/api/v1/link-preview",{params:{url:e}});return o==null?void 0:o.data}),retry:!1})};function IB({url:e}){var n,i,a;let t=new URL(e),o=Ule({url:e});if(o.isLoading)return te.createElement(bB,null);let r=()=>{window.open(e,"_blank");};return o.isError?te.createElement(O,{onPress:r,className:Pi.linkPreview},te.createElement("div",{className:Pi.linkPreview__top},te.createElement(hg,null)),te.createElement("div",{className:Pi.linkPreview__bottom},te.createElement(N.Caption,null,t.hostname))):te.createElement(O,{onPress:r,className:Pi.linkPreview},te.createElement("div",{className:Pi.linkPreview__top},(n=o.data)!=null&&n.image?te.createElement("object",{data:o.data.image,className:Pi.linkPreview__object},te.createElement(hg,null)):(i=o.data)!=null&&i.video?te.createElement(fg,{src:o.data.video}):te.createElement(hg,null)),te.createElement("div",{className:Pi.linkPreview__bottom},te.createElement(N.Caption,null,t.hostname),te.createElement(N.BodyBold,null,((a=o.data)==null?void 0:a.title)||"")))}var Cg=({text:e="",mentionees:t=[],mentioned:o})=>{if(!e)return null;let r=zv.find(e).filter(n=>n.type==="url");return te.createElement(te.Fragment,null,te.createElement(Nm,{data:{text:e},mentionees:t,metadata:{mentioned:o}}),r&&r.length>0&&te.createElement(IB,{url:r[0].href}))};var rc={imageContent:"o",imageContent__img:"Fn",imageContent__imgContainer:"t",imageContent__imgCover:"Hn"};var Vle=e=>{let r=kn({fetcher:PostRepository.getPost,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return d({post:t},o)},_i=Vle;var jle=({fileId:e})=>{let t=it({fileId:e});return te.createElement("img",{loading:"lazy",className:rc.imageContent__img,src:t,alt:e})},Gle=({postId:e,index:t,imageLeftCount:o,postAmount:r,onImageClick:n})=>{let{post:i,isLoading:a}=_i(e);return a?null:te.createElement(O,{key:i.postId,className:rc.imageContent__imgContainer,onPress:()=>n()},te.createElement(jle,{fileId:i.data.fileId}),o>0&&t===r-1&&te.createElement(N.Heading,{className:rc.imageContent__imgCover},"+ ",o))},vg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onImageClick:n=()=>{}})=>{var p;let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),s=Math.max(0,r.children.length-4),{post:l,isLoading:c}=_i((p=r.children)==null?void 0:p[0]);return c||(l==null?void 0:l.dataType)!=="image"?null:te.createElement("div",{className:rc.imageContent,style:i,"data-images-amount":Math.min(r.children.length,4)},a.map((u,g)=>te.createElement(Gle,{key:u,postId:u,index:g,imageLeftCount:s,postAmount:r.children.length,onImageClick:()=>n(g)})))};var ga={videoContent:"i",videoContent__video:"Ln",videoContent__videoContainer:"l",videoContent__videoCover:"Tn",videoContent__playButtonCover:"Vn",videoContent__playButton:"qn",videoContent__playButton__svg:"Gn"};var Qle=e=>te.createElement("svg",d({width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("g",{id:"Icon ",clipPath:"url(#clip0_1936_14348)"},te.createElement("path",{id:"Vector",d:"M8.95117 5V19L19.9512 12L8.95117 5Z"})),te.createElement("defs",null,te.createElement("clipPath",{id:"clip0_1936_14348"},te.createElement("rect",{width:"24",height:"24",transform:"translate(0.951172)"})))),Wle=({fileId:e})=>{let t=it({fileId:e});return te.createElement("img",{className:ga.videoContent__video,src:t,alt:e})},qle=({postId:e,postAmount:t,videoLeftCount:o,index:r,onVideoClick:n})=>{let{post:i,isLoading:a}=_i(e);return a?null:te.createElement(O,{className:ga.videoContent__videoContainer,"data-videos-amount":Math.min(t,4),onPress:()=>n()},te.createElement(Wle,{fileId:i.data.thumbnailFileId}),o>0&&r===t-1&&te.createElement(N.Heading,{className:ga.videoContent__videoCover},"+ ",o),o===0||r<t-1?te.createElement("div",{className:ga.videoContent__playButtonCover},te.createElement("div",{className:ga.videoContent__playButton,onClick:()=>n()},te.createElement(Qle,{className:ga.videoContent__playButton__svg}))):null)},xg=({pageId:e="*",componentId:t="*",elementId:o="*",post:r,onVideoClick:n})=>{let{themeStyles:i}=A({pageId:e,componentId:t,elementId:o}),a=r.children.slice(0,4),{post:s}=_i(r.children[0]),l=Math.max(0,r.children.length-4);return (s==null?void 0:s.dataType)!=="video"?null:te.createElement("div",{className:ga.videoContent,style:i},te.createElement("div",{className:ga.videoContent,style:i,"data-videos-amount":Math.min(r.children.length,4)},a.map((c,p)=>te.createElement(qle,{key:c,index:p,postId:c,videoLeftCount:l,postAmount:r.children.length,onVideoClick:()=>n(p)}))))};var qr={modal:"Jn",modalContent:"Kn",closeButton:"Nn",fullImage:"On",nextButton:"Pn",prevButton:"Qn",overlayPanel:"Wn",overlayPanel__prev:"Re",overlayPanel__next:"Ue",overlayPanel__prevButton:"De",overlayPanel__nextButton:"Zn",overlayPanel__middle:"_n",imageViewer__clearButton:"ed",imageViewer__clearButton__img:"rd"};var MB=e=>te.createElement("svg",d({width:"6",height:"9",viewBox:"0 0 6 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M5.13281 4.71094L1.71094 8.17969C1.59375 8.29688 1.40625 8.29688 1.3125 8.17969L0.84375 7.71094C0.726562 7.59375 0.726562 7.42969 0.84375 7.3125L3.60938 4.5L0.84375 1.71094C0.726562 1.59375 0.726562 1.40625 0.84375 1.3125L1.3125 0.84375C1.40625 0.726562 1.59375 0.726562 1.71094 0.84375L5.13281 4.3125C5.25 4.42969 5.25 4.59375 5.13281 4.71094Z"}));function PB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialImageIndex:n,onClose:i}){var h,x;let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(b=>b.dataType==="image"),u=p[s],g=le({fileId:(h=u==null?void 0:u.data)==null?void 0:h.fileId}),f=s<p.length-1,y=s>0,C=()=>{f&&l(b=>b+1);},v=()=>{y&&l(b=>b-1);};return te.createElement("div",{style:a},te.createElement("div",{className:qr.modal,onClick:i},te.createElement("div",{className:qr.modalContent,onClick:b=>b.stopPropagation()},te.createElement("img",{src:g,alt:((x=u==null?void 0:u.data)==null?void 0:x.fileId)||"",className:qr.fullImage}),te.createElement("div",{className:qr.overlayPanel},y&&te.createElement("div",{className:qr.overlayPanel__prev,onClick:v},te.createElement(MB,{className:qr.overlayPanel__prevButton})),te.createElement("div",{className:qr.overlayPanel__middle}),f&&te.createElement("div",{className:qr.overlayPanel__next,onClick:C},te.createElement(MB,{className:qr.overlayPanel__nextButton}))),te.createElement("span",{className:qr.closeButton},te.createElement(E1,{pageId:e,componentId:t,defaultClassName:qr.imageViewer__clearButton,imgClassName:qr.imageViewer__clearButton__img,onPress:i})))))}var Kr={modal:"ad",modalContent:"od",closeButton:"td",fullImage:"id",nextButton:"ld",prevButton:"sd",overlayPanel:"cd",overlayPanel__prev:"Fe",overlayPanel__next:"He",overlayPanel__prevButton:"Le",overlayPanel__nextButton:"nd",overlayPanel__middle:"dd",videoViewer__clearButton:"md",videoViewer__clearButton__img:"pd"};var ome=memo(({videoPost:e})=>{let t=useMemo(()=>(e==null?void 0:e.data.videoFileId.high)||(e==null?void 0:e.data.videoFileId.medium)||(e==null?void 0:e.data.videoFileId.low)||(e==null?void 0:e.data.videoFileId.original)||void 0,[e]),o=Ht(t),r=Ht(e==null?void 0:e.data.thumbnailFileId),n=useRef(null),i=useMemo(()=>{if(o==null)return null;if(o.status===S0.Transcoded){let{videoUrl:a}=o;return (a==null?void 0:a["1080p"])||(a==null?void 0:a["720p"])||(a==null?void 0:a["480p"])||(a==null?void 0:a["360p"])||(a==null?void 0:a.original)||o.fileUrl}return o.fileUrl},[o]);return useEffect(()=>{var a;(a=n.current)==null||a.load();},[i]),i==null?te.createElement(te.Fragment,null):te.createElement("video",{controls:!0,controlsList:"nodownload",autoPlay:!0,className:Kr.fullImage,ref:n,poster:r==null?void 0:r.fileUrl},te.createElement("source",{src:i,type:"video/mp4"}),te.createElement("p",null,"Your browser does not support this format of video. Please try again later once the server transcodes the video into an playable format(mp4)."))});function TB({pageId:e="*",componentId:t="*",elementId:o="*",post:r,initialVideoIndex:n,onClose:i}){let{themeStyles:a}=A({pageId:e,componentId:t,elementId:o}),[s,l]=useState(n),p=Va((r==null?void 0:r.children)||[]).filter(v=>v.dataType==="video"),u=p[s],g=s<p.length-1,f=s>0,y=()=>{g&&l(v=>v+1);},C=()=>{f&&l(v=>v-1);};return te.createElement("div",{style:a},te.createElement("div",{className:Kr.modal,onClick:i},te.createElement("div",{className:Kr.modalContent,onClick:v=>v.stopPropagation()},te.createElement(ome,{videoPost:u}),te.createElement("div",{className:Kr.overlayPanel},f&&te.createElement("div",{className:Kr.overlayPanel__prev,onClick:C},te.createElement(tc,{className:Kr.overlayPanel__prevButton})),te.createElement("div",{className:Kr.overlayPanel__middle}),g&&te.createElement("div",{className:Kr.overlayPanel__next,onClick:y},te.createElement(tc,{className:Kr.overlayPanel__nextButton}))),te.createElement("span",{className:Kr.closeButton},te.createElement(E1,{pageId:e,componentId:t,defaultClassName:Kr.videoViewer__clearButton,imgClassName:Kr.videoViewer__clearButton__img,onPress:i})))))}var SB=({post:e,community:t})=>{let{currentUserId:o}=De(),r=useMemo(()=>e.targetType==="community"&&e.targetId===(t==null?void 0:t.communityId),[e.targetType,t==null?void 0:t.communityId]),{moderators:n}=rm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===o):!1,[n,r,o]),a=e.postedUserId===o;return {isCommunityModerator:i,isOwner:a}};var Vn={postMenu:"gd",postMenu__item:"g",postMenu__editPost__text:"hd",postMenu__editPost__icon:"fd",postMenu__reportPost__text:"bd",postMenu__reportPost__icon:"ud",postMenu__deletePost__text:"vd",postMenu__deletePost__icon:"xd"};var EB=({post:e,isFlaggable:t,onReportSuccess:o,onReportError:r,onUnreportSuccess:n,onUnreportError:i})=>{let a=useQueryClient(),s=(e==null?void 0:e.postId)||void 0,{data:l,isLoading:c}=useQuery({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s],queryFn:()=>PostRepository.isPostFlaggedByMe(s),enabled:s!=null&&t}),{mutateAsync:p}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.flagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!0);}),onSuccess:()=>{o==null||o();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),r==null||r(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}}),{mutateAsync:u}=useMutation({mutationFn:()=>_(void 0,null,function*(){return PostRepository.unflagPost(e.postId)}),onMutate:()=>_(void 0,null,function*(){yield a.cancelQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),a.setQueryData(["asc-uikit","PostRepository","isPostFlaggedByMe",s],()=>!1);}),onSuccess:()=>{n==null||n();},onError:(g,f,y)=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]}),i==null||i(g);},onSettled:()=>{a.invalidateQueries({queryKey:["asc-uikit","PostRepository","isPostFlaggedByMe",s]});}});return {isLoading:c,isFlaggedByMe:l||!1,mutateReportPost:p,mutateUnReportPost:u}};var jn={createPost:"wd",createPost__topBar:"yd",createPost__status:"kd",createPost_infoIcon:"jd",createPost__notiWrap:"Te",createPost__formMediaAttachment:"Ve",drawer__content:"zd",mentionTextInput_item:"qe",drawerContentContainer:"S"};var mme=createContext({itemWithAds:[],isLoading:!1,prependItem:()=>{},removeItem:()=>{},updateItem:()=>{},loadMore:()=>{},hasMore:!1,loadMoreHasBeenCalled:!1,fetch:()=>{},refetch:()=>{},scrollPosition:0,onScroll:()=>{}}),bs=()=>{let e=useContext(mme);if(!e)throw new Error("useGlobalFeedContext must be used within a GlobalFeedProvider");return e};var BB=()=>/Mobi|Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);var LB=e=>new Promise((t,o)=>{let r=document.createElement("video"),n=document.createElement("canvas"),i=n.getContext("2d");r.src=URL.createObjectURL(e);let a=()=>{r.currentTime=10;},s=()=>{try{n.width=r.videoWidth,n.height=r.videoHeight,i==null||i.drawImage(r,0,0,n.width,n.height);let c=n.toDataURL("image/png");t(c);}catch(c){o(c);}finally{r.removeEventListener("canplay",a),r.removeEventListener("seeked",s),r.removeEventListener("error",l),URL.revokeObjectURL(r.src);}},l=c=>{o(new Error(`Error loading video: ${c}`));};r.addEventListener("canplay",a),r.addEventListener("seeked",s),r.addEventListener("error",l),r.load();});var AB={createNewPostButton:"Ge"};function Ig({pageId:e="*",componentId:t="*",isValid:o,onSubmit:r}){let n="create_new_post_button",{config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return a?null:te.createElement("button",{onSubmit:r,style:s,disabled:!o,className:AB.createNewPostButton,type:"submit"},i.text)}var L1={thumbnail__container:"h",thumbnail__wrapper:"Je",thumbnail:"Xd",closeIcon:"Yd",icon__status:"Cd"};var ume=ka`
|
|
4806
4806
|
from {
|
|
4807
4807
|
transform: rotate(0deg);
|
|
4808
4808
|
}
|
|
@@ -4811,9 +4811,9 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),te.cr
|
|
|
4811
4811
|
}
|
|
4812
4812
|
`,DB=m.svg`
|
|
4813
4813
|
animation: ${ume} 2s linear infinite;
|
|
4814
|
-
`;var fa=e=>te.createElement(DB,d({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none"},e),te.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"white",strokeWidth:"2"}),te.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"#1054DE",strokeWidth:"2",strokeDasharray:"46.75",strokeDashoffset:"21",strokeLinecap:"round",strokeLinejoin:"round"}));function hme(e){return e.fileId!==void 0}function nc({files:e=[],uploadedFiles:t=[],onChange:o=i=>{},onLoadingChange:r=i=>{},onError:n=i=>{}}){let[i,a]=useState([]),s=useMemo(()=>Array.isArray(e)?e:Array.from(e),[e]),l=useCallback(()=>{o({uploaded:[],uploading:[]});},[o]),c=useCallback(()=>{a([]);},[]),p=useCallback((g,f)=>{if(hme(g)){let y=t.filter(C=>C.fileId!==g.fileId);o({uploaded:y,uploading:s});}else if(f!==void 0){let y=t.filter((C,v)=>v!==f);o({uploaded:y,uploading:s});}else {let y=s.filter(C=>C.name!==g.name);o({uploaded:t,uploading:y});}},[o,t,s]);return useEffect(()=>{if(!s.length)return;function g(){return _(this,null,function*(){r(!0);try{let f=yield Promise.all(s.map(C=>_(this,null,function*(){let v=new FormData;v.append("files",C);let h=yield _(this,null,function*(){if(C.type.includes(FileType.IMAGE))return FileRepository.createImage(v);if(C.type.includes(FileType.VIDEO))return FileRepository.createVideo(v)});return h&&h.data.length>0?h.data[0]:null}))),y=[...t,...f].filter(Oe);o({uploaded:y,uploading:[]}),a([]);}catch(f){a(s.map(y=>y.name)),n(!0);}finally{r(!1);}})}g();},[s]),{allFiles:[...t,...s],uploading:s,uploaded:t,removeFile:p,reset:l,rejected:i,retry:c}}function Pg({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,uploadLoading:n,onError:i,isErrorUpload:a}){let s=nc({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,onError:i}),{allFiles:l,removeFile:c}=s;return l.length===0?null:l&&te.createElement("div",{"data-images-amount":Math.min(l.length,3),className:L1.thumbnail__container},l==null?void 0:l.map((p,u)=>{var g;return te.createElement("div",{key:u,"data-images-height":l.length>2,className:L1.thumbnail__wrapper},n?te.createElement("div",{className:L1.icon__status},te.createElement(fa,null)):a?te.createElement("div",{className:L1.icon__status},te.createElement(Zt,null)):te.createElement(te.Fragment,null,te.createElement("img",{className:L1.thumbnail,src:FileRepository.fileUrlWithSize(p==null?void 0:p.fileUrl,"medium"),alt:(g=p.attributes)==null?void 0:g.name}),te.createElement("button",{type:"reset",onClick:()=>c(p)},te.createElement(ko,{className:L1.closeIcon}))))}))}var ya={thumbnail__container:"f",thumbnail__wrapper:"Ad",thumbnail__wrapper_item_3:"Md",thumbnail:"Sd",closeIcon:"Ed",icon__status:"Id",playIcon:"Rd"};var _g=({files:e,uploadedFiles:t,onLoadingChange:o,onChange:r,uploadLoading:n,onError:i,videoThumbnail:a,removeThumbnail:s,isErrorUpload:l})=>{let c=nc({files:e,uploadedFiles:t,onChange:r,onLoadingChange:o,onError:i}),{allFiles:p,removeFile:u}=c;if(p.length===0)return null;let g=(f,y)=>{u(f,y),s(y);};return a?te.createElement("div",{"data-images-amount":Math.min(a.length,3),className:ya.thumbnail__container},a==null?void 0:a.map((f,y)=>te.createElement("div",{key:f.videoUrl,className:gr(ya.thumbnail__wrapper,a.length>2&&ya.thumbnail__wrapper_item_3)},n?te.createElement("div",{className:ya.icon__status},te.createElement(fa,null)):l?te.createElement("div",{className:ya.icon__status},te.createElement(Zt,null)):te.createElement(te.Fragment,null,te.createElement("img",{className:ya.thumbnail,src:f.thumbnail}),te.createElement("button",{type:"reset",onClick:()=>{g(f.file,y);}},te.createElement(ko,{className:ya.closeIcon})),te.createElement("div",{className:ya.playIcon},te.createElement(To,null)))))):null};var Pme=({ref:e})=>{let[t,o]=useState(void 0);return useEffect(()=>{if(e.current==null)return;let r=new ResizeObserver(n=>{for(let i of n)o(i.target.clientHeight);});return e.current&&r.observe(e.current),()=>{r.disconnect();}},[e.current]),t};function Sg({community:e,targetType:t,targetId:o}){let r="post_composer_page",{themeStyles:n}=Re({pageId:r}),i="6.75rem",a="8.5rem",s="11rem",l="14.5rem",{AmityPostComposerPageBehavior:c}=It(),{confirm:p}=et(),[u,g]=useState(i),[f]=useState(!0),y=useRef(null),C=useRef(null),{prependItem:v}=bs(),h=Pme({ref:C}),{handleSubmit:x}=useForm(),[b,M]=useState({text:"",mentioned:[],mentionees:[{type:"user",userIds:[""]}],attachments:[{fileId:"",type:"image"}]}),[I,w]=useState([]),[k,S]=useState([]),[L,D]=useState([]),[H,$]=useState([]),[B,z]=useState(!1),[V,K]=useState([]),[U,j]=useState(!1),[Z,G]=useState(!0),[Q,T]=useState(!0),[F,q]=useState(!1),[Y,ie]=useState([]),ce=useRef(null),Ke=()=>useMutation({mutationFn:pe=>_(this,null,function*(){return PostRepository.createPost(pe)}),onSuccess:pe=>{var ge;(ge=c==null?void 0:c.goToSocialHomePage)==null||ge.call(c),v(pe.data);},onError:pe=>{console.error("Failed to create post",pe);}}),{mutateAsync:xt,isPending:to,isError:jt}=Ke(),He=()=>{let pe=I.map(jo=>({type:"image",fileId:jo.fileId})),ge=k.map(jo=>({type:"video",fileId:jo.fileId})),on=[...pe,...ge];xt({targetId:o,targetType:t,data:{text:b.text},dataType:"text",metadata:{mentioned:b.mentioned},mentionees:b.mentionees,attachments:on});},mr=pe=>{M(ge=>E(d({},ge),{mentioned:pe.mentioned,text:pe.text,mentionees:pe.mentionees}));},Fr=pe=>{u===i&&pe==="0px"||g(pe);},Po=()=>{p({pageId:r,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{var pe;(pe=c==null?void 0:c.goToSocialHomePage)==null||pe.call(c);},okText:"Discard",cancelText:"Keep editing"});};useEffect(()=>{I.length>0?(G(!0),T(!1)):k.length>0&&Y.length>0?(G(!1),T(!0)):(I.length==0||Y.length==0)&&(G(!0),T(!0));},[I,k,Z,Q,Y]),useEffect(()=>{BB()?j(!0):j(!1);},[]),useEffect(()=>{g(!U&&Z&&Q||U&&Z&&!Q||U&&!Z&&Q?s:!U&&Z&&!Q||!U&&!Z&&Q?a:l);},[U,Z,Q]);let Qe=pe=>{ie(ge=>ge.filter((on,jo)=>jo!==pe));},wn=pe=>{if(pe.length+V.length>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 images. Any additional images will not be saved. ",okText:"Close"});return}pe.length>0&&(K(ge=>[...ge,...pe]),D(pe));},Or=pe=>_(this,null,function*(){let ge=Y?Y.length:0;if(pe.length+ge>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 videos. Any additional videos will not be saved. ",okText:"Close"});return}if(pe.length>0){$==null||$(pe);let on=pe.map(Ur=>({file:Ur,videoUrl:URL.createObjectURL(Ur),thumbnail:void 0})),jo=yield Promise.all(on.map(Ur=>_(this,null,function*(){let Hi=yield LB(Ur.file);return E(d({},Ur),{thumbnail:Hi})})));ie(Ur=>[...Ur,...jo]);}}),tn=u==a||u==s||u==l;return te.createElement("div",{className:jn.createPost,style:n},te.createElement("form",{onSubmit:x(He),"data-from-media":u==i,className:jn.createPost__formMediaAttachment},te.createElement("div",{className:jn.createPost__topBar},te.createElement(Nr,{pageId:r,onPress:Po}),te.createElement(pa,{pageId:r,community:e}),te.createElement(Ig,{pageId:r,onSubmit:x(He),isValid:b.text.length>0||I.length>0||k.length>0})),te.createElement(qi,{onChange:mr,communityId:o,mentionContainer:ce.current,dataValue:{data:{text:b.text}}}),te.createElement(Pg,{files:L,uploadedFiles:I,uploadLoading:B,onLoadingChange:z,onChange:({uploaded:pe,uploading:ge})=>{w(pe),D(ge);},onError:q,isErrorUpload:F}),te.createElement(_g,{files:H,uploadedFiles:k,uploadLoading:B,onLoadingChange:z,onChange:({uploaded:pe,uploading:ge})=>{S(pe),$(ge);},onError:q,isErrorUpload:F,videoThumbnail:Y,removeThumbnail:Qe}),te.createElement("div",{ref:ce,style:{"--asc-mention-bottom":`${h!=null?h:0}px`},className:jn.mentionTextInput_item})),te.createElement("div",{ref:y}),y.current?ox.createPortal(te.createElement(Drawer.Root,{snapPoints:[i,a,s,l],activeSnapPoint:u,setActiveSnapPoint:pe=>{typeof pe=="string"&&Fr(pe);},open:f,modal:!1},te.createElement(Drawer.Portal,{container:y.current},te.createElement(Drawer.Content,{className:jn.drawer__content},te.createElement("div",{"data-item-position":u===i,className:jn.createPost__notiWrap},to&&te.createElement(Os,{content:"Posting...",icon:te.createElement(fa,null),className:jn.createPost__status}),jt&&te.createElement(Os,{content:"Failed to create post",icon:te.createElement(Y1,{className:jn.createPost_infoIcon}),className:jn.createPost__status,duration:3e3})),te.createElement("div",{ref:C,className:jn.drawerContentContainer,"data-show-detail-media-attachment":tn},tn?te.createElement(C5,{pageId:r,isVisibleCamera:U,isVisibleImage:Z,isVisibleVideo:Q,onVideoFileChange:Or,onImageFileChange:wn}):te.createElement(h5,{pageId:r,isVisibleCamera:U,isVisibleImage:Z,isVisibleVideo:Q,onVideoFileChange:Or,onImageFileChange:wn}))))),y.current):null)}var ha={editPost:"Ud",editPost__topBar:"Bd",editPost__status:"Dd",editPost_infoIcon:"Fd",editPost__notiWrap:"Hd",editPost__formMediaAttachment:"Ke",drawer__content:"Ld",mentionTextInput_item:"Ne"};var OB={editPostButton:"Oe"};function Ng(r){var n=r,{pageId:e="*",componentId:t="*"}=n,o=P(n,["pageId","componentId"]);let i="edit_post_button",{config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:i});return s?null:te.createElement(O,d({style:l,className:OB.editPostButton},o),a.text)}var UB={editPostTitle:"Td"};function Eg({pageId:e="*",componentId:t="*"}){let o="edit_post_title",{config:r,isExcluded:n,themeStyles:i}=A({pageId:e,componentId:t,elementId:o});return n?null:te.createElement("div",{style:i,className:UB.editPostTitle},r.text)}var Ame=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)return;let n=yield PostRepository.getPostByIds(e);o(n.data);})}r();},[e]),t},zB=Ame;var A1={thumbnail__container:"b",thumbnail__wrapper:"Pe",thumbnail:"Vd",thumbnail__closeButton:"qd",thumbnail__closeIcon:"Gd",icon__status:"Jd",playIcon:"Kd"};var Hme=({fieldId:e,onRemove:t,type:o})=>{let r=it({fileId:e});return r?te.createElement(te.Fragment,null,te.createElement("img",{className:A1.thumbnail,src:r,alt:"thumbnail"}),te.createElement(O,{type:"reset",onPress:()=>t(),className:A1.thumbnail__closeButton},te.createElement(ko,{className:A1.thumbnail__closeIcon})),o===PostContentType.VIDEO&&te.createElement("div",{className:A1.playIcon,"data-image":"test"},te.createElement(To,null))):null},Lg=({postMedia:e,onRemove:t})=>e.length==0?null:te.createElement("div",{"data-images-amount":Math.min(e.length,3),className:A1.thumbnail__container},e==null?void 0:e.map((o,r)=>te.createElement("div",{key:r,"data-images-height":e.length>2,className:A1.thumbnail__wrapper},te.createElement(Hme,{type:o.dataType,key:r,fieldId:o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.thumbnailFileId,onRemove:()=>t(o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.videoFileId.original)}))));var Ag=(e,t)=>{if(e.length!==t.length)return !1;let o=[...e].sort(),r=[...t].sort();for(let n=0;n<o.length;n++)if(o[n]!==r[n])return !1;return !0};function Dg({post:e}){var z,V,K;let t="post_composer_page",{themeStyles:o}=Re({pageId:t}),{onBack:r}=Be(),{confirm:n}=et(),{updateItem:i}=bs(),[a,s]=useState({text:(z=e.data.text)!=null?z:"",mentioned:((V=e.metadata)==null?void 0:V.mentioned)||[],mentionees:e.mentionees,attachments:[{fileId:"",type:"image"}]}),[l,c]=useState([]),[p,u]=useState([]),[g,f]=useState([]),[y,C]=useState([]),v=useRef(null),h=()=>useMutation({mutationFn:U=>_(this,null,function*(){return yield PostRepository.editPost(e.postId,U)}),onSuccess:U=>{r(),i(U.data);},onError:U=>{console.error("Failed to edit post",U);}}),{mutateAsync:x,isPending:b,isError:M}=h(),{handleSubmit:I}=useForm(),w=zB((e==null?void 0:e.children)||[]);useEffect(()=>{let U=w.filter(Z=>Z.dataType==="image");f(U),c(U);let j=w.filter(Z=>Z.dataType==="video");C(j),u(j);},[w]);let k=U=>{c(j=>j.filter(Z=>Z.data.fileId!==U));},S=U=>{u(j=>j.filter(Z=>Z.data.videoFileId.original!==U));},L=()=>{var G,Q;let U=l.map(T=>({fileId:T.data.fileId,type:PostContentType.IMAGE})),j=p.map(T=>({fileId:T.data.videoFileId.original,type:"video"})),Z=[...U,...j];a&&x({data:{text:a.text},metadata:{mentioned:(G=a.mentioned)!=null?G:[]},mentionees:(Q=a.mentionees)!=null?Q:[],attachments:Z});},D=U=>{s(j=>E(d({},j),{mentioned:U.mentioned,text:U.text,mentionees:U.mentionees}));},H=()=>{n({pageId:t,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{r();},okText:"Discard",cancelText:"Keep editing"});},$=!Ag(g,l),B=!Ag(y,p);return te.createElement("div",{className:ha.editPost,style:o},te.createElement("form",{onSubmit:I(L),className:ha.editPost__formMediaAttachment},te.createElement("div",{className:ha.editPost__topBar},te.createElement(Nr,{pageId:t,onPress:H}),te.createElement(Eg,{pageId:t}),te.createElement(Ng,{pageId:t,type:"submit",onPress:()=>I(L),isDisabled:e.data.text==a.text&&!$&&!B||!(a.text.length>0||l.length>0||p.length>0)})),te.createElement(qi,{communityId:e.targetType==="community"?e.targetId:void 0,onChange:D,mentionContainer:v.current,dataValue:{data:{text:e.data.text},metadata:{mentioned:((K=e.metadata)==null?void 0:K.mentioned)||[]},mentionees:e.mentionees}}),te.createElement(Lg,{postMedia:l,onRemove:k}),te.createElement(Lg,{postMedia:p,onRemove:S}),te.createElement("div",{ref:v,className:ha.mentionTextInput_item}),te.createElement("div",{className:ha.editPost__notiWrap},b&&te.createElement(Os,{content:"Posting...",icon:te.createElement(fa,null),className:ha.editPost__status}),M&&te.createElement(Os,{content:"Failed to edit post",icon:te.createElement(Zt,{className:ha.editPost_infoIcon}),className:ha.editPost__status,duration:3e3}))))}var jme=e=>e.mode==="create";function Hg(e){if(jme(e)){let{targetId:t,targetType:o,community:r}=e;return te.createElement(Sg,{mode:"create",targetId:t,targetType:o,community:r})}else {let{post:t}=e;return te.createElement(Dg,{mode:"edit",post:t})}}var Qme=e=>te.createElement("svg",d({width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M18.3804 2.25391C19.2593 3.13281 19.2593 4.53906 18.3804 5.41797L15.7437 8.05469L14.5483 9.25L5.97021 17.8281L1.9624 18.25C1.92725 18.25 1.89209 18.25 1.85693 18.25C1.36475 18.25 0.978027 17.8281 1.04834 17.3359L1.47021 13.3281L10.0483 4.75L11.2437 3.55469L13.8804 0.917969C14.3022 0.496094 14.8999 0.25 15.4624 0.25C16.0249 0.25 16.6226 0.496094 17.0444 0.917969L18.3804 2.25391ZM5.19678 16.2109L13.353 8.08984L14.4429 7L12.2983 4.85547L11.2085 5.94531L3.0874 14.1016L2.84131 16.457L5.19678 16.2109ZM17.1851 4.22266C17.396 4.01172 17.396 3.66016 17.1851 3.44922L15.8491 2.11328C15.7085 1.97266 15.5327 1.9375 15.4624 1.9375C15.3921 1.9375 15.2163 1.97266 15.0757 2.11328L13.4937 3.66016L15.6382 5.80469L17.1851 4.22266Z"})),Wme=e=>te.createElement("svg",d({width:"16",height:"19",viewBox:"0 0 16 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M15.3608 3.0625C15.6421 3.0625 15.9233 3.34375 15.9233 3.625V4.1875C15.9233 4.50391 15.6421 4.75 15.3608 4.75H14.7983L14.0249 16.668C13.9897 17.5469 13.2163 18.25 12.3374 18.25H3.72412C2.84521 18.25 2.07178 17.5469 2.03662 16.668L1.29834 4.75H0.73584C0.419434 4.75 0.17334 4.50391 0.17334 4.1875V3.625C0.17334 3.34375 0.419434 3.0625 0.73584 3.0625H3.61865L4.81396 1.09375C5.09521 0.636719 5.72803 0.25 6.25537 0.25H9.80615C10.3335 0.25 10.9663 0.636719 11.2476 1.09375L12.4429 3.0625H15.3608ZM6.25537 1.9375L5.5874 3.0625H10.4741L9.80615 1.9375H6.25537ZM12.3374 16.5625L13.0757 4.75H2.98584L3.72412 16.5625H12.3374Z"})),qme=e=>te.createElement("svg",d({width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M12.3125 3.0625C13.543 3.0625 14.8789 2.64062 16.1445 2.07812C17.2344 1.62109 18.5 2.42969 18.5 3.625V12.0625C18.5 12.6602 18.1836 13.1875 17.7266 13.5039C16.7773 14.1016 15.2656 14.875 13.1914 14.875C10.8008 14.875 9.21875 13.75 7.49609 13.75C5.52734 13.75 4.33203 14.1719 3.03125 14.7695V17.6875C3.03125 18.0039 2.75 18.25 2.46875 18.25H1.90625C1.58984 18.25 1.34375 18.0039 1.34375 17.6875V3.41406C0.816406 3.13281 0.5 2.57031 0.5 1.9375C0.5 0.988281 1.30859 0.214844 2.29297 0.285156C3.10156 0.320312 3.76953 0.953125 3.83984 1.76172C3.83984 1.79688 3.875 1.90234 3.875 1.9375C3.875 2.11328 3.80469 2.35938 3.76953 2.5C4.54297 2.18359 5.49219 1.9375 6.61719 1.9375C9.00781 1.9375 10.5898 3.0625 12.3125 3.0625ZM16.8125 12.0625V3.625C15.6875 4.15234 13.8242 4.75 12.3125 4.75C10.2031 4.75 8.72656 3.625 6.61719 3.625C5.14062 3.625 3.76953 4.22266 3.03125 4.75V12.9062C4.12109 12.4141 5.98438 12.0625 7.49609 12.0625C9.60547 12.0625 11.082 13.1875 13.1914 13.1875C14.668 13.1875 16.0391 12.625 16.8125 12.0625Z"})),N5=({post:e,pageId:t="*",componentId:o="*",elementId:r="*",onCloseMenu:n,onPostDeleted:i})=>{let{success:a,error:s}=So(),l=useMemo(()=>(e==null?void 0:e.targetType)==="community",[e==null?void 0:e.targetType]),{community:c}=_t({communityId:e==null?void 0:e.targetId,shouldCall:l}),{isCommunityModerator:p,isOwner:u}=SB({post:e,community:c}),{AmityPostContentComponentBehavior:g}=It(),{removeDrawerData:f}=qm(),{showEditPostButton:y,showDeletePostButton:C,showReportPostButton:v}=useMemo(()=>p?u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!0,showReportPostButton:!0}:u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!1,showReportPostButton:!0},[p,u]),{isFlaggedByMe:h,isLoading:x,mutateReportPost:b,mutateUnReportPost:M}=EB({post:e,isFlaggable:v,onReportSuccess:()=>{a({content:"Post reported."});},onReportError:()=>{s({content:"Failed to report post."});},onUnreportSuccess:()=>{a({content:"Post unreported."});},onUnreportError:()=>{s({content:"Failed to unreport post."});}}),{confirm:I}=et(),{mutateAsync:w}=useMutation({mutationFn:()=>_(void 0,null,function*(){return n(),PostRepository.hardDeletePost(e.postId)}),onSuccess:()=>{a({content:"Post deleted."}),i==null||i(e);},onError:()=>{s({content:"Failed to delete post."});}}),k=()=>{n(),I({title:"Delete post",content:"This post will be permanently deleted.",cancelText:"Cancel",okText:"Delete",onOk:()=>w(),pageId:t,componentId:o});};return te.createElement("div",{className:Vn.postMenu},v&&!x?te.createElement(O,{className:Vn.postMenu__item,onPress:()=>{h?M():b(),f();}},te.createElement(qme,{className:Vn.postMenu__reportPost__icon}),te.createElement(N.Title,{className:Vn.postMenu__reportPost__text},h?"Unreport post":"Report post")):null,y?te.createElement(O,{className:Vn.postMenu__item,onPress:()=>{var S;f(),(S=g==null?void 0:g.goToPostComposerPage)==null||S.call(g,{mode:"edit",post:e});}},te.createElement(Qme,{className:Vn.postMenu__editPost__icon}),te.createElement(N.Title,{className:Vn.postMenu__editPost__text},"Edit post")):null,C?te.createElement(O,{className:Vn.postMenu__item,onPress:()=>k()},te.createElement(Wme,{className:Vn.postMenu__deletePost__icon}),te.createElement(N.Title,{className:Vn.postMenu__deletePost__text},"Delete post")):null)};var ZB=({post:e,community:t})=>{let{currentUserId:o}=De(),r=useMemo(()=>(e==null?void 0:e.targetType)==="community"&&(e==null?void 0:e.targetId)===(t==null?void 0:t.communityId),[e==null?void 0:e.targetType,t==null?void 0:t.communityId]),{moderators:n}=rm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===(e==null?void 0:e.postedUserId)):!1,[n,r,e==null?void 0:e.postedUserId]),a=(e==null?void 0:e.postedUserId)===o;return {isCommunityModerator:i,isOwner:a}};var QB=({threshold:e,elementRef:t})=>{let[o,r]=useState(!1);return useEffect(()=>{if(!t.current)return;let n=new IntersectionObserver(i=>{i.forEach(a=>{let s=a.isIntersecting;r(s);});},{threshold:e});return n.observe(t.current),()=>{n.disconnect();}},[e,t]),{isVisible:o}};var WB={announcementBadge:"Nd"};var Fg={featuredIcon__background:"Od",featuredIcon__textColor:"Pd"};var qB=r=>{var n=r,{backgroundColor:e,textColor:t}=n,o=P(n,["backgroundColor","textColor"]);return te.createElement("svg",d({width:"73",height:"26",viewBox:"0 0 73 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),te.createElement("path",{d:"M0 0H69C71.2091 0 73 1.79086 73 4V22C73 24.2091 71.2091 26 69 26H0V0Z",className:Fg.featuredIcon__background,fill:e}),te.createElement("path",{d:"M9.12988 18V8.84033H14.9697V10.2178H10.7676V12.9282H14.6079V14.2612H10.7676V18H9.12988ZM19.5108 18.1396C17.4478 18.1396 16.1973 16.7559 16.1973 14.5469V14.5405C16.1973 12.3569 17.4605 10.9287 19.4346 10.9287C21.4088 10.9287 22.6275 12.3125 22.6275 14.4072V14.9277H17.7779C17.797 16.1719 18.4698 16.8955 19.5426 16.8955C20.3995 16.8955 20.8883 16.4639 21.0406 16.1465L21.0596 16.1021H22.564L22.545 16.1592C22.3228 17.0542 21.3961 18.1396 19.5108 18.1396ZM19.4537 12.1665C18.5714 12.1665 17.9112 12.7632 17.7906 13.8677H21.085C20.9771 12.7314 20.336 12.1665 19.4537 12.1665ZM26.0197 18.1143C24.6994 18.1143 23.7409 17.3018 23.7409 16.0386V16.0259C23.7409 14.7881 24.6867 14.0645 26.3752 13.9629L28.1588 13.855V13.2583C28.1588 12.5664 27.7082 12.1855 26.8576 12.1855C26.1339 12.1855 25.6642 12.4458 25.5055 12.9028L25.4992 12.9282H24.0075L24.0138 12.8711C24.1662 11.7031 25.2834 10.9287 26.9338 10.9287C28.7174 10.9287 29.7204 11.792 29.7204 13.2583V18H28.1588V17.0479H28.0509C27.6701 17.7207 26.9338 18.1143 26.0197 18.1143ZM25.3024 15.9624C25.3024 16.5527 25.8039 16.9019 26.5021 16.9019C27.4543 16.9019 28.1588 16.2798 28.1588 15.4546V14.896L26.5973 14.9976C25.715 15.0547 25.3024 15.3784 25.3024 15.9497V15.9624ZM34.2678 18.0317C32.6746 18.0317 32.0207 17.4985 32.0207 16.1592V12.2871H30.9416V11.062H32.0207V9.36084H33.6267V11.062H35.093V12.2871H33.6267V15.7847C33.6267 16.4766 33.8996 16.7686 34.5598 16.7686C34.782 16.7686 34.9026 16.7622 35.093 16.7432V17.9619C34.8645 18.0063 34.5725 18.0317 34.2678 18.0317ZM38.8851 18.1396C37.3236 18.1396 36.5238 17.2002 36.5238 15.5498V11.062H38.1043V15.188C38.1043 16.2607 38.5042 16.8066 39.4564 16.8066C40.4783 16.8066 41.0242 16.1465 41.0242 15.1055V11.062H42.6048V18H41.0242V16.9463H40.9163C40.5926 17.689 39.888 18.1396 38.8851 18.1396ZM44.4545 18V11.062H46.0351V12.1284H46.143C46.3778 11.3857 47.0126 10.9478 47.9267 10.9478C48.1679 10.9478 48.4154 10.9795 48.5678 11.0239V12.4395C48.3139 12.3887 48.0536 12.3506 47.7807 12.3506C46.727 12.3506 46.0351 12.979 46.0351 13.9692V18H44.4545ZM52.5757 18.1396C50.5127 18.1396 49.2622 16.7559 49.2622 14.5469V14.5405C49.2622 12.3569 50.5254 10.9287 52.4995 10.9287C54.4736 10.9287 55.6924 12.3125 55.6924 14.4072V14.9277H50.8428C50.8618 16.1719 51.5346 16.8955 52.6074 16.8955C53.4643 16.8955 53.9531 16.4639 54.1054 16.1465L54.1245 16.1021H55.6289L55.6098 16.1592C55.3877 17.0542 54.4609 18.1396 52.5757 18.1396ZM52.5185 12.1665C51.6362 12.1665 50.9761 12.7632 50.8554 13.8677H54.1499C54.042 12.7314 53.4009 12.1665 52.5185 12.1665ZM59.6939 18.1143C57.9546 18.1143 56.8502 16.7368 56.8502 14.5405V14.5278C56.8502 12.3188 57.9356 10.9478 59.6939 10.9478C60.6461 10.9478 61.4395 11.4175 61.8013 12.1665H61.9092V8.37695H63.4962V18H61.9092V16.9146H61.8013C61.4205 17.6699 60.6714 18.1143 59.6939 18.1143ZM60.189 16.7812C61.2681 16.7812 61.9346 15.9307 61.9346 14.5405V14.5278C61.9346 13.1377 61.2618 12.2808 60.189 12.2808C59.1163 12.2808 58.4561 13.1313 58.4561 14.5278V14.5405C58.4561 15.937 59.1099 16.7812 60.189 16.7812Z",className:Fg.featuredIcon__textColor,fill:t}))};var zg=({pageId:e="*",componentId:t="*"})=>{let o="announcement_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:te.createElement(oe,{"data-qa-anchor":i,defaultIcon:()=>te.createElement(qB,{className:WB.announcementBadge}),imgIcon:()=>te.createElement("img",{src:r.icon,alt:a}),configIconName:r.icon,defaultIconName:s.icon})};var KB={pinBadge__icon:"Qd"};var XB=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"29",height:"30",fill:"none",viewBox:"0 0 29 30"},e),te.createElement("path",{fill:e.fill,d:"M18.106 16.436c.575 1.547.53 3.27-.596 4.398a.74.74 0 01-1.06 0l-3.006-3.005-2.32 2.32c-.022.022-.067.022-.089.044l-1.59.53c-.2.067-.398-.132-.332-.331l.53-1.591.066-.066 2.32-2.32-3.005-3.006a.722.722 0 010-1.06c1.105-1.105 2.829-1.194 4.376-.62l2.917-2.342-.929-.928a.722.722 0 010-1.06l1.061-1.06a.74.74 0 011.06 0l6.011 6.01a.76.76 0 010 1.06l-1.06 1.06a.74.74 0 01-1.061 0l-.95-.95-2.343 2.917z"}));var Vg=({pageId:e,componentId:t})=>{let o="pin_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:te.createElement(oe,{"data-qa-anchor":i,defaultIcon:()=>te.createElement(XB,{className:KB.pinBadge__icon}),imgIcon:()=>te.createElement("img",{src:r.icon,alt:a}),defaultIconName:s.icon,configIconName:r.icon})};var r2e=({pageId:e,post:t,hideTarget:o})=>{var s;let r=useMemo(()=>(t==null?void 0:t.targetType)==="community",[t==null?void 0:t.targetType]),{community:n}=_t({communityId:t==null?void 0:t.targetId,shouldCall:r}),{goToCommunityProfilePage:i,onClickUser:a}=Be();return n?te.createElement("div",{className:he.postTitle},t.creator&&te.createElement("div",{className:he.postTitle__user__container},te.createElement(N.BodyBold,{className:he.postTitle__text},te.createElement(O,{onPress:()=>a(t.creator.userId)},"aensuthasneuthasnetusantheusnatheusnthasenuthasnteuhsanteuhsnatehusntaheusntaheu")),t.creator.isBrand?null:te.createElement(qd,{className:he.postTitle__brandIcon}),n?te.createElement(tc,{className:he.postTitle__icon}):null),n&&!o&&te.createElement(te.Fragment,null,te.createElement(O,{onPress:()=>{i(n.communityId);}},te.createElement(N.BodyBold,{className:he.postTitle__text},n.displayName)))):te.createElement("div",{className:he.postTitle__user__container},te.createElement(O,{onPress:()=>t.creator&&a(t.creator.userId)},te.createElement(N.BodyBold,{className:he.postTitle__text},(s=t.creator)==null?void 0:s.displayName)),t.creator.isBrand?null:te.createElement(qd,{className:he.postTitle__brandIcon}))};var n2e=({post:e,onImageClick:t,onVideoClick:o})=>te.createElement(te.Fragment,null,te.createElement(vg,{post:e,onImageClick:t}),te.createElement(xg,{post:e,onVideoClick:o})),hn=({pageId:e="*",post:t,onClick:o,onPostDeleted:r,category:n,hideMenu:i=!1,hideTarget:a=!1,style:s})=>{var Fr,Po,Qe,wn,Or,tn,pe;let l="post_content",{themeStyles:c}=re({pageId:e,componentId:l}),{post:p}=_i(t==null?void 0:t.postId),{setDrawerData:u,removeDrawerData:g}=qm(),[f,y]=useState(!1),[C,v]=useState(!1),[h,x]=useState(!1),[b,M]=useState(null),[I,w]=useState(null),[k,S]=useState(null),[L,D]=useState(0),{page:H}=Be(),$=useRef(null),B=useMemo(()=>{if(t!=null&&p!=null)return un(t==null?void 0:t.updatedAt).unix()>un(p==null?void 0:p.updatedAt).unix()?t:p;if(p!=null)return p;if(t!=null)return t},[t,p]);Fd({postId:B==null?void 0:B.postId,level:SubscriptionLevels.POST,shouldSubscribe:f});let z=useMemo(()=>(B==null?void 0:B.targetType)==="community",[B==null?void 0:B.targetType]),{community:V}=_t({communityId:B==null?void 0:B.targetId,shouldCall:z}),{isCommunityModerator:K}=ZB({post:B,community:V});useEffect(()=>{var ge;B!=null&&S(((ge=B.myReactions)==null?void 0:ge[0])||null);},[B==null?void 0:B.myReactions]),useEffect(()=>{B!=null&&D((B==null?void 0:B.reactionsCount)||0);},[B==null?void 0:B.reactionsCount]);let {mutateAsync:U}=useMutation({mutationFn:ge=>_(void 0,null,function*(){if(k&&k!==ge)try{yield ReactionRepository.removeReaction("post",B==null?void 0:B.postId,k);}catch(on){console.log();}return ReactionRepository.addReaction("post",B==null?void 0:B.postId,ge)}),onMutate:ge=>{y(!0),D(L+1),S(ge);}}),{mutateAsync:j}=useMutation({mutationFn:ge=>_(void 0,null,function*(){return ReactionRepository.removeReaction("post",B==null?void 0:B.postId,ge)}),onMutate:()=>{y(!0),D(Math.max(0,L-1)),S(null);}}),Z=ge=>{k?j(k):U(ge);},G=ge=>{v(!0),M(ge);},Q=()=>{v(!1),M(null);},T=ge=>{x(!0),w(ge);},F=()=>{x(!1),w(null);},ce=((Fr=B==null?void 0:B.reactions)==null?void 0:Fr.like)>0,Ke=((Po=B==null?void 0:B.reactions)==null?void 0:Po.love)>0,xt=((Qe=B==null?void 0:B.reactions)==null?void 0:Qe.fire)>0,to=((wn=B==null?void 0:B.reactions)==null?void 0:wn.happy)>0,jt=((Or=B==null?void 0:B.reactions)==null?void 0:Or.crying)>0,He=ce||Ke||xt||to||jt,{isVisible:mr}=QB({threshold:.6,elementRef:$});return useEffect(()=>{var ge;(H==null?void 0:H.type)!=="PostDetailPage"&&mr&&((ge=B.analytics)==null||ge.markAsViewed());},[B,mr,H==null?void 0:H.type]),te.createElement("div",{ref:$,className:he.postContent,style:c},(n==="announcement"||n==="pin_and_announcement")&&te.createElement(zg,{pageId:e,componentId:l}),te.createElement("div",{className:he.postContent__bar,"data-type":s},te.createElement("div",{className:he.postContent__bar__userAvatar},te.createElement(Wo,{userId:B==null?void 0:B.postedUserId})),te.createElement("div",{className:he.postContent__bar__detail},te.createElement("div",null,te.createElement(r2e,{post:B,hideTarget:a})),te.createElement("div",{className:he.postContent__bar__information__subtitle},K?te.createElement("div",{className:he.postContent__bar__information__subtitle__moderator},te.createElement(w1,{pageId:e,componentId:l}),te.createElement("span",{className:he.postContent__bar__information__subtitle__separator},"\u2022")):null,te.createElement(M1,{timestamp:B.createdAt}),B.createdAt!==B.editedAt&&te.createElement(N.Caption,{className:he.postContent__bar__information__editedTag},"(edited)"))),te.createElement("div",{className:he.postContent__wrapRightMenu},(n==="pin"||n==="pin_and_announcement")&&te.createElement(Vg,{pageId:e,componentId:l}),s==="feed"?te.createElement("div",{className:he.postContent__bar__actionButton},!i&&te.createElement(ec,{pageId:e,componentId:l,onClick:()=>u({content:te.createElement(N5,{post:B,onCloseMenu:()=>g(),pageId:e,componentId:l,onPostDeleted:r})})})):null)),te.createElement("div",{className:he.postContent__content_and_reactions},te.createElement("div",{className:he.postContent__content},te.createElement(Cg,{text:(tn=B==null?void 0:B.data)==null?void 0:tn.text,mentioned:(pe=B==null?void 0:B.metadata)==null?void 0:pe.mentioned,mentionees:B==null?void 0:B.mentioness}),B.children.length>0?te.createElement(n2e,{post:B,onImageClick:G,onVideoClick:T}):null),s==="detail"?te.createElement("div",{className:he.postContent__reactions_and_comments},te.createElement("div",{className:he.postContent__reactionsBar,onClick:()=>u({content:te.createElement(Om,{pageId:e,referenceId:B.postId,referenceType:"post"})})},He?te.createElement("div",{className:he.postContent__reactionsBar__reactions},jt&&te.createElement(yB,{className:he.postContent__reactionsBar__reactions__icon}),to&&te.createElement(hB,{className:he.postContent__reactionsBar__reactions__icon}),xt&&te.createElement(CB,{className:he.postContent__reactionsBar__reactions__icon}),Ke&&te.createElement(vB,{className:he.postContent__reactionsBar__reactions__icon}),ce&&te.createElement(xB,{className:he.postContent__reactionsBar__reactions__icon})):null,te.createElement(N.Caption,{className:he.postContent__reactionsBar__reactions__count},`${lb((B==null?void 0:B.reactionsCount)||0)} ${(B==null?void 0:B.reactionsCount)===1?"like":"likes"}`)),te.createElement(N.Caption,{className:he.postContent__commentsCount},`${(B==null?void 0:B.commentsCount)||0} ${(B==null?void 0:B.commentsCount)===1?"comment":"comments"}`)):null,!(V!=null&&V.isJoined)&&(H==null?void 0:H.type)==="CommunityProfilePage"?te.createElement(te.Fragment,null,te.createElement(N.Body,{className:he.postContent__notMember},"Join community to interact with all posts")):!(V!=null&&V.isJoined)&&(H==null?void 0:H.type)==="PostDetailPage"?null:te.createElement(te.Fragment,null,te.createElement("div",{className:he.postContent__divider}),te.createElement("div",{className:he.postContent__reactionBar},te.createElement("div",{className:he.postContent__reactionBar__leftPane},te.createElement($3,{pageId:e,componentId:l,reactionsCount:s==="feed"?L:void 0,myReaction:k,defaultIconClassName:he.postContent__reactionBar__leftPane__icon,imgIconClassName:he.postContent__reactionBar__leftPane__iconImg,onReactionClick:Z}),te.createElement(gg,{pageId:e,componentId:l,commentsCount:s==="feed"?B.commentsCount:void 0,defaultIconClassName:he.postContent__reactionBar__leftPane__icon,imgIconClassName:he.postContent__reactionBar__leftPane__iconImg,onPress:()=>o==null?void 0:o()})),te.createElement("div",{className:he.postContent__reactionBar__rightPane},te.createElement(ug,{pageId:e,componentId:l}))))),C&&typeof b=="number"?te.createElement(PB,{post:B,onClose:Q,initialImageIndex:b}):null,h&&typeof I=="number"?te.createElement(TB,{post:B,onClose:F,initialVideoIndex:I}):null)};var Et={postContentSkeleton:"Wd",postContentSkeleton__bar:"Zd",postContentSkeleton__bar__information:"_d",postContentSkeleton__content:"e0",postContentSkeleton__animation:"r0","skeleton-pulse":"Qe",postContentSkeleton__bar__userAvatar:"a0",postContentSkeleton__bar__information__title:"o0",postContentSkeleton__bar__information__subtitle:"t0",postContentSkeleton__content__bar1:"i0",postContentSkeleton__content__bar2:"l0",postContentSkeleton__content__bar3:"s0"};var ac=({pageId:e="*"})=>{let t="post_content",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=re({pageId:e,componentId:t});return te.createElement("div",{"data-qa-anchor":o,style:s,className:gr(Et.postContentSkeleton,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__bar,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__bar__userAvatar,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__bar__information,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__bar__information__title,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__bar__information__subtitle,Et.postContentSkeleton__animation)}))),te.createElement("div",{className:gr(Et.postContentSkeleton__content,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__content__bar1,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__content__bar2,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__content__bar3,Et.postContentSkeleton__animation)})))};function H1({queryParams:e,shouldCall:t=!0}){let n=pt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return d({communities:o},r)}var eL={myCommunitiesList:"c0"};var E5=({pageId:e="*"})=>{let t="my_communities",{themeStyles:o}=re({pageId:e,componentId:t}),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}});return te.createElement("div",{style:o,className:eL.myCommunitiesList},te.createElement(hs,{pageId:e,communityCollection:r,isLoading:a,onLoadMore:()=>{n&&a===!1&&i();}}))};var l2e=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"161",viewBox:"0 0 161 161",fill:"none"},te.createElement("path",{d:"M130.1 24.5H34.0996C29.6813 24.5 26.0996 28.0817 26.0996 32.5V128.5C26.0996 132.918 29.6813 136.5 34.0996 136.5H130.1C134.518 136.5 138.1 132.918 138.1 128.5V32.5C138.1 28.0817 134.518 24.5 130.1 24.5Z",fill:"#292B32"}),te.createElement("path",{d:"M43.7002 68.2H44.2002H151.7C152.628 68.2 153.519 68.5688 154.175 69.2251C154.831 69.8815 155.2 70.7718 155.2 71.7V91.7C155.2 92.6283 154.831 93.5185 154.175 94.1749C153.519 94.8313 152.628 95.2 151.7 95.2H43.7002C42.7719 95.2 41.8817 94.8313 41.2253 94.1749C40.5689 93.5185 40.2002 92.6283 40.2002 91.7V71.7C40.2002 70.7718 40.5689 69.8815 41.2253 69.2251C41.8817 68.5688 42.7719 68.2 43.7002 68.2Z",fill:"#292B32",stroke:"#40434E"}),te.createElement("path",{opacity:"0.3",d:"M90.9002 74.1H70.1002C68.7747 74.1 67.7002 75.1745 67.7002 76.5C67.7002 77.8255 68.7747 78.9 70.1002 78.9H90.9002C92.2257 78.9 93.3002 77.8255 93.3002 76.5C93.3002 75.1745 92.2257 74.1 90.9002 74.1Z",fill:"#40434E"}),te.createElement("path",{opacity:"0.15",d:"M105.3 84.5H70.1002C68.7747 84.5 67.7002 85.5745 67.7002 86.9C67.7002 88.2255 68.7747 89.3 70.1002 89.3H105.3C106.626 89.3 107.7 88.2255 107.7 86.9C107.7 85.5745 106.626 84.5 105.3 84.5Z",fill:"#40434E"}),te.createElement("path",{d:"M53.6996 89.3C57.897 89.3 61.2996 85.8974 61.2996 81.7C61.2996 77.5027 57.897 74.1 53.6996 74.1C49.5022 74.1 46.0996 77.5027 46.0996 81.7C46.0996 85.8974 49.5022 89.3 53.6996 89.3Z",fill:"#40434E"}),te.createElement("path",{d:"M9.2998 102.6H9.7998H117.3C118.228 102.6 119.118 102.969 119.775 103.625C120.431 104.282 120.8 105.172 120.8 106.1V126.1C120.8 127.028 120.431 127.919 119.775 128.575C119.118 129.231 118.228 129.6 117.3 129.6H9.2998C8.37155 129.6 7.48131 129.231 6.82493 128.575C6.16855 127.919 5.7998 127.028 5.7998 126.1V106.1C5.7998 105.172 6.16855 104.282 6.82493 103.625C7.48131 102.969 8.37155 102.6 9.2998 102.6Z",fill:"#292B32",stroke:"#40434E"}),te.createElement("path",{opacity:"0.3",d:"M56.4998 108.5H35.6998C34.3743 108.5 33.2998 109.575 33.2998 110.9C33.2998 112.225 34.3743 113.3 35.6998 113.3H56.4998C57.8253 113.3 58.8998 112.225 58.8998 110.9C58.8998 109.575 57.8253 108.5 56.4998 108.5Z",fill:"#40434E"}),te.createElement("path",{opacity:"0.15",d:"M70.8998 118.9H35.6998C34.3743 118.9 33.2998 119.975 33.2998 121.3C33.2998 122.626 34.3743 123.7 35.6998 123.7H70.8998C72.2253 123.7 73.2998 122.626 73.2998 121.3C73.2998 119.975 72.2253 118.9 70.8998 118.9Z",fill:"#40434E"}),te.createElement("path",{d:"M19.3002 123.7C23.4976 123.7 26.9002 120.297 26.9002 116.1C26.9002 111.903 23.4976 108.5 19.3002 108.5C15.1028 108.5 11.7002 111.903 11.7002 116.1C11.7002 120.297 15.1028 123.7 19.3002 123.7Z",fill:"#40434E"}),te.createElement("path",{d:"M9.2998 33.8H117.3C119.233 33.8 120.8 35.367 120.8 37.3V57.3C120.8 59.233 119.233 60.8 117.3 60.8H9.2998C7.36681 60.8 5.7998 59.233 5.7998 57.3V37.3C5.7998 35.367 7.36681 33.8 9.2998 33.8Z",fill:"#292B32",stroke:"#40434E"}),te.createElement("path",{opacity:"0.3",d:"M54.8992 39.7H34.0992C32.7737 39.7 31.6992 40.7745 31.6992 42.1C31.6992 43.4255 32.7737 44.5 34.0992 44.5H54.8992C56.2247 44.5 57.2992 43.4255 57.2992 42.1C57.2992 40.7745 56.2247 39.7 54.8992 39.7Z",fill:"#40434E"}),te.createElement("path",{opacity:"0.15",d:"M69.2992 50.1H34.0992C32.7737 50.1 31.6992 51.1745 31.6992 52.5C31.6992 53.8255 32.7737 54.9 34.0992 54.9H69.2992C70.6247 54.9 71.6992 53.8255 71.6992 52.5C71.6992 51.1745 70.6247 50.1 69.2992 50.1Z",fill:"#40434E"}),te.createElement("path",{d:"M19.3002 54.9C23.4976 54.9 26.9002 51.4974 26.9002 47.3C26.9002 43.1026 23.4976 39.7 19.3002 39.7C15.1028 39.7 11.7002 43.1026 11.7002 47.3C11.7002 51.4974 15.1028 54.9 19.3002 54.9Z",fill:"#40434E"})),m2e=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"160",viewBox:"0 0 161 160",fill:"none"},te.createElement("path",{d:"M130.452 24H34.4521C30.0339 24 26.4521 27.5817 26.4521 32V128C26.4521 132.418 30.0339 136 34.4521 136H130.452C134.87 136 138.452 132.418 138.452 128V32C138.452 27.5817 134.87 24 130.452 24Z",fill:"#EBECEF"}),te.createElement("path",{d:"M44.0522 67.7H44.5522H152.052C152.981 67.7 153.871 68.0688 154.527 68.7251C155.184 69.3815 155.552 70.2718 155.552 71.2V91.2C155.552 92.1283 155.184 93.0185 154.527 93.6749C153.871 94.3313 152.981 94.7 152.052 94.7H44.0522C43.124 94.7 42.2337 94.3313 41.5774 93.6749C40.921 93.0185 40.5522 92.1283 40.5522 91.2V71.2C40.5522 70.2718 40.921 69.3815 41.5774 68.7251C42.2337 68.0688 43.124 67.7 44.0522 67.7Z",fill:"white",stroke:"#EBECEF"}),te.createElement("path",{opacity:"0.3",d:"M91.2523 73.6H70.4522C69.1268 73.6 68.0522 74.6745 68.0522 76C68.0522 77.3255 69.1268 78.4 70.4522 78.4H91.2523C92.5777 78.4 93.6523 77.3255 93.6523 76C93.6523 74.6745 92.5777 73.6 91.2523 73.6Z",fill:"#A5A9B5"}),te.createElement("path",{opacity:"0.15",d:"M105.652 84H70.4522C69.1268 84 68.0522 85.0745 68.0522 86.4C68.0522 87.7255 69.1268 88.8 70.4522 88.8H105.652C106.978 88.8 108.052 87.7255 108.052 86.4C108.052 85.0745 106.978 84 105.652 84Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M54.0521 88.8C58.2495 88.8 61.6521 85.3974 61.6521 81.2C61.6521 77.0027 58.2495 73.6 54.0521 73.6C49.8548 73.6 46.4521 77.0027 46.4521 81.2C46.4521 85.3974 49.8548 88.8 54.0521 88.8Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M9.65234 102.1H10.1523H117.652C118.581 102.1 119.471 102.469 120.127 103.125C120.784 103.782 121.152 104.672 121.152 105.6V125.6C121.152 126.528 120.784 127.419 120.127 128.075C119.471 128.731 118.581 129.1 117.652 129.1H9.65234C8.72409 129.1 7.83385 128.731 7.17747 128.075C6.52109 127.419 6.15234 126.528 6.15234 125.6V105.6C6.15234 104.672 6.52109 103.782 7.17747 103.125C7.83385 102.469 8.72409 102.1 9.65234 102.1Z",fill:"white",stroke:"#EBECEF"}),te.createElement("path",{opacity:"0.3",d:"M56.8523 108H36.0523C34.7269 108 33.6523 109.075 33.6523 110.4C33.6523 111.725 34.7269 112.8 36.0523 112.8H56.8523C58.1778 112.8 59.2523 111.725 59.2523 110.4C59.2523 109.075 58.1778 108 56.8523 108Z",fill:"#A5A9B5"}),te.createElement("path",{opacity:"0.15",d:"M71.2523 118.4H36.0523C34.7269 118.4 33.6523 119.475 33.6523 120.8C33.6523 122.126 34.7269 123.2 36.0523 123.2H71.2523C72.5778 123.2 73.6523 122.126 73.6523 120.8C73.6523 119.475 72.5778 118.4 71.2523 118.4Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M19.6522 123.2C23.8496 123.2 27.2522 119.797 27.2522 115.6C27.2522 111.403 23.8496 108 19.6522 108C15.4549 108 12.0522 111.403 12.0522 115.6C12.0522 119.797 15.4549 123.2 19.6522 123.2Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M9.65234 33.3H117.652C119.585 33.3 121.152 34.867 121.152 36.8V56.8C121.152 58.733 119.585 60.3 117.652 60.3H9.65234C7.71935 60.3 6.15234 58.733 6.15234 56.8V36.8C6.15234 34.867 7.71935 33.3 9.65234 33.3Z",fill:"white",stroke:"#EBECEF"}),te.createElement("path",{opacity:"0.3",d:"M55.2522 39.2H34.4522C33.1268 39.2 32.0522 40.2745 32.0522 41.6C32.0522 42.9255 33.1268 44 34.4522 44H55.2522C56.5777 44 57.6522 42.9255 57.6522 41.6C57.6522 40.2745 56.5777 39.2 55.2522 39.2Z",fill:"#A5A9B5"}),te.createElement("path",{opacity:"0.15",d:"M69.6522 49.6H34.4522C33.1268 49.6 32.0522 50.6745 32.0522 52C32.0522 53.3255 33.1268 54.4 34.4522 54.4H69.6522C70.9777 54.4 72.0522 53.3255 72.0522 52C72.0522 50.6745 70.9777 49.6 69.6522 49.6Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M19.6522 54.4C23.8496 54.4 27.2522 50.9974 27.2522 46.8C27.2522 42.6026 23.8496 39.2 19.6522 39.2C15.4549 39.2 12.0522 42.6026 12.0522 46.8C12.0522 50.9974 15.4549 54.4 19.6522 54.4Z",fill:"#A5A9B5"})),Qg=({pageId:e="*",componentId:t="*"})=>{let o="illustration",{currentTheme:r,accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:o});return s?null:te.createElement(oe,{defaultIconName:a.icon,configIconName:i.icon,imgIcon:()=>te.createElement("img",{src:i.icon,alt:l,"data-qa-anchor":n}),defaultIcon:()=>te.createElement("div",{"data-qa-anchor":n},r==="light"?te.createElement(m2e,null):te.createElement(l2e,null))})};var oL={description:"n0"};function Wg({pageId:e="*",componentId:t="*"}){let o="description",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(N.Caption,{className:oL.description,style:l,"data-qa-anchor":r},n.text)}var rL={title:"d0"};function F1({pageId:e="*",componentId:t="*",titleClassName:o}){let r="title",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:te.createElement(N.Title,{className:gr(rL.title,o),style:s,"data-qa-anchor":n},i.text)}var B5={exploreCommunitiesButton:"m0",exploreCommunitiesButton__icon:"p0",exploreCommunitiesButton__text:"g0"};var y2e=e=>te.createElement("svg",d({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M7.85254 0.25C12.1338 0.25 15.6025 3.71875 15.6025 8C15.6025 12.2812 12.1338 15.75 7.85254 15.75C3.57129 15.75 0.102539 12.2812 0.102539 8C0.102539 3.71875 3.57129 0.25 7.85254 0.25ZM13.4463 5.25C12.79 3.9375 11.6963 2.90625 10.3525 2.3125C10.79 3.125 11.1338 4.125 11.3525 5.25H13.4463ZM7.85254 1.75C7.25879 1.75 6.32129 3.0625 5.85254 5.25H9.82129C9.35254 3.0625 8.41504 1.75 7.85254 1.75ZM1.60254 8C1.60254 8.4375 1.63379 8.875 1.72754 9.25H4.13379C4.10254 8.84375 4.10254 8.4375 4.10254 8C4.10254 7.59375 4.10254 7.1875 4.13379 6.75H1.72754C1.63379 7.15625 1.60254 7.59375 1.60254 8ZM2.22754 10.75C2.88379 12.0625 3.97754 13.125 5.32129 13.7188C4.88379 12.9062 4.54004 11.9062 4.32129 10.75H2.22754ZM4.32129 5.25C4.54004 4.125 4.88379 3.125 5.32129 2.3125C3.97754 2.90625 2.88379 3.9375 2.22754 5.25H4.32129ZM7.85254 14.25C8.41504 14.25 9.35254 12.9688 9.82129 10.75H5.85254C6.32129 12.9688 7.25879 14.25 7.85254 14.25ZM10.04 9.25C10.0713 8.875 10.1025 8.4375 10.1025 8C10.1025 7.5625 10.0713 7.15625 10.04 6.75H5.63379C5.60254 7.15625 5.60254 7.5625 5.60254 8C5.60254 8.4375 5.60254 8.875 5.63379 9.25H10.04ZM10.3525 13.7188C11.6963 13.125 12.79 12.0625 13.4463 10.75H11.3525C11.1338 11.9062 10.79 12.9062 10.3525 13.7188ZM11.54 9.25H13.9775C14.04 8.875 14.1025 8.4375 14.1025 8C14.1025 7.59375 14.04 7.15625 13.9775 6.75H11.54C11.5713 7.1875 11.6025 7.59375 11.6025 8C11.6025 8.4375 11.5713 8.84375 11.54 9.25Z"}));function qg({pageId:e="*",componentId:t="*"}){let o="explore_communities_button",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement("div",{className:B5.exploreCommunitiesButton,"data-qa-anchor":r,style:l},te.createElement(y2e,{className:B5.exploreCommunitiesButton__icon}),te.createElement(N.BodyBold,{className:B5.exploreCommunitiesButton__text},n.text))}var nL={createCommunityButton:"h0"};function Kg({pageId:e="*",componentId:t="*",onClick:o}){let r="create_community_button",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:r});return s?null:te.createElement("div",{className:nL.createCommunityButton,onClick:()=>o(),"data-qa-anchor":n,style:c},te.createElement(oe,{defaultIcon:()=>te.createElement(te.Fragment,null),imgIcon:()=>te.createElement("img",{src:i.icon,alt:l}),configIconName:i.icon,defaultIconName:a.icon}),te.createElement(N.Body,null,i.text))}var Jg={emptyNewsfeed:"f0",emptyNewsfeed__text:"b0"};function Xm({pageId:e="*"}){let t="empty_newsfeed",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=re({pageId:e,componentId:t});return i?null:te.createElement("div",{className:Jg.emptyNewsfeed},te.createElement(Qg,{pageId:e,componentId:t}),te.createElement("div",{className:Jg.emptyNewsfeed__text},te.createElement(F1,{pageId:e,componentId:t}),te.createElement(Wg,{pageId:e,componentId:t})),te.createElement(qg,{pageId:e,componentId:t}),te.createElement(Kg,{pageId:e,componentId:t,onClick:()=>{}}))}var U1={global_feed:"u0",global_feed__postContainer:"v0",global_feed__postSkeletonContainer:"x0",global_feed__pullToRefresh:"w0",global_feed__post__reactionBar__leftPane__icon:"y0",global_feed__post__reactionBar__leftPane__iconImg:"k0",global_feed__pullToRefresh__spinner:"j0",spin:"We",global_feed__divider:"z0",global_feed__post__divider:"X0",global_feed__post__reactionBar:"Y0",global_feed__post__reactionBar__leftPane:"C0",global_feed__post__reactionBar__rightPane:"A0",global_feed__intersection:"M0",global_feed__commentContainer:"S0"};var Jt={container:"E0",innerContainer:"I0",header:"R0",header__title:"U0",header__avatar:"B0",header__detail:"D0",content__text:"F0",content__imageContainer:"H0",content__image:"L0",footer:"Ze",footer__content__description:"T0",footer__content__headline:"V0",footer__left:"q0",footer__right:"G0",footer__content__button:"J0",footer__content__button__text:"K0",infoIcon__button:"N0",infoIcon:"O0"};var aL=({ad:e,avatarUrl:t,adImageUrl:o,themeStyles:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return te.createElement("div",{className:Jt.container,style:r},te.createElement("div",{className:Jt.innerContainer},te.createElement("div",{className:Jt.header},te.createElement("div",{className:Jt.header__avatar},te.createElement(bt,{avatarUrl:t,defaultImage:te.createElement(Am,null)})),te.createElement("div",{className:Jt.header__detail},te.createElement(N.BodyBold,{className:Jt.header__title},(l=e.advertiser)==null?void 0:l.name),te.createElement(Lm,null))),te.createElement("div",null,te.createElement(N.Body,{className:Jt.content__text},e.body),te.createElement("div",{className:Jt.content__imageContainer},te.createElement("img",{className:Jt.content__image,src:o})))),te.createElement(O,{className:Jt.infoIcon__button,onPress:()=>a(!0)},te.createElement(gn,{className:Jt.infoIcon})),te.createElement(O,{className:Jt.footer,"data-has-url":!!e.callToActionUrl,onPress:s},te.createElement("div",{className:Jt.footer__left},te.createElement(N.Body,{renderer:({typoClassName:c})=>te.createElement("div",{className:gr(c,Jt.footer__content__description)},e.description)}),te.createElement(N.BodyBold,{className:Jt.footer__content__headline},e.headline)),e.callToActionUrl?te.createElement("div",{className:Jt.footer__right},te.createElement(O,{className:Jt.footer__content__button,onPress:s},te.createElement(N.CaptionBold,{renderer:({typoClassName:c})=>te.createElement("div",{className:gr(c,Jt.footer__content__button__text)},e.callToAction)}))):null),te.createElement(e5,{ad:e,isOpen:i,onOpenChange:c=>a(c)}))};var sL=({pageId:e="*",ad:t})=>{var c,p,u,g,f,y;let o="post_content",{themeStyles:r}=re({pageId:e,componentId:o}),i=it({fileId:(p=(c=t.advertiser)==null?void 0:c.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=it({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return te.createElement(aL,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:C=>{window==null||window.open(C,"_blank");}})};var Xg=e=>(e==null?void 0:e.adId)!==void 0,L5=({pageId:e="*",componentId:t="*",items:o,isLoading:r,onFeedReachBottom:n,onPostDeleted:i})=>{let{accessibilityId:a,themeStyles:s}=re({pageId:e,componentId:t}),[l,c]=useState(null),{AmityGlobalFeedComponentBehavior:p}=It();if(Bo({node:l,onIntersect:()=>{n();}}),o.length===0&&!r)return te.createElement(Xm,{pageId:e});let u=(g,f)=>Xg(g)?f&&Xg(f)?`${f.adId}-${g.adId}`:`${f.postId}-${g.adId}`:g.postId;return te.createElement("div",{className:U1.global_feed,style:s,"data-qa-anchor":a},o.map((g,f)=>te.createElement("div",{key:u(g,o[Math.max(0,f-1)])},f!==0?te.createElement("div",{className:U1.global_feed__divider}):null,Xg(g)?te.createElement(sL,{ad:g}):te.createElement(O,{className:U1.global_feed__postContainer,onPress:()=>{var y;return (y=p==null?void 0:p.goToPostDetailPage)==null?void 0:y.call(p,{postId:g.postId})}},te.createElement(hn,{pageId:e,post:g,category:"general",style:"feed",onClick:()=>{var y;(y=p==null?void 0:p.goToPostDetailPage)==null||y.call(p,{postId:g.postId});},onPostDeleted:i})))),r?Array.from({length:2}).map((g,f)=>te.createElement("div",{key:f},te.createElement("div",{className:U1.global_feed__divider}),te.createElement("div",{className:U1.global_feed__postSkeletonContainer},te.createElement(ac,null)))):null,!r&&te.createElement("div",{ref:g=>c(g),className:U1.global_feed__intersection}))};var Ym={newsfeed:"P0",newsfeed__postList:"Q0",newsfeed__postContainer:"W0",newsfeed__pullToRefresh:"Z0",newsfeed__post__reactionBar__leftPane__icon:"_0",newsfeed__post__reactionBar__leftPane__iconImg:"em",newsfeed__pullToRefresh__spinner:"rm",spin:"_e",newsfeed__divider:"am",newsfeed__post__divider:"om",newsfeed__post__reactionBar:"tm",newsfeed__post__reactionBar__leftPane:"im",newsfeed__post__reactionBar__rightPane:"lm",newsfeed__intersection:"sm"};var k2e=e=>te.createElement("div",{className:Ym.newsfeed__pullToRefresh__spinner},te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),te.createElement("defs",null,te.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},te.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),te.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"}))))),A5=({pageId:e="*"})=>{let t="newsfeed",{themeStyles:o}=re({pageId:e,componentId:t}),r=useRef(0),[n,i]=useState(0),{itemWithAds:a,hasMore:s,isLoading:l,loadMore:c,fetch:p,refetch:u,removeItem:g}=bs();useEffect(()=>{p();},[]);let f=()=>{s&&!l&&c();};return a.length===0&&!l?te.createElement(Xm,{pageId:e}):te.createElement("div",{className:Ym.newsfeed,style:o,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{r.current=y.touches[0].clientY;},onTouchMove:y=>{let C=y.touches[0].clientY;r.current>C||i(Math.min(C-r.current,100));},onTouchEnd:y=>{r.current=0,n>=75&&u(),i(0);}},te.createElement("div",{style:{"--asc-pull-to-refresh-height":`${n}px`},className:Ym.newsfeed__pullToRefresh},te.createElement(k2e,null)),te.createElement("div",{className:Ym.newsfeed__divider}),te.createElement($m,{type:"globalFeed",pageId:e}),a.length>0&&te.createElement("div",{className:Ym.newsfeed__divider}),te.createElement(L5,{isLoading:l,items:a,pageId:e,componentId:t,onFeedReachBottom:()=>f(),onPostDeleted:y=>g(y.postId)}))};var D5={postCreationButton:"cm",postCreationButton__icon:"nm"};var N2e=e=>te.createElement("svg",d({style:{pointerEvents:"none"},width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M13.0002 5.96667C13.5314 5.96667 14.0002 6.43542 14.0002 6.96667V7.96667C14.0002 8.52917 13.5314 8.96667 13.0002 8.96667H8.50016V13.4667C8.50016 14.0292 8.03141 14.4667 7.50016 14.4667H6.50016C5.93766 14.4667 5.50016 14.0292 5.50016 13.4667V8.96667H1.00016C0.437662 8.96667 0.000162125 8.52917 0.000162125 7.96667V6.96667C0.000162125 6.43542 0.437662 5.96667 1.00016 5.96667H5.50016V1.46667C5.50016 0.935425 5.93766 0.466675 6.50016 0.466675H7.50016C8.03141 0.466675 8.50016 0.935425 8.50016 1.46667V5.96667H13.0002Z"}));function ef({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onClick:n}){let i="post_creation_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(oe,{defaultIcon:()=>te.createElement(O,{style:u,className:D5.postCreationButton,onPress:n,"data-qa-anchor":a},te.createElement(N2e,{className:gr(D5.postCreationButton__icon,o)})),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:gr(D5.postCreationButton,r),onClick:n,"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon})}var lc={globalSearchButton:"dm",globalSearchButton__icon:"mm",globalSearchButton__svg:"pm"};var B2e=e=>te.createElement("svg",d({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M15.7814 14.3104C16.0627 14.6229 16.0627 15.0917 15.7502 15.3729L14.8752 16.2479C14.5939 16.5604 14.1252 16.5604 13.8127 16.2479L10.7189 13.1542C10.5627 12.9979 10.5002 12.8104 10.5002 12.6229V12.0917C9.37516 12.9667 8.00016 13.4667 6.50016 13.4667C2.90641 13.4667 0.000162125 10.5604 0.000162125 6.96667C0.000162125 3.40417 2.90641 0.466675 6.50016 0.466675C10.0627 0.466675 13.0002 3.40417 13.0002 6.96667C13.0002 8.49792 12.4689 9.87292 11.6252 10.9667H12.1252C12.3127 10.9667 12.5002 11.0604 12.6564 11.1854L15.7814 14.3104ZM6.50016 10.9667C8.68766 10.9667 10.5002 9.18542 10.5002 6.96667C10.5002 4.77917 8.68766 2.96667 6.50016 2.96667C4.28141 2.96667 2.50016 4.77917 2.50016 6.96667C2.50016 9.18542 4.28141 10.9667 6.50016 10.9667Z"}));function tf({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n}){let i="global_search_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{style:u,"data-qa-anchor":a,className:lc.globalSearchButton,onPress:n},te.createElement(oe,{defaultIcon:()=>te.createElement("div",{className:lc.globalSearchButton__icon},te.createElement(B2e,{className:gr(lc.globalSearchButton__svg,o)})),imgIcon:()=>te.createElement("img",{style:u,src:s.icon,alt:p,className:gr(lc.globalSearchButton__icon,r),"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon}))}var dL={headerLabel:"gm"};function of({pageId:e="*",componentId:t="*"}){let o="header_label",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(N.Heading,{className:dL.headerLabel,style:l,"data-qa-anchor":r},n.text)}var H5={topNavigation:"hm",topNavigationLeftPane:"fm",topNavigationRightPane:"bm"};var $1={socialHomePage:"um",socialHomePage__topBar:"vm",socialHomePage__topNavigation:"xm",socialHomePage__tabs:"er",socialHomePage__contents:"rr",socialHomePage__createPostMenu:"wm"};function rf({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="newsfeed_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(Fn,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}function nf({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="explore_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(Fn,{pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i},a.text)}function af({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="my_communities_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(Fn,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}var F5=(r=>(r.Newsfeed="Newsfeed",r.Explore="Explore",r.MyCommunities="My communities",r))(F5||{});function sf(){let e="social_home_page",{themeStyles:t}=Re({pageId:e}),{scrollPosition:o,onScroll:r}=bs(),[n,i]=useState("Newsfeed"),[a,s]=useState(!1),l=useRef(null),c=useRef(!0);useEffect(()=>{l.current&&(l.current.scrollTop=o,setTimeout(()=>{c.current=!1;},100));},[l.current]);let p=()=>{s(g=>!g);},u=g=>{c.current||r(g);};return useEffect(()=>{let g=()=>{a&&s(!1);};a?document.addEventListener("mousedown",g):document.removeEventListener("mousedown",g);},[a]),te.createElement("div",{className:$1.socialHomePage,style:t},te.createElement("div",{className:$1.socialHomePage__topBar},te.createElement("div",{className:$1.socialHomePage__topNavigation},te.createElement(O5,{pageId:e,selectedTab:n,onClickPostCreationButton:p})),te.createElement("div",{className:$1.socialHomePage__tabs},te.createElement(rf,{pageId:e,isActive:n==="Newsfeed",onClick:()=>i("Newsfeed")}),te.createElement(nf,{pageId:e,isActive:n==="Explore",onClick:()=>i("Explore")}),te.createElement(af,{pageId:e,isActive:n==="My communities",onClick:()=>i("My communities")}))),te.createElement("div",{className:$1.socialHomePage__contents,ref:l,onScroll:u},n==="Newsfeed"&&te.createElement(A5,{pageId:e}),n==="Explore"&&te.createElement(_d,{isOpen:!1,toggleOpen:()=>{},hideSideMenu:!0}),n==="My communities"&&te.createElement(E5,{pageId:e})),a&&te.createElement("div",{className:$1.socialHomePage__createPostMenu},te.createElement(u5,{pageId:e})))}function O5({pageId:e="*",selectedTab:t,onClickPostCreationButton:o}){let r="top_navigation",{goToSocialGlobalSearchPage:n,goToMyCommunitiesSearchPage:i}=Be(),{isExcluded:a,themeStyles:s}=re({pageId:e,componentId:r}),l=()=>{switch(t){case"Newsfeed":n();break;case"Explore":break;case"My communities":i();break}};return a?null:te.createElement("div",{className:H5.topNavigation,style:s},te.createElement("div",{className:H5.topNavigationLeftPane},te.createElement(of,{pageId:e,componentId:r})),te.createElement("div",{className:H5.topNavigationRightPane},te.createElement(tf,{pageId:e,componentId:r,onPress:l}),t!=="Explore"&&te.createElement(ef,{pageId:e,componentId:r,onClick:o})))}var Ca={container:"ym",headerImageContainer:"km",headerImage:"jm",backButton:"ar",moreButton:"or",content:"zm",name:"Xm",description:"Ym",communityProfile__communityInfo__container:"Cm",divider:"Am",statCount:"Mm",statTitle:"Sm",menuButton:"Em",communityProfile__joinButton__container:"Im",communityProfile__joinButton:"Rm",communityProfile__pendingPost__container:"Um",communityProfile__menuItem:"Bm",communityProfile__privateIcon:"Dm",communityProfile__divider:"Fm"};var U5={communityTabs__container:"Hm",communityTabs__tab:"tr"};var fL=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",fill:"none",viewBox:"0 0 25 24"},te.createElement("path",{fill:"currentColor",d:"M9.219 14.5c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zm0 3.375c-.492 0-.844-.352-.844-.844 0-.457.352-.843.844-.843h3.937c.457 0 .844.386.844.843a.833.833 0 01-.844.844H9.22zm0-6.75c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zM18.5 3.25c1.23 0 2.25 1.02 2.25 2.25V19c0 1.266-1.02 2.25-2.25 2.25H7.25A2.221 2.221 0 015 19V5.5c0-1.23.984-2.25 2.25-2.25H18.5zM19.063 19V7.75H6.688V19c0 .316.246.563.562.563H18.5a.578.578 0 00.563-.563z"}));var hL=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"35",height:"34",fill:"none",viewBox:"0 0 35 34"},te.createElement("path",{fill:"currentColor",d:"M21.998 18.295c.372 2.014-.15 4.027-1.567 5.444a.833.833 0 01-1.193 0l-3.58-3.58-2.585 2.586c-.025.025-.074.025-.1.05l-1.59.795c-.224.125-.497-.149-.373-.373l.795-1.59.075-.075 2.585-2.585-3.58-3.58c-.348-.348-.348-.845 0-1.194 1.418-1.416 3.406-1.963 5.42-1.59l1.218-.92-.671-.671c-.348-.348-.348-.846 0-1.194l2.386-2.386a.833.833 0 011.194 0l6.761 6.761a.856.856 0 010 1.194l-2.386 2.386a.833.833 0 01-1.194 0l-.696-.696-.92 1.218zm-9.273-3.455l7.035 7.035c.746-1.143.845-2.635.398-3.928l2.61-3.405 1.442 1.441 1.193-1.193-5.568-5.568-1.193 1.193 1.442 1.442-3.406 2.61c-1.318-.472-2.81-.373-3.953.373z"}));var lf=({pageId:e,componentId:t="*",activeTab:o,onTabChange:r})=>{let n="community_profile_tab",{isExcluded:i,accessibilityId:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return i?null:te.createElement("div",{"data-qa-anchor":a,style:s,className:U5.communityTabs__container},te.createElement(O,{"data-is-active":o==="community_feed",onPress:()=>r("community_feed"),className:U5.communityTabs__tab},te.createElement(fL,null)),te.createElement(O,{"data-is-active":o==="community_pin",onPress:()=>r("community_pin"),className:U5.communityTabs__tab},te.createElement(hL,null)))};var dc={communityCover__container:"ir",communityCover__topBar:"Lm",communityCover__backButton:"Tm",communityCover__menuButton:"Vm"};var CL={menuButton:"qm"};function mf({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n}){let i="menu_button",{isExcluded:a,accessibilityId:s,themeStyles:l,config:c,defaultConfig:p,uiReference:u}=A({pageId:e,componentId:t,elementId:i});return a?null:te.createElement(O,{className:r,onPress:o,"data-qa-anchor":s},te.createElement(oe,{defaultIcon:()=>te.createElement(M5,{className:gr(CL.menuButton,n),style:l}),imgIcon:()=>te.createElement("img",{src:c.icon,alt:u}),defaultIconName:p.icon,configIconName:c.icon}))}var df=({pageId:e="*",componentId:t="*",image:o,onBack:r,onClickMenu:n})=>{let i="community_cover",{isExcluded:a,accessibilityId:s,themeStyles:l,config:c}=A({pageId:e,componentId:t,elementId:i}),p=o?{backgroundImage:`url(${o})`}:{background:"linear-gradient(180deg, #a5a9b5 0%, #636878 100%)"};return a?null:te.createElement("div",{className:dc.communityCover__container,"data-qa-anchor":s,style:d(d({},l),p)},te.createElement("div",{style:d({},p)}),te.createElement("div",{className:dc.communityCover__topBar},te.createElement(Mm,{defaultClassName:dc.communityCover__backButton,onPress:r}),te.createElement(mf,{className:dc.communityCover__menuButton,onClick:n})))};var cf={communityJoinButton:"Gm",joinButton:"Jm"};var xL=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 384 512",fill:"currentColor"},e),te.createElement("path",{d:`M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16
|
|
4814
|
+
`;var fa=e=>te.createElement(DB,d({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"21",viewBox:"0 0 21 21",fill:"none"},e),te.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"white",strokeWidth:"2"}),te.createElement("circle",{cx:"10.5",cy:"10.5",r:"9",fill:"none",stroke:"#1054DE",strokeWidth:"2",strokeDasharray:"46.75",strokeDashoffset:"21",strokeLinecap:"round",strokeLinejoin:"round"}));function hme(e){return e.fileId!==void 0}function nc({files:e=[],uploadedFiles:t=[],onChange:o=i=>{},onLoadingChange:r=i=>{},onError:n=i=>{}}){let[i,a]=useState([]),s=useMemo(()=>Array.isArray(e)?e:Array.from(e),[e]),l=useCallback(()=>{o({uploaded:[],uploading:[]});},[o]),c=useCallback(()=>{a([]);},[]),p=useCallback((g,f)=>{if(hme(g)){let y=t.filter(C=>C.fileId!==g.fileId);o({uploaded:y,uploading:s});}else if(f!==void 0){let y=t.filter((C,v)=>v!==f);o({uploaded:y,uploading:s});}else {let y=s.filter(C=>C.name!==g.name);o({uploaded:t,uploading:y});}},[o,t,s]);return useEffect(()=>{if(!s.length)return;function g(){return _(this,null,function*(){r(!0);try{let f=yield Promise.all(s.map(C=>_(this,null,function*(){let v=new FormData;v.append("files",C);let h=yield _(this,null,function*(){if(C.type.includes(FileType.IMAGE))return FileRepository.createImage(v);if(C.type.includes(FileType.VIDEO))return FileRepository.createVideo(v)});return h&&h.data.length>0?h.data[0]:null}))),y=[...t,...f].filter(Oe);o({uploaded:y,uploading:[]}),a([]);}catch(f){a(s.map(y=>y.name)),n(!0);}finally{r(!1);}})}g();},[s]),{allFiles:[...t,...s],uploading:s,uploaded:t,removeFile:p,reset:l,rejected:i,retry:c}}function Pg({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,uploadLoading:n,onError:i,isErrorUpload:a}){let s=nc({files:e,uploadedFiles:t,onChange:o,onLoadingChange:r,onError:i}),{allFiles:l,removeFile:c}=s;return l.length===0?null:l&&te.createElement("div",{"data-images-amount":Math.min(l.length,3),className:L1.thumbnail__container},l==null?void 0:l.map((p,u)=>{var g;return te.createElement("div",{key:u,"data-images-height":l.length>2,className:L1.thumbnail__wrapper},n?te.createElement("div",{className:L1.icon__status},te.createElement(fa,null)):a?te.createElement("div",{className:L1.icon__status},te.createElement(Zt,null)):te.createElement(te.Fragment,null,te.createElement("img",{className:L1.thumbnail,src:FileRepository.fileUrlWithSize(p==null?void 0:p.fileUrl,"medium"),alt:(g=p.attributes)==null?void 0:g.name}),te.createElement("button",{type:"reset",onClick:()=>c(p)},te.createElement(ko,{className:L1.closeIcon}))))}))}var ya={thumbnail__container:"f",thumbnail__wrapper:"Sd",thumbnail__wrapper_item_3:"Ad",thumbnail:"Md",closeIcon:"Bd",icon__status:"Ed",playIcon:"Id"};var _g=({files:e,uploadedFiles:t,onLoadingChange:o,onChange:r,uploadLoading:n,onError:i,videoThumbnail:a,removeThumbnail:s,isErrorUpload:l})=>{let c=nc({files:e,uploadedFiles:t,onChange:r,onLoadingChange:o,onError:i}),{allFiles:p,removeFile:u}=c;if(p.length===0)return null;let g=(f,y)=>{u(f,y),s(y);};return a?te.createElement("div",{"data-images-amount":Math.min(a.length,3),className:ya.thumbnail__container},a==null?void 0:a.map((f,y)=>te.createElement("div",{key:f.videoUrl,className:gr(ya.thumbnail__wrapper,a.length>2&&ya.thumbnail__wrapper_item_3)},n?te.createElement("div",{className:ya.icon__status},te.createElement(fa,null)):l?te.createElement("div",{className:ya.icon__status},te.createElement(Zt,null)):te.createElement(te.Fragment,null,te.createElement("img",{className:ya.thumbnail,src:f.thumbnail}),te.createElement("button",{type:"reset",onClick:()=>{g(f.file,y);}},te.createElement(ko,{className:ya.closeIcon})),te.createElement("div",{className:ya.playIcon},te.createElement(To,null)))))):null};var Pme=({ref:e})=>{let[t,o]=useState(void 0);return useEffect(()=>{if(e.current==null)return;let r=new ResizeObserver(n=>{for(let i of n)o(i.target.clientHeight);});return e.current&&r.observe(e.current),()=>{r.disconnect();}},[e.current]),t};function Sg({community:e,targetType:t,targetId:o}){let r="post_composer_page",{themeStyles:n}=Re({pageId:r}),i="6.75rem",a="8.5rem",s="11rem",l="14.5rem",{AmityPostComposerPageBehavior:c}=It(),{confirm:p}=et(),[u,g]=useState(i),[f]=useState(!0),y=useRef(null),C=useRef(null),{prependItem:v}=bs(),h=Pme({ref:C}),{handleSubmit:x}=useForm(),[b,M]=useState({text:"",mentioned:[],mentionees:[{type:"user",userIds:[""]}],attachments:[{fileId:"",type:"image"}]}),[I,w]=useState([]),[k,S]=useState([]),[L,D]=useState([]),[H,$]=useState([]),[B,z]=useState(!1),[V,K]=useState([]),[U,j]=useState(!1),[Z,G]=useState(!0),[Q,T]=useState(!0),[F,q]=useState(!1),[Y,ie]=useState([]),ce=useRef(null),Ke=()=>useMutation({mutationFn:pe=>_(this,null,function*(){return PostRepository.createPost(pe)}),onSuccess:pe=>{var ge;(ge=c==null?void 0:c.goToSocialHomePage)==null||ge.call(c),v(pe.data);},onError:pe=>{console.error("Failed to create post",pe);}}),{mutateAsync:xt,isPending:to,isError:jt}=Ke(),He=()=>{let pe=I.map(jo=>({type:"image",fileId:jo.fileId})),ge=k.map(jo=>({type:"video",fileId:jo.fileId})),on=[...pe,...ge];xt({targetId:o,targetType:t,data:{text:b.text},dataType:"text",metadata:{mentioned:b.mentioned},mentionees:b.mentionees,attachments:on});},mr=pe=>{M(ge=>E(d({},ge),{mentioned:pe.mentioned,text:pe.text,mentionees:pe.mentionees}));},Fr=pe=>{u===i&&pe==="0px"||g(pe);},Po=()=>{p({pageId:r,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{var pe;(pe=c==null?void 0:c.goToSocialHomePage)==null||pe.call(c);},okText:"Discard",cancelText:"Keep editing"});};useEffect(()=>{I.length>0?(G(!0),T(!1)):k.length>0&&Y.length>0?(G(!1),T(!0)):(I.length==0||Y.length==0)&&(G(!0),T(!0));},[I,k,Z,Q,Y]),useEffect(()=>{BB()?j(!0):j(!1);},[]),useEffect(()=>{g(!U&&Z&&Q||U&&Z&&!Q||U&&!Z&&Q?s:!U&&Z&&!Q||!U&&!Z&&Q?a:l);},[U,Z,Q]);let Qe=pe=>{ie(ge=>ge.filter((on,jo)=>jo!==pe));},wn=pe=>{if(pe.length+V.length>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 images. Any additional images will not be saved. ",okText:"Close"});return}pe.length>0&&(K(ge=>[...ge,...pe]),D(pe));},Or=pe=>_(this,null,function*(){let ge=Y?Y.length:0;if(pe.length+ge>10){p({pageId:r,type:"info",title:"Maximum upload limit reached",content:"You\u2019ve reached the upload limit of 10 videos. Any additional videos will not be saved. ",okText:"Close"});return}if(pe.length>0){$==null||$(pe);let on=pe.map(Ur=>({file:Ur,videoUrl:URL.createObjectURL(Ur),thumbnail:void 0})),jo=yield Promise.all(on.map(Ur=>_(this,null,function*(){let Hi=yield LB(Ur.file);return E(d({},Ur),{thumbnail:Hi})})));ie(Ur=>[...Ur,...jo]);}}),tn=u==a||u==s||u==l;return te.createElement("div",{className:jn.createPost,style:n},te.createElement("form",{onSubmit:x(He),"data-from-media":u==i,className:jn.createPost__formMediaAttachment},te.createElement("div",{className:jn.createPost__topBar},te.createElement(Nr,{pageId:r,onPress:Po}),te.createElement(pa,{pageId:r,community:e}),te.createElement(Ig,{pageId:r,onSubmit:x(He),isValid:b.text.length>0||I.length>0||k.length>0})),te.createElement(qi,{onChange:mr,communityId:o,mentionContainer:ce.current,dataValue:{data:{text:b.text}}}),te.createElement(Pg,{files:L,uploadedFiles:I,uploadLoading:B,onLoadingChange:z,onChange:({uploaded:pe,uploading:ge})=>{w(pe),D(ge);},onError:q,isErrorUpload:F}),te.createElement(_g,{files:H,uploadedFiles:k,uploadLoading:B,onLoadingChange:z,onChange:({uploaded:pe,uploading:ge})=>{S(pe),$(ge);},onError:q,isErrorUpload:F,videoThumbnail:Y,removeThumbnail:Qe}),te.createElement("div",{ref:ce,style:{"--asc-mention-bottom":`${h!=null?h:0}px`},className:jn.mentionTextInput_item})),te.createElement("div",{ref:y}),y.current?ox.createPortal(te.createElement(Drawer.Root,{snapPoints:[i,a,s,l],activeSnapPoint:u,setActiveSnapPoint:pe=>{typeof pe=="string"&&Fr(pe);},open:f,modal:!1},te.createElement(Drawer.Portal,{container:y.current},te.createElement(Drawer.Content,{className:jn.drawer__content},te.createElement("div",{"data-item-position":u===i,className:jn.createPost__notiWrap},to&&te.createElement(Os,{content:"Posting...",icon:te.createElement(fa,null),className:jn.createPost__status}),jt&&te.createElement(Os,{content:"Failed to create post",icon:te.createElement(Y1,{className:jn.createPost_infoIcon}),className:jn.createPost__status,duration:3e3})),te.createElement("div",{ref:C,className:jn.drawerContentContainer,"data-show-detail-media-attachment":tn},tn?te.createElement(C5,{pageId:r,isVisibleCamera:U,isVisibleImage:Z,isVisibleVideo:Q,onVideoFileChange:Or,onImageFileChange:wn}):te.createElement(h5,{pageId:r,isVisibleCamera:U,isVisibleImage:Z,isVisibleVideo:Q,onVideoFileChange:Or,onImageFileChange:wn}))))),y.current):null)}var ha={editPost:"Rd",editPost__topBar:"Ud",editPost__status:"Dd",editPost_infoIcon:"Fd",editPost__notiWrap:"Hd",editPost__formMediaAttachment:"Ke",drawer__content:"Ld",mentionTextInput_item:"Ne"};var OB={editPostButton:"Oe"};function Ng(r){var n=r,{pageId:e="*",componentId:t="*"}=n,o=P(n,["pageId","componentId"]);let i="edit_post_button",{config:a,isExcluded:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:i});return s?null:te.createElement(O,d({style:l,className:OB.editPostButton},o),a.text)}var UB={editPostTitle:"Td"};function Eg({pageId:e="*",componentId:t="*"}){let o="edit_post_title",{config:r,isExcluded:n,themeStyles:i}=A({pageId:e,componentId:t,elementId:o});return n?null:te.createElement("div",{style:i,className:UB.editPostTitle},r.text)}var Ame=e=>{let[t,o]=useState([]);return useEffect(()=>{function r(){return _(this,null,function*(){if(!e||(e==null?void 0:e.length)===0)return;let n=yield PostRepository.getPostByIds(e);o(n.data);})}r();},[e]),t},zB=Ame;var A1={thumbnail__container:"b",thumbnail__wrapper:"Pe",thumbnail:"Vd",thumbnail__closeButton:"qd",thumbnail__closeIcon:"Gd",icon__status:"Jd",playIcon:"Kd"};var Hme=({fieldId:e,onRemove:t,type:o})=>{let r=it({fileId:e});return r?te.createElement(te.Fragment,null,te.createElement("img",{className:A1.thumbnail,src:r,alt:"thumbnail"}),te.createElement(O,{type:"reset",onPress:()=>t(),className:A1.thumbnail__closeButton},te.createElement(ko,{className:A1.thumbnail__closeIcon})),o===PostContentType.VIDEO&&te.createElement("div",{className:A1.playIcon,"data-image":"test"},te.createElement(To,null))):null},Lg=({postMedia:e,onRemove:t})=>e.length==0?null:te.createElement("div",{"data-images-amount":Math.min(e.length,3),className:A1.thumbnail__container},e==null?void 0:e.map((o,r)=>te.createElement("div",{key:r,"data-images-height":e.length>2,className:A1.thumbnail__wrapper},te.createElement(Hme,{type:o.dataType,key:r,fieldId:o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.thumbnailFileId,onRemove:()=>t(o.dataType===PostContentType.IMAGE?o.data.fileId:o.data.videoFileId.original)}))));var Ag=(e,t)=>{if(e.length!==t.length)return !1;let o=[...e].sort(),r=[...t].sort();for(let n=0;n<o.length;n++)if(o[n]!==r[n])return !1;return !0};function Dg({post:e}){var z,V,K;let t="post_composer_page",{themeStyles:o}=Re({pageId:t}),{onBack:r}=Be(),{confirm:n}=et(),{updateItem:i}=bs(),[a,s]=useState({text:(z=e.data.text)!=null?z:"",mentioned:((V=e.metadata)==null?void 0:V.mentioned)||[],mentionees:e.mentionees,attachments:[{fileId:"",type:"image"}]}),[l,c]=useState([]),[p,u]=useState([]),[g,f]=useState([]),[y,C]=useState([]),v=useRef(null),h=()=>useMutation({mutationFn:U=>_(this,null,function*(){return yield PostRepository.editPost(e.postId,U)}),onSuccess:U=>{r(),i(U.data);},onError:U=>{console.error("Failed to edit post",U);}}),{mutateAsync:x,isPending:b,isError:M}=h(),{handleSubmit:I}=useForm(),w=zB((e==null?void 0:e.children)||[]);useEffect(()=>{let U=w.filter(Z=>Z.dataType==="image");f(U),c(U);let j=w.filter(Z=>Z.dataType==="video");C(j),u(j);},[w]);let k=U=>{c(j=>j.filter(Z=>Z.data.fileId!==U));},S=U=>{u(j=>j.filter(Z=>Z.data.videoFileId.original!==U));},L=()=>{var G,Q;let U=l.map(T=>({fileId:T.data.fileId,type:PostContentType.IMAGE})),j=p.map(T=>({fileId:T.data.videoFileId.original,type:"video"})),Z=[...U,...j];a&&x({data:{text:a.text},metadata:{mentioned:(G=a.mentioned)!=null?G:[]},mentionees:(Q=a.mentionees)!=null?Q:[],attachments:Z});},D=U=>{s(j=>E(d({},j),{mentioned:U.mentioned,text:U.text,mentionees:U.mentionees}));},H=()=>{n({pageId:t,type:"confirm",title:"Discard this post?",content:"The post will be permanently deleted. It cannot be undone.",onOk:()=>{r();},okText:"Discard",cancelText:"Keep editing"});},$=!Ag(g,l),B=!Ag(y,p);return te.createElement("div",{className:ha.editPost,style:o},te.createElement("form",{onSubmit:I(L),className:ha.editPost__formMediaAttachment},te.createElement("div",{className:ha.editPost__topBar},te.createElement(Nr,{pageId:t,onPress:H}),te.createElement(Eg,{pageId:t}),te.createElement(Ng,{pageId:t,type:"submit",onPress:()=>I(L),isDisabled:e.data.text==a.text&&!$&&!B||!(a.text.length>0||l.length>0||p.length>0)})),te.createElement(qi,{communityId:e.targetType==="community"?e.targetId:void 0,onChange:D,mentionContainer:v.current,dataValue:{data:{text:e.data.text},metadata:{mentioned:((K=e.metadata)==null?void 0:K.mentioned)||[]},mentionees:e.mentionees}}),te.createElement(Lg,{postMedia:l,onRemove:k}),te.createElement(Lg,{postMedia:p,onRemove:S}),te.createElement("div",{ref:v,className:ha.mentionTextInput_item}),te.createElement("div",{className:ha.editPost__notiWrap},b&&te.createElement(Os,{content:"Posting...",icon:te.createElement(fa,null),className:ha.editPost__status}),M&&te.createElement(Os,{content:"Failed to edit post",icon:te.createElement(Zt,{className:ha.editPost_infoIcon}),className:ha.editPost__status,duration:3e3}))))}var jme=e=>e.mode==="create";function Hg(e){if(jme(e)){let{targetId:t,targetType:o,community:r}=e;return te.createElement(Sg,{mode:"create",targetId:t,targetType:o,community:r})}else {let{post:t}=e;return te.createElement(Dg,{mode:"edit",post:t})}}var Qme=e=>te.createElement("svg",d({width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M18.3804 2.25391C19.2593 3.13281 19.2593 4.53906 18.3804 5.41797L15.7437 8.05469L14.5483 9.25L5.97021 17.8281L1.9624 18.25C1.92725 18.25 1.89209 18.25 1.85693 18.25C1.36475 18.25 0.978027 17.8281 1.04834 17.3359L1.47021 13.3281L10.0483 4.75L11.2437 3.55469L13.8804 0.917969C14.3022 0.496094 14.8999 0.25 15.4624 0.25C16.0249 0.25 16.6226 0.496094 17.0444 0.917969L18.3804 2.25391ZM5.19678 16.2109L13.353 8.08984L14.4429 7L12.2983 4.85547L11.2085 5.94531L3.0874 14.1016L2.84131 16.457L5.19678 16.2109ZM17.1851 4.22266C17.396 4.01172 17.396 3.66016 17.1851 3.44922L15.8491 2.11328C15.7085 1.97266 15.5327 1.9375 15.4624 1.9375C15.3921 1.9375 15.2163 1.97266 15.0757 2.11328L13.4937 3.66016L15.6382 5.80469L17.1851 4.22266Z"})),Wme=e=>te.createElement("svg",d({width:"16",height:"19",viewBox:"0 0 16 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M15.3608 3.0625C15.6421 3.0625 15.9233 3.34375 15.9233 3.625V4.1875C15.9233 4.50391 15.6421 4.75 15.3608 4.75H14.7983L14.0249 16.668C13.9897 17.5469 13.2163 18.25 12.3374 18.25H3.72412C2.84521 18.25 2.07178 17.5469 2.03662 16.668L1.29834 4.75H0.73584C0.419434 4.75 0.17334 4.50391 0.17334 4.1875V3.625C0.17334 3.34375 0.419434 3.0625 0.73584 3.0625H3.61865L4.81396 1.09375C5.09521 0.636719 5.72803 0.25 6.25537 0.25H9.80615C10.3335 0.25 10.9663 0.636719 11.2476 1.09375L12.4429 3.0625H15.3608ZM6.25537 1.9375L5.5874 3.0625H10.4741L9.80615 1.9375H6.25537ZM12.3374 16.5625L13.0757 4.75H2.98584L3.72412 16.5625H12.3374Z"})),qme=e=>te.createElement("svg",d({width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M12.3125 3.0625C13.543 3.0625 14.8789 2.64062 16.1445 2.07812C17.2344 1.62109 18.5 2.42969 18.5 3.625V12.0625C18.5 12.6602 18.1836 13.1875 17.7266 13.5039C16.7773 14.1016 15.2656 14.875 13.1914 14.875C10.8008 14.875 9.21875 13.75 7.49609 13.75C5.52734 13.75 4.33203 14.1719 3.03125 14.7695V17.6875C3.03125 18.0039 2.75 18.25 2.46875 18.25H1.90625C1.58984 18.25 1.34375 18.0039 1.34375 17.6875V3.41406C0.816406 3.13281 0.5 2.57031 0.5 1.9375C0.5 0.988281 1.30859 0.214844 2.29297 0.285156C3.10156 0.320312 3.76953 0.953125 3.83984 1.76172C3.83984 1.79688 3.875 1.90234 3.875 1.9375C3.875 2.11328 3.80469 2.35938 3.76953 2.5C4.54297 2.18359 5.49219 1.9375 6.61719 1.9375C9.00781 1.9375 10.5898 3.0625 12.3125 3.0625ZM16.8125 12.0625V3.625C15.6875 4.15234 13.8242 4.75 12.3125 4.75C10.2031 4.75 8.72656 3.625 6.61719 3.625C5.14062 3.625 3.76953 4.22266 3.03125 4.75V12.9062C4.12109 12.4141 5.98438 12.0625 7.49609 12.0625C9.60547 12.0625 11.082 13.1875 13.1914 13.1875C14.668 13.1875 16.0391 12.625 16.8125 12.0625Z"})),N5=({post:e,pageId:t="*",componentId:o="*",elementId:r="*",onCloseMenu:n,onPostDeleted:i})=>{let{success:a,error:s}=So(),l=useMemo(()=>(e==null?void 0:e.targetType)==="community",[e==null?void 0:e.targetType]),{community:c}=_t({communityId:e==null?void 0:e.targetId,shouldCall:l}),{isCommunityModerator:p,isOwner:u}=SB({post:e,community:c}),{AmityPostContentComponentBehavior:g}=It(),{removeDrawerData:f}=qm(),{showEditPostButton:y,showDeletePostButton:C,showReportPostButton:v}=useMemo(()=>p?u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!0,showReportPostButton:!0}:u?{showEditPostButton:!0,showDeletePostButton:!0,showReportPostButton:!1}:{showEditPostButton:!1,showDeletePostButton:!1,showReportPostButton:!0},[p,u]),{isFlaggedByMe:h,isLoading:x,mutateReportPost:b,mutateUnReportPost:M}=EB({post:e,isFlaggable:v,onReportSuccess:()=>{a({content:"Post reported."});},onReportError:()=>{s({content:"Failed to report post."});},onUnreportSuccess:()=>{a({content:"Post unreported."});},onUnreportError:()=>{s({content:"Failed to unreport post."});}}),{confirm:I}=et(),{mutateAsync:w}=useMutation({mutationFn:()=>_(void 0,null,function*(){return n(),PostRepository.hardDeletePost(e.postId)}),onSuccess:()=>{a({content:"Post deleted."}),i==null||i(e);},onError:()=>{s({content:"Failed to delete post."});}}),k=()=>{n(),I({title:"Delete post",content:"This post will be permanently deleted.",cancelText:"Cancel",okText:"Delete",onOk:()=>w(),pageId:t,componentId:o});};return te.createElement("div",{className:Vn.postMenu},v&&!x?te.createElement(O,{className:Vn.postMenu__item,onPress:()=>{h?M():b(),f();}},te.createElement(qme,{className:Vn.postMenu__reportPost__icon}),te.createElement(N.Title,{className:Vn.postMenu__reportPost__text},h?"Unreport post":"Report post")):null,y?te.createElement(O,{className:Vn.postMenu__item,onPress:()=>{var S;f(),(S=g==null?void 0:g.goToPostComposerPage)==null||S.call(g,{mode:"edit",post:e});}},te.createElement(Qme,{className:Vn.postMenu__editPost__icon}),te.createElement(N.Title,{className:Vn.postMenu__editPost__text},"Edit post")):null,C?te.createElement(O,{className:Vn.postMenu__item,onPress:()=>k()},te.createElement(Wme,{className:Vn.postMenu__deletePost__icon}),te.createElement(N.Title,{className:Vn.postMenu__deletePost__text},"Delete post")):null)};var ZB=({post:e,community:t})=>{let{currentUserId:o}=De(),r=useMemo(()=>(e==null?void 0:e.targetType)==="community"&&(e==null?void 0:e.targetId)===(t==null?void 0:t.communityId),[e==null?void 0:e.targetType,t==null?void 0:t.communityId]),{moderators:n}=rm({communityId:t==null?void 0:t.communityId,shouldCall:r}),i=useMemo(()=>r?n.some(s=>s.userId===(e==null?void 0:e.postedUserId)):!1,[n,r,e==null?void 0:e.postedUserId]),a=(e==null?void 0:e.postedUserId)===o;return {isCommunityModerator:i,isOwner:a}};var QB=({threshold:e,elementRef:t})=>{let[o,r]=useState(!1);return useEffect(()=>{if(!t.current)return;let n=new IntersectionObserver(i=>{i.forEach(a=>{let s=a.isIntersecting;r(s);});},{threshold:e});return n.observe(t.current),()=>{n.disconnect();}},[e,t]),{isVisible:o}};var WB={announcementBadge:"Nd"};var Fg={featuredIcon__background:"Od",featuredIcon__textColor:"Pd"};var qB=r=>{var n=r,{backgroundColor:e,textColor:t}=n,o=P(n,["backgroundColor","textColor"]);return te.createElement("svg",d({width:"73",height:"26",viewBox:"0 0 73 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o),te.createElement("path",{d:"M0 0H69C71.2091 0 73 1.79086 73 4V22C73 24.2091 71.2091 26 69 26H0V0Z",className:Fg.featuredIcon__background,fill:e}),te.createElement("path",{d:"M9.12988 18V8.84033H14.9697V10.2178H10.7676V12.9282H14.6079V14.2612H10.7676V18H9.12988ZM19.5108 18.1396C17.4478 18.1396 16.1973 16.7559 16.1973 14.5469V14.5405C16.1973 12.3569 17.4605 10.9287 19.4346 10.9287C21.4088 10.9287 22.6275 12.3125 22.6275 14.4072V14.9277H17.7779C17.797 16.1719 18.4698 16.8955 19.5426 16.8955C20.3995 16.8955 20.8883 16.4639 21.0406 16.1465L21.0596 16.1021H22.564L22.545 16.1592C22.3228 17.0542 21.3961 18.1396 19.5108 18.1396ZM19.4537 12.1665C18.5714 12.1665 17.9112 12.7632 17.7906 13.8677H21.085C20.9771 12.7314 20.336 12.1665 19.4537 12.1665ZM26.0197 18.1143C24.6994 18.1143 23.7409 17.3018 23.7409 16.0386V16.0259C23.7409 14.7881 24.6867 14.0645 26.3752 13.9629L28.1588 13.855V13.2583C28.1588 12.5664 27.7082 12.1855 26.8576 12.1855C26.1339 12.1855 25.6642 12.4458 25.5055 12.9028L25.4992 12.9282H24.0075L24.0138 12.8711C24.1662 11.7031 25.2834 10.9287 26.9338 10.9287C28.7174 10.9287 29.7204 11.792 29.7204 13.2583V18H28.1588V17.0479H28.0509C27.6701 17.7207 26.9338 18.1143 26.0197 18.1143ZM25.3024 15.9624C25.3024 16.5527 25.8039 16.9019 26.5021 16.9019C27.4543 16.9019 28.1588 16.2798 28.1588 15.4546V14.896L26.5973 14.9976C25.715 15.0547 25.3024 15.3784 25.3024 15.9497V15.9624ZM34.2678 18.0317C32.6746 18.0317 32.0207 17.4985 32.0207 16.1592V12.2871H30.9416V11.062H32.0207V9.36084H33.6267V11.062H35.093V12.2871H33.6267V15.7847C33.6267 16.4766 33.8996 16.7686 34.5598 16.7686C34.782 16.7686 34.9026 16.7622 35.093 16.7432V17.9619C34.8645 18.0063 34.5725 18.0317 34.2678 18.0317ZM38.8851 18.1396C37.3236 18.1396 36.5238 17.2002 36.5238 15.5498V11.062H38.1043V15.188C38.1043 16.2607 38.5042 16.8066 39.4564 16.8066C40.4783 16.8066 41.0242 16.1465 41.0242 15.1055V11.062H42.6048V18H41.0242V16.9463H40.9163C40.5926 17.689 39.888 18.1396 38.8851 18.1396ZM44.4545 18V11.062H46.0351V12.1284H46.143C46.3778 11.3857 47.0126 10.9478 47.9267 10.9478C48.1679 10.9478 48.4154 10.9795 48.5678 11.0239V12.4395C48.3139 12.3887 48.0536 12.3506 47.7807 12.3506C46.727 12.3506 46.0351 12.979 46.0351 13.9692V18H44.4545ZM52.5757 18.1396C50.5127 18.1396 49.2622 16.7559 49.2622 14.5469V14.5405C49.2622 12.3569 50.5254 10.9287 52.4995 10.9287C54.4736 10.9287 55.6924 12.3125 55.6924 14.4072V14.9277H50.8428C50.8618 16.1719 51.5346 16.8955 52.6074 16.8955C53.4643 16.8955 53.9531 16.4639 54.1054 16.1465L54.1245 16.1021H55.6289L55.6098 16.1592C55.3877 17.0542 54.4609 18.1396 52.5757 18.1396ZM52.5185 12.1665C51.6362 12.1665 50.9761 12.7632 50.8554 13.8677H54.1499C54.042 12.7314 53.4009 12.1665 52.5185 12.1665ZM59.6939 18.1143C57.9546 18.1143 56.8502 16.7368 56.8502 14.5405V14.5278C56.8502 12.3188 57.9356 10.9478 59.6939 10.9478C60.6461 10.9478 61.4395 11.4175 61.8013 12.1665H61.9092V8.37695H63.4962V18H61.9092V16.9146H61.8013C61.4205 17.6699 60.6714 18.1143 59.6939 18.1143ZM60.189 16.7812C61.2681 16.7812 61.9346 15.9307 61.9346 14.5405V14.5278C61.9346 13.1377 61.2618 12.2808 60.189 12.2808C59.1163 12.2808 58.4561 13.1313 58.4561 14.5278V14.5405C58.4561 15.937 59.1099 16.7812 60.189 16.7812Z",className:Fg.featuredIcon__textColor,fill:t}))};var zg=({pageId:e="*",componentId:t="*"})=>{let o="announcement_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:te.createElement(oe,{"data-qa-anchor":i,defaultIcon:()=>te.createElement(qB,{className:WB.announcementBadge}),imgIcon:()=>te.createElement("img",{src:r.icon,alt:a}),configIconName:r.icon,defaultIconName:s.icon})};var KB={pinBadge__icon:"Qd"};var XB=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"29",height:"30",fill:"none",viewBox:"0 0 29 30"},e),te.createElement("path",{fill:e.fill,d:"M18.106 16.436c.575 1.547.53 3.27-.596 4.398a.74.74 0 01-1.06 0l-3.006-3.005-2.32 2.32c-.022.022-.067.022-.089.044l-1.59.53c-.2.067-.398-.132-.332-.331l.53-1.591.066-.066 2.32-2.32-3.005-3.006a.722.722 0 010-1.06c1.105-1.105 2.829-1.194 4.376-.62l2.917-2.342-.929-.928a.722.722 0 010-1.06l1.061-1.06a.74.74 0 011.06 0l6.011 6.01a.76.76 0 010 1.06l-1.06 1.06a.74.74 0 01-1.061 0l-.95-.95-2.343 2.917z"}));var Vg=({pageId:e,componentId:t})=>{let o="pin_badge",{config:r,isExcluded:n,accessibilityId:i,uiReference:a,defaultConfig:s}=A({pageId:e,componentId:t,elementId:o});return n?null:te.createElement(oe,{"data-qa-anchor":i,defaultIcon:()=>te.createElement(XB,{className:KB.pinBadge__icon}),imgIcon:()=>te.createElement("img",{src:r.icon,alt:a}),defaultIconName:s.icon,configIconName:r.icon})};var r2e=({pageId:e,post:t,hideTarget:o})=>{var s;let r=useMemo(()=>(t==null?void 0:t.targetType)==="community",[t==null?void 0:t.targetType]),{community:n}=_t({communityId:t==null?void 0:t.targetId,shouldCall:r}),{goToCommunityProfilePage:i,onClickUser:a}=Be();return n?te.createElement("div",{className:he.postTitle},t.creator&&te.createElement("div",{className:he.postTitle__user__container},te.createElement(N.BodyBold,{className:he.postTitle__text},te.createElement(O,{onPress:()=>a(t.creator.userId)},"aensuthasneuthasnetusantheusnatheusnthasenuthasnteuhsanteuhsnatehusntaheusntaheu")),t.creator.isBrand?null:te.createElement(qd,{className:he.postTitle__brandIcon}),n?te.createElement(tc,{className:he.postTitle__icon}):null),n&&!o&&te.createElement(te.Fragment,null,te.createElement(O,{onPress:()=>{i(n.communityId);}},te.createElement(N.BodyBold,{className:he.postTitle__text},n.displayName)))):te.createElement("div",{className:he.postTitle__user__container},te.createElement(O,{onPress:()=>t.creator&&a(t.creator.userId)},te.createElement(N.BodyBold,{className:he.postTitle__text},(s=t.creator)==null?void 0:s.displayName)),t.creator.isBrand?null:te.createElement(qd,{className:he.postTitle__brandIcon}))};var n2e=({post:e,onImageClick:t,onVideoClick:o})=>te.createElement(te.Fragment,null,te.createElement(vg,{post:e,onImageClick:t}),te.createElement(xg,{post:e,onVideoClick:o})),hn=({pageId:e="*",post:t,onClick:o,onPostDeleted:r,category:n,hideMenu:i=!1,hideTarget:a=!1,style:s})=>{var Fr,Po,Qe,wn,Or,tn,pe;let l="post_content",{themeStyles:c}=re({pageId:e,componentId:l}),{post:p}=_i(t==null?void 0:t.postId),{setDrawerData:u,removeDrawerData:g}=qm(),[f,y]=useState(!1),[C,v]=useState(!1),[h,x]=useState(!1),[b,M]=useState(null),[I,w]=useState(null),[k,S]=useState(null),[L,D]=useState(0),{page:H}=Be(),$=useRef(null),B=useMemo(()=>{if(t!=null&&p!=null)return un(t==null?void 0:t.updatedAt).unix()>un(p==null?void 0:p.updatedAt).unix()?t:p;if(p!=null)return p;if(t!=null)return t},[t,p]);Fd({postId:B==null?void 0:B.postId,level:SubscriptionLevels.POST,shouldSubscribe:f});let z=useMemo(()=>(B==null?void 0:B.targetType)==="community",[B==null?void 0:B.targetType]),{community:V}=_t({communityId:B==null?void 0:B.targetId,shouldCall:z}),{isCommunityModerator:K}=ZB({post:B,community:V});useEffect(()=>{var ge;B!=null&&S(((ge=B.myReactions)==null?void 0:ge[0])||null);},[B==null?void 0:B.myReactions]),useEffect(()=>{B!=null&&D((B==null?void 0:B.reactionsCount)||0);},[B==null?void 0:B.reactionsCount]);let {mutateAsync:U}=useMutation({mutationFn:ge=>_(void 0,null,function*(){if(k&&k!==ge)try{yield ReactionRepository.removeReaction("post",B==null?void 0:B.postId,k);}catch(on){console.log();}return ReactionRepository.addReaction("post",B==null?void 0:B.postId,ge)}),onMutate:ge=>{y(!0),D(L+1),S(ge);}}),{mutateAsync:j}=useMutation({mutationFn:ge=>_(void 0,null,function*(){return ReactionRepository.removeReaction("post",B==null?void 0:B.postId,ge)}),onMutate:()=>{y(!0),D(Math.max(0,L-1)),S(null);}}),Z=ge=>{k?j(k):U(ge);},G=ge=>{v(!0),M(ge);},Q=()=>{v(!1),M(null);},T=ge=>{x(!0),w(ge);},F=()=>{x(!1),w(null);},ce=((Fr=B==null?void 0:B.reactions)==null?void 0:Fr.like)>0,Ke=((Po=B==null?void 0:B.reactions)==null?void 0:Po.love)>0,xt=((Qe=B==null?void 0:B.reactions)==null?void 0:Qe.fire)>0,to=((wn=B==null?void 0:B.reactions)==null?void 0:wn.happy)>0,jt=((Or=B==null?void 0:B.reactions)==null?void 0:Or.crying)>0,He=ce||Ke||xt||to||jt,{isVisible:mr}=QB({threshold:.6,elementRef:$});return useEffect(()=>{var ge;(H==null?void 0:H.type)!=="PostDetailPage"&&mr&&((ge=B.analytics)==null||ge.markAsViewed());},[B,mr,H==null?void 0:H.type]),te.createElement("div",{ref:$,className:he.postContent,style:c},(n==="announcement"||n==="pin_and_announcement")&&te.createElement(zg,{pageId:e,componentId:l}),te.createElement("div",{className:he.postContent__bar,"data-type":s},te.createElement("div",{className:he.postContent__bar__userAvatar},te.createElement(Wo,{userId:B==null?void 0:B.postedUserId})),te.createElement("div",{className:he.postContent__bar__detail},te.createElement("div",null,te.createElement(r2e,{post:B,hideTarget:a})),te.createElement("div",{className:he.postContent__bar__information__subtitle},K?te.createElement("div",{className:he.postContent__bar__information__subtitle__moderator},te.createElement(w1,{pageId:e,componentId:l}),te.createElement("span",{className:he.postContent__bar__information__subtitle__separator},"\u2022")):null,te.createElement(M1,{timestamp:B.createdAt}),B.createdAt!==B.editedAt&&te.createElement(N.Caption,{className:he.postContent__bar__information__editedTag},"(edited)"))),te.createElement("div",{className:he.postContent__wrapRightMenu},(n==="pin"||n==="pin_and_announcement")&&te.createElement(Vg,{pageId:e,componentId:l}),s==="feed"?te.createElement("div",{className:he.postContent__bar__actionButton},!i&&te.createElement(ec,{pageId:e,componentId:l,onClick:()=>u({content:te.createElement(N5,{post:B,onCloseMenu:()=>g(),pageId:e,componentId:l,onPostDeleted:r})})})):null)),te.createElement("div",{className:he.postContent__content_and_reactions},te.createElement("div",{className:he.postContent__content},te.createElement(Cg,{text:(tn=B==null?void 0:B.data)==null?void 0:tn.text,mentioned:(pe=B==null?void 0:B.metadata)==null?void 0:pe.mentioned,mentionees:B==null?void 0:B.mentioness}),B.children.length>0?te.createElement(n2e,{post:B,onImageClick:G,onVideoClick:T}):null),s==="detail"?te.createElement("div",{className:he.postContent__reactions_and_comments},te.createElement("div",{className:he.postContent__reactionsBar,onClick:()=>u({content:te.createElement(Om,{pageId:e,referenceId:B.postId,referenceType:"post"})})},He?te.createElement("div",{className:he.postContent__reactionsBar__reactions},jt&&te.createElement(yB,{className:he.postContent__reactionsBar__reactions__icon}),to&&te.createElement(hB,{className:he.postContent__reactionsBar__reactions__icon}),xt&&te.createElement(CB,{className:he.postContent__reactionsBar__reactions__icon}),Ke&&te.createElement(vB,{className:he.postContent__reactionsBar__reactions__icon}),ce&&te.createElement(xB,{className:he.postContent__reactionsBar__reactions__icon})):null,te.createElement(N.Caption,{className:he.postContent__reactionsBar__reactions__count},`${lb((B==null?void 0:B.reactionsCount)||0)} ${(B==null?void 0:B.reactionsCount)===1?"like":"likes"}`)),te.createElement(N.Caption,{className:he.postContent__commentsCount},`${(B==null?void 0:B.commentsCount)||0} ${(B==null?void 0:B.commentsCount)===1?"comment":"comments"}`)):null,!(V!=null&&V.isJoined)&&(H==null?void 0:H.type)==="CommunityProfilePage"?te.createElement(te.Fragment,null,te.createElement(N.Body,{className:he.postContent__notMember},"Join community to interact with all posts")):!(V!=null&&V.isJoined)&&(H==null?void 0:H.type)==="PostDetailPage"?null:te.createElement(te.Fragment,null,te.createElement("div",{className:he.postContent__divider}),te.createElement("div",{className:he.postContent__reactionBar},te.createElement("div",{className:he.postContent__reactionBar__leftPane},te.createElement($3,{pageId:e,componentId:l,reactionsCount:s==="feed"?L:void 0,myReaction:k,defaultIconClassName:he.postContent__reactionBar__leftPane__icon,imgIconClassName:he.postContent__reactionBar__leftPane__iconImg,onReactionClick:Z}),te.createElement(gg,{pageId:e,componentId:l,commentsCount:s==="feed"?B.commentsCount:void 0,defaultIconClassName:he.postContent__reactionBar__leftPane__icon,imgIconClassName:he.postContent__reactionBar__leftPane__iconImg,onPress:()=>o==null?void 0:o()})),te.createElement("div",{className:he.postContent__reactionBar__rightPane},te.createElement(ug,{pageId:e,componentId:l}))))),C&&typeof b=="number"?te.createElement(PB,{post:B,onClose:Q,initialImageIndex:b}):null,h&&typeof I=="number"?te.createElement(TB,{post:B,onClose:F,initialVideoIndex:I}):null)};var Et={postContentSkeleton:"Wd",postContentSkeleton__bar:"Zd",postContentSkeleton__bar__information:"_d",postContentSkeleton__content:"e0",postContentSkeleton__animation:"r0","skeleton-pulse":"Qe",postContentSkeleton__bar__userAvatar:"a0",postContentSkeleton__bar__information__title:"o0",postContentSkeleton__bar__information__subtitle:"t0",postContentSkeleton__content__bar1:"i0",postContentSkeleton__content__bar2:"l0",postContentSkeleton__content__bar3:"s0"};var ac=({pageId:e="*"})=>{let t="post_content",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=re({pageId:e,componentId:t});return te.createElement("div",{"data-qa-anchor":o,style:s,className:gr(Et.postContentSkeleton,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__bar,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__bar__userAvatar,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__bar__information,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__bar__information__title,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__bar__information__subtitle,Et.postContentSkeleton__animation)}))),te.createElement("div",{className:gr(Et.postContentSkeleton__content,Et.postContentSkeleton__animation)},te.createElement("div",{className:gr(Et.postContentSkeleton__content__bar1,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__content__bar2,Et.postContentSkeleton__animation)}),te.createElement("div",{className:gr(Et.postContentSkeleton__content__bar3,Et.postContentSkeleton__animation)})))};function H1({queryParams:e,shouldCall:t=!0}){let n=pt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return d({communities:o},r)}var eL={myCommunitiesList:"c0"};var E5=({pageId:e="*"})=>{let t="my_communities",{themeStyles:o}=re({pageId:e,componentId:t}),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}});return te.createElement("div",{style:o,className:eL.myCommunitiesList},te.createElement(hs,{pageId:e,communityCollection:r,isLoading:a,onLoadMore:()=>{n&&a===!1&&i();}}))};var l2e=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"161",viewBox:"0 0 161 161",fill:"none"},te.createElement("path",{d:"M130.1 24.5H34.0996C29.6813 24.5 26.0996 28.0817 26.0996 32.5V128.5C26.0996 132.918 29.6813 136.5 34.0996 136.5H130.1C134.518 136.5 138.1 132.918 138.1 128.5V32.5C138.1 28.0817 134.518 24.5 130.1 24.5Z",fill:"#292B32"}),te.createElement("path",{d:"M43.7002 68.2H44.2002H151.7C152.628 68.2 153.519 68.5688 154.175 69.2251C154.831 69.8815 155.2 70.7718 155.2 71.7V91.7C155.2 92.6283 154.831 93.5185 154.175 94.1749C153.519 94.8313 152.628 95.2 151.7 95.2H43.7002C42.7719 95.2 41.8817 94.8313 41.2253 94.1749C40.5689 93.5185 40.2002 92.6283 40.2002 91.7V71.7C40.2002 70.7718 40.5689 69.8815 41.2253 69.2251C41.8817 68.5688 42.7719 68.2 43.7002 68.2Z",fill:"#292B32",stroke:"#40434E"}),te.createElement("path",{opacity:"0.3",d:"M90.9002 74.1H70.1002C68.7747 74.1 67.7002 75.1745 67.7002 76.5C67.7002 77.8255 68.7747 78.9 70.1002 78.9H90.9002C92.2257 78.9 93.3002 77.8255 93.3002 76.5C93.3002 75.1745 92.2257 74.1 90.9002 74.1Z",fill:"#40434E"}),te.createElement("path",{opacity:"0.15",d:"M105.3 84.5H70.1002C68.7747 84.5 67.7002 85.5745 67.7002 86.9C67.7002 88.2255 68.7747 89.3 70.1002 89.3H105.3C106.626 89.3 107.7 88.2255 107.7 86.9C107.7 85.5745 106.626 84.5 105.3 84.5Z",fill:"#40434E"}),te.createElement("path",{d:"M53.6996 89.3C57.897 89.3 61.2996 85.8974 61.2996 81.7C61.2996 77.5027 57.897 74.1 53.6996 74.1C49.5022 74.1 46.0996 77.5027 46.0996 81.7C46.0996 85.8974 49.5022 89.3 53.6996 89.3Z",fill:"#40434E"}),te.createElement("path",{d:"M9.2998 102.6H9.7998H117.3C118.228 102.6 119.118 102.969 119.775 103.625C120.431 104.282 120.8 105.172 120.8 106.1V126.1C120.8 127.028 120.431 127.919 119.775 128.575C119.118 129.231 118.228 129.6 117.3 129.6H9.2998C8.37155 129.6 7.48131 129.231 6.82493 128.575C6.16855 127.919 5.7998 127.028 5.7998 126.1V106.1C5.7998 105.172 6.16855 104.282 6.82493 103.625C7.48131 102.969 8.37155 102.6 9.2998 102.6Z",fill:"#292B32",stroke:"#40434E"}),te.createElement("path",{opacity:"0.3",d:"M56.4998 108.5H35.6998C34.3743 108.5 33.2998 109.575 33.2998 110.9C33.2998 112.225 34.3743 113.3 35.6998 113.3H56.4998C57.8253 113.3 58.8998 112.225 58.8998 110.9C58.8998 109.575 57.8253 108.5 56.4998 108.5Z",fill:"#40434E"}),te.createElement("path",{opacity:"0.15",d:"M70.8998 118.9H35.6998C34.3743 118.9 33.2998 119.975 33.2998 121.3C33.2998 122.626 34.3743 123.7 35.6998 123.7H70.8998C72.2253 123.7 73.2998 122.626 73.2998 121.3C73.2998 119.975 72.2253 118.9 70.8998 118.9Z",fill:"#40434E"}),te.createElement("path",{d:"M19.3002 123.7C23.4976 123.7 26.9002 120.297 26.9002 116.1C26.9002 111.903 23.4976 108.5 19.3002 108.5C15.1028 108.5 11.7002 111.903 11.7002 116.1C11.7002 120.297 15.1028 123.7 19.3002 123.7Z",fill:"#40434E"}),te.createElement("path",{d:"M9.2998 33.8H117.3C119.233 33.8 120.8 35.367 120.8 37.3V57.3C120.8 59.233 119.233 60.8 117.3 60.8H9.2998C7.36681 60.8 5.7998 59.233 5.7998 57.3V37.3C5.7998 35.367 7.36681 33.8 9.2998 33.8Z",fill:"#292B32",stroke:"#40434E"}),te.createElement("path",{opacity:"0.3",d:"M54.8992 39.7H34.0992C32.7737 39.7 31.6992 40.7745 31.6992 42.1C31.6992 43.4255 32.7737 44.5 34.0992 44.5H54.8992C56.2247 44.5 57.2992 43.4255 57.2992 42.1C57.2992 40.7745 56.2247 39.7 54.8992 39.7Z",fill:"#40434E"}),te.createElement("path",{opacity:"0.15",d:"M69.2992 50.1H34.0992C32.7737 50.1 31.6992 51.1745 31.6992 52.5C31.6992 53.8255 32.7737 54.9 34.0992 54.9H69.2992C70.6247 54.9 71.6992 53.8255 71.6992 52.5C71.6992 51.1745 70.6247 50.1 69.2992 50.1Z",fill:"#40434E"}),te.createElement("path",{d:"M19.3002 54.9C23.4976 54.9 26.9002 51.4974 26.9002 47.3C26.9002 43.1026 23.4976 39.7 19.3002 39.7C15.1028 39.7 11.7002 43.1026 11.7002 47.3C11.7002 51.4974 15.1028 54.9 19.3002 54.9Z",fill:"#40434E"})),m2e=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"161",height:"160",viewBox:"0 0 161 160",fill:"none"},te.createElement("path",{d:"M130.452 24H34.4521C30.0339 24 26.4521 27.5817 26.4521 32V128C26.4521 132.418 30.0339 136 34.4521 136H130.452C134.87 136 138.452 132.418 138.452 128V32C138.452 27.5817 134.87 24 130.452 24Z",fill:"#EBECEF"}),te.createElement("path",{d:"M44.0522 67.7H44.5522H152.052C152.981 67.7 153.871 68.0688 154.527 68.7251C155.184 69.3815 155.552 70.2718 155.552 71.2V91.2C155.552 92.1283 155.184 93.0185 154.527 93.6749C153.871 94.3313 152.981 94.7 152.052 94.7H44.0522C43.124 94.7 42.2337 94.3313 41.5774 93.6749C40.921 93.0185 40.5522 92.1283 40.5522 91.2V71.2C40.5522 70.2718 40.921 69.3815 41.5774 68.7251C42.2337 68.0688 43.124 67.7 44.0522 67.7Z",fill:"white",stroke:"#EBECEF"}),te.createElement("path",{opacity:"0.3",d:"M91.2523 73.6H70.4522C69.1268 73.6 68.0522 74.6745 68.0522 76C68.0522 77.3255 69.1268 78.4 70.4522 78.4H91.2523C92.5777 78.4 93.6523 77.3255 93.6523 76C93.6523 74.6745 92.5777 73.6 91.2523 73.6Z",fill:"#A5A9B5"}),te.createElement("path",{opacity:"0.15",d:"M105.652 84H70.4522C69.1268 84 68.0522 85.0745 68.0522 86.4C68.0522 87.7255 69.1268 88.8 70.4522 88.8H105.652C106.978 88.8 108.052 87.7255 108.052 86.4C108.052 85.0745 106.978 84 105.652 84Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M54.0521 88.8C58.2495 88.8 61.6521 85.3974 61.6521 81.2C61.6521 77.0027 58.2495 73.6 54.0521 73.6C49.8548 73.6 46.4521 77.0027 46.4521 81.2C46.4521 85.3974 49.8548 88.8 54.0521 88.8Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M9.65234 102.1H10.1523H117.652C118.581 102.1 119.471 102.469 120.127 103.125C120.784 103.782 121.152 104.672 121.152 105.6V125.6C121.152 126.528 120.784 127.419 120.127 128.075C119.471 128.731 118.581 129.1 117.652 129.1H9.65234C8.72409 129.1 7.83385 128.731 7.17747 128.075C6.52109 127.419 6.15234 126.528 6.15234 125.6V105.6C6.15234 104.672 6.52109 103.782 7.17747 103.125C7.83385 102.469 8.72409 102.1 9.65234 102.1Z",fill:"white",stroke:"#EBECEF"}),te.createElement("path",{opacity:"0.3",d:"M56.8523 108H36.0523C34.7269 108 33.6523 109.075 33.6523 110.4C33.6523 111.725 34.7269 112.8 36.0523 112.8H56.8523C58.1778 112.8 59.2523 111.725 59.2523 110.4C59.2523 109.075 58.1778 108 56.8523 108Z",fill:"#A5A9B5"}),te.createElement("path",{opacity:"0.15",d:"M71.2523 118.4H36.0523C34.7269 118.4 33.6523 119.475 33.6523 120.8C33.6523 122.126 34.7269 123.2 36.0523 123.2H71.2523C72.5778 123.2 73.6523 122.126 73.6523 120.8C73.6523 119.475 72.5778 118.4 71.2523 118.4Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M19.6522 123.2C23.8496 123.2 27.2522 119.797 27.2522 115.6C27.2522 111.403 23.8496 108 19.6522 108C15.4549 108 12.0522 111.403 12.0522 115.6C12.0522 119.797 15.4549 123.2 19.6522 123.2Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M9.65234 33.3H117.652C119.585 33.3 121.152 34.867 121.152 36.8V56.8C121.152 58.733 119.585 60.3 117.652 60.3H9.65234C7.71935 60.3 6.15234 58.733 6.15234 56.8V36.8C6.15234 34.867 7.71935 33.3 9.65234 33.3Z",fill:"white",stroke:"#EBECEF"}),te.createElement("path",{opacity:"0.3",d:"M55.2522 39.2H34.4522C33.1268 39.2 32.0522 40.2745 32.0522 41.6C32.0522 42.9255 33.1268 44 34.4522 44H55.2522C56.5777 44 57.6522 42.9255 57.6522 41.6C57.6522 40.2745 56.5777 39.2 55.2522 39.2Z",fill:"#A5A9B5"}),te.createElement("path",{opacity:"0.15",d:"M69.6522 49.6H34.4522C33.1268 49.6 32.0522 50.6745 32.0522 52C32.0522 53.3255 33.1268 54.4 34.4522 54.4H69.6522C70.9777 54.4 72.0522 53.3255 72.0522 52C72.0522 50.6745 70.9777 49.6 69.6522 49.6Z",fill:"#A5A9B5"}),te.createElement("path",{d:"M19.6522 54.4C23.8496 54.4 27.2522 50.9974 27.2522 46.8C27.2522 42.6026 23.8496 39.2 19.6522 39.2C15.4549 39.2 12.0522 42.6026 12.0522 46.8C12.0522 50.9974 15.4549 54.4 19.6522 54.4Z",fill:"#A5A9B5"})),Qg=({pageId:e="*",componentId:t="*"})=>{let o="illustration",{currentTheme:r,accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:o});return s?null:te.createElement(oe,{defaultIconName:a.icon,configIconName:i.icon,imgIcon:()=>te.createElement("img",{src:i.icon,alt:l,"data-qa-anchor":n}),defaultIcon:()=>te.createElement("div",{"data-qa-anchor":n},r==="light"?te.createElement(m2e,null):te.createElement(l2e,null))})};var oL={description:"n0"};function Wg({pageId:e="*",componentId:t="*"}){let o="description",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(N.Caption,{className:oL.description,style:l,"data-qa-anchor":r},n.text)}var rL={title:"d0"};function F1({pageId:e="*",componentId:t="*",titleClassName:o}){let r="title",{accessibilityId:n,config:i,isExcluded:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:r});return a?null:te.createElement(N.Title,{className:gr(rL.title,o),style:s,"data-qa-anchor":n},i.text)}var B5={exploreCommunitiesButton:"m0",exploreCommunitiesButton__icon:"p0",exploreCommunitiesButton__text:"g0"};var y2e=e=>te.createElement("svg",d({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M7.85254 0.25C12.1338 0.25 15.6025 3.71875 15.6025 8C15.6025 12.2812 12.1338 15.75 7.85254 15.75C3.57129 15.75 0.102539 12.2812 0.102539 8C0.102539 3.71875 3.57129 0.25 7.85254 0.25ZM13.4463 5.25C12.79 3.9375 11.6963 2.90625 10.3525 2.3125C10.79 3.125 11.1338 4.125 11.3525 5.25H13.4463ZM7.85254 1.75C7.25879 1.75 6.32129 3.0625 5.85254 5.25H9.82129C9.35254 3.0625 8.41504 1.75 7.85254 1.75ZM1.60254 8C1.60254 8.4375 1.63379 8.875 1.72754 9.25H4.13379C4.10254 8.84375 4.10254 8.4375 4.10254 8C4.10254 7.59375 4.10254 7.1875 4.13379 6.75H1.72754C1.63379 7.15625 1.60254 7.59375 1.60254 8ZM2.22754 10.75C2.88379 12.0625 3.97754 13.125 5.32129 13.7188C4.88379 12.9062 4.54004 11.9062 4.32129 10.75H2.22754ZM4.32129 5.25C4.54004 4.125 4.88379 3.125 5.32129 2.3125C3.97754 2.90625 2.88379 3.9375 2.22754 5.25H4.32129ZM7.85254 14.25C8.41504 14.25 9.35254 12.9688 9.82129 10.75H5.85254C6.32129 12.9688 7.25879 14.25 7.85254 14.25ZM10.04 9.25C10.0713 8.875 10.1025 8.4375 10.1025 8C10.1025 7.5625 10.0713 7.15625 10.04 6.75H5.63379C5.60254 7.15625 5.60254 7.5625 5.60254 8C5.60254 8.4375 5.60254 8.875 5.63379 9.25H10.04ZM10.3525 13.7188C11.6963 13.125 12.79 12.0625 13.4463 10.75H11.3525C11.1338 11.9062 10.79 12.9062 10.3525 13.7188ZM11.54 9.25H13.9775C14.04 8.875 14.1025 8.4375 14.1025 8C14.1025 7.59375 14.04 7.15625 13.9775 6.75H11.54C11.5713 7.1875 11.6025 7.59375 11.6025 8C11.6025 8.4375 11.5713 8.84375 11.54 9.25Z"}));function qg({pageId:e="*",componentId:t="*"}){let o="explore_communities_button",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement("div",{className:B5.exploreCommunitiesButton,"data-qa-anchor":r,style:l},te.createElement(y2e,{className:B5.exploreCommunitiesButton__icon}),te.createElement(N.BodyBold,{className:B5.exploreCommunitiesButton__text},n.text))}var nL={createCommunityButton:"h0"};function Kg({pageId:e="*",componentId:t="*",onClick:o}){let r="create_community_button",{accessibilityId:n,config:i,defaultConfig:a,isExcluded:s,uiReference:l,themeStyles:c}=A({pageId:e,componentId:t,elementId:r});return s?null:te.createElement("div",{className:nL.createCommunityButton,onClick:()=>o(),"data-qa-anchor":n,style:c},te.createElement(oe,{defaultIcon:()=>te.createElement(te.Fragment,null),imgIcon:()=>te.createElement("img",{src:i.icon,alt:l}),configIconName:i.icon,defaultIconName:a.icon}),te.createElement(N.Body,null,i.text))}var Jg={emptyNewsfeed:"f0",emptyNewsfeed__text:"b0"};function Xm({pageId:e="*"}){let t="empty_newsfeed",{accessibilityId:o,config:r,defaultConfig:n,isExcluded:i,uiReference:a,themeStyles:s}=re({pageId:e,componentId:t});return i?null:te.createElement("div",{className:Jg.emptyNewsfeed},te.createElement(Qg,{pageId:e,componentId:t}),te.createElement("div",{className:Jg.emptyNewsfeed__text},te.createElement(F1,{pageId:e,componentId:t}),te.createElement(Wg,{pageId:e,componentId:t})),te.createElement(qg,{pageId:e,componentId:t}),te.createElement(Kg,{pageId:e,componentId:t,onClick:()=>{}}))}var U1={global_feed:"u0",global_feed__postContainer:"v0",global_feed__postSkeletonContainer:"x0",global_feed__pullToRefresh:"w0",global_feed__post__reactionBar__leftPane__icon:"y0",global_feed__post__reactionBar__leftPane__iconImg:"k0",global_feed__pullToRefresh__spinner:"j0",spin:"We",global_feed__divider:"z0",global_feed__post__divider:"X0",global_feed__post__reactionBar:"Y0",global_feed__post__reactionBar__leftPane:"C0",global_feed__post__reactionBar__rightPane:"S0",global_feed__intersection:"A0",global_feed__commentContainer:"M0"};var Jt={container:"B0",innerContainer:"E0",header:"I0",header__title:"R0",header__avatar:"U0",header__detail:"D0",content__text:"F0",content__imageContainer:"H0",content__image:"L0",footer:"Ze",footer__content__description:"T0",footer__content__headline:"V0",footer__left:"q0",footer__right:"G0",footer__content__button:"J0",footer__content__button__text:"K0",infoIcon__button:"N0",infoIcon:"O0"};var aL=({ad:e,avatarUrl:t,adImageUrl:o,themeStyles:r,onCallToActionClick:n})=>{var l;let[i,a]=useState(!1),s=()=>{n==null||n(e.callToActionUrl);};return te.createElement("div",{className:Jt.container,style:r},te.createElement("div",{className:Jt.innerContainer},te.createElement("div",{className:Jt.header},te.createElement("div",{className:Jt.header__avatar},te.createElement(bt,{avatarUrl:t,defaultImage:te.createElement(Am,null)})),te.createElement("div",{className:Jt.header__detail},te.createElement(N.BodyBold,{className:Jt.header__title},(l=e.advertiser)==null?void 0:l.name),te.createElement(Lm,null))),te.createElement("div",null,te.createElement(N.Body,{className:Jt.content__text},e.body),te.createElement("div",{className:Jt.content__imageContainer},te.createElement("img",{className:Jt.content__image,src:o})))),te.createElement(O,{className:Jt.infoIcon__button,onPress:()=>a(!0)},te.createElement(gn,{className:Jt.infoIcon})),te.createElement(O,{className:Jt.footer,"data-has-url":!!e.callToActionUrl,onPress:s},te.createElement("div",{className:Jt.footer__left},te.createElement(N.Body,{renderer:({typoClassName:c})=>te.createElement("div",{className:gr(c,Jt.footer__content__description)},e.description)}),te.createElement(N.BodyBold,{className:Jt.footer__content__headline},e.headline)),e.callToActionUrl?te.createElement("div",{className:Jt.footer__right},te.createElement(O,{className:Jt.footer__content__button,onPress:s},te.createElement(N.CaptionBold,{renderer:({typoClassName:c})=>te.createElement("div",{className:gr(c,Jt.footer__content__button__text)},e.callToAction)}))):null),te.createElement(e5,{ad:e,isOpen:i,onOpenChange:c=>a(c)}))};var sL=({pageId:e="*",ad:t})=>{var c,p,u,g,f,y;let o="post_content",{themeStyles:r}=re({pageId:e,componentId:o}),i=it({fileId:(p=(c=t.advertiser)==null?void 0:c.avatar)==null?void 0:p.fileId})||((g=(u=t.advertiser)==null?void 0:u.avatar)==null?void 0:g.fileUrl)||"",s=it({fileId:(f=t.image1_1)==null?void 0:f.fileId})||((y=t.image1_1)==null?void 0:y.fileUrl)||"";return te.createElement(aL,{themeStyles:r,avatarUrl:i,adImageUrl:s,ad:t,onCallToActionClick:C=>{window==null||window.open(C,"_blank");}})};var Xg=e=>(e==null?void 0:e.adId)!==void 0,L5=({pageId:e="*",componentId:t="*",items:o,isLoading:r,onFeedReachBottom:n,onPostDeleted:i})=>{let{accessibilityId:a,themeStyles:s}=re({pageId:e,componentId:t}),[l,c]=useState(null),{AmityGlobalFeedComponentBehavior:p}=It();if(Bo({node:l,onIntersect:()=>{n();}}),o.length===0&&!r)return te.createElement(Xm,{pageId:e});let u=(g,f)=>Xg(g)?f&&Xg(f)?`${f.adId}-${g.adId}`:`${f.postId}-${g.adId}`:g.postId;return te.createElement("div",{className:U1.global_feed,style:s,"data-qa-anchor":a},o.map((g,f)=>te.createElement("div",{key:u(g,o[Math.max(0,f-1)])},f!==0?te.createElement("div",{className:U1.global_feed__divider}):null,Xg(g)?te.createElement(sL,{ad:g}):te.createElement(O,{className:U1.global_feed__postContainer,onPress:()=>{var y;return (y=p==null?void 0:p.goToPostDetailPage)==null?void 0:y.call(p,{postId:g.postId})}},te.createElement(hn,{pageId:e,post:g,category:"general",style:"feed",onClick:()=>{var y;(y=p==null?void 0:p.goToPostDetailPage)==null||y.call(p,{postId:g.postId});},onPostDeleted:i})))),r?Array.from({length:2}).map((g,f)=>te.createElement("div",{key:f},te.createElement("div",{className:U1.global_feed__divider}),te.createElement("div",{className:U1.global_feed__postSkeletonContainer},te.createElement(ac,null)))):null,!r&&te.createElement("div",{ref:g=>c(g),className:U1.global_feed__intersection}))};var Ym={newsfeed:"P0",newsfeed__postList:"Q0",newsfeed__postContainer:"W0",newsfeed__pullToRefresh:"Z0",newsfeed__post__reactionBar__leftPane__icon:"_0",newsfeed__post__reactionBar__leftPane__iconImg:"em",newsfeed__pullToRefresh__spinner:"rm",spin:"_e",newsfeed__divider:"am",newsfeed__post__divider:"om",newsfeed__post__reactionBar:"tm",newsfeed__post__reactionBar__leftPane:"im",newsfeed__post__reactionBar__rightPane:"lm",newsfeed__intersection:"sm"};var k2e=e=>te.createElement("div",{className:Ym.newsfeed__pullToRefresh__spinner},te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),te.createElement("defs",null,te.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},te.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),te.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"}))))),A5=({pageId:e="*"})=>{let t="newsfeed",{themeStyles:o}=re({pageId:e,componentId:t}),r=useRef(0),[n,i]=useState(0),{itemWithAds:a,hasMore:s,isLoading:l,loadMore:c,fetch:p,refetch:u,removeItem:g}=bs();useEffect(()=>{p();},[]);let f=()=>{s&&!l&&c();};return a.length===0&&!l?te.createElement(Xm,{pageId:e}):te.createElement("div",{className:Ym.newsfeed,style:o,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{r.current=y.touches[0].clientY;},onTouchMove:y=>{let C=y.touches[0].clientY;r.current>C||i(Math.min(C-r.current,100));},onTouchEnd:y=>{r.current=0,n>=75&&u(),i(0);}},te.createElement("div",{style:{"--asc-pull-to-refresh-height":`${n}px`},className:Ym.newsfeed__pullToRefresh},te.createElement(k2e,null)),te.createElement("div",{className:Ym.newsfeed__divider}),te.createElement($m,{type:"globalFeed",pageId:e}),a.length>0&&te.createElement("div",{className:Ym.newsfeed__divider}),te.createElement(L5,{isLoading:l,items:a,pageId:e,componentId:t,onFeedReachBottom:()=>f(),onPostDeleted:y=>g(y.postId)}))};var D5={postCreationButton:"cm",postCreationButton__icon:"nm"};var N2e=e=>te.createElement("svg",d({style:{pointerEvents:"none"},width:"14",height:"15",viewBox:"0 0 14 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M13.0002 5.96667C13.5314 5.96667 14.0002 6.43542 14.0002 6.96667V7.96667C14.0002 8.52917 13.5314 8.96667 13.0002 8.96667H8.50016V13.4667C8.50016 14.0292 8.03141 14.4667 7.50016 14.4667H6.50016C5.93766 14.4667 5.50016 14.0292 5.50016 13.4667V8.96667H1.00016C0.437662 8.96667 0.000162125 8.52917 0.000162125 7.96667V6.96667C0.000162125 6.43542 0.437662 5.96667 1.00016 5.96667H5.50016V1.46667C5.50016 0.935425 5.93766 0.466675 6.50016 0.466675H7.50016C8.03141 0.466675 8.50016 0.935425 8.50016 1.46667V5.96667H13.0002Z"}));function ef({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onClick:n}){let i="post_creation_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(oe,{defaultIcon:()=>te.createElement(O,{style:u,className:D5.postCreationButton,onPress:n,"data-qa-anchor":a},te.createElement(N2e,{className:gr(D5.postCreationButton__icon,o)})),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:gr(D5.postCreationButton,r),onClick:n,"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon})}var lc={globalSearchButton:"dm",globalSearchButton__icon:"mm",globalSearchButton__svg:"pm"};var B2e=e=>te.createElement("svg",d({width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M15.7814 14.3104C16.0627 14.6229 16.0627 15.0917 15.7502 15.3729L14.8752 16.2479C14.5939 16.5604 14.1252 16.5604 13.8127 16.2479L10.7189 13.1542C10.5627 12.9979 10.5002 12.8104 10.5002 12.6229V12.0917C9.37516 12.9667 8.00016 13.4667 6.50016 13.4667C2.90641 13.4667 0.000162125 10.5604 0.000162125 6.96667C0.000162125 3.40417 2.90641 0.466675 6.50016 0.466675C10.0627 0.466675 13.0002 3.40417 13.0002 6.96667C13.0002 8.49792 12.4689 9.87292 11.6252 10.9667H12.1252C12.3127 10.9667 12.5002 11.0604 12.6564 11.1854L15.7814 14.3104ZM6.50016 10.9667C8.68766 10.9667 10.5002 9.18542 10.5002 6.96667C10.5002 4.77917 8.68766 2.96667 6.50016 2.96667C4.28141 2.96667 2.50016 4.77917 2.50016 6.96667C2.50016 9.18542 4.28141 10.9667 6.50016 10.9667Z"}));function tf({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n}){let i="global_search_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{style:u,"data-qa-anchor":a,className:lc.globalSearchButton,onPress:n},te.createElement(oe,{defaultIcon:()=>te.createElement("div",{className:lc.globalSearchButton__icon},te.createElement(B2e,{className:gr(lc.globalSearchButton__svg,o)})),imgIcon:()=>te.createElement("img",{style:u,src:s.icon,alt:p,className:gr(lc.globalSearchButton__icon,r),"data-qa-anchor":a}),defaultIconName:l.icon,configIconName:s.icon}))}var dL={headerLabel:"gm"};function of({pageId:e="*",componentId:t="*"}){let o="header_label",{accessibilityId:r,config:n,defaultConfig:i,isExcluded:a,uiReference:s,themeStyles:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(N.Heading,{className:dL.headerLabel,style:l,"data-qa-anchor":r},n.text)}var H5={topNavigation:"hm",topNavigationLeftPane:"fm",topNavigationRightPane:"bm"};var $1={socialHomePage:"um",socialHomePage__topBar:"vm",socialHomePage__topNavigation:"xm",socialHomePage__tabs:"er",socialHomePage__contents:"rr",socialHomePage__createPostMenu:"wm"};function rf({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="newsfeed_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(Fn,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}function nf({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="explore_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(Fn,{pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r(),"data-qa-anchor":i},a.text)}function af({pageId:e="*",componentId:t="*",isActive:o,onClick:r}){let n="my_communities_button",{accessibilityId:i,config:a,defaultConfig:s,isExcluded:l,uiReference:c,themeStyles:p}=A({pageId:e,componentId:t,elementId:n});return l?null:te.createElement(Fn,{"data-qa-anchor":i,pageId:e,componentId:t,elementId:n,isActive:o,onPress:()=>r==null?void 0:r()},a.text)}var F5=(r=>(r.Newsfeed="Newsfeed",r.Explore="Explore",r.MyCommunities="My communities",r))(F5||{});function sf(){let e="social_home_page",{themeStyles:t}=Re({pageId:e}),{scrollPosition:o,onScroll:r}=bs(),[n,i]=useState("Newsfeed"),[a,s]=useState(!1),l=useRef(null),c=useRef(!0);useEffect(()=>{l.current&&(l.current.scrollTop=o,setTimeout(()=>{c.current=!1;},100));},[l.current]);let p=()=>{s(g=>!g);},u=g=>{c.current||r(g);};return useEffect(()=>{let g=()=>{a&&s(!1);};a?document.addEventListener("mousedown",g):document.removeEventListener("mousedown",g);},[a]),te.createElement("div",{className:$1.socialHomePage,style:t},te.createElement("div",{className:$1.socialHomePage__topBar},te.createElement("div",{className:$1.socialHomePage__topNavigation},te.createElement(O5,{pageId:e,selectedTab:n,onClickPostCreationButton:p})),te.createElement("div",{className:$1.socialHomePage__tabs},te.createElement(rf,{pageId:e,isActive:n==="Newsfeed",onClick:()=>i("Newsfeed")}),te.createElement(nf,{pageId:e,isActive:n==="Explore",onClick:()=>i("Explore")}),te.createElement(af,{pageId:e,isActive:n==="My communities",onClick:()=>i("My communities")}))),te.createElement("div",{className:$1.socialHomePage__contents,ref:l,onScroll:u},n==="Newsfeed"&&te.createElement(A5,{pageId:e}),n==="Explore"&&te.createElement(_d,{isOpen:!1,toggleOpen:()=>{},hideSideMenu:!0}),n==="My communities"&&te.createElement(E5,{pageId:e})),a&&te.createElement("div",{className:$1.socialHomePage__createPostMenu},te.createElement(u5,{pageId:e})))}function O5({pageId:e="*",selectedTab:t,onClickPostCreationButton:o}){let r="top_navigation",{goToSocialGlobalSearchPage:n,goToMyCommunitiesSearchPage:i}=Be(),{isExcluded:a,themeStyles:s}=re({pageId:e,componentId:r}),l=()=>{switch(t){case"Newsfeed":n();break;case"Explore":break;case"My communities":i();break}};return a?null:te.createElement("div",{className:H5.topNavigation,style:s},te.createElement("div",{className:H5.topNavigationLeftPane},te.createElement(of,{pageId:e,componentId:r})),te.createElement("div",{className:H5.topNavigationRightPane},te.createElement(tf,{pageId:e,componentId:r,onPress:l}),t!=="Explore"&&te.createElement(ef,{pageId:e,componentId:r,onClick:o})))}var Ca={container:"ym",headerImageContainer:"km",headerImage:"jm",backButton:"ar",moreButton:"or",content:"zm",name:"Xm",description:"Ym",communityProfile__communityInfo__container:"Cm",divider:"Sm",statCount:"Am",statTitle:"Mm",menuButton:"Bm",communityProfile__joinButton__container:"Em",communityProfile__joinButton:"Im",communityProfile__pendingPost__container:"Rm",communityProfile__menuItem:"Um",communityProfile__privateIcon:"Dm",communityProfile__divider:"Fm"};var U5={communityTabs__container:"Hm",communityTabs__tab:"tr"};var fL=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"25",height:"24",fill:"none",viewBox:"0 0 25 24"},te.createElement("path",{fill:"currentColor",d:"M9.219 14.5c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zm0 3.375c-.492 0-.844-.352-.844-.844 0-.457.352-.843.844-.843h3.937c.457 0 .844.386.844.843a.833.833 0 01-.844.844H9.22zm0-6.75c-.492 0-.844-.352-.844-.844 0-.457.352-.844.844-.844h7.312c.457 0 .844.387.844.844a.833.833 0 01-.844.844H9.22zM18.5 3.25c1.23 0 2.25 1.02 2.25 2.25V19c0 1.266-1.02 2.25-2.25 2.25H7.25A2.221 2.221 0 015 19V5.5c0-1.23.984-2.25 2.25-2.25H18.5zM19.063 19V7.75H6.688V19c0 .316.246.563.562.563H18.5a.578.578 0 00.563-.563z"}));var hL=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"35",height:"34",fill:"none",viewBox:"0 0 35 34"},te.createElement("path",{fill:"currentColor",d:"M21.998 18.295c.372 2.014-.15 4.027-1.567 5.444a.833.833 0 01-1.193 0l-3.58-3.58-2.585 2.586c-.025.025-.074.025-.1.05l-1.59.795c-.224.125-.497-.149-.373-.373l.795-1.59.075-.075 2.585-2.585-3.58-3.58c-.348-.348-.348-.845 0-1.194 1.418-1.416 3.406-1.963 5.42-1.59l1.218-.92-.671-.671c-.348-.348-.348-.846 0-1.194l2.386-2.386a.833.833 0 011.194 0l6.761 6.761a.856.856 0 010 1.194l-2.386 2.386a.833.833 0 01-1.194 0l-.696-.696-.92 1.218zm-9.273-3.455l7.035 7.035c.746-1.143.845-2.635.398-3.928l2.61-3.405 1.442 1.441 1.193-1.193-5.568-5.568-1.193 1.193 1.442 1.442-3.406 2.61c-1.318-.472-2.81-.373-3.953.373z"}));var lf=({pageId:e,componentId:t="*",activeTab:o,onTabChange:r})=>{let n="community_profile_tab",{isExcluded:i,accessibilityId:a,themeStyles:s}=A({pageId:e,componentId:t,elementId:n});return i?null:te.createElement("div",{"data-qa-anchor":a,style:s,className:U5.communityTabs__container},te.createElement(O,{"data-is-active":o==="community_feed",onPress:()=>r("community_feed"),className:U5.communityTabs__tab},te.createElement(fL,null)),te.createElement(O,{"data-is-active":o==="community_pin",onPress:()=>r("community_pin"),className:U5.communityTabs__tab},te.createElement(hL,null)))};var dc={communityCover__container:"ir",communityCover__topBar:"Lm",communityCover__backButton:"Tm",communityCover__menuButton:"Vm"};var CL={menuButton:"qm"};function mf({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n}){let i="menu_button",{isExcluded:a,accessibilityId:s,themeStyles:l,config:c,defaultConfig:p,uiReference:u}=A({pageId:e,componentId:t,elementId:i});return a?null:te.createElement(O,{className:r,onPress:o,"data-qa-anchor":s},te.createElement(oe,{defaultIcon:()=>te.createElement(M5,{className:gr(CL.menuButton,n),style:l}),imgIcon:()=>te.createElement("img",{src:c.icon,alt:u}),defaultIconName:p.icon,configIconName:c.icon}))}var df=({pageId:e="*",componentId:t="*",image:o,onBack:r,onClickMenu:n})=>{let i="community_cover",{isExcluded:a,accessibilityId:s,themeStyles:l,config:c}=A({pageId:e,componentId:t,elementId:i}),p=o?{backgroundImage:`url(${o})`}:{background:"linear-gradient(180deg, #a5a9b5 0%, #636878 100%)"};return a?null:te.createElement("div",{className:dc.communityCover__container,"data-qa-anchor":s,style:d(d({},l),p)},te.createElement("div",{style:d({},p)}),te.createElement("div",{className:dc.communityCover__topBar},te.createElement(Mm,{defaultClassName:dc.communityCover__backButton,onPress:r}),te.createElement(mf,{className:dc.communityCover__menuButton,onClick:n})))};var cf={communityJoinButton:"Gm",joinButton:"Jm"};var xL=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",viewBox:"0 0 384 512",fill:"currentColor"},e),te.createElement("path",{d:`M368 224H224V80c0-8.84-7.16-16-16-16h-32c-8.84 0-16 7.16-16 16v144H16c-8.84 0-16 7.16-16
|
|
4815
4815
|
16v32c0 8.84 7.16 16 16 16h144v144c0 8.84 7.16 16 16 16h32c8.84 0 16-7.16 16-16V288h144c8.84
|
|
4816
|
-
0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z`}));var pf=({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n})=>{let i="community_join_button",{config:a,themeStyles:s,accessibilityId:l,isExcluded:c,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{"data-qa-anchor":l,style:s,onPress:o,className:gr(cf.communityJoinButton,r)},te.createElement(oe,{defaultIcon:()=>te.createElement(xL,{className:gr(cf.joinButton,n)}),imgIcon:()=>te.createElement("img",{src:a.icon,alt:p}),defaultIconName:u.icon,configIconName:a.icon}),"Join")};var q2e=createContext({activeTab:"community_feed",setActiveTab:()=>{}}),V5=()=>useContext(q2e);var IL=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},te.createElement("circle",{cx:"9.88525",cy:"10",r:"5.5",fill:"white"}),te.createElement("path",{d:"M8.62899 17.3036C9.55401 18.2356 10.4373 18.2286 11.3693 17.3036L12.4125 16.2604C12.5099 16.163 12.5934 16.1352 12.7185 16.1352H14.193C15.5075 16.1352 16.1334 15.5092 16.1334 14.1947V12.7203C16.1334 12.5951 16.1682 12.5047 16.2586 12.4143L17.3019 11.3641C18.2339 10.439 18.2269 9.55575 17.3019 8.63073L16.2586 7.58748C16.1682 7.49011 16.1334 7.40665 16.1334 7.28146V5.807C16.1334 4.4925 15.5075 3.86655 14.193 3.86655H12.7185C12.5934 3.86655 12.5029 3.83178 12.4125 3.74136L11.3693 2.69811C10.4373 1.76614 9.55401 1.76614 8.62899 2.70507L7.58574 3.74136C7.49533 3.83178 7.40491 3.86655 7.27972 3.86655H5.80526C4.49076 3.86655 3.86481 4.47859 3.86481 5.807V7.28146C3.86481 7.40665 3.83004 7.49707 3.73962 7.58748L2.69637 8.63073C1.7644 9.55575 1.77136 10.439 2.69637 11.3641L3.73962 12.4143C3.83004 12.5047 3.86481 12.5951 3.86481 12.7203V14.1947C3.86481 15.5092 4.49076 16.1352 5.80526 16.1352H7.27972C7.40491 16.1352 7.48837 16.163 7.58574 16.2604L8.62899 17.3036ZM8.8446 13.5618C8.60117 13.5618 8.40643 13.4714 8.25342 13.3115L6.02782 10.8216C5.90959 10.6964 5.84699 10.5225 5.84699 10.3486C5.84699 9.93132 6.14606 9.63225 6.57727 9.63225C6.81374 9.63225 6.98761 9.70876 7.14062 9.87568L8.81678 11.7466L12.1691 6.96153C12.336 6.72506 12.5168 6.62769 12.795 6.62769C13.2263 6.62769 13.5323 6.92676 13.5323 7.33015C13.5323 7.46925 13.4766 7.64312 13.3723 7.78918L9.47055 13.2628C9.31059 13.4714 9.10194 13.5618 8.8446 13.5618Z",fill:"#1054DE"}));var ff=({pageId:e="*",componentId:t="*"})=>{let o="community_verify_badge",{config:r,themeStyles:n,accessibilityId:i,isExcluded:a,uiReference:s,defaultConfig:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(oe,{"data-qa-anchor":i,defaultIcon:()=>te.createElement(IL,null),imgIcon:()=>te.createElement("img",{src:r.icon,alt:s}),defaultIconName:l.icon,configIconName:r.icon})};var pc={descriptionWrapper:"Km",description:"lr",expanded:"Nm",toggleButton:"Om"};var yf=({pageId:e="*",componentId:t="*",description:o=""})=>{let[r,n]=useState(!1),[i,a]=useState(!1),s=useRef(null),l="community_description",{themeStyles:c,accessibilityId:p,isExcluded:u}=A({pageId:e,componentId:t,elementId:l}),g=180,f=o.length>g?o.slice(0,g):o;if(useEffect(()=>{s.current&&a(o.length>g);},[o]),u)return null;let y=()=>n(!0);return te.createElement("div",{"data-qa-anchor":p,style:c,className:pc.descriptionWrapper},te.createElement("div",{ref:s,className:`${pc.description} ${r?pc.expanded:""}`},te.createElement(N.Body,null,r?o:f," ",i&&!r&&te.createElement(O,{onPress:y,className:pc.toggleButton}," ","...See more"))))};var ML={communityName__truncate:"Pm"};var hf=({pageId:e="*",componentId:t="*",name:o=""})=>{let r="community_name",{config:n,themeStyles:i,accessibilityId:a,isExcluded:s}=A({pageId:e,componentId:t,elementId:r});return s?null:te.createElement(N.Heading,{"data-qa-anchor":a,className:ML.communityName__truncate},o)};var uc={communityInfo__container:"Qm",communityInfo__wrapper:"Wm",communityInfo__count:"Zm",communityInfo__title:"_m"};var Z5=({pageId:e="*",componentId:t="*",count:o,text:r,onClick:n})=>{let i="community_info",{config:a,accessibilityId:s,themeStyles:l,isExcluded:c}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{onPress:n,className:uc.communityInfo__container},te.createElement("div",{className:uc.communityInfo__wrapper},te.createElement(N.BodyBold,{className:uc.communityInfo__count},lb(o)),te.createElement(N.Caption,{className:uc.communityInfo__title},r)))};var ode=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"61",height:"61",viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M33.0312 44.25C33.0312 45.7266 31.8711 46.7812 30.5 46.7812C29.0234 46.7812 27.9688 45.7266 27.9688 44.25V37.5C27.9688 36.1289 29.0234 34.9688 30.5 34.9688C31.8711 34.9688 33.0312 36.1289 33.0312 37.5V44.25ZM30.5 3.75C37.8828 3.75 44 9.86719 44 17.25V24H47.375C51.0664 24 54.125 27.0586 54.125 30.75V51C54.125 54.7969 51.0664 57.75 47.375 57.75H13.625C9.82812 57.75 6.875 54.7969 6.875 51V30.75C6.875 27.0586 9.82812 24 13.625 24H17V17.25C17 9.86719 23.0117 3.75 30.5 3.75ZM30.5 8.8125C25.7539 8.8125 22.0625 12.6094 22.0625 17.25V24H38.9375V17.25C38.9375 12.6094 35.1406 8.8125 30.5 8.8125ZM13.625 29.0625C12.6758 29.0625 11.9375 29.9062 11.9375 30.75V51C11.9375 51.9492 12.6758 52.6875 13.625 52.6875H47.375C48.2188 52.6875 49.0625 51.9492 49.0625 51V30.75C49.0625 29.9062 48.2188 29.0625 47.375 29.0625H13.625Z"}))},Q5=ode;var W5=({pageId:e="*",community:t})=>{let {onBack:o,onEditCommunity:r}=Be(),{activeTab:n,setActiveTab:i}=V5(),{communityCategories:a,avatarFileUrl:s,joinCommunity:l,pendingPostsCount:c,canReviewCommunityPosts:p}=vd(t.communityId),u=f=>{i(f);};t.isJoined&&t.postSetting&&p&&c>0;return te.createElement("div",{className:Ca.container},te.createElement(df,{pageId:e,image:s,onBack:o,onClickMenu:()=>r(t.communityId)}),te.createElement("div",{className:Ca.content},te.createElement("div",{className:Ca.name},!t.isPublic&&te.createElement(Q5,{className:Ca.communityProfile__privateIcon}),te.createElement(hf,{pageId:e,name:t.displayName}),t.isOfficial&&te.createElement(ff,null)),te.createElement(Dn,{pageId:e,categories:a}),te.createElement(yf,{pageId:e,description:t.description||""}),te.createElement("div",{className:Ca.communityProfile__communityInfo__container},te.createElement(Z5,{count:t.postsCount,text:"posts"}),te.createElement("div",{className:Ca.divider}),te.createElement(Z5,{count:t.membersCount,text:"members",onClick:()=>r(t.communityId,"MEMBERS")})),!t.isJoined&&t.isPublic&&te.createElement("div",{className:Ca.communityProfile__joinButton__container},te.createElement(pf,{onClick:l})),te.createElement("div",null,te.createElement($m,{type:"communityFeed",communityId:t.communityId})),te.createElement(lf,{pageId:e,activeTab:n,onTabChange:u})),te.createElement("div",{className:Ca.communityProfile__divider}))};var nde=10;function Cf({targetType:e,targetId:t,feedType:o,limit:r=nde}){let a=pt({fetcher:PostRepository.getPosts,params:{targetType:e,targetId:t,feedType:o,limit:r},shouldCall:!!t&&!!e}),{items:n}=a,i=P(a,["items"]);return d({posts:n},i)}var co={communityFeed__container:"ep",communityFeed__loadingIndicator:"rp",communityFeed__observerTarget:"ap",communityFeed__post:"op",communityFeed__spinner:"tp",spin:"sr",communityFeed__postContent:"ip",communityFeed__postSkeleton:"lp",communityFeed__postSkeletonHeader:"sp",communityFeed__postSkeletonAvatar:"cr",communityFeed__postSkeletonUserInfo:"cp",communityFeed__postSkeletonUsername:"nr",communityFeed__postSkeletonSubtitle:"dr",communityFeed__postSkeletonContent:"np",communityFeed__postSkeletonLine:"s",pulse:"mr",communityFeed__emptyPost:"dp",communityFeed__emptyPostIcon:"mp",communityFeed__emptyPostText:"pp",communityFeed__announcePost:"gp"};var ade=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"61",height:"41",viewBox:"0 0 61 41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M58.3438 0.5C59.7148 0.5 60.875 1.66016 60.875 3.03125V38.4688C60.875 39.9453 59.7148 41 58.3438 41H5.1875C2.33984 41 0.125 38.7852 0.125 35.9375V6.40625C0.125 5.03516 1.17969 3.875 2.65625 3.875H6.875V3.03125C6.875 1.66016 7.92969 0.5 9.40625 0.5H58.3438ZM3.5 35.9375C3.5 36.8867 4.23828 37.625 5.1875 37.625C6.03125 37.625 6.875 36.8867 6.875 35.9375V7.25H3.5V35.9375ZM57.5 37.625V3.875H10.25V35.9375V36.043C10.25 36.4648 10.0391 37.2031 9.93359 37.625H57.5ZM14.8906 27.5C14.1523 27.5 13.625 26.9727 13.625 26.2344V8.51562C13.625 7.88281 14.1523 7.25 14.8906 7.25H32.6094C33.2422 7.25 33.875 7.88281 33.875 8.51562V26.2344C33.875 26.9727 33.2422 27.5 32.6094 27.5H14.8906ZM17 10.625V24.125H30.5V10.625H17ZM13.625 32.9844V32.1406C13.625 31.5078 14.1523 30.875 14.8906 30.875H32.6094C33.2422 30.875 33.875 31.5078 33.875 32.1406V32.9844C33.875 33.7227 33.2422 34.25 32.6094 34.25H14.8906C14.1523 34.25 13.625 33.7227 13.625 32.9844ZM37.25 32.9844V32.1406C37.25 31.5078 37.7773 30.875 38.5156 30.875H52.8594C53.4922 30.875 54.125 31.5078 54.125 32.1406V32.9844C54.125 33.7227 53.4922 34.25 52.8594 34.25H38.5156C37.7773 34.25 37.25 33.7227 37.25 32.9844ZM37.25 26.2344V25.3906C37.25 24.7578 37.7773 24.125 38.5156 24.125H52.8594C53.4922 24.125 54.125 24.7578 54.125 25.3906V26.2344C54.125 26.9727 53.4922 27.5 52.8594 27.5H38.5156C37.7773 27.5 37.25 26.9727 37.25 26.2344ZM37.25 12.7344V11.8906C37.25 11.2578 37.7773 10.625 38.5156 10.625H52.8594C53.4922 10.625 54.125 11.2578 54.125 11.8906V12.7344C54.125 13.4727 53.4922 14 52.8594 14H38.5156C37.7773 14 37.25 13.4727 37.25 12.7344ZM37.25 19.4844V18.6406C37.25 18.0078 37.7773 17.375 38.5156 17.375H52.8594C53.4922 17.375 54.125 18.0078 54.125 18.6406V19.4844C54.125 20.2227 53.4922 20.75 52.8594 20.75H38.5156C37.7773 20.75 37.25 20.2227 37.25 19.4844Z"}))},q5=ade;var gc={lockPrivateContent__wrap:"hp",lockPrivateContent__lockIcon:"fp",lockPrivateContent__title:"bp",lockPrivateContent__body:"up"};var fc=()=>te.createElement("div",{className:gc.lockPrivateContent__wrap},te.createElement(Q5,{className:gc.lockPrivateContent__lockIcon}),te.createElement(N.Title,{className:gc.lockPrivateContent__title},"This community is private"),te.createElement(N.Body,{className:gc.lockPrivateContent__body},"Only invited members can see the posts."));function yc({communityId:e,level:t,shouldSubscribe:o=!0,callback:r}){return oa({fetcher:CommunityRepository.getCommunity,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getCommunityTopic(n,t)})}function hc({communityId:e,placement:t}){let n=pt({fetcher:PostRepository.getPinnedPosts,params:{communityId:e,placement:t,sortBy:"lastPinned"},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return d({pinnedPost:o},r)}var Cc=()=>te.createElement("div",{className:co.communityFeed__postSkeleton},te.createElement("div",{className:co.communityFeed__postSkeletonHeader},te.createElement("div",{className:co.communityFeed__postSkeletonAvatar}),te.createElement("div",{className:co.communityFeed__postSkeletonUserInfo},te.createElement("div",{className:co.communityFeed__postSkeletonUsername}),te.createElement("div",{className:co.communityFeed__postSkeletonSubtitle}))),te.createElement("div",{className:co.communityFeed__postSkeletonContent},te.createElement("div",{className:co.communityFeed__postSkeletonLine}),te.createElement("div",{className:co.communityFeed__postSkeletonLine}),te.createElement("div",{className:co.communityFeed__postSkeletonLine}))),J5=({pageId:e="*",communityId:t})=>{let o="community_feed_component",{isExcluded:r,accessibilityId:n,themeStyles:i}=re({pageId:e,componentId:o}),{community:a}=_t({communityId:t,shouldCall:!!t}),s=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic),{posts:l,hasMore:c,loadMore:p,isLoading:u}=Cf({feedType:"published",targetId:t,targetType:"community",limit:10}),{pinnedPost:g,isLoading:f,refresh:y}=hc({communityId:t,placement:"announcement"}),{AmityCommunityProfilePageBehavior:C}=It();yc({communityId:t,level:SubscriptionLevels.POST});let v=useRef(null);if(useEffect(()=>{let b=new IntersectionObserver(M=>_(void 0,null,function*(){M[0].isIntersecting&&c&&p();}),{threshold:.5});return v.current&&b.observe(v.current),()=>{v.current&&b.unobserve(v.current);}},[c,p]),useEffect(()=>{y();},[]),r)return null;let h=()=>{let b=l.filter(M=>!g.some(I=>I.post.postId===M.postId));return te.createElement(te.Fragment,null,u?Array.from({length:2}).map((M,I)=>te.createElement(Cc,{key:I})):b&&b.map(M=>te.createElement(O,{className:co.communityFeed__postContent,onPress:()=>{var I;return (I=C==null?void 0:C.goToPostDetailPage)==null?void 0:I.call(C,{postId:M.postId,hideTarget:!0})}},te.createElement(hn,{key:M.postId,post:M,category:"general",style:"feed",hideTarget:!0,onClick:()=>{var I;return (I=C==null?void 0:C.goToPostDetailPage)==null?void 0:I.call(C,{postId:M.postId,hideTarget:!0})}}))),(l==null?void 0:l.length)===0&&!u&&te.createElement("div",{className:co.communityFeed__emptyPost},te.createElement(q5,{className:co.communityFeed__emptyPostIcon}),te.createElement("p",{className:co.communityFeed__emptyPostText},"No post yet")),te.createElement("div",{ref:v,className:co.communityFeed__observerTarget}))},x=()=>f?te.createElement(Cc,null):g&&g.map(({post:b})=>te.createElement(O,{onPress:()=>{var M;(M=C==null?void 0:C.goToPostDetailPage)==null||M.call(C,{postId:b.postId,hideTarget:!0,category:"announcement"});},className:co.communityFeed__announcePost},te.createElement(hn,{key:b.postId,post:b,category:"announcement",style:"feed",hideTarget:!0,onClick:()=>{var M;return (M=C==null?void 0:C.goToPostDetailPage)==null?void 0:M.call(C,{postId:b.postId,hideTarget:!0})},onPostDeleted:()=>y()})));return te.createElement("div",{"data-qa-anchor":n,className:co.communityFeed__container,style:i},s||a!=null&&a.isPublic?te.createElement(te.Fragment,null,x(),h()):te.createElement(fc,null))};var kL=({communityId:e})=>te.createElement("div",null,"CommunityPinnedPost");var vf={storyCommentButton:"vp",storyCommentIcon:"xp"};var yde=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),te.createElement("path",{fill:"#A5A9B5",d:"M10 2.188c4.682 0 8.5 3.12 8.5 6.906C18.5 12.912 14.682 16 10 16c-1.295 0-2.49-.232-3.586-.63-.797.663-2.457 1.693-4.648 1.693-.133 0-.2-.034-.266-.133-.033-.1 0-.233.066-.3 0-.032 1.395-1.493 1.827-3.187-1.196-1.195-1.893-2.69-1.893-4.35 0-3.784 3.785-6.905 8.5-6.905z"})),SL=({pageId:e="*",componentId:t="*",onPress:o,commentsCount:r,imgClassName:n})=>{let i="story_comment_button",{isExcluded:a,accessibilityId:s,defaultConfig:l,config:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return a?null:te.createElement(O,{"data-qa-anchor":s,onPress:o,style:u,className:gr(vf.storyCommentButton)},te.createElement(oe,{defaultIconName:l.icon,configIconName:c.icon,imgIcon:()=>te.createElement("img",{src:c.icon,alt:p,className:gr(n),style:u}),defaultIcon:()=>te.createElement("div",{className:gr(vf.storyCommentIcon)},te.createElement(yde,null),te.createElement(N.BodyBold,null,lb(r)))}))};var bf={storyReactionButton:"wp",storyReactionIcon:"yp"};var vde=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),te.createElement("path",{fill:"#A5A9B5",d:"M17.793 11.025c.148.854.037 1.67-.334 2.338a3.437 3.437 0 01-.668 2.487c-.037 2.078-1.299 3.525-4.156 3.525h-.854c-3.785 0-4.935-1.41-6.605-1.447-.112.482-.594.853-1.114.853H1.688c-.667 0-1.187-.52-1.187-1.187V8.687c0-.63.52-1.187 1.188-1.187h3.636c.705-.594 1.707-2.227 2.56-3.08.52-.52.372-4.045 2.673-4.045 2.115 0 3.525 1.188 3.525 3.896 0 .706-.148 1.262-.334 1.745h1.373c1.781 0 3.191 1.521 3.191 3.154 0 .705-.185 1.299-.519 1.855zm-2.3 2.004c.816-.742.704-1.892.185-2.449.37 0 .853-.705.853-1.373-.037-.705-.63-1.41-1.41-1.41h-3.86c0-1.41 1.04-2.078 1.04-3.526 0-.89 0-2.115-1.744-2.115-.705.705-.372 2.487-1.41 3.526-1.002 1.002-2.45 3.6-3.526 3.6H5.25v6.939c1.967 0 3.71 1.373 6.346 1.373h1.41c1.299 0 2.264-.631 1.967-2.412.556-.334 1.002-1.373.52-2.153zM3.765 16.406a.903.903 0 00-.891-.89.88.88 0 00-.89.89c0 .52.37.89.89.89a.88.88 0 00.89-.89z"})),xde=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),te.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"url(#paint0_linear_7702_34939)"}),te.createElement("path",{fill:"#fff",d:"M7.486 10.575H5.42a.611.611 0 00-.62.619v6.187c0 .361.258.619.62.619h2.066c.336 0 .62-.258.62-.619v-6.187a.628.628 0 00-.62-.62zm-1.033 6.394a.596.596 0 01-.62-.62c0-.334.258-.618.62-.618.336 0 .62.284.62.619 0 .36-.284.619-.62.619zm8.264-10.055c0-1.908-1.24-2.114-1.859-2.114-.542 0-.775 1.031-.878 1.495-.155.567-.284 1.134-.672 1.521-.826.851-1.265 1.908-2.298 2.913a.415.415 0 00-.078.232v5.518c0 .154.13.283.284.31.414 0 .956.231 1.37.412.826.36 1.833.799 3.073.799h.077c1.11 0 2.428 0 2.944-.748.233-.31.285-.696.155-1.16.44-.438.646-1.263.44-1.934.439-.593.49-1.443.232-2.036.31-.31.516-.8.49-1.264 0-.799-.67-1.52-1.523-1.52h-2.635c.207-.723.878-1.341.878-2.424z"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_7702_34939",x1:"9",x2:"19.8",y1:"2.4",y2:"29.4",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#5B9DFF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"})))),NL=({myReactions:e=[],reactionsCount:t,pageId:o="*",componentId:r="*",defaultIconClassName:n,imgIconClassName:i,onPress:a})=>{let s="story_reaction_button",{isExcluded:l,accessibilityId:c,config:p,uiReference:u,themeStyles:g}=A({pageId:o,componentId:r,elementId:s}),f=e.length>0;return l?null:te.createElement(O,{"data-qa-anchor":c,className:gr(bf.storyReactionButton),onPress:a,style:g},te.createElement(oe,{defaultIcon:()=>te.createElement("div",{className:gr(bf.storyReactionIcon,n)},f?te.createElement(xde,null):te.createElement(vde,null),te.createElement(N.BodyBold,null,lb(t))),imgIcon:()=>te.createElement("img",{src:p.icon,alt:u,className:gr(i)})}))};var ws={viewStoryCompostBarContainer:"kp",viewStoryFailedCompostBarContainer:"jp",viewStoryFailedCompostBarWrapper:"zp",viewStoryUploadingWrapper:"Xp",viewStoryCompostBarViewIconContainer:"Yp",viewStoryCompostBarEngagementContainer:"Cp",viewStoryCommentButton:"Ap",viewStoryCommentIcon:"Mp"};var Ide=({pageId:e="*",syncState:t,reach:o,commentsCount:r,reactionsCount:n,isLiked:i,storyId:a,onClickComment:s,showImpression:l,isMember:c,myReactions:p})=>{let u=So(),g=()=>_(void 0,null,function*(){try{if(!c){u.info({content:"Join community to interact with all stories"});return}i?yield ReactionRepository.removeReaction("story",a,hr):yield ReactionRepository.addReaction("story",a,hr);}catch(f){console.error("Can't toggle like",f);}});return t==="syncing"?te.createElement("div",{className:ws.viewStoryCompostBarContainer},te.createElement("div",{className:ws.viewStoryUploadingWrapper},te.createElement(vm,{width:20,height:20}),"Uploading...")):t==="error"?te.createElement("div",{className:ws.viewStoryFailedCompostBarContainer},te.createElement("div",{className:ws.viewStoryFailedCompostBarWrapper},te.createElement(y4,null),te.createElement("span",null,"Failed to upload")),te.createElement(Sa,null)):te.createElement("div",{className:ws.viewStoryCompostBarContainer},te.createElement("div",null,l&&te.createElement("div",{className:ws.viewStoryCompostBarViewIconContainer},te.createElement(O3,{reach:o}))),te.createElement("div",{className:ws.viewStoryCompostBarEngagementContainer},te.createElement(SL,{pageId:e,commentsCount:r,onPress:s}),te.createElement(NL,{pageId:e,myReactions:p,reactionsCount:n,onPress:g})))},X5=Ide;var Xr={iconButton:"Sp",rendererContainer:"Ep",storyVideo:"Ip",muteCircleIcon:"Rp",unmuteCircleIcon:"Up",loadingOverlay:"Bp",storyImage:"Dp",playStoryButton:"Fp",pauseStoryButton:"Hp",closeButton:"Lp",verifiedBadge:"Tp",dotsButton:"Vp",viewStoryInfoContainer:"qp",viewStoryCompostBarContainer:"Gp",viewStoryCompostBarViewIconContainer:"Jp",viewStoryCompostBarEngagementContainer:"Kp",viewStoryCompostBarEngagementIconContainer:"Np",storyContent:"Op",header:"Pp",viewStoryContainer:"Qp",viewStoryHeaderContainer:"Wp",avatarContainer:"Zp",addStoryButton:"pr",viewStoryHeaderListActionsContainer:"_p",viewStoryHeadingInfoContainer:"eg",viewStoryHeading:"rg",viewStoryHeadingTitle:"ag",viewStorySubHeading:"og"};var _de=({community:e,heading:t,subheading:o,isHaveActions:r,isOfficial:n,isPaused:i,onPlay:a,onPause:s,onAction:l,onClose:c,onClickCommunity:p,haveStoryPermission:u,addStoryButton:g})=>te.createElement("div",{className:Xr.viewStoryHeaderContainer},te.createElement("div",{className:Xr.viewStoryHeadingInfoContainer},te.createElement("div",{className:Xr.avatarContainer},te.createElement(Zr,{pageId:"story_page",community:e}),u&&g),te.createElement("div",{className:Xr.viewStoryInfoContainer},te.createElement("div",{className:Xr.viewStoryHeading},te.createElement(yw,{lines:1},te.createElement("div",{className:Xr.viewStoryHeadingTitle,"data-qa-anchor":"community_display_name",onClick:p},t)),n&&te.createElement(p1,{className:Xr.verifiedBadge})),te.createElement("span",{className:Xr.viewStorySubHeading},o))),te.createElement("div",{className:Xr.viewStoryHeaderListActionsContainer},i?te.createElement(To,{className:Xr.playStoryButton,"data-qa-anchor":"play_button",onClick:a}):te.createElement(As,{className:Xr.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:s}),r&&te.createElement(U3,{pageId:"story_page",onPress:l}),te.createElement(Nr,{defaultClassName:gr(Xr.closeButton),pageId:"story_page",onPress:c}))),Y5=_de;function vc({queryParams:e,shouldCall:t=!0}){let n=pt({fetcher:CommunityRepository.Membership.getMembers,params:E(d({},e),{includeDeleted:!1}),shouldCall:!!(e!=null&&e.communityId)&&t}),{items:o}=n,r=P(n,["items"]);return d({members:o},r)}var bo={iconButton:"tg",hyperLinkContainer:"gr",rendererContainer:"ig",storyVideo:"lg",muteCircleIcon:"sg",unmuteCircleIcon:"cg",loadingOverlay:"ng",storyImageContainer:"dg",storyImage:"mg",playStoryButton:"pg",pauseStoryButton:"gg",closeButton:"hg",verifiedBadge:"fg",dotsButton:"bg",viewStoryInfoContainer:"ug",viewStoryCompostBarContainer:"vg",viewStoryCompostBarViewIconContainer:"xg",viewStoryCompostBarEngagementContainer:"wg",viewStoryCompostBarEngagementIconContainer:"yg",header:"kg",viewStoryContainer:"jg",viewStoryHeaderContainer:"zg",avatarContainer:"Xg",addStoryButton:"hr",viewStoryHeaderListActionsContainer:"Yg",viewStoryHeadingInfoContainer:"Cg",viewStoryHeading:"Ag",viewStoryHeadingTitle:"Mg",viewStorySubHeading:"Sg",story:"Eg",storyContent:"Ig",actionButton:"fr",navigationOverlay:"Rg",leftOverlay:"Ug",rightOverlay:"Bg",imageFit:"Dg",imageFill:"Fg"};var R5={progressBarContainer:"Hg",progressSegment:"Lg",progressBar:"Tg"};var t2=te.memo(({pageId:e="*",componentId:t="*",duration:o,currentIndex:r,storiesCount:n,isPaused:i,onComplete:a})=>{let s="progress_bar",{config:l,isExcluded:c}=A({pageId:e,componentId:t,elementId:s}),[p,u]=useState(new Array(n).fill(0)),[g,f]=useState(r),y=l==null?void 0:l.backgroundColor,C=l==null?void 0:l.progressColor;return useEffect(()=>{r<g&&u(v=>{let h=[...v];return h[r]=0,h}),f(r);},[r,g]),useEffect(()=>{let v;return i||(v=setInterval(()=>{u(h=>{let x=[...h];return x[r]<100&&(x[r]+=100/o*100,x[r]>=100&&(x[r]=100,a())),x});},100)),()=>{v&&clearInterval(v);}},[o,r,i,a]),c?null:te.createElement("div",{className:gr(R5.progressBarContainer),style:{backgroundColor:y}},p.map((v,h)=>te.createElement("div",{key:h,className:gr(R5.progressSegment),style:{width:`calc(${100/n}% - 4px)`}},te.createElement("div",{className:gr(R5.progressBar),style:{width:`${h<r?100:h===r?v:0}%`,backgroundColor:C}}))))});var Ade=({story:{actions:e,fileInputRef:t,addStoryButton:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l,url:c},action:p,config:u,onClose:g,onClickCommunity:f})=>{var Fi,Ma,nt,Mn;let{formatMessage:y}=useIntl(),[C,v]=useState(!1),[h,x]=useState(!1),[b,M]=useState(!1),[I,w]=useState(!1),{loader:k}=u,{client:S}=De(),[L,D]=useState(""),H=useRef(null),$=!!(l&&l.myReactions&&l.myReactions.includes($n)),B=(l==null?void 0:l.reactionsCount)||0,{storyId:z,syncState:V,reach:K,commentsCount:U,createdAt:j,creator:Z,community:G,myReactions:Q,data:T,items:F}=l,{members:q}=vc({queryParams:{communityId:G==null?void 0:G.communityId},shouldCall:!!(G!=null&&G.communityId)}),ie=(q==null?void 0:q.find(Je=>Je.userId===(S==null?void 0:S.userId)))!=null,{user:ce}=Cr(S==null?void 0:S.userId),Ke=(G==null?void 0:G.isOfficial)||!1,xt=(Z==null?void 0:Z.userId)===(ce==null?void 0:ce.userId),to=m5(ce==null?void 0:ce.roles),jt=l5(ce==null?void 0:ce.roles),He=to||jt||us(S,G==null?void 0:G.communityId),mr=useMemo(()=>te.createElement("div",{"data-qa-anchor":"community_display_name"},G==null?void 0:G.displayName),[G==null?void 0:G.displayName]),Fr=useMemo(()=>j&&(Z!=null&&Z.displayName)?te.createElement("span",null,te.createElement("span",{"data-qa-anchor":"created_at"},d5(j))," \u2022 By"," ",te.createElement("span",{"data-qa-anchor":"creator_display_name"},Z==null?void 0:Z.displayName)):"",[j,Z==null?void 0:Z.displayName]),Po="asc-uikit-stories-viewer",Qe=useCallback(()=>{if(H.current&&H.current.complete){let oo=new Lde().getPalette(H.current,2);if(oo){let Ae=`linear-gradient(to top, rgb(${oo[0].join(",")}), rgb(${oo[1].join(",")})`;D(Ae);}}},[]),wn=useCallback(()=>{v(!0),I&&w(!1),p("play",!0),Qe();},[p,I,Qe]),Or=()=>{p("play",!0),w(!1);},tn=()=>{p("pause",!0),w(!0);},pe=()=>{p("pause",!0),x(!0);},ge=()=>{p("play",!0),x(!1);},on=()=>{p("pause",!0),M(!0);},jo=()=>{p("play",!0),M(!1);},Ur=()=>{g();},Hi=()=>{i();};return useEffect(()=>{H.current&&H.current.complete&&Qe();},[]),useEffect(()=>{if(t.current){let Je=()=>{p("pause",!0),w(!0);},oo=()=>{p("play",!0),w(!1);};return t.current.addEventListener("click",Je),t.current.addEventListener("cancel",oo),()=>{t.current&&(t.current.removeEventListener("cancel",oo),t.current.removeEventListener("click",Je));}}},[t]),useEffect(()=>{var Je,oo;if(s){let Ae=()=>{p("pause",!0),w(!0);},Ye=()=>{p("play",!0),w(!1);};return (Je=s.current)==null||Je.addEventListener("dragstart",Ae),(oo=s.current)==null||oo.addEventListener("dragend",Ye),()=>{var Go,dr;(Go=s.current)==null||Go.removeEventListener("dragstart",Ae),(dr=s.current)==null||dr.removeEventListener("dragend",Ye);}}},[s]),te.createElement("div",{className:bo.rendererContainer,style:{background:L}},te.createElement(t2,{pageId:a,duration:5e3,currentIndex:r,storiesCount:n,isPaused:I||h||b,onComplete:Hi}),te.createElement(Y5,{community:G,heading:mr,subheading:Fr,isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:He,isOfficial:Ke,isPaused:I,onPlay:Or,onPause:tn,onAction:pe,onClickCommunity:()=>f==null?void 0:f(),onClose:Ur,addStoryButton:o}),te.createElement("div",{className:gr(bo.storyImageContainer,{[bo.imageFit]:T.imageDisplayMode==="fit",[bo.imageFill]:T.imageDisplayMode==="fill"})},te.createElement("img",{ref:H,className:gr(bo.storyImage,{[bo.imageFit]:T.imageDisplayMode==="fit",[bo.imageFill]:T.imageDisplayMode==="fill"}),"data-qa-anchor":"image_view",src:c!=null?c:l==null?void 0:l.data.fileData,onLoad:wn,alt:"Story Image",crossOrigin:"anonymous"})),!C&&te.createElement("div",{className:bo.loadingOverlay},k||te.createElement("div",null,"loading...")),te.createElement(Er,{rootId:Po,isOpen:h,onClose:ge,mountPoint:document.getElementById(Po),detent:"content-height"},e==null?void 0:e.map(Je=>te.createElement(O,{key:Je.name,className:bo.actionButton,onPress:()=>Je==null?void 0:Je.action()},(Je==null?void 0:Je.icon)&&Je.icon,te.createElement(N.BodyBold,null,Je.name)))),te.createElement(Er,{rootId:Po,isOpen:b,onClose:jo,mountPoint:document.getElementById(Po),detent:"full-height",headerTitle:y({id:"storyViewer.commentSheet.title"})},te.createElement(Dm,{referenceId:z,referenceType:"story",community:G,shouldAllowCreation:G==null?void 0:G.allowCommentInStory,shouldAllowInteraction:ie})),((Ma=(Fi=F==null?void 0:F[0])==null?void 0:Fi.data)==null?void 0:Ma.url)&&te.createElement("div",{className:bo.hyperLinkContainer},te.createElement(vi,{href:F[0].data.url.startsWith("http")?F[0].data.url:`https://${F[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},te.createElement(yw,{lines:1},te.createElement("span",null,((Mn=(nt=F[0])==null?void 0:nt.data)==null?void 0:Mn.customText)||F[0].data.url.replace(/^https?:\/\//,""))))),te.createElement(X5,{pageId:a,storyId:z,syncState:V,reach:K,commentsCount:U,reactionsCount:B,isLiked:$,myReactions:Q,onClickComment:on,showImpression:xt||us(S,G==null?void 0:G.communityId),isMember:ie}))},Dde=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&(!e.type||e.type==="image"),priority:2}},FL={renderer:Ade,tester:Dde};var Ode=()=>{let[e,t]=useState(!1),o=useCallback(()=>t(!0),[]),r=useCallback(()=>t(!1),[]);return {muted:e,mute:o,unmute:r}},Ude=e=>{let[t,o]=useState(!1),r=useCallback(()=>{e("play",!0),o(!1);},[e]),n=useCallback(()=>{e("pause",!0),o(!0);},[e]);return {isPaused:t,play:r,pause:n}},zde=e=>{let[t,o]=useState(!1),[r,n]=useState(!1),i=useCallback(()=>{e("pause",!0),o(!0);},[e]),a=useCallback(()=>{e("play",!0),o(!1);},[e]),s=useCallback(()=>{e("pause",!0),n(!0);},[e]),l=useCallback(()=>{e("play",!0),n(!1);},[e]);return {isBottomSheetOpen:t,isOpenCommentSheet:r,openBottomSheet:i,closeBottomSheet:a,openCommentSheet:s,closeCommentSheet:l}},$de=({story:{actions:e,addStoryButton:t,fileInputRef:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l},action:c,config:p,messageHandler:u,onClose:g,onClickCommunity:f})=>{var Or,tn,pe,ge,on,jo,Ur,Hi,Fi,Ma;let[y,C]=useState(!1),{loader:v}=p,{client:h}=De(),{user:x}=Cr(h==null?void 0:h.userId),b=useRef(null),{muted:M,mute:I,unmute:w}=Ode(),{isPaused:k,play:S,pause:L}=Ude(c),{isBottomSheetOpen:D,isOpenCommentSheet:H,openBottomSheet:$,closeBottomSheet:B,openCommentSheet:z,closeCommentSheet:V}=zde(c),{storyId:K,syncState:U,reach:j,commentsCount:Z,createdAt:G,creator:Q,community:T,myReactions:F,data:q,items:Y}=l,ie=(Or=l==null?void 0:l.myReactions)==null?void 0:Or.includes($n),ce=(l==null?void 0:l.reactions[$n])||0,{members:Ke}=vc({queryParams:{communityId:T==null?void 0:T.communityId},shouldCall:!!(T!=null&&T.communityId)}),xt=Ke==null?void 0:Ke.some(nt=>nt.userId===(h==null?void 0:h.userId)),to=(T==null?void 0:T.isOfficial)||!1,jt=(Q==null?void 0:Q.userId)===(x==null?void 0:x.userId),He=m5(x==null?void 0:x.roles),mr=l5(x==null?void 0:x.roles),Fr=He||mr||us(h,T==null?void 0:T.communityId),Po=useCallback(()=>{var nt;u("UPDATE_VIDEO_DURATION",{duration:(nt=l==null?void 0:l.videoData)==null?void 0:nt.attributes.metadata.video.duration}),C(!0),c("play",!0);},[u,(tn=l==null?void 0:l.videoData)==null?void 0:tn.attributes.metadata.video.duration,c]),Qe=useCallback(()=>{r+1<n?i():g();},[r,n,i,g]);useEffect(()=>{b.current&&(k||D||H?(b.current.pause(),c("pause",!0)):(b.current.play(),c("play",!0)));},[k,D,H,c]),useEffect(()=>{if(o.current){let nt=()=>{c("pause",!0),L();},Mn=()=>{c("play",!0),S();};return o.current.addEventListener("click",nt),o.current.addEventListener("cancel",Mn),()=>{var Je,oo;(Je=o.current)==null||Je.removeEventListener("click",nt),(oo=o.current)==null||oo.removeEventListener("cancel",Mn);}}},[c,L,S]),useEffect(()=>{if(s!=null&&s.current){let nt=()=>{c("pause",!0),L();},Mn=()=>{c("play",!0),S();};return s.current.addEventListener("dragstart",nt),s.current.addEventListener("dragend",Mn),()=>{var Je,oo;(Je=s.current)==null||Je.removeEventListener("dragstart",nt),(oo=s.current)==null||oo.removeEventListener("dragend",Mn);}}},[c,L,S,s]);let wn=Math.round(((pe=l==null?void 0:l.videoData)==null?void 0:pe.attributes.metadata.video.duration)*1e3);return te.createElement("div",{className:gr(bo.rendererContainer)},te.createElement(t2,{pageId:a,duration:wn,currentIndex:r,storiesCount:n,isPaused:k||D||H,onComplete:Qe}),te.createElement(G3,{pageId:"story_page",componentId:"*",isMuted:M,onPress:M?w:I}),te.createElement(Y5,{community:T,heading:te.createElement("div",{"data-qa-anchor":"community_display_name"},T==null?void 0:T.displayName),subheading:G&&(Q!=null&&Q.displayName)?te.createElement("span",null,te.createElement("span",{"data-qa-anchor":"created_at"},d5(G))," \u2022 By"," ",te.createElement("span",{"data-qa-anchor":"creator_display_name"},Q==null?void 0:Q.displayName)):"",isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:Fr,isOfficial:to,isPaused:k,onPlay:S,onPause:L,onMute:I,onUnmute:w,onAction:$,onClickCommunity:()=>f==null?void 0:f(),onClose:g,addStoryButton:t}),te.createElement("video",{"data-qa-anchor":"video_view",ref:b,className:gr(bo.storyVideo),src:((ge=l==null?void 0:l.videoData)==null?void 0:ge.fileUrl)||((jo=(on=l==null?void 0:l.videoData)==null?void 0:on.videoUrl)==null?void 0:jo.original),controls:!1,onLoadedData:Po,playsInline:!0,onWaiting:()=>c("pause",!0),onPlaying:()=>c("play",!0),muted:M,autoPlay:!0}),!y&&te.createElement("div",{className:gr(bo.loadingOverlay)},v||te.createElement("div",null,"loading...")),te.createElement(Er,{rootId:"asc-uikit-stories-viewer",isOpen:D,onClose:B,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"content-height"},e==null?void 0:e.map(nt=>te.createElement(O,{key:nt.name,className:gr(bo.actionButton),onPress:nt==null?void 0:nt.action},nt==null?void 0:nt.icon,te.createElement(N.BodyBold,null,nt.name)))),te.createElement(Er,{rootId:"asc-uikit-stories-viewer",isOpen:H,onClose:V,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"full-height"},te.createElement(Dm,{referenceId:K,referenceType:"story",community:T,shouldAllowCreation:T==null?void 0:T.allowCommentInStory,shouldAllowInteraction:xt})),((Hi=(Ur=Y==null?void 0:Y[0])==null?void 0:Ur.data)==null?void 0:Hi.url)&&te.createElement("div",{className:gr(bo.hyperLinkContainer)},te.createElement(vi,{href:Y[0].data.url.startsWith("http")?Y[0].data.url:`https://${Y[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},te.createElement(yw,{lines:1},te.createElement("span",null,((Ma=(Fi=Y[0])==null?void 0:Fi.data)==null?void 0:Ma.customText)||Y[0].data.url.replace(/^https?:\/\//,""))))),te.createElement(X5,{pageId:a,storyId:K,syncState:U,reach:j,commentsCount:Z,reactionsCount:ce,isLiked:ie,onClickComment:z,myReactions:F,showImpression:jt||us(h,T==null?void 0:T.communityId),isMember:xt}))},Vde=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&e.type==="video",priority:2}},OL={renderer:$de,tester:Vde};var Gde=({story:e,action:t})=>(useEffect(()=>{t("play");},[e]),te.createElement("div",{style:zL.storyContent},te.createElement("p",{style:zL.text},"This story could not be loaded."))),zL={storyContent:{width:"100%",maxHeight:"100%",margin:"auto"},text:{textAlign:"center",color:"white",width:"90%",margin:"auto"}},Zde=()=>({condition:!0,priority:1}),$L={renderer:Gde,tester:Zde};var qde=e=>{useEffect(()=>{e.action("play");},[e.story]);let t=e.story.originalContent;return te.createElement(t,d({},e))},Kde=e=>({condition:!!e.content,priority:2}),VL={renderer:qde,tester:Kde};var Yt={drawer__content:"br",drawer__innerContent:"Vg",drawer__placeholder:"qg",drawer__overlay:"Gg",drawer__title:"Jg",drawer__content__data:"Kg",drawer__content__data__title:"Ng",drawer__content__data__text:"Og",drawer__content__data__caption:"Pg",drawer__content__data__infoIcon:"Qg",drawer__content__emptySpace:"Wg",drawer__container:"Zg",drawer__innerContainer:"_g"};var jL=({isOpen:e,onOpenChange:t,ad:o,targetRef:r})=>{var n;return te.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:i=>{i.preventDefault(),i.stopPropagation();}},te.createElement(Drawer.Portal,{container:r==null?void 0:r.current},te.createElement("div",{className:Yt.drawer__container},te.createElement("div",{className:Yt.drawer__innerContainer},te.createElement(Drawer.Overlay,{className:Yt.drawer__overlay}),te.createElement(Drawer.Content,{className:Yt.drawer__content},te.createElement("div",{className:Yt.drawer__innerContent},te.createElement("div",{className:Yt.drawer__placeholder}),te.createElement(Drawer.Title,{className:Yt.drawer__title},te.createElement(N.Title,null,"About this advertisement")),te.createElement("div",{className:Yt.drawer__content__data},te.createElement(N.BodyBold,{className:Yt.drawer__content__data__title},"Why this advertisement?"),te.createElement("div",{className:Yt.drawer__content__data__text},te.createElement(gn,{className:Yt.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Yt.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),te.createElement("div",{className:Yt.drawer__content__data},te.createElement(N.BodyBold,{className:Yt.drawer__content__data__title},"About this advertiser"),te.createElement("div",{className:Yt.drawer__content__data__text},te.createElement(gn,{className:Yt.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Yt.drawer__content__data__caption},"Advertiser name: ",(n=o.advertiser)==null?void 0:n.companyName)))),te.createElement("div",{className:Yt.drawer__content__emptySpace}))))))};var Rt={iconButton:"eh",hyperLinkContainer:"rh",hyperLink__text:"ah",rendererContainer:"oh",storyVideo:"th",muteCircleIcon:"ih",unmuteCircleIcon:"lh",loadingOverlay:"sh",storyImageContainer:"ch",storyImage:"nh",playStoryButton:"dh",pauseStoryButton:"mh",closeButton:"ph",verifiedBadge:"gh",dotsButton:"hh",viewStoryInfoContainer:"fh",viewStoryCompostBarContainer:"bh",viewStoryCompostBarViewIconContainer:"uh",viewStoryCompostBarEngagementContainer:"vh",viewStoryCompostBarEngagementIconContainer:"xh",header:"wh",viewStoryContainer:"yh",viewStoryHeaderContainer:"kh",avatarContainer:"jh",addStoryButton:"ur",viewStoryHeaderListActionsContainer:"zh",viewStoryHeadingInfoContainer:"Xh",viewStoryHeading:"Yh",viewStoryHeadingTitle:"Ch",viewStorySubHeading:"Ah",story:"Mh",storyContent:"Sh",actionButton:"vr",navigationOverlay:"Eh",leftOverlay:"Ih",rightOverlay:"Rh",imageFit:"Uh",imageFill:"Bh",infoIcon__button:"Dh",infoIcon:"Fh",storyAd__main:"Hh",storyAd__topBar:"Lh",storyAd__topBar__left:"Th",storyAd__topBar__avatar:"Vh",storyAd__topBar__text:"qh",storyAd__topBar__advertiserName:"Gh",storyAd__topBar__right:"Jh",storyAd__closeButton:"Kh"};var QL=({pageId:e="*",ad:t,avatarUrl:o,adImageUrl:r,currentIndex:n,isPaused:i,storiesCount:a,renderLoader:s=()=>te.createElement("div",null,"loading..."),onComplete:l=()=>{},onPauseClick:c,onPlayClick:p,onClose:u,onImageLoaded:g,onAdvertisementInfoOpen:f,onAdvertisementInfoClose:y})=>{var S;let[C,v]=useState(!1),[h,x]=useState(!1),b=()=>{x(!0),f==null||f();},M=()=>{x(!1),y==null||y();},I=useRef(null),w=useRef(null),k=()=>{v(!0),g==null||g();};return te.createElement("div",{className:Rt.rendererContainer,ref:w},te.createElement("div",{className:Rt.storyAd__main},te.createElement(t2,{pageId:e,duration:5e3,currentIndex:n,storiesCount:a,isPaused:i,onComplete:l}),te.createElement("div",{className:Rt.storyAd__topBar},te.createElement("div",{className:Rt.storyAd__topBar__left},te.createElement("div",{className:Rt.storyAd__topBar__avatar},te.createElement(bt,{defaultImage:te.createElement(Am,null),avatarUrl:o})),te.createElement("div",{className:Rt.storyAd__topBar__text},te.createElement(N.BodyBold,{className:Rt.storyAd__topBar__advertiserName},(S=t.advertiser)==null?void 0:S.name),te.createElement(Lm,null))),te.createElement("div",{className:Rt.storyAd__topBar__right},i?te.createElement(To,{className:Rt.playStoryButton,"data-qa-anchor":"play_button",onClick:()=>p==null?void 0:p()}):te.createElement(As,{className:Rt.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:()=>c==null?void 0:c()}),te.createElement(Nr,{defaultClassName:gr(Rt.storyAd__closeButton),pageId:e,onPress:u}))),te.createElement("div",{className:gr(Rt.storyImageContainer)},te.createElement("img",{ref:I,className:gr(Rt.storyImage),"data-qa-anchor":"image_view",src:r,onLoad:k,alt:"Story Image",crossOrigin:"anonymous"})),!C&&te.createElement("div",{className:Rt.loadingOverlay},s()),t.callToActionUrl&&te.createElement("div",{className:Rt.hyperLinkContainer},te.createElement("a",{className:Rt.hyperLink__text,href:t.callToActionUrl,target:"_blank",rel:"noreferrer"},t.callToAction)),te.createElement(O,{className:Rt.infoIcon__button,onPress:()=>{b();}},te.createElement(gn,{className:Rt.infoIcon}))),te.createElement(jL,{ad:t,isOpen:h,targetRef:w,onOpenChange:L=>!L&&M()}))};var oce=({story:e,action:t,config:o,onClose:r})=>{var k,S,L,D,H,$;let[n,i]=useState(!1),{loader:a}=o,{ad:s,currentIndex:l,storiesCount:c,increaseIndex:p,pageId:u,dragEventTarget:g}=e,f=()=>{t("play",!0),i(!1);},y=()=>{t("pause",!0),i(!0);},v=it({fileId:(S=(k=s==null?void 0:s.advertiser)==null?void 0:k.avatar)==null?void 0:S.fileId})||((D=(L=s==null?void 0:s.advertiser)==null?void 0:L.avatar)==null?void 0:D.fileUrl)||"",x=it({fileId:(H=s==null?void 0:s.image9_16)==null?void 0:H.fileId})||(($=s==null?void 0:s.image9_16)==null?void 0:$.fileUrl)||"",b=useCallback(()=>{n&&i(!1),t("play",!0);},[t,n]),M=()=>{t("pause",!0);},I=()=>{t("play",!0);},w=()=>{p();};return useEffect(()=>{var B,z;if(g){let V=()=>{t("pause",!0),i(!0);},K=()=>{t("play",!0),i(!1);};return (B=g.current)==null||B.addEventListener("dragstart",V),(z=g.current)==null||z.addEventListener("dragend",K),()=>{var U,j;(U=g.current)==null||U.removeEventListener("dragstart",V),(j=g.current)==null||j.removeEventListener("dragend",K);}}},[g]),s?te.createElement(QL,{pageId:u,ad:s,adImageUrl:x,avatarUrl:v,currentIndex:l,isPaused:n,storiesCount:c,renderLoader:()=>a,onComplete:w,onPauseClick:y,onPlayClick:f,onClose:r,onImageLoaded:b,onAdvertisementInfoOpen:M,onAdvertisementInfoClose:I}):null},rce=e=>({condition:!!e.ad,priority:2}),WL={renderer:oce,tester:rce};var o2=[FL,OL,WL,VL,$L];var Tf={storyButton:"xr",desktopOnly:"wr"};var ace=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),te.createElement("path",{d:"M12 23.91C5.578 23.91.375 18.709.375 12.287.375 5.864 5.578.66 12 .66s11.625 5.203 11.625 11.625S18.422 23.91 12 23.91zM6.656 13.084l6.328 6.375c.47.422 1.172.422 1.594 0l.797-.797c.422-.422.422-1.172 0-1.594l-4.781-4.781 4.781-4.735c.422-.468.422-1.171 0-1.593l-.797-.797c-.422-.422-1.172-.422-1.594 0l-6.328 6.328c-.468.469-.468 1.172 0 1.594z"})),Mc=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_left_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement("button",{"data-qa-anchor":n,className:gr(Tf.storyButton,Tf.desktopOnly),onClick:o,style:a},te.createElement(ace,null))};var kf={storyButton:"yr",desktopOnly:"kr"};var mce=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),te.createElement("path",{d:"M12 .66c6.422 0 11.625 5.204 11.625 11.626S18.422 23.91 12 23.91.375 18.708.375 12.286 5.578.66 12 .66zm5.297 10.829L10.969 5.16c-.422-.422-1.172-.422-1.594 0l-.797.797c-.422.422-.422 1.172 0 1.593l4.781 4.735-4.78 4.781c-.423.422-.423 1.172 0 1.594l.796.797c.422.422 1.172.422 1.594 0l6.328-6.375c.469-.422.469-1.125 0-1.594z"})),Pc=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_right_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement("button",{"data-qa-anchor":n,className:gr(kf.storyButton,kf.desktopOnly),onClick:o,style:a},te.createElement(mce,null))};var ar={overlayLeft:"jr",overlayRight:"zr",viewStoryContent:"Nh",viewStoryOverlay:"Oh",hiddenInput:"Ph",viewStoryContainer:"Qh",storyWrapper:"Wh",deleteIcon:"Zh",arrowButton:"_h"};var hce=7e3,Ms=e=>!!(e!=null&&e.storyId),ru=({pageId:e="*",communityId:t,onBack:o,onClose:r,onSwipeDown:n,onClickCommunity:i,goToDraftStoryPage:a})=>{var Q;let{accessibilityId:s}=Re({pageId:e}),{confirm:l}=et(),c=So(),p=useMotionValue(0),u=useRef(null),g=useRef(new EventTarget),[f,y]=useState(!1),{stories:C}=ta({targetId:t,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),v=useMemo(()=>o2.map(({renderer:T,tester:F})=>({renderer:Y=>T(E(d({},Y),{onClose:()=>r(t),onClickCommunity:()=>i(t)})),tester:F})),[o2,r,i,t]),h=useRef(null),{client:x,currentUserId:b}=De(),[M,I]=useState(0),{file:w,setFile:k}=yi(),S=C[M],L=Ms(S)?((Q=S==null?void 0:S.creator)==null?void 0:Q.userId)===b:!1,D=Ms(S)?ap(x,S==null?void 0:S.targetId):!1,H=()=>{if(M===C.length-1){o();return}I(M+1);},$=()=>{M!==0&&I(M-1);},B=T=>{l({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You'll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){y(!1),yield StoryRepository.softDeleteStory(T),M===0?r(t):I(M-1),c.success({content:"Story deleted"});})});},z=T=>{B(T);},V=useCallback((T,F,q,Y)=>_(void 0,null,function*(){var ie;try{let ce=new FormData;ce.append("files",T),k(null),T!=null&&T.type.includes("image")&&b?yield StoryRepository.createImageStory("user",b,ce,q,F,Y):b&&(yield StoryRepository.createVideoStory("user",b,ce,q,Y)),c.success({content:"Successfully shared story"});}catch(ce){ce instanceof Error&&c.info({content:(ie=ce.message)!=null?ie:"Failed to share story"});}}),[b,c,k]),K=()=>{k(null);},U=te.createElement(FileTrigger,{ref:h,onSelect:T=>{let F=Array.from(T);k(F[0]);}},te.createElement(is,{pageId:e})),j=()=>{if(M===C.length-1){o();return}I(T=>T+1);},Z=C==null?void 0:C.map(T=>{var F,q,Y;if(Ms(T)){let ie=(T==null?void 0:T.dataType)==="image",ce=ie?(F=T==null?void 0:T.imageData)==null?void 0:F.fileUrl:(Y=(q=T==null?void 0:T.videoData)==null?void 0:q.videoUrl)==null?void 0:Y["720p"];return {story:T,url:ce,type:ie?"image":"video",actions:[L||D?{name:"Delete",action:()=>z(T==null?void 0:T.storyId),icon:te.createElement(h4,{fill:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-default")})}:null].filter(rn),onCreateStory:V,discardStory:K,addStoryButton:U,fileInputRef:h,currentIndex:M,storiesCount:C==null?void 0:C.length,increaseIndex:j,pageId:e,dragEventTarget:g.current,setIsBottomSheetOpen:y,isBottomSheetOpen:f}}else return {ad:T,actions:[],pageId:e,currentIndex:M,storiesCount:C==null?void 0:C.length,increaseIndex:j}}),G="asc-uikit-stories-viewer";return useEffect(()=>{let T=C[C.length-1];Ms(T)&&(T==null?void 0:T.syncState)==="syncing"&&I(C.length-1),S&&Ms(S)&&(S==null||S.analytics.markAsSeen());},[M,C]),useEffect(()=>{if(C.filter(Ms).every(F=>F==null?void 0:F.isSeen))return;let T=C.findIndex(F=>Ms(F)?!(F!=null&&F.isSeen):!1);T!==-1&&I(T);},[]),Xa({targetId:t,targetType:"community"}),w&&a(t,"community",w.type.includes("image")?{type:"image",url:URL.createObjectURL(w)}:{type:"video",url:URL.createObjectURL(w)},"communityFeed"),!C||C.length===0?null:te.createElement("div",{className:gr(ar.storyWrapper)},te.createElement(Mc,{onClick:$}),te.createElement(motion.div,{id:G,ref:u,"data-qa-anchor":s,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{g.current.dispatchEvent(new Event("dragstart"));},onDrag:(T,F)=>{F.point.y<F.point.y-F.offset.y&&p.set(0);},onDragEnd:(T,F)=>{g.current.dispatchEvent(new Event("dragend")),F.offset.y>100?n(t):p.set(0);},className:gr(ar.viewStoryContainer)},te.createElement("div",{className:gr(ar.viewStoryContent)},te.createElement("div",{className:gr(ar.overlayLeft),onClick:$}),te.createElement("div",{className:gr(ar.overlayRight),onClick:H}),te.createElement("div",{className:gr(ar.viewStoryOverlay)}),te.createElement(uce,{key:C==null?void 0:C.length,progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:M,stories:Z,renderers:v,defaultInterval:hce,onStoryStart:()=>Ms(S)&&(S==null?void 0:S.analytics.markAsSeen()),onStoryEnd:H,onNext:H,onPrevious:$,onAllStoriesEnd:H}))),te.createElement(Pc,{onClick:H}))};var Mce=7e3,Ps=e=>!!(e!=null&&e.storyId),JL=({pageId:e="*",targetId:t,targetIds:o,onChangePage:r,onClickStory:n,goToDraftStoryPage:i,onClose:a,onSwipeDown:s,onClickCommunity:l})=>{var Q;let{accessibilityId:c}=Re({pageId:e}),{confirm:p}=et(),u=So(),{client:g,currentUserId:f}=De(),{file:y,setFile:C}=yi(),v=useMotionValue(0),h=useRef(null),x=useRef(new EventTarget),[b,M]=useState(0),I=useRef(null),{stories:w}=ta({targetType:"community",targetId:t,options:{orderBy:"asc",sortBy:"createdAt"}}),k=useMemo(()=>o2.map(({renderer:T,tester:F})=>({renderer:Y=>T(E(d({},Y),{onClose:()=>a(t),onClickCommunity:()=>l(t)})),tester:F})),[o2,a,s,l,t]),S=w[b],L=Ps(S)?((Q=S==null?void 0:S.creator)==null?void 0:Q.userId)===f:!1,D=Ps(S)?ap(g,S==null?void 0:S.targetId):!1,H=()=>{if(b===0){let F=o.indexOf(t)-1;if(F>=0){let q=o[F];n(q);}else r==null||r();M(0);return}M(T=>T-1);},$=T=>{let F=b===w.length-1;p({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){yield StoryRepository.softDeleteStory(T),u.success({content:"Story deleted"}),w.length===1?r==null||r():F?H():M(q=>q);})});},B=T=>{$(T);},z=(T,F,q,Y)=>_(void 0,null,function*(){var ie;try{let ce=new FormData;if(ce.append("files",T),C(null),T!=null&&T.type.includes("image")&&f){let{data:Ke}=yield StoryRepository.createImageStory("user",f,ce,q,F,Y);Ke&&u.success({content:"Successfully shared story"});}else if(f){let{data:Ke}=yield StoryRepository.createVideoStory("user",f,ce,q,Y);Ke&&u.success({content:"Successfully shared story"});}}catch(ce){ce instanceof Error&&u.info({content:(ie=ce.message)!=null?ie:"Failed to share story"});}}),V=()=>{C(null);},K=te.createElement(FileTrigger,{ref:I,onSelect:T=>{let F=Array.from(T);C(F[0]);}},te.createElement(is,{pageId:e})),U=()=>{b!==w.length-1&&M(T=>T+1);},j=w==null?void 0:w.map(T=>{var F,q,Y;if(Ps(T)){let ie=(T==null?void 0:T.dataType)==="image",ce=ie?(F=T==null?void 0:T.imageData)==null?void 0:F.fileUrl:(Y=(q=T==null?void 0:T.videoData)==null?void 0:q.videoUrl)==null?void 0:Y["720p"];return {story:T,url:ce,type:ie?"image":"video",actions:[L||D?{name:"Delete",action:()=>B(T==null?void 0:T.storyId),icon:te.createElement(u1,{className:ar.deleteIcon})}:null].filter(rn),onCreateStory:z,discardStory:V,addStoryButton:K,fileInputRef:I,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:U,pageId:e}}else return {ad:T,actions:[],pageId:e,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:U}}),Z=()=>{if(b===(j==null?void 0:j.length)-1){let F=o.indexOf(t)+1;if(F<o.length){let q=o[F];n(q);}else r==null||r();M(0);return}M(T=>T+1);},G="asc-uikit-stories-viewer";return useEffect(()=>{let T=w[w.length-1];Ps(T)&&(T==null?void 0:T.syncState)==="syncing"&&M(w.length-1),S&&Ps(S)&&(S==null||S.analytics.markAsSeen());},[S,w]),useEffect(()=>{if(w.filter(Ps).every(F=>F==null?void 0:F.isSeen))return;let T=w.findIndex(F=>Ps(F)?!(F!=null&&F.isSeen):!1);T!==-1&&M(T);},[]),useEffect(()=>{y&&i(t,"community",y.type.includes("image")?{type:"image",url:URL.createObjectURL(y)}:{type:"video",url:URL.createObjectURL(y)},"globalFeed");},[y,i,t]),Xa({targetId:t,targetType:"community"}),!w||w.length===0?null:te.createElement("div",{className:gr(ar.storyWrapper),"data-qa-anchor":c},te.createElement(Mc,{onClick:H}),te.createElement(motion.div,{id:G,ref:h,"data-qa-anchor":c,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{x.current.dispatchEvent(new Event("dragstart"));},onDrag:(T,F)=>{F.point.y<F.point.y-F.offset.y&&v.set(0);},onDragEnd:(T,F)=>{x.current.dispatchEvent(new Event("dragend")),F.offset.y>100?s(t):v.set(0);},className:gr(ar.viewStoryContainer)},te.createElement("div",{className:gr(ar.viewStoryContent)},te.createElement("div",{className:gr(ar.overlayLeft),onClick:H}),te.createElement("div",{className:gr(ar.overlayRight),onClick:Z}),te.createElement("div",{className:gr(ar.viewStoryOverlay)}),te.createElement(uce,{progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:b,stories:j,renderers:k,defaultInterval:Mce,onStoryStart:()=>Ps(S)&&(S==null?void 0:S.analytics.markAsSeen()),onStoryEnd:U,onNext:Z,onPrevious:H,onAllStoriesEnd:Z}))),te.createElement(Pc,{onClick:Z}))};var nu=({pageId:e="*",targetId:t,onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})=>{let{stories:l}=c5({seenState:"smart",limit:10});return te.createElement(JL,{pageId:e,targetId:t,targetIds:l.map(c=>c.targetId),onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})};var _ce=({type:e,targetId:t})=>{let o="view_story_page",{onBack:r,goToDraftStoryPage:n,onClickCommunity:i,onChangePage:a,onClickStory:s}=R(),l=()=>{a("newsfeed");},c=p=>{i(p);};return e==="communityFeed"?te.createElement(ru,{pageId:o,communityId:t,onBack:r,onClose:c,onSwipeDown:c,onClickCommunity:c,goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f)}):e==="globalFeed"?te.createElement(nu,{pageId:o,targetId:t,onChangePage:l,onClose:l,onSwipeDown:l,onClickStory:p=>s(p,"globalFeed"),goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f),onClickCommunity:p=>i(p)}):null},YL=_ce;var RL={roundedBackButton:"ef"};var kce=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"currentColor",d:"M16.176 23.914c-.14.176-.422.176-.598 0L8.23 16.566a.405.405 0 010-.597l7.348-7.348c.176-.176.457-.176.598 0l.703.668c.176.176.176.457 0 .598l-5.45 5.449h12.024c.211 0 .422.21.422.422v.984c0 .246-.21.422-.422.422H11.43l5.449 5.484c.176.141.176.422 0 .598l-.703.668z"})),Af=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="back_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{style:u,className:RL.roundedBackButton,onPress:n},te.createElement(oe,{"data-qa-anchor":a,defaultIcon:()=>te.createElement(kce,{className:o}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var Zn={draftPageContainer:"Xr",headerContainer:"rf",storyWrapper:"af",header:"of",topRightButtons:"tf",mainContainer:"if",previewImage:"lf",footer:"sf",videoPreview:"cf",hyperLinkContainer:"nf",playPauseButton:"df",progressBar:"mf",progressFill:"pf",userInfo:"gf",name:"hf",description:"ff",storyPreview:"bf"};var Df=({targetId:e,targetType:t,mediaType:o,goToCommunityPage:r,goToGlobalFeedPage:n,onDiscardCreateStory:i})=>{var V,K,U,j,Z,G;let{page:a}=Be(),s="create_story_page",{accessibilityId:l,themeStyles:c}=Re({pageId:s}),{file:p,setFile:u}=yi(),{community:g}=k3(e),[f,y]=useState(!1),{confirm:C}=et(),v=So(),[h,x]=useState([{data:{url:"",customText:""},type:"hyperlink"}]),b=()=>{y(!1);},[M,I]=useState("fit"),[w,k]=useState([]),S=()=>{I(M==="fit"?"fill":"fit"),M==="fill"&&k([]);},L=(Q,T,F,q)=>_(void 0,null,function*(){var Y;if(Q)try{let ie=new FormData;ie.append("files",Q),u(null),a.type==="DraftPage"&&a.context.storyType==="globalFeed"?n():r(e),(o==null?void 0:o.type)==="image"&&e?yield StoryRepository.createImageStory(t,e,ie,F,T,q):(o==null?void 0:o.type)==="video"&&e&&(yield StoryRepository.createVideoStory(t,e,ie,F,q)),v.success({content:"Successfully shared story"});}catch(ie){ie instanceof Error&&v.info({content:(Y=ie.message)!=null?Y:"Failed to share story"});}}),D=()=>{C({pageId:s,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",cancelText:"Cancel",okText:"Delete",onOk:()=>{u(null),i();}});},H=({url:Q,customText:T})=>{x([{data:{url:Q,customText:T||""},type:"hyperlink"}]),y(!1);},$=()=>{x([{data:{url:"",customText:""},type:"hyperlink"}]);},B=()=>{var Q,T;if((T=(Q=h[0])==null?void 0:Q.data)!=null&&T.url){v.info({content:"Can\u2019t add more than one link to your story."});return}y(!0);},z=useCallback(Q=>_(void 0,null,function*(){let T=new Image;T.crossOrigin="Anonymous",T.src=Q,T.onload=()=>{let q=new Lde().getPalette(T,2);q&&k(q.map(Y=>`rgb(${Y.join(",")})`));};}),[]);return useEffect(()=>{_(void 0,null,function*(){if((o==null?void 0:o.type)==="image")if(p){let T=URL.createObjectURL(p);yield z(T);}else o.url&&(yield z(o.url));});},[p,o,z]),te.createElement("div",{"data-qa-anchor":l,style:c,className:Zn.storyWrapper},te.createElement("div",{id:"asc-uikit-create-story",className:Zn.draftPageContainer},te.createElement("div",{className:Zn.headerContainer},te.createElement("div",{className:Zn.header},te.createElement(Af,{pageId:s,onPress:D}),te.createElement("div",{className:Zn.topRightButtons},(o==null?void 0:o.type)==="image"&&te.createElement(E3,{pageId:s,onPress:S}),te.createElement(F3,{pageId:s,onPress:B})))),(o==null?void 0:o.type)==="image"?te.createElement("div",{className:Zn.mainContainer,style:{background:`linear-gradient(
|
|
4816
|
+
0 16-7.16 16-16v-32c0-8.84-7.16-16-16-16z`}));var pf=({pageId:e="*",componentId:t="*",onClick:o,className:r,defaultClassName:n})=>{let i="community_join_button",{config:a,themeStyles:s,accessibilityId:l,isExcluded:c,uiReference:p,defaultConfig:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{"data-qa-anchor":l,style:s,onPress:o,className:gr(cf.communityJoinButton,r)},te.createElement(oe,{defaultIcon:()=>te.createElement(xL,{className:gr(cf.joinButton,n)}),imgIcon:()=>te.createElement("img",{src:a.icon,alt:p}),defaultIconName:u.icon,configIconName:a.icon}),"Join")};var q2e=createContext({activeTab:"community_feed",setActiveTab:()=>{}}),V5=()=>useContext(q2e);var IL=()=>te.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},te.createElement("circle",{cx:"9.88525",cy:"10",r:"5.5",fill:"white"}),te.createElement("path",{d:"M8.62899 17.3036C9.55401 18.2356 10.4373 18.2286 11.3693 17.3036L12.4125 16.2604C12.5099 16.163 12.5934 16.1352 12.7185 16.1352H14.193C15.5075 16.1352 16.1334 15.5092 16.1334 14.1947V12.7203C16.1334 12.5951 16.1682 12.5047 16.2586 12.4143L17.3019 11.3641C18.2339 10.439 18.2269 9.55575 17.3019 8.63073L16.2586 7.58748C16.1682 7.49011 16.1334 7.40665 16.1334 7.28146V5.807C16.1334 4.4925 15.5075 3.86655 14.193 3.86655H12.7185C12.5934 3.86655 12.5029 3.83178 12.4125 3.74136L11.3693 2.69811C10.4373 1.76614 9.55401 1.76614 8.62899 2.70507L7.58574 3.74136C7.49533 3.83178 7.40491 3.86655 7.27972 3.86655H5.80526C4.49076 3.86655 3.86481 4.47859 3.86481 5.807V7.28146C3.86481 7.40665 3.83004 7.49707 3.73962 7.58748L2.69637 8.63073C1.7644 9.55575 1.77136 10.439 2.69637 11.3641L3.73962 12.4143C3.83004 12.5047 3.86481 12.5951 3.86481 12.7203V14.1947C3.86481 15.5092 4.49076 16.1352 5.80526 16.1352H7.27972C7.40491 16.1352 7.48837 16.163 7.58574 16.2604L8.62899 17.3036ZM8.8446 13.5618C8.60117 13.5618 8.40643 13.4714 8.25342 13.3115L6.02782 10.8216C5.90959 10.6964 5.84699 10.5225 5.84699 10.3486C5.84699 9.93132 6.14606 9.63225 6.57727 9.63225C6.81374 9.63225 6.98761 9.70876 7.14062 9.87568L8.81678 11.7466L12.1691 6.96153C12.336 6.72506 12.5168 6.62769 12.795 6.62769C13.2263 6.62769 13.5323 6.92676 13.5323 7.33015C13.5323 7.46925 13.4766 7.64312 13.3723 7.78918L9.47055 13.2628C9.31059 13.4714 9.10194 13.5618 8.8446 13.5618Z",fill:"#1054DE"}));var ff=({pageId:e="*",componentId:t="*"})=>{let o="community_verify_badge",{config:r,themeStyles:n,accessibilityId:i,isExcluded:a,uiReference:s,defaultConfig:l}=A({pageId:e,componentId:t,elementId:o});return a?null:te.createElement(oe,{"data-qa-anchor":i,defaultIcon:()=>te.createElement(IL,null),imgIcon:()=>te.createElement("img",{src:r.icon,alt:s}),defaultIconName:l.icon,configIconName:r.icon})};var pc={descriptionWrapper:"Km",description:"lr",expanded:"Nm",toggleButton:"Om"};var yf=({pageId:e="*",componentId:t="*",description:o=""})=>{let[r,n]=useState(!1),[i,a]=useState(!1),s=useRef(null),l="community_description",{themeStyles:c,accessibilityId:p,isExcluded:u}=A({pageId:e,componentId:t,elementId:l}),g=180,f=o.length>g?o.slice(0,g):o;if(useEffect(()=>{s.current&&a(o.length>g);},[o]),u)return null;let y=()=>n(!0);return te.createElement("div",{"data-qa-anchor":p,style:c,className:pc.descriptionWrapper},te.createElement("div",{ref:s,className:`${pc.description} ${r?pc.expanded:""}`},te.createElement(N.Body,null,r?o:f," ",i&&!r&&te.createElement(O,{onPress:y,className:pc.toggleButton}," ","...See more"))))};var ML={communityName__truncate:"Pm"};var hf=({pageId:e="*",componentId:t="*",name:o=""})=>{let r="community_name",{config:n,themeStyles:i,accessibilityId:a,isExcluded:s}=A({pageId:e,componentId:t,elementId:r});return s?null:te.createElement(N.Heading,{"data-qa-anchor":a,className:ML.communityName__truncate},o)};var uc={communityInfo__container:"Qm",communityInfo__wrapper:"Wm",communityInfo__count:"Zm",communityInfo__title:"_m"};var Z5=({pageId:e="*",componentId:t="*",count:o,text:r,onClick:n})=>{let i="community_info",{config:a,accessibilityId:s,themeStyles:l,isExcluded:c}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{onPress:n,className:uc.communityInfo__container},te.createElement("div",{className:uc.communityInfo__wrapper},te.createElement(N.BodyBold,{className:uc.communityInfo__count},lb(o)),te.createElement(N.Caption,{className:uc.communityInfo__title},r)))};var ode=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"61",height:"61",viewBox:"0 0 61 61",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M33.0312 44.25C33.0312 45.7266 31.8711 46.7812 30.5 46.7812C29.0234 46.7812 27.9688 45.7266 27.9688 44.25V37.5C27.9688 36.1289 29.0234 34.9688 30.5 34.9688C31.8711 34.9688 33.0312 36.1289 33.0312 37.5V44.25ZM30.5 3.75C37.8828 3.75 44 9.86719 44 17.25V24H47.375C51.0664 24 54.125 27.0586 54.125 30.75V51C54.125 54.7969 51.0664 57.75 47.375 57.75H13.625C9.82812 57.75 6.875 54.7969 6.875 51V30.75C6.875 27.0586 9.82812 24 13.625 24H17V17.25C17 9.86719 23.0117 3.75 30.5 3.75ZM30.5 8.8125C25.7539 8.8125 22.0625 12.6094 22.0625 17.25V24H38.9375V17.25C38.9375 12.6094 35.1406 8.8125 30.5 8.8125ZM13.625 29.0625C12.6758 29.0625 11.9375 29.9062 11.9375 30.75V51C11.9375 51.9492 12.6758 52.6875 13.625 52.6875H47.375C48.2188 52.6875 49.0625 51.9492 49.0625 51V30.75C49.0625 29.9062 48.2188 29.0625 47.375 29.0625H13.625Z"}))},Q5=ode;var W5=({pageId:e="*",community:t})=>{let {onBack:o,onEditCommunity:r}=Be(),{activeTab:n,setActiveTab:i}=V5(),{communityCategories:a,avatarFileUrl:s,joinCommunity:l,pendingPostsCount:c,canReviewCommunityPosts:p}=vd(t.communityId),u=f=>{i(f);};t.isJoined&&t.postSetting&&p&&c>0;return te.createElement("div",{className:Ca.container},te.createElement(df,{pageId:e,image:s,onBack:o,onClickMenu:()=>r(t.communityId)}),te.createElement("div",{className:Ca.content},te.createElement("div",{className:Ca.name},!t.isPublic&&te.createElement(Q5,{className:Ca.communityProfile__privateIcon}),te.createElement(hf,{pageId:e,name:t.displayName}),t.isOfficial&&te.createElement(ff,null)),te.createElement(Dn,{pageId:e,categories:a}),te.createElement(yf,{pageId:e,description:t.description||""}),te.createElement("div",{className:Ca.communityProfile__communityInfo__container},te.createElement(Z5,{count:t.postsCount,text:"posts"}),te.createElement("div",{className:Ca.divider}),te.createElement(Z5,{count:t.membersCount,text:"members",onClick:()=>r(t.communityId,"MEMBERS")})),!t.isJoined&&t.isPublic&&te.createElement("div",{className:Ca.communityProfile__joinButton__container},te.createElement(pf,{onClick:l})),te.createElement("div",null,te.createElement($m,{type:"communityFeed",communityId:t.communityId})),te.createElement(lf,{pageId:e,activeTab:n,onTabChange:u})),te.createElement("div",{className:Ca.communityProfile__divider}))};var nde=10;function Cf({targetType:e,targetId:t,feedType:o,limit:r=nde}){let a=pt({fetcher:PostRepository.getPosts,params:{targetType:e,targetId:t,feedType:o,limit:r},shouldCall:!!t&&!!e}),{items:n}=a,i=P(a,["items"]);return d({posts:n},i)}var co={communityFeed__container:"ep",communityFeed__loadingIndicator:"rp",communityFeed__observerTarget:"ap",communityFeed__post:"op",communityFeed__spinner:"tp",spin:"sr",communityFeed__postContent:"ip",communityFeed__postSkeleton:"lp",communityFeed__postSkeletonHeader:"sp",communityFeed__postSkeletonAvatar:"cr",communityFeed__postSkeletonUserInfo:"cp",communityFeed__postSkeletonUsername:"nr",communityFeed__postSkeletonSubtitle:"dr",communityFeed__postSkeletonContent:"np",communityFeed__postSkeletonLine:"s",pulse:"mr",communityFeed__emptyPost:"dp",communityFeed__emptyPostIcon:"mp",communityFeed__emptyPostText:"pp",communityFeed__announcePost:"gp"};var ade=t=>{var e=P(t,[]);return te.createElement("svg",d({width:"61",height:"41",viewBox:"0 0 61 41",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M58.3438 0.5C59.7148 0.5 60.875 1.66016 60.875 3.03125V38.4688C60.875 39.9453 59.7148 41 58.3438 41H5.1875C2.33984 41 0.125 38.7852 0.125 35.9375V6.40625C0.125 5.03516 1.17969 3.875 2.65625 3.875H6.875V3.03125C6.875 1.66016 7.92969 0.5 9.40625 0.5H58.3438ZM3.5 35.9375C3.5 36.8867 4.23828 37.625 5.1875 37.625C6.03125 37.625 6.875 36.8867 6.875 35.9375V7.25H3.5V35.9375ZM57.5 37.625V3.875H10.25V35.9375V36.043C10.25 36.4648 10.0391 37.2031 9.93359 37.625H57.5ZM14.8906 27.5C14.1523 27.5 13.625 26.9727 13.625 26.2344V8.51562C13.625 7.88281 14.1523 7.25 14.8906 7.25H32.6094C33.2422 7.25 33.875 7.88281 33.875 8.51562V26.2344C33.875 26.9727 33.2422 27.5 32.6094 27.5H14.8906ZM17 10.625V24.125H30.5V10.625H17ZM13.625 32.9844V32.1406C13.625 31.5078 14.1523 30.875 14.8906 30.875H32.6094C33.2422 30.875 33.875 31.5078 33.875 32.1406V32.9844C33.875 33.7227 33.2422 34.25 32.6094 34.25H14.8906C14.1523 34.25 13.625 33.7227 13.625 32.9844ZM37.25 32.9844V32.1406C37.25 31.5078 37.7773 30.875 38.5156 30.875H52.8594C53.4922 30.875 54.125 31.5078 54.125 32.1406V32.9844C54.125 33.7227 53.4922 34.25 52.8594 34.25H38.5156C37.7773 34.25 37.25 33.7227 37.25 32.9844ZM37.25 26.2344V25.3906C37.25 24.7578 37.7773 24.125 38.5156 24.125H52.8594C53.4922 24.125 54.125 24.7578 54.125 25.3906V26.2344C54.125 26.9727 53.4922 27.5 52.8594 27.5H38.5156C37.7773 27.5 37.25 26.9727 37.25 26.2344ZM37.25 12.7344V11.8906C37.25 11.2578 37.7773 10.625 38.5156 10.625H52.8594C53.4922 10.625 54.125 11.2578 54.125 11.8906V12.7344C54.125 13.4727 53.4922 14 52.8594 14H38.5156C37.7773 14 37.25 13.4727 37.25 12.7344ZM37.25 19.4844V18.6406C37.25 18.0078 37.7773 17.375 38.5156 17.375H52.8594C53.4922 17.375 54.125 18.0078 54.125 18.6406V19.4844C54.125 20.2227 53.4922 20.75 52.8594 20.75H38.5156C37.7773 20.75 37.25 20.2227 37.25 19.4844Z"}))},q5=ade;var gc={lockPrivateContent__wrap:"hp",lockPrivateContent__lockIcon:"fp",lockPrivateContent__title:"bp",lockPrivateContent__body:"up"};var fc=()=>te.createElement("div",{className:gc.lockPrivateContent__wrap},te.createElement(Q5,{className:gc.lockPrivateContent__lockIcon}),te.createElement(N.Title,{className:gc.lockPrivateContent__title},"This community is private"),te.createElement(N.Body,{className:gc.lockPrivateContent__body},"Only invited members can see the posts."));function yc({communityId:e,level:t,shouldSubscribe:o=!0,callback:r}){return oa({fetcher:CommunityRepository.getCommunity,params:e,callback:r,shouldSubscribe:!!e&&o,getSubscribedTopic:({data:n})=>getCommunityTopic(n,t)})}function hc({communityId:e,placement:t}){let n=pt({fetcher:PostRepository.getPinnedPosts,params:{communityId:e,placement:t,sortBy:"lastPinned"},shouldCall:!!e}),{items:o}=n,r=P(n,["items"]);return d({pinnedPost:o},r)}var Cc=()=>te.createElement("div",{className:co.communityFeed__postSkeleton},te.createElement("div",{className:co.communityFeed__postSkeletonHeader},te.createElement("div",{className:co.communityFeed__postSkeletonAvatar}),te.createElement("div",{className:co.communityFeed__postSkeletonUserInfo},te.createElement("div",{className:co.communityFeed__postSkeletonUsername}),te.createElement("div",{className:co.communityFeed__postSkeletonSubtitle}))),te.createElement("div",{className:co.communityFeed__postSkeletonContent},te.createElement("div",{className:co.communityFeed__postSkeletonLine}),te.createElement("div",{className:co.communityFeed__postSkeletonLine}),te.createElement("div",{className:co.communityFeed__postSkeletonLine}))),J5=({pageId:e="*",communityId:t})=>{let o="community_feed_component",{isExcluded:r,accessibilityId:n,themeStyles:i}=re({pageId:e,componentId:o}),{community:a}=_t({communityId:t,shouldCall:!!t}),s=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic),{posts:l,hasMore:c,loadMore:p,isLoading:u}=Cf({feedType:"published",targetId:t,targetType:"community",limit:10}),{pinnedPost:g,isLoading:f,refresh:y}=hc({communityId:t,placement:"announcement"}),{AmityCommunityProfilePageBehavior:C}=It();yc({communityId:t,level:SubscriptionLevels.POST});let v=useRef(null);if(useEffect(()=>{let b=new IntersectionObserver(M=>_(void 0,null,function*(){M[0].isIntersecting&&c&&p();}),{threshold:.5});return v.current&&b.observe(v.current),()=>{v.current&&b.unobserve(v.current);}},[c,p]),useEffect(()=>{y();},[]),r)return null;let h=()=>{let b=l.filter(M=>!g.some(I=>I.post.postId===M.postId));return te.createElement(te.Fragment,null,u?Array.from({length:2}).map((M,I)=>te.createElement(Cc,{key:I})):b&&b.map(M=>te.createElement(O,{className:co.communityFeed__postContent,onPress:()=>{var I;return (I=C==null?void 0:C.goToPostDetailPage)==null?void 0:I.call(C,{postId:M.postId,hideTarget:!0})}},te.createElement(hn,{key:M.postId,post:M,category:"general",style:"feed",hideTarget:!0,onClick:()=>{var I;return (I=C==null?void 0:C.goToPostDetailPage)==null?void 0:I.call(C,{postId:M.postId,hideTarget:!0})}}))),(l==null?void 0:l.length)===0&&!u&&te.createElement("div",{className:co.communityFeed__emptyPost},te.createElement(q5,{className:co.communityFeed__emptyPostIcon}),te.createElement("p",{className:co.communityFeed__emptyPostText},"No post yet")),te.createElement("div",{ref:v,className:co.communityFeed__observerTarget}))},x=()=>f?te.createElement(Cc,null):g&&g.map(({post:b})=>te.createElement(O,{onPress:()=>{var M;(M=C==null?void 0:C.goToPostDetailPage)==null||M.call(C,{postId:b.postId,hideTarget:!0,category:"announcement"});},className:co.communityFeed__announcePost},te.createElement(hn,{key:b.postId,post:b,category:"announcement",style:"feed",hideTarget:!0,onClick:()=>{var M;return (M=C==null?void 0:C.goToPostDetailPage)==null?void 0:M.call(C,{postId:b.postId,hideTarget:!0})},onPostDeleted:()=>y()})));return te.createElement("div",{"data-qa-anchor":n,className:co.communityFeed__container,style:i},s||a!=null&&a.isPublic?te.createElement(te.Fragment,null,x(),h()):te.createElement(fc,null))};var kL=({communityId:e})=>te.createElement("div",null,"CommunityPinnedPost");var vf={storyCommentButton:"vp",storyCommentIcon:"xp"};var yde=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),te.createElement("path",{fill:"#A5A9B5",d:"M10 2.188c4.682 0 8.5 3.12 8.5 6.906C18.5 12.912 14.682 16 10 16c-1.295 0-2.49-.232-3.586-.63-.797.663-2.457 1.693-4.648 1.693-.133 0-.2-.034-.266-.133-.033-.1 0-.233.066-.3 0-.032 1.395-1.493 1.827-3.187-1.196-1.195-1.893-2.69-1.893-4.35 0-3.784 3.785-6.905 8.5-6.905z"})),SL=({pageId:e="*",componentId:t="*",onPress:o,commentsCount:r,imgClassName:n})=>{let i="story_comment_button",{isExcluded:a,accessibilityId:s,defaultConfig:l,config:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return a?null:te.createElement(O,{"data-qa-anchor":s,onPress:o,style:u,className:gr(vf.storyCommentButton)},te.createElement(oe,{defaultIconName:l.icon,configIconName:c.icon,imgIcon:()=>te.createElement("img",{src:c.icon,alt:p,className:gr(n),style:u}),defaultIcon:()=>te.createElement("div",{className:gr(vf.storyCommentIcon)},te.createElement(yde,null),te.createElement(N.BodyBold,null,lb(r)))}))};var bf={storyReactionButton:"wp",storyReactionIcon:"yp"};var vde=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",fill:"none",viewBox:"0 0 20 20"},e),te.createElement("path",{fill:"#A5A9B5",d:"M17.793 11.025c.148.854.037 1.67-.334 2.338a3.437 3.437 0 01-.668 2.487c-.037 2.078-1.299 3.525-4.156 3.525h-.854c-3.785 0-4.935-1.41-6.605-1.447-.112.482-.594.853-1.114.853H1.688c-.667 0-1.187-.52-1.187-1.187V8.687c0-.63.52-1.187 1.188-1.187h3.636c.705-.594 1.707-2.227 2.56-3.08.52-.52.372-4.045 2.673-4.045 2.115 0 3.525 1.188 3.525 3.896 0 .706-.148 1.262-.334 1.745h1.373c1.781 0 3.191 1.521 3.191 3.154 0 .705-.185 1.299-.519 1.855zm-2.3 2.004c.816-.742.704-1.892.185-2.449.37 0 .853-.705.853-1.373-.037-.705-.63-1.41-1.41-1.41h-3.86c0-1.41 1.04-2.078 1.04-3.526 0-.89 0-2.115-1.744-2.115-.705.705-.372 2.487-1.41 3.526-1.002 1.002-2.45 3.6-3.526 3.6H5.25v6.939c1.967 0 3.71 1.373 6.346 1.373h1.41c1.299 0 2.264-.631 1.967-2.412.556-.334 1.002-1.373.52-2.153zM3.765 16.406a.903.903 0 00-.891-.89.88.88 0 00-.89.89c0 .52.37.89.89.89a.88.88 0 00.89-.89z"})),xde=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24"},e),te.createElement("circle",{cx:"12",cy:"12",r:"12",fill:"url(#paint0_linear_7702_34939)"}),te.createElement("path",{fill:"#fff",d:"M7.486 10.575H5.42a.611.611 0 00-.62.619v6.187c0 .361.258.619.62.619h2.066c.336 0 .62-.258.62-.619v-6.187a.628.628 0 00-.62-.62zm-1.033 6.394a.596.596 0 01-.62-.62c0-.334.258-.618.62-.618.336 0 .62.284.62.619 0 .36-.284.619-.62.619zm8.264-10.055c0-1.908-1.24-2.114-1.859-2.114-.542 0-.775 1.031-.878 1.495-.155.567-.284 1.134-.672 1.521-.826.851-1.265 1.908-2.298 2.913a.415.415 0 00-.078.232v5.518c0 .154.13.283.284.31.414 0 .956.231 1.37.412.826.36 1.833.799 3.073.799h.077c1.11 0 2.428 0 2.944-.748.233-.31.285-.696.155-1.16.44-.438.646-1.263.44-1.934.439-.593.49-1.443.232-2.036.31-.31.516-.8.49-1.264 0-.799-.67-1.52-1.523-1.52h-2.635c.207-.723.878-1.341.878-2.424z"}),te.createElement("defs",null,te.createElement("linearGradient",{id:"paint0_linear_7702_34939",x1:"9",x2:"19.8",y1:"2.4",y2:"29.4",gradientUnits:"userSpaceOnUse"},te.createElement("stop",{stopColor:"#5B9DFF"}),te.createElement("stop",{offset:"1",stopColor:"#0041BE"})))),NL=({myReactions:e=[],reactionsCount:t,pageId:o="*",componentId:r="*",defaultIconClassName:n,imgIconClassName:i,onPress:a})=>{let s="story_reaction_button",{isExcluded:l,accessibilityId:c,config:p,uiReference:u,themeStyles:g}=A({pageId:o,componentId:r,elementId:s}),f=e.length>0;return l?null:te.createElement(O,{"data-qa-anchor":c,className:gr(bf.storyReactionButton),onPress:a,style:g},te.createElement(oe,{defaultIcon:()=>te.createElement("div",{className:gr(bf.storyReactionIcon,n)},f?te.createElement(xde,null):te.createElement(vde,null),te.createElement(N.BodyBold,null,lb(t))),imgIcon:()=>te.createElement("img",{src:p.icon,alt:u,className:gr(i)})}))};var ws={viewStoryCompostBarContainer:"kp",viewStoryFailedCompostBarContainer:"jp",viewStoryFailedCompostBarWrapper:"zp",viewStoryUploadingWrapper:"Xp",viewStoryCompostBarViewIconContainer:"Yp",viewStoryCompostBarEngagementContainer:"Cp",viewStoryCommentButton:"Sp",viewStoryCommentIcon:"Ap"};var Ide=({pageId:e="*",syncState:t,reach:o,commentsCount:r,reactionsCount:n,isLiked:i,storyId:a,onClickComment:s,showImpression:l,isMember:c,myReactions:p})=>{let u=So(),g=()=>_(void 0,null,function*(){try{if(!c){u.info({content:"Join community to interact with all stories"});return}i?yield ReactionRepository.removeReaction("story",a,hr):yield ReactionRepository.addReaction("story",a,hr);}catch(f){console.error("Can't toggle like",f);}});return t==="syncing"?te.createElement("div",{className:ws.viewStoryCompostBarContainer},te.createElement("div",{className:ws.viewStoryUploadingWrapper},te.createElement(vm,{width:20,height:20}),"Uploading...")):t==="error"?te.createElement("div",{className:ws.viewStoryFailedCompostBarContainer},te.createElement("div",{className:ws.viewStoryFailedCompostBarWrapper},te.createElement(y4,null),te.createElement("span",null,"Failed to upload")),te.createElement(Sa,null)):te.createElement("div",{className:ws.viewStoryCompostBarContainer},te.createElement("div",null,l&&te.createElement("div",{className:ws.viewStoryCompostBarViewIconContainer},te.createElement(O3,{reach:o}))),te.createElement("div",{className:ws.viewStoryCompostBarEngagementContainer},te.createElement(SL,{pageId:e,commentsCount:r,onPress:s}),te.createElement(NL,{pageId:e,myReactions:p,reactionsCount:n,onPress:g})))},X5=Ide;var Xr={iconButton:"Mp",rendererContainer:"Bp",storyVideo:"Ep",muteCircleIcon:"Ip",unmuteCircleIcon:"Rp",loadingOverlay:"Up",storyImage:"Dp",playStoryButton:"Fp",pauseStoryButton:"Hp",closeButton:"Lp",verifiedBadge:"Tp",dotsButton:"Vp",viewStoryInfoContainer:"qp",viewStoryCompostBarContainer:"Gp",viewStoryCompostBarViewIconContainer:"Jp",viewStoryCompostBarEngagementContainer:"Kp",viewStoryCompostBarEngagementIconContainer:"Np",storyContent:"Op",header:"Pp",viewStoryContainer:"Qp",viewStoryHeaderContainer:"Wp",avatarContainer:"Zp",addStoryButton:"pr",viewStoryHeaderListActionsContainer:"_p",viewStoryHeadingInfoContainer:"eg",viewStoryHeading:"rg",viewStoryHeadingTitle:"ag",viewStorySubHeading:"og"};var _de=({community:e,heading:t,subheading:o,isHaveActions:r,isOfficial:n,isPaused:i,onPlay:a,onPause:s,onAction:l,onClose:c,onClickCommunity:p,haveStoryPermission:u,addStoryButton:g})=>te.createElement("div",{className:Xr.viewStoryHeaderContainer},te.createElement("div",{className:Xr.viewStoryHeadingInfoContainer},te.createElement("div",{className:Xr.avatarContainer},te.createElement(Zr,{pageId:"story_page",community:e}),u&&g),te.createElement("div",{className:Xr.viewStoryInfoContainer},te.createElement("div",{className:Xr.viewStoryHeading},te.createElement(yw,{lines:1},te.createElement("div",{className:Xr.viewStoryHeadingTitle,"data-qa-anchor":"community_display_name",onClick:p},t)),n&&te.createElement(p1,{className:Xr.verifiedBadge})),te.createElement("span",{className:Xr.viewStorySubHeading},o))),te.createElement("div",{className:Xr.viewStoryHeaderListActionsContainer},i?te.createElement(To,{className:Xr.playStoryButton,"data-qa-anchor":"play_button",onClick:a}):te.createElement(As,{className:Xr.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:s}),r&&te.createElement(U3,{pageId:"story_page",onPress:l}),te.createElement(Nr,{defaultClassName:gr(Xr.closeButton),pageId:"story_page",onPress:c}))),Y5=_de;function vc({queryParams:e,shouldCall:t=!0}){let n=pt({fetcher:CommunityRepository.Membership.getMembers,params:E(d({},e),{includeDeleted:!1}),shouldCall:!!(e!=null&&e.communityId)&&t}),{items:o}=n,r=P(n,["items"]);return d({members:o},r)}var bo={iconButton:"tg",hyperLinkContainer:"gr",rendererContainer:"ig",storyVideo:"lg",muteCircleIcon:"sg",unmuteCircleIcon:"cg",loadingOverlay:"ng",storyImageContainer:"dg",storyImage:"mg",playStoryButton:"pg",pauseStoryButton:"gg",closeButton:"hg",verifiedBadge:"fg",dotsButton:"bg",viewStoryInfoContainer:"ug",viewStoryCompostBarContainer:"vg",viewStoryCompostBarViewIconContainer:"xg",viewStoryCompostBarEngagementContainer:"wg",viewStoryCompostBarEngagementIconContainer:"yg",header:"kg",viewStoryContainer:"jg",viewStoryHeaderContainer:"zg",avatarContainer:"Xg",addStoryButton:"hr",viewStoryHeaderListActionsContainer:"Yg",viewStoryHeadingInfoContainer:"Cg",viewStoryHeading:"Sg",viewStoryHeadingTitle:"Ag",viewStorySubHeading:"Mg",story:"Bg",storyContent:"Eg",actionButton:"fr",navigationOverlay:"Ig",leftOverlay:"Rg",rightOverlay:"Ug",imageFit:"Dg",imageFill:"Fg"};var R5={progressBarContainer:"Hg",progressSegment:"Lg",progressBar:"Tg"};var t2=te.memo(({pageId:e="*",componentId:t="*",duration:o,currentIndex:r,storiesCount:n,isPaused:i,onComplete:a})=>{let s="progress_bar",{config:l,isExcluded:c}=A({pageId:e,componentId:t,elementId:s}),[p,u]=useState(new Array(n).fill(0)),[g,f]=useState(r),y=l==null?void 0:l.backgroundColor,C=l==null?void 0:l.progressColor;return useEffect(()=>{r<g&&u(v=>{let h=[...v];return h[r]=0,h}),f(r);},[r,g]),useEffect(()=>{let v;return i||(v=setInterval(()=>{u(h=>{let x=[...h];return x[r]<100&&(x[r]+=100/o*100,x[r]>=100&&(x[r]=100,a())),x});},100)),()=>{v&&clearInterval(v);}},[o,r,i,a]),c?null:te.createElement("div",{className:gr(R5.progressBarContainer),style:{backgroundColor:y}},p.map((v,h)=>te.createElement("div",{key:h,className:gr(R5.progressSegment),style:{width:`calc(${100/n}% - 4px)`}},te.createElement("div",{className:gr(R5.progressBar),style:{width:`${h<r?100:h===r?v:0}%`,backgroundColor:C}}))))});var Ade=({story:{actions:e,fileInputRef:t,addStoryButton:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l,url:c},action:p,config:u,onClose:g,onClickCommunity:f})=>{var Fi,Ma,nt,Mn;let{formatMessage:y}=useIntl(),[C,v]=useState(!1),[h,x]=useState(!1),[b,M]=useState(!1),[I,w]=useState(!1),{loader:k}=u,{client:S}=De(),[L,D]=useState(""),H=useRef(null),$=!!(l&&l.myReactions&&l.myReactions.includes($n)),B=(l==null?void 0:l.reactionsCount)||0,{storyId:z,syncState:V,reach:K,commentsCount:U,createdAt:j,creator:Z,community:G,myReactions:Q,data:T,items:F}=l,{members:q}=vc({queryParams:{communityId:G==null?void 0:G.communityId},shouldCall:!!(G!=null&&G.communityId)}),ie=(q==null?void 0:q.find(Je=>Je.userId===(S==null?void 0:S.userId)))!=null,{user:ce}=Cr(S==null?void 0:S.userId),Ke=(G==null?void 0:G.isOfficial)||!1,xt=(Z==null?void 0:Z.userId)===(ce==null?void 0:ce.userId),to=m5(ce==null?void 0:ce.roles),jt=l5(ce==null?void 0:ce.roles),He=to||jt||us(S,G==null?void 0:G.communityId),mr=useMemo(()=>te.createElement("div",{"data-qa-anchor":"community_display_name"},G==null?void 0:G.displayName),[G==null?void 0:G.displayName]),Fr=useMemo(()=>j&&(Z!=null&&Z.displayName)?te.createElement("span",null,te.createElement("span",{"data-qa-anchor":"created_at"},d5(j))," \u2022 By"," ",te.createElement("span",{"data-qa-anchor":"creator_display_name"},Z==null?void 0:Z.displayName)):"",[j,Z==null?void 0:Z.displayName]),Po="asc-uikit-stories-viewer",Qe=useCallback(()=>{if(H.current&&H.current.complete){let oo=new Lde().getPalette(H.current,2);if(oo){let Ae=`linear-gradient(to top, rgb(${oo[0].join(",")}), rgb(${oo[1].join(",")})`;D(Ae);}}},[]),wn=useCallback(()=>{v(!0),I&&w(!1),p("play",!0),Qe();},[p,I,Qe]),Or=()=>{p("play",!0),w(!1);},tn=()=>{p("pause",!0),w(!0);},pe=()=>{p("pause",!0),x(!0);},ge=()=>{p("play",!0),x(!1);},on=()=>{p("pause",!0),M(!0);},jo=()=>{p("play",!0),M(!1);},Ur=()=>{g();},Hi=()=>{i();};return useEffect(()=>{H.current&&H.current.complete&&Qe();},[]),useEffect(()=>{if(t.current){let Je=()=>{p("pause",!0),w(!0);},oo=()=>{p("play",!0),w(!1);};return t.current.addEventListener("click",Je),t.current.addEventListener("cancel",oo),()=>{t.current&&(t.current.removeEventListener("cancel",oo),t.current.removeEventListener("click",Je));}}},[t]),useEffect(()=>{var Je,oo;if(s){let Ae=()=>{p("pause",!0),w(!0);},Ye=()=>{p("play",!0),w(!1);};return (Je=s.current)==null||Je.addEventListener("dragstart",Ae),(oo=s.current)==null||oo.addEventListener("dragend",Ye),()=>{var Go,dr;(Go=s.current)==null||Go.removeEventListener("dragstart",Ae),(dr=s.current)==null||dr.removeEventListener("dragend",Ye);}}},[s]),te.createElement("div",{className:bo.rendererContainer,style:{background:L}},te.createElement(t2,{pageId:a,duration:5e3,currentIndex:r,storiesCount:n,isPaused:I||h||b,onComplete:Hi}),te.createElement(Y5,{community:G,heading:mr,subheading:Fr,isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:He,isOfficial:Ke,isPaused:I,onPlay:Or,onPause:tn,onAction:pe,onClickCommunity:()=>f==null?void 0:f(),onClose:Ur,addStoryButton:o}),te.createElement("div",{className:gr(bo.storyImageContainer,{[bo.imageFit]:T.imageDisplayMode==="fit",[bo.imageFill]:T.imageDisplayMode==="fill"})},te.createElement("img",{ref:H,className:gr(bo.storyImage,{[bo.imageFit]:T.imageDisplayMode==="fit",[bo.imageFill]:T.imageDisplayMode==="fill"}),"data-qa-anchor":"image_view",src:c!=null?c:l==null?void 0:l.data.fileData,onLoad:wn,alt:"Story Image",crossOrigin:"anonymous"})),!C&&te.createElement("div",{className:bo.loadingOverlay},k||te.createElement("div",null,"loading...")),te.createElement(Er,{rootId:Po,isOpen:h,onClose:ge,mountPoint:document.getElementById(Po),detent:"content-height"},e==null?void 0:e.map(Je=>te.createElement(O,{key:Je.name,className:bo.actionButton,onPress:()=>Je==null?void 0:Je.action()},(Je==null?void 0:Je.icon)&&Je.icon,te.createElement(N.BodyBold,null,Je.name)))),te.createElement(Er,{rootId:Po,isOpen:b,onClose:jo,mountPoint:document.getElementById(Po),detent:"full-height",headerTitle:y({id:"storyViewer.commentSheet.title"})},te.createElement(Dm,{referenceId:z,referenceType:"story",community:G,shouldAllowCreation:G==null?void 0:G.allowCommentInStory,shouldAllowInteraction:ie})),((Ma=(Fi=F==null?void 0:F[0])==null?void 0:Fi.data)==null?void 0:Ma.url)&&te.createElement("div",{className:bo.hyperLinkContainer},te.createElement(vi,{href:F[0].data.url.startsWith("http")?F[0].data.url:`https://${F[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},te.createElement(yw,{lines:1},te.createElement("span",null,((Mn=(nt=F[0])==null?void 0:nt.data)==null?void 0:Mn.customText)||F[0].data.url.replace(/^https?:\/\//,""))))),te.createElement(X5,{pageId:a,storyId:z,syncState:V,reach:K,commentsCount:U,reactionsCount:B,isLiked:$,myReactions:Q,onClickComment:on,showImpression:xt||us(S,G==null?void 0:G.communityId),isMember:ie}))},Dde=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&(!e.type||e.type==="image"),priority:2}},FL={renderer:Ade,tester:Dde};var Ode=()=>{let[e,t]=useState(!1),o=useCallback(()=>t(!0),[]),r=useCallback(()=>t(!1),[]);return {muted:e,mute:o,unmute:r}},Ude=e=>{let[t,o]=useState(!1),r=useCallback(()=>{e("play",!0),o(!1);},[e]),n=useCallback(()=>{e("pause",!0),o(!0);},[e]);return {isPaused:t,play:r,pause:n}},zde=e=>{let[t,o]=useState(!1),[r,n]=useState(!1),i=useCallback(()=>{e("pause",!0),o(!0);},[e]),a=useCallback(()=>{e("play",!0),o(!1);},[e]),s=useCallback(()=>{e("pause",!0),n(!0);},[e]),l=useCallback(()=>{e("play",!0),n(!1);},[e]);return {isBottomSheetOpen:t,isOpenCommentSheet:r,openBottomSheet:i,closeBottomSheet:a,openCommentSheet:s,closeCommentSheet:l}},$de=({story:{actions:e,addStoryButton:t,fileInputRef:o,currentIndex:r,storiesCount:n,increaseIndex:i,pageId:a,dragEventTarget:s,story:l},action:c,config:p,messageHandler:u,onClose:g,onClickCommunity:f})=>{var Or,tn,pe,ge,on,jo,Ur,Hi,Fi,Ma;let[y,C]=useState(!1),{loader:v}=p,{client:h}=De(),{user:x}=Cr(h==null?void 0:h.userId),b=useRef(null),{muted:M,mute:I,unmute:w}=Ode(),{isPaused:k,play:S,pause:L}=Ude(c),{isBottomSheetOpen:D,isOpenCommentSheet:H,openBottomSheet:$,closeBottomSheet:B,openCommentSheet:z,closeCommentSheet:V}=zde(c),{storyId:K,syncState:U,reach:j,commentsCount:Z,createdAt:G,creator:Q,community:T,myReactions:F,data:q,items:Y}=l,ie=(Or=l==null?void 0:l.myReactions)==null?void 0:Or.includes($n),ce=(l==null?void 0:l.reactions[$n])||0,{members:Ke}=vc({queryParams:{communityId:T==null?void 0:T.communityId},shouldCall:!!(T!=null&&T.communityId)}),xt=Ke==null?void 0:Ke.some(nt=>nt.userId===(h==null?void 0:h.userId)),to=(T==null?void 0:T.isOfficial)||!1,jt=(Q==null?void 0:Q.userId)===(x==null?void 0:x.userId),He=m5(x==null?void 0:x.roles),mr=l5(x==null?void 0:x.roles),Fr=He||mr||us(h,T==null?void 0:T.communityId),Po=useCallback(()=>{var nt;u("UPDATE_VIDEO_DURATION",{duration:(nt=l==null?void 0:l.videoData)==null?void 0:nt.attributes.metadata.video.duration}),C(!0),c("play",!0);},[u,(tn=l==null?void 0:l.videoData)==null?void 0:tn.attributes.metadata.video.duration,c]),Qe=useCallback(()=>{r+1<n?i():g();},[r,n,i,g]);useEffect(()=>{b.current&&(k||D||H?(b.current.pause(),c("pause",!0)):(b.current.play(),c("play",!0)));},[k,D,H,c]),useEffect(()=>{if(o.current){let nt=()=>{c("pause",!0),L();},Mn=()=>{c("play",!0),S();};return o.current.addEventListener("click",nt),o.current.addEventListener("cancel",Mn),()=>{var Je,oo;(Je=o.current)==null||Je.removeEventListener("click",nt),(oo=o.current)==null||oo.removeEventListener("cancel",Mn);}}},[c,L,S]),useEffect(()=>{if(s!=null&&s.current){let nt=()=>{c("pause",!0),L();},Mn=()=>{c("play",!0),S();};return s.current.addEventListener("dragstart",nt),s.current.addEventListener("dragend",Mn),()=>{var Je,oo;(Je=s.current)==null||Je.removeEventListener("dragstart",nt),(oo=s.current)==null||oo.removeEventListener("dragend",Mn);}}},[c,L,S,s]);let wn=Math.round(((pe=l==null?void 0:l.videoData)==null?void 0:pe.attributes.metadata.video.duration)*1e3);return te.createElement("div",{className:gr(bo.rendererContainer)},te.createElement(t2,{pageId:a,duration:wn,currentIndex:r,storiesCount:n,isPaused:k||D||H,onComplete:Qe}),te.createElement(G3,{pageId:"story_page",componentId:"*",isMuted:M,onPress:M?w:I}),te.createElement(Y5,{community:T,heading:te.createElement("div",{"data-qa-anchor":"community_display_name"},T==null?void 0:T.displayName),subheading:G&&(Q!=null&&Q.displayName)?te.createElement("span",null,te.createElement("span",{"data-qa-anchor":"created_at"},d5(G))," \u2022 By"," ",te.createElement("span",{"data-qa-anchor":"creator_display_name"},Q==null?void 0:Q.displayName)):"",isHaveActions:(e==null?void 0:e.length)>0,haveStoryPermission:Fr,isOfficial:to,isPaused:k,onPlay:S,onPause:L,onMute:I,onUnmute:w,onAction:$,onClickCommunity:()=>f==null?void 0:f(),onClose:g,addStoryButton:t}),te.createElement("video",{"data-qa-anchor":"video_view",ref:b,className:gr(bo.storyVideo),src:((ge=l==null?void 0:l.videoData)==null?void 0:ge.fileUrl)||((jo=(on=l==null?void 0:l.videoData)==null?void 0:on.videoUrl)==null?void 0:jo.original),controls:!1,onLoadedData:Po,playsInline:!0,onWaiting:()=>c("pause",!0),onPlaying:()=>c("play",!0),muted:M,autoPlay:!0}),!y&&te.createElement("div",{className:gr(bo.loadingOverlay)},v||te.createElement("div",null,"loading...")),te.createElement(Er,{rootId:"asc-uikit-stories-viewer",isOpen:D,onClose:B,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"content-height"},e==null?void 0:e.map(nt=>te.createElement(O,{key:nt.name,className:gr(bo.actionButton),onPress:nt==null?void 0:nt.action},nt==null?void 0:nt.icon,te.createElement(N.BodyBold,null,nt.name)))),te.createElement(Er,{rootId:"asc-uikit-stories-viewer",isOpen:H,onClose:V,mountPoint:document.getElementById("asc-uikit-stories-viewer"),detent:"full-height"},te.createElement(Dm,{referenceId:K,referenceType:"story",community:T,shouldAllowCreation:T==null?void 0:T.allowCommentInStory,shouldAllowInteraction:xt})),((Hi=(Ur=Y==null?void 0:Y[0])==null?void 0:Ur.data)==null?void 0:Hi.url)&&te.createElement("div",{className:gr(bo.hyperLinkContainer)},te.createElement(vi,{href:Y[0].data.url.startsWith("http")?Y[0].data.url:`https://${Y[0].data.url}`,target:"_blank",rel:"noopener noreferrer",onClick:()=>l==null?void 0:l.analytics.markLinkAsClicked()},te.createElement(yw,{lines:1},te.createElement("span",null,((Ma=(Fi=Y[0])==null?void 0:Fi.data)==null?void 0:Ma.customText)||Y[0].data.url.replace(/^https?:\/\//,""))))),te.createElement(X5,{pageId:a,storyId:K,syncState:U,reach:j,commentsCount:Z,reactionsCount:ce,isLiked:ie,onClickComment:z,myReactions:F,showImpression:jt||us(h,T==null?void 0:T.communityId),isMember:xt}))},Vde=e=>{var t;return {condition:!!((t=e.story)!=null&&t.storyId)&&e.type==="video",priority:2}},OL={renderer:$de,tester:Vde};var Gde=({story:e,action:t})=>(useEffect(()=>{t("play");},[e]),te.createElement("div",{style:zL.storyContent},te.createElement("p",{style:zL.text},"This story could not be loaded."))),zL={storyContent:{width:"100%",maxHeight:"100%",margin:"auto"},text:{textAlign:"center",color:"white",width:"90%",margin:"auto"}},Zde=()=>({condition:!0,priority:1}),$L={renderer:Gde,tester:Zde};var qde=e=>{useEffect(()=>{e.action("play");},[e.story]);let t=e.story.originalContent;return te.createElement(t,d({},e))},Kde=e=>({condition:!!e.content,priority:2}),VL={renderer:qde,tester:Kde};var Yt={drawer__content:"br",drawer__innerContent:"Vg",drawer__placeholder:"qg",drawer__overlay:"Gg",drawer__title:"Jg",drawer__content__data:"Kg",drawer__content__data__title:"Ng",drawer__content__data__text:"Og",drawer__content__data__caption:"Pg",drawer__content__data__infoIcon:"Qg",drawer__content__emptySpace:"Wg",drawer__container:"Zg",drawer__innerContainer:"_g"};var jL=({isOpen:e,onOpenChange:t,ad:o,targetRef:r})=>{var n;return te.createElement(Drawer.Root,{open:e,onOpenChange:t,onDrag:i=>{i.preventDefault(),i.stopPropagation();}},te.createElement(Drawer.Portal,{container:r==null?void 0:r.current},te.createElement("div",{className:Yt.drawer__container},te.createElement("div",{className:Yt.drawer__innerContainer},te.createElement(Drawer.Overlay,{className:Yt.drawer__overlay}),te.createElement(Drawer.Content,{className:Yt.drawer__content},te.createElement("div",{className:Yt.drawer__innerContent},te.createElement("div",{className:Yt.drawer__placeholder}),te.createElement(Drawer.Title,{className:Yt.drawer__title},te.createElement(N.Title,null,"About this advertisement")),te.createElement("div",{className:Yt.drawer__content__data},te.createElement(N.BodyBold,{className:Yt.drawer__content__data__title},"Why this advertisement?"),te.createElement("div",{className:Yt.drawer__content__data__text},te.createElement(gn,{className:Yt.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Yt.drawer__content__data__caption},"You're seeing this advertisement because it was displayed to all users in the system."))),te.createElement("div",{className:Yt.drawer__content__data},te.createElement(N.BodyBold,{className:Yt.drawer__content__data__title},"About this advertiser"),te.createElement("div",{className:Yt.drawer__content__data__text},te.createElement(gn,{className:Yt.drawer__content__data__infoIcon}),te.createElement(N.Caption,{className:Yt.drawer__content__data__caption},"Advertiser name: ",(n=o.advertiser)==null?void 0:n.companyName)))),te.createElement("div",{className:Yt.drawer__content__emptySpace}))))))};var Rt={iconButton:"eh",hyperLinkContainer:"rh",hyperLink__text:"ah",rendererContainer:"oh",storyVideo:"th",muteCircleIcon:"ih",unmuteCircleIcon:"lh",loadingOverlay:"sh",storyImageContainer:"ch",storyImage:"nh",playStoryButton:"dh",pauseStoryButton:"mh",closeButton:"ph",verifiedBadge:"gh",dotsButton:"hh",viewStoryInfoContainer:"fh",viewStoryCompostBarContainer:"bh",viewStoryCompostBarViewIconContainer:"uh",viewStoryCompostBarEngagementContainer:"vh",viewStoryCompostBarEngagementIconContainer:"xh",header:"wh",viewStoryContainer:"yh",viewStoryHeaderContainer:"kh",avatarContainer:"jh",addStoryButton:"ur",viewStoryHeaderListActionsContainer:"zh",viewStoryHeadingInfoContainer:"Xh",viewStoryHeading:"Yh",viewStoryHeadingTitle:"Ch",viewStorySubHeading:"Sh",story:"Ah",storyContent:"Mh",actionButton:"vr",navigationOverlay:"Bh",leftOverlay:"Eh",rightOverlay:"Ih",imageFit:"Rh",imageFill:"Uh",infoIcon__button:"Dh",infoIcon:"Fh",storyAd__main:"Hh",storyAd__topBar:"Lh",storyAd__topBar__left:"Th",storyAd__topBar__avatar:"Vh",storyAd__topBar__text:"qh",storyAd__topBar__advertiserName:"Gh",storyAd__topBar__right:"Jh",storyAd__closeButton:"Kh"};var QL=({pageId:e="*",ad:t,avatarUrl:o,adImageUrl:r,currentIndex:n,isPaused:i,storiesCount:a,renderLoader:s=()=>te.createElement("div",null,"loading..."),onComplete:l=()=>{},onPauseClick:c,onPlayClick:p,onClose:u,onImageLoaded:g,onAdvertisementInfoOpen:f,onAdvertisementInfoClose:y})=>{var S;let[C,v]=useState(!1),[h,x]=useState(!1),b=()=>{x(!0),f==null||f();},M=()=>{x(!1),y==null||y();},I=useRef(null),w=useRef(null),k=()=>{v(!0),g==null||g();};return te.createElement("div",{className:Rt.rendererContainer,ref:w},te.createElement("div",{className:Rt.storyAd__main},te.createElement(t2,{pageId:e,duration:5e3,currentIndex:n,storiesCount:a,isPaused:i,onComplete:l}),te.createElement("div",{className:Rt.storyAd__topBar},te.createElement("div",{className:Rt.storyAd__topBar__left},te.createElement("div",{className:Rt.storyAd__topBar__avatar},te.createElement(bt,{defaultImage:te.createElement(Am,null),avatarUrl:o})),te.createElement("div",{className:Rt.storyAd__topBar__text},te.createElement(N.BodyBold,{className:Rt.storyAd__topBar__advertiserName},(S=t.advertiser)==null?void 0:S.name),te.createElement(Lm,null))),te.createElement("div",{className:Rt.storyAd__topBar__right},i?te.createElement(To,{className:Rt.playStoryButton,"data-qa-anchor":"play_button",onClick:()=>p==null?void 0:p()}):te.createElement(As,{className:Rt.pauseStoryButton,"data-qa-anchor":"pause_button",onClick:()=>c==null?void 0:c()}),te.createElement(Nr,{defaultClassName:gr(Rt.storyAd__closeButton),pageId:e,onPress:u}))),te.createElement("div",{className:gr(Rt.storyImageContainer)},te.createElement("img",{ref:I,className:gr(Rt.storyImage),"data-qa-anchor":"image_view",src:r,onLoad:k,alt:"Story Image",crossOrigin:"anonymous"})),!C&&te.createElement("div",{className:Rt.loadingOverlay},s()),t.callToActionUrl&&te.createElement("div",{className:Rt.hyperLinkContainer},te.createElement("a",{className:Rt.hyperLink__text,href:t.callToActionUrl,target:"_blank",rel:"noreferrer"},t.callToAction)),te.createElement(O,{className:Rt.infoIcon__button,onPress:()=>{b();}},te.createElement(gn,{className:Rt.infoIcon}))),te.createElement(jL,{ad:t,isOpen:h,targetRef:w,onOpenChange:L=>!L&&M()}))};var oce=({story:e,action:t,config:o,onClose:r})=>{var k,S,L,D,H,$;let[n,i]=useState(!1),{loader:a}=o,{ad:s,currentIndex:l,storiesCount:c,increaseIndex:p,pageId:u,dragEventTarget:g}=e,f=()=>{t("play",!0),i(!1);},y=()=>{t("pause",!0),i(!0);},v=it({fileId:(S=(k=s==null?void 0:s.advertiser)==null?void 0:k.avatar)==null?void 0:S.fileId})||((D=(L=s==null?void 0:s.advertiser)==null?void 0:L.avatar)==null?void 0:D.fileUrl)||"",x=it({fileId:(H=s==null?void 0:s.image9_16)==null?void 0:H.fileId})||(($=s==null?void 0:s.image9_16)==null?void 0:$.fileUrl)||"",b=useCallback(()=>{n&&i(!1),t("play",!0);},[t,n]),M=()=>{t("pause",!0);},I=()=>{t("play",!0);},w=()=>{p();};return useEffect(()=>{var B,z;if(g){let V=()=>{t("pause",!0),i(!0);},K=()=>{t("play",!0),i(!1);};return (B=g.current)==null||B.addEventListener("dragstart",V),(z=g.current)==null||z.addEventListener("dragend",K),()=>{var U,j;(U=g.current)==null||U.removeEventListener("dragstart",V),(j=g.current)==null||j.removeEventListener("dragend",K);}}},[g]),s?te.createElement(QL,{pageId:u,ad:s,adImageUrl:x,avatarUrl:v,currentIndex:l,isPaused:n,storiesCount:c,renderLoader:()=>a,onComplete:w,onPauseClick:y,onPlayClick:f,onClose:r,onImageLoaded:b,onAdvertisementInfoOpen:M,onAdvertisementInfoClose:I}):null},rce=e=>({condition:!!e.ad,priority:2}),WL={renderer:oce,tester:rce};var o2=[FL,OL,WL,VL,$L];var Tf={storyButton:"xr",desktopOnly:"wr"};var ace=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),te.createElement("path",{d:"M12 23.91C5.578 23.91.375 18.709.375 12.287.375 5.864 5.578.66 12 .66s11.625 5.203 11.625 11.625S18.422 23.91 12 23.91zM6.656 13.084l6.328 6.375c.47.422 1.172.422 1.594 0l.797-.797c.422-.422.422-1.172 0-1.594l-4.781-4.781 4.781-4.735c.422-.468.422-1.171 0-1.593l-.797-.797c-.422-.422-1.172-.422-1.594 0l-6.328 6.328c-.468.469-.468 1.172 0 1.594z"})),Mc=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_left_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement("button",{"data-qa-anchor":n,className:gr(Tf.storyButton,Tf.desktopOnly),onClick:o,style:a},te.createElement(ace,null))};var kf={storyButton:"yr",desktopOnly:"kr"};var mce=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},e),te.createElement("path",{d:"M12 .66c6.422 0 11.625 5.204 11.625 11.626S18.422 23.91 12 23.91.375 18.708.375 12.286 5.578.66 12 .66zm5.297 10.829L10.969 5.16c-.422-.422-1.172-.422-1.594 0l-.797.797c-.422.422-.422 1.172 0 1.593l4.781 4.735-4.78 4.781c-.423.422-.423 1.172 0 1.594l.796.797c.422.422 1.172.422 1.594 0l6.328-6.375c.469-.422.469-1.125 0-1.594z"})),Pc=({pageId:e="*",componentId:t="*",onClick:o})=>{let r="arrow_right_button",{accessibilityId:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement("button",{"data-qa-anchor":n,className:gr(kf.storyButton,kf.desktopOnly),onClick:o,style:a},te.createElement(mce,null))};var ar={overlayLeft:"jr",overlayRight:"zr",viewStoryContent:"Nh",viewStoryOverlay:"Oh",hiddenInput:"Ph",viewStoryContainer:"Qh",storyWrapper:"Wh",deleteIcon:"Zh",arrowButton:"_h"};var hce=7e3,Ms=e=>!!(e!=null&&e.storyId),ru=({pageId:e="*",communityId:t,onBack:o,onClose:r,onSwipeDown:n,onClickCommunity:i,goToDraftStoryPage:a})=>{var Q;let{accessibilityId:s}=Re({pageId:e}),{confirm:l}=et(),c=So(),p=useMotionValue(0),u=useRef(null),g=useRef(new EventTarget),[f,y]=useState(!1),{stories:C}=ta({targetId:t,targetType:"community",options:{orderBy:"asc",sortBy:"createdAt"}}),v=useMemo(()=>o2.map(({renderer:T,tester:F})=>({renderer:Y=>T(E(d({},Y),{onClose:()=>r(t),onClickCommunity:()=>i(t)})),tester:F})),[o2,r,i,t]),h=useRef(null),{client:x,currentUserId:b}=De(),[M,I]=useState(0),{file:w,setFile:k}=yi(),S=C[M],L=Ms(S)?((Q=S==null?void 0:S.creator)==null?void 0:Q.userId)===b:!1,D=Ms(S)?ap(x,S==null?void 0:S.targetId):!1,H=()=>{if(M===C.length-1){o();return}I(M+1);},$=()=>{M!==0&&I(M-1);},B=T=>{l({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You'll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){y(!1),yield StoryRepository.softDeleteStory(T),M===0?r(t):I(M-1),c.success({content:"Story deleted"});})});},z=T=>{B(T);},V=useCallback((T,F,q,Y)=>_(void 0,null,function*(){var ie;try{let ce=new FormData;ce.append("files",T),k(null),T!=null&&T.type.includes("image")&&b?yield StoryRepository.createImageStory("user",b,ce,q,F,Y):b&&(yield StoryRepository.createVideoStory("user",b,ce,q,Y)),c.success({content:"Successfully shared story"});}catch(ce){ce instanceof Error&&c.info({content:(ie=ce.message)!=null?ie:"Failed to share story"});}}),[b,c,k]),K=()=>{k(null);},U=te.createElement(FileTrigger,{ref:h,onSelect:T=>{let F=Array.from(T);k(F[0]);}},te.createElement(is,{pageId:e})),j=()=>{if(M===C.length-1){o();return}I(T=>T+1);},Z=C==null?void 0:C.map(T=>{var F,q,Y;if(Ms(T)){let ie=(T==null?void 0:T.dataType)==="image",ce=ie?(F=T==null?void 0:T.imageData)==null?void 0:F.fileUrl:(Y=(q=T==null?void 0:T.videoData)==null?void 0:q.videoUrl)==null?void 0:Y["720p"];return {story:T,url:ce,type:ie?"image":"video",actions:[L||D?{name:"Delete",action:()=>z(T==null?void 0:T.storyId),icon:te.createElement(h4,{fill:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-default")})}:null].filter(rn),onCreateStory:V,discardStory:K,addStoryButton:U,fileInputRef:h,currentIndex:M,storiesCount:C==null?void 0:C.length,increaseIndex:j,pageId:e,dragEventTarget:g.current,setIsBottomSheetOpen:y,isBottomSheetOpen:f}}else return {ad:T,actions:[],pageId:e,currentIndex:M,storiesCount:C==null?void 0:C.length,increaseIndex:j}}),G="asc-uikit-stories-viewer";return useEffect(()=>{let T=C[C.length-1];Ms(T)&&(T==null?void 0:T.syncState)==="syncing"&&I(C.length-1),S&&Ms(S)&&(S==null||S.analytics.markAsSeen());},[M,C]),useEffect(()=>{if(C.filter(Ms).every(F=>F==null?void 0:F.isSeen))return;let T=C.findIndex(F=>Ms(F)?!(F!=null&&F.isSeen):!1);T!==-1&&I(T);},[]),Xa({targetId:t,targetType:"community"}),w&&a(t,"community",w.type.includes("image")?{type:"image",url:URL.createObjectURL(w)}:{type:"video",url:URL.createObjectURL(w)},"communityFeed"),!C||C.length===0?null:te.createElement("div",{className:gr(ar.storyWrapper)},te.createElement(Mc,{onClick:$}),te.createElement(motion.div,{id:G,ref:u,"data-qa-anchor":s,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{g.current.dispatchEvent(new Event("dragstart"));},onDrag:(T,F)=>{F.point.y<F.point.y-F.offset.y&&p.set(0);},onDragEnd:(T,F)=>{g.current.dispatchEvent(new Event("dragend")),F.offset.y>100?n(t):p.set(0);},className:gr(ar.viewStoryContainer)},te.createElement("div",{className:gr(ar.viewStoryContent)},te.createElement("div",{className:gr(ar.overlayLeft),onClick:$}),te.createElement("div",{className:gr(ar.overlayRight),onClick:H}),te.createElement("div",{className:gr(ar.viewStoryOverlay)}),te.createElement(uce,{key:C==null?void 0:C.length,progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:M,stories:Z,renderers:v,defaultInterval:hce,onStoryStart:()=>Ms(S)&&(S==null?void 0:S.analytics.markAsSeen()),onStoryEnd:H,onNext:H,onPrevious:$,onAllStoriesEnd:H}))),te.createElement(Pc,{onClick:H}))};var Mce=7e3,Ps=e=>!!(e!=null&&e.storyId),JL=({pageId:e="*",targetId:t,targetIds:o,onChangePage:r,onClickStory:n,goToDraftStoryPage:i,onClose:a,onSwipeDown:s,onClickCommunity:l})=>{var Q;let{accessibilityId:c}=Re({pageId:e}),{confirm:p}=et(),u=So(),{client:g,currentUserId:f}=De(),{file:y,setFile:C}=yi(),v=useMotionValue(0),h=useRef(null),x=useRef(new EventTarget),[b,M]=useState(0),I=useRef(null),{stories:w}=ta({targetType:"community",targetId:t,options:{orderBy:"asc",sortBy:"createdAt"}}),k=useMemo(()=>o2.map(({renderer:T,tester:F})=>({renderer:Y=>T(E(d({},Y),{onClose:()=>a(t),onClickCommunity:()=>l(t)})),tester:F})),[o2,a,s,l,t]),S=w[b],L=Ps(S)?((Q=S==null?void 0:S.creator)==null?void 0:Q.userId)===f:!1,D=Ps(S)?ap(g,S==null?void 0:S.targetId):!1,H=()=>{if(b===0){let F=o.indexOf(t)-1;if(F>=0){let q=o[F];n(q);}else r==null||r();M(0);return}M(T=>T-1);},$=T=>{let F=b===w.length-1;p({pageId:e,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",okText:"Delete",onOk:()=>_(void 0,null,function*(){yield StoryRepository.softDeleteStory(T),u.success({content:"Story deleted"}),w.length===1?r==null||r():F?H():M(q=>q);})});},B=T=>{$(T);},z=(T,F,q,Y)=>_(void 0,null,function*(){var ie;try{let ce=new FormData;if(ce.append("files",T),C(null),T!=null&&T.type.includes("image")&&f){let{data:Ke}=yield StoryRepository.createImageStory("user",f,ce,q,F,Y);Ke&&u.success({content:"Successfully shared story"});}else if(f){let{data:Ke}=yield StoryRepository.createVideoStory("user",f,ce,q,Y);Ke&&u.success({content:"Successfully shared story"});}}catch(ce){ce instanceof Error&&u.info({content:(ie=ce.message)!=null?ie:"Failed to share story"});}}),V=()=>{C(null);},K=te.createElement(FileTrigger,{ref:I,onSelect:T=>{let F=Array.from(T);C(F[0]);}},te.createElement(is,{pageId:e})),U=()=>{b!==w.length-1&&M(T=>T+1);},j=w==null?void 0:w.map(T=>{var F,q,Y;if(Ps(T)){let ie=(T==null?void 0:T.dataType)==="image",ce=ie?(F=T==null?void 0:T.imageData)==null?void 0:F.fileUrl:(Y=(q=T==null?void 0:T.videoData)==null?void 0:q.videoUrl)==null?void 0:Y["720p"];return {story:T,url:ce,type:ie?"image":"video",actions:[L||D?{name:"Delete",action:()=>B(T==null?void 0:T.storyId),icon:te.createElement(u1,{className:ar.deleteIcon})}:null].filter(rn),onCreateStory:z,discardStory:V,addStoryButton:K,fileInputRef:I,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:U,pageId:e}}else return {ad:T,actions:[],pageId:e,currentIndex:b,storiesCount:w==null?void 0:w.length,increaseIndex:U}}),Z=()=>{if(b===(j==null?void 0:j.length)-1){let F=o.indexOf(t)+1;if(F<o.length){let q=o[F];n(q);}else r==null||r();M(0);return}M(T=>T+1);},G="asc-uikit-stories-viewer";return useEffect(()=>{let T=w[w.length-1];Ps(T)&&(T==null?void 0:T.syncState)==="syncing"&&M(w.length-1),S&&Ps(S)&&(S==null||S.analytics.markAsSeen());},[S,w]),useEffect(()=>{if(w.filter(Ps).every(F=>F==null?void 0:F.isSeen))return;let T=w.findIndex(F=>Ps(F)?!(F!=null&&F.isSeen):!1);T!==-1&&M(T);},[]),useEffect(()=>{y&&i(t,"community",y.type.includes("image")?{type:"image",url:URL.createObjectURL(y)}:{type:"video",url:URL.createObjectURL(y)},"globalFeed");},[y,i,t]),Xa({targetId:t,targetType:"community"}),!w||w.length===0?null:te.createElement("div",{className:gr(ar.storyWrapper),"data-qa-anchor":c},te.createElement(Mc,{onClick:H}),te.createElement(motion.div,{id:G,ref:h,"data-qa-anchor":c,initial:{y:0},drag:"y",whileDrag:{scale:.95,borderRadius:"8px",cursor:"grabbing"},dragConstraints:{top:0,bottom:200},dragElastic:{top:0,bottom:.5},onDragStart:()=>{x.current.dispatchEvent(new Event("dragstart"));},onDrag:(T,F)=>{F.point.y<F.point.y-F.offset.y&&v.set(0);},onDragEnd:(T,F)=>{x.current.dispatchEvent(new Event("dragend")),F.offset.y>100?s(t):v.set(0);},className:gr(ar.viewStoryContainer)},te.createElement("div",{className:gr(ar.viewStoryContent)},te.createElement("div",{className:gr(ar.overlayLeft),onClick:H}),te.createElement("div",{className:gr(ar.overlayRight),onClick:Z}),te.createElement("div",{className:gr(ar.viewStoryOverlay)}),te.createElement(uce,{progressWrapperStyles:{display:"none"},preventDefault:!0,currentIndex:b,stories:j,renderers:k,defaultInterval:Mce,onStoryStart:()=>Ps(S)&&(S==null?void 0:S.analytics.markAsSeen()),onStoryEnd:U,onNext:Z,onPrevious:H,onAllStoriesEnd:Z}))),te.createElement(Pc,{onClick:Z}))};var nu=({pageId:e="*",targetId:t,onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})=>{let{stories:l}=c5({seenState:"smart",limit:10});return te.createElement(JL,{pageId:e,targetId:t,targetIds:l.map(c=>c.targetId),onChangePage:o,onClickStory:r,goToDraftStoryPage:n,onClose:i,onSwipeDown:a,onClickCommunity:s})};var _ce=({type:e,targetId:t})=>{let o="view_story_page",{onBack:r,goToDraftStoryPage:n,onClickCommunity:i,onChangePage:a,onClickStory:s}=R(),l=()=>{a("newsfeed");},c=p=>{i(p);};return e==="communityFeed"?te.createElement(ru,{pageId:o,communityId:t,onBack:r,onClose:c,onSwipeDown:c,onClickCommunity:c,goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f)}):e==="globalFeed"?te.createElement(nu,{pageId:o,targetId:t,onChangePage:l,onClose:l,onSwipeDown:l,onClickStory:p=>s(p,"globalFeed"),goToDraftStoryPage:({targetId:p,targetType:u,mediaType:g,storyType:f})=>n(p,u,g,f),onClickCommunity:p=>i(p)}):null},YL=_ce;var RL={roundedBackButton:"ef"};var kce=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",fill:"none",viewBox:"0 0 32 32"},e),te.createElement("circle",{cx:"16",cy:"16",r:"16",fill:"#000",fillOpacity:"0.5"}),te.createElement("path",{fill:"currentColor",d:"M16.176 23.914c-.14.176-.422.176-.598 0L8.23 16.566a.405.405 0 010-.597l7.348-7.348c.176-.176.457-.176.598 0l.703.668c.176.176.176.457 0 .598l-5.45 5.449h12.024c.211 0 .422.21.422.422v.984c0 .246-.21.422-.422.422H11.43l5.449 5.484c.176.141.176.422 0 .598l-.703.668z"})),Af=({pageId:e="*",componentId:t="*",defaultClassName:o,imgClassName:r,onPress:n})=>{let i="back_button",{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:e,componentId:t,elementId:i});return c?null:te.createElement(O,{style:u,className:RL.roundedBackButton,onPress:n},te.createElement(oe,{"data-qa-anchor":a,defaultIcon:()=>te.createElement(kce,{className:o}),imgIcon:()=>te.createElement("img",{src:s.icon,alt:p,className:r}),defaultIconName:l.icon,configIconName:s.icon}))};var Zn={draftPageContainer:"Xr",headerContainer:"rf",storyWrapper:"af",header:"of",topRightButtons:"tf",mainContainer:"if",previewImage:"lf",footer:"sf",videoPreview:"cf",hyperLinkContainer:"nf",playPauseButton:"df",progressBar:"mf",progressFill:"pf",userInfo:"gf",name:"hf",description:"ff",storyPreview:"bf"};var Df=({targetId:e,targetType:t,mediaType:o,goToCommunityPage:r,goToGlobalFeedPage:n,onDiscardCreateStory:i})=>{var V,K,U,j,Z,G;let{page:a}=Be(),s="create_story_page",{accessibilityId:l,themeStyles:c}=Re({pageId:s}),{file:p,setFile:u}=yi(),{community:g}=k3(e),[f,y]=useState(!1),{confirm:C}=et(),v=So(),[h,x]=useState([{data:{url:"",customText:""},type:"hyperlink"}]),b=()=>{y(!1);},[M,I]=useState("fit"),[w,k]=useState([]),S=()=>{I(M==="fit"?"fill":"fit"),M==="fill"&&k([]);},L=(Q,T,F,q)=>_(void 0,null,function*(){var Y;if(Q)try{let ie=new FormData;ie.append("files",Q),u(null),a.type==="DraftPage"&&a.context.storyType==="globalFeed"?n():r(e),(o==null?void 0:o.type)==="image"&&e?yield StoryRepository.createImageStory(t,e,ie,F,T,q):(o==null?void 0:o.type)==="video"&&e&&(yield StoryRepository.createVideoStory(t,e,ie,F,q)),v.success({content:"Successfully shared story"});}catch(ie){ie instanceof Error&&v.info({content:(Y=ie.message)!=null?Y:"Failed to share story"});}}),D=()=>{C({pageId:s,title:"Delete this story?",content:"This story will be permanently deleted. You\u2019ll no longer to see and find this story.",cancelText:"Cancel",okText:"Delete",onOk:()=>{u(null),i();}});},H=({url:Q,customText:T})=>{x([{data:{url:Q,customText:T||""},type:"hyperlink"}]),y(!1);},$=()=>{x([{data:{url:"",customText:""},type:"hyperlink"}]);},B=()=>{var Q,T;if((T=(Q=h[0])==null?void 0:Q.data)!=null&&T.url){v.info({content:"Can\u2019t add more than one link to your story."});return}y(!0);},z=useCallback(Q=>_(void 0,null,function*(){let T=new Image;T.crossOrigin="Anonymous",T.src=Q,T.onload=()=>{let q=new Lde().getPalette(T,2);q&&k(q.map(Y=>`rgb(${Y.join(",")})`));};}),[]);return useEffect(()=>{_(void 0,null,function*(){if((o==null?void 0:o.type)==="image")if(p){let T=URL.createObjectURL(p);yield z(T);}else o.url&&(yield z(o.url));});},[p,o,z]),te.createElement("div",{"data-qa-anchor":l,style:c,className:Zn.storyWrapper},te.createElement("div",{id:"asc-uikit-create-story",className:Zn.draftPageContainer},te.createElement("div",{className:Zn.headerContainer},te.createElement("div",{className:Zn.header},te.createElement(Af,{pageId:s,onPress:D}),te.createElement("div",{className:Zn.topRightButtons},(o==null?void 0:o.type)==="image"&&te.createElement(E3,{pageId:s,onPress:S}),te.createElement(F3,{pageId:s,onPress:B})))),(o==null?void 0:o.type)==="image"?te.createElement("div",{className:Zn.mainContainer,style:{background:`linear-gradient(
|
|
4817
4817
|
180deg,
|
|
4818
4818
|
${w[0]||"var(--asc-color-black)"} 0%,
|
|
4819
4819
|
${w[1]||"var(--asc-color-black)"} 100%
|
|
@@ -5387,14 +5387,14 @@ Note: nickname must be alphanumeric only and 3-25 characters in length.`)),te.cr
|
|
|
5387
5387
|
}
|
|
5388
5388
|
`,i3e=m.svg`
|
|
5389
5389
|
animation: ${n3e} 2s linear infinite;
|
|
5390
|
-
`,a3e=e=>{let t=v4$1();return te.createElement(i3e,d({xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.52453 4C9.52453 4.31559 9.26869 4.57143 8.9531 4.57143C8.63751 4.57143 8.38167 4.31559 8.38167 4V0.571429C8.38167 0.255837 8.63751 0 8.9531 0C9.26869 0 9.52453 0.255837 9.52453 0.571428V4ZM7.23891 5.03082C7.51222 4.87303 7.60586 4.52355 7.44807 4.25024L5.73378 1.28101C5.57599 1.0077 5.22651 0.914056 4.9532 1.07185C4.67989 1.22965 4.58624 1.57913 4.74404 1.85244L6.45832 4.82167C6.61612 5.09498 6.9656 5.18862 7.23891 5.03082ZM5.77458 5.50525C6.04789 5.66304 6.14153 6.01252 5.98374 6.28583C5.82594 6.55914 5.47646 6.65278 5.20315 6.49499L2.23392 4.7807C1.96061 4.62291 1.86697 4.27343 2.02476 4.00012C2.18256 3.72681 2.53204 3.63316 2.80535 3.79096L5.77458 5.50525ZM5.52455 8.00013C5.52455 7.68454 5.26872 7.4287 4.95312 7.4287H1.52455C1.20896 7.4287 0.953125 7.68454 0.953125 8.00013C0.953125 8.31572 1.20896 8.57156 1.52455 8.57156H4.95313C5.26872 8.57156 5.52455 8.31572 5.52455 8.00013ZM5.20327 9.50543C5.47658 9.34764 5.82606 9.44128 5.98385 9.71459C6.14165 9.9879 6.048 10.3374 5.77469 10.4952L2.80546 12.2095C2.53215 12.3673 2.18267 12.2736 2.02488 12.0003C1.86708 11.727 1.96073 11.3775 2.23404 11.2197L5.20327 9.50543ZM7.23874 10.9693C6.96543 10.8115 6.61595 10.9051 6.45815 11.1784L4.74387 14.1476C4.58607 14.4209 4.67971 14.7704 4.95302 14.9282C5.22633 15.086 5.57581 14.9924 5.73361 14.7191L7.44789 11.7498C7.60569 11.4765 7.51205 11.127 7.23874 10.9693ZM8.95292 11.4287C8.63732 11.4287 8.38149 11.6845 8.38149 12.0001V15.4287C8.38149 15.7443 8.63732 16.0001 8.95292 16.0001C9.26851 16.0001 9.52435 15.7443 9.52435 15.4287V12.0001C9.52435 11.6845 9.26851 11.4287 8.95292 11.4287ZM10.6674 5.03064C10.9407 5.18843 11.2901 5.09479 11.4479 4.82148L13.1622 1.85225C13.32 1.57894 13.2264 1.22946 12.9531 1.07166C12.6798 0.913868 12.3303 1.00751 12.1725 1.28082L10.4582 4.25005C10.3004 4.52336 10.394 4.87284 10.6674 5.03064ZM12.7028 6.4947C12.4295 6.65249 12.08 6.55885 11.9222 6.28554C11.7644 6.01223 11.8581 5.66275 12.1314 5.50496L15.1006 3.79067C15.3739 3.63287 15.7234 3.72652 15.8812 3.99983C16.039 4.27314 15.9453 4.62262 15.672 4.78041L12.7028 6.4947ZM12.3816 8C12.3816 8.31559 12.6374 8.57143 12.953 8.57143H16.3816C16.6972 8.57143 16.953 8.31559 16.953 8C16.953 7.68441 16.6972 7.42857 16.3816 7.42857H12.953C12.6374 7.42857 12.3816 7.68441 12.3816 8ZM12.1315 10.4946C11.8582 10.3368 11.7646 9.98737 11.9224 9.71406C12.0801 9.44075 12.4296 9.3471 12.7029 9.5049L15.6722 11.2192C15.9455 11.377 16.0391 11.7265 15.8813 11.9998C15.7235 12.2731 15.3741 12.3667 15.1007 12.2089L12.1315 10.4946ZM10.6673 10.9693C10.3939 11.1271 10.3003 11.4766 10.4581 11.7499L12.1724 14.7191C12.3302 14.9924 12.6797 15.0861 12.953 14.9283C13.2263 14.7705 13.3199 14.421 13.1621 14.1477L11.4478 11.1785C11.29 10.9052 10.9406 10.8115 10.6673 10.9693Z",fill:`url(#paint_${t})`}),te.createElement("defs",null,te.createElement("radialGradient",{id:`paint_${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.95312 8) scale(8)"},te.createElement("stop",{offset:"0.669733",stopColor:"white"}),te.createElement("stop",{offset:"0.716307",stopColor:"white",stopOpacity:"0.01"}))))},DH=a3e;var FH={DIRECT_CHAT:2,ONLY_ME_CHAT:1};function c3e(e,t){var i,a,s;if((i=e==null?void 0:e.metadata)!=null&&i.isDirectChat&&(e==null?void 0:e.memberCount)===FH.ONLY_ME_CHAT)return "Me";if(!((a=e==null?void 0:e.metadata)!=null&&a.isDirectChat)&&(e!=null&&e.displayName))return e==null?void 0:e.displayName;let{firstname:o="",lastname:r=""}=(s=t==null?void 0:t.metadata)!=null?s:{},n=trim(`${o}${r}`);return (t==null?void 0:t.displayName)||n||(t==null?void 0:t.userId)||e.channelId}function r9(o){return _(this,arguments,function*({avatarFileId:e,avatarCustomUrl:t}){if(t)return t;if(e){let r=yield FileRepository.getFile(e);return FileRepository.fileUrlWithSize(r.data.fileUrl,"small")}return null})}function p3e(e,t,o){return _(this,null,function*(){var r,n;return (e==null?void 0:e.memberCount)===FH.ONLY_ME_CHAT?r9({avatarCustomUrl:o==null?void 0:o.avatarUrl}):(r=e==null?void 0:e.metadata)!=null&&r.isDirectChat&&(t!=null&&t.avatarUrl)?r9({avatarCustomUrl:t.avatarUrl}):r9({avatarFileId:e==null?void 0:e.avatarFileId,avatarCustomUrl:(n=e==null?void 0:e.metadata)==null?void 0:n.avatarCustomUrl})})}function u3e({channel:e}){var p,u,g;let{currentUserId:t}=ol(),[o,r]=useState(null),n=(p=e==null?void 0:e.metadata)!=null&&p.isDirectChat?((g=(u=e==null?void 0:e.metadata)==null?void 0:u.userIds)!=null?g:[]).find(f=>f!==t):null,i=ne(t),a=ne(n),s=le({fileId:i==null?void 0:i.avatarFileId}),l=le({fileId:a==null?void 0:a.avatarFileId});return useEffect(()=>{function f(){return _(this,null,function*(){r(null);let y=yield p3e(e,{avatarUrl:(a==null?void 0:a.avatarCustomUrl)||l},{avatarUrl:(i==null?void 0:i.avatarCustomUrl)||s});r(y);})}f();},[a==null?void 0:a.avatarCustomUrl,e,s,i==null?void 0:i.avatarCustomUrl]),{chatName:useMemo(()=>e==null?void 0:c3e(e,a),[e,a]),chatAvatar:o,type:e==null?void 0:e.type}}var OH=u3e;var d2={messageListHeader:"uf",displayName:"vf",memberCount:"xf",memberIcon:"wf",avatar:"yf"};var yu=({channel:e,pageId:t="*"})=>{let o="chat_header",{themeStyles:r}=re({pageId:t,componentId:o}),{chatName:n,chatAvatar:i}=OH({channel:e}),a=fu();return te.createElement("div",{className:d2.messageListHeader,style:r},te.createElement("div",{className:d2.avatar},te.createElement(bt,{avatarUrl:i,defaultImage:te.createElement(BH,null)})),te.createElement("div",null,te.createElement("div",{className:d2.displayName},te.createElement(N.Title,null,n||"Loading...")),te.createElement("div",{className:d2.memberCount},a?te.createElement(te.Fragment,null,te.createElement(AH,{className:d2.memberIcon}),te.createElement(N.Caption,null,lb((e==null?void 0:e.memberCount)||0)," ",`${(e==null?void 0:e.memberCount)||0} ${(e==null?void 0:e.memberCount)===1?"member":"members"}`)):te.createElement(te.Fragment,null,te.createElement(DH,{width:20,height:20}),te.createElement(N.Caption,null,"Waiting for connection...")))))};var UH={spinner:"kf",rotate:"Yr"};var zH=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return te.createElement("svg",d({width:"25",height:"25",xmlns:"http://www.w3.org/2000/svg","aria-label":"Loading...",viewBox:"0 0 100 100",version:"1.1",className:gr(UH.spinner,e)},t),te.createElement("defs",{id:"defs3821"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0",rx:"3",ry:"3",transform:"rotate(-90 50 50)",width:"25",x:"72",y:"47",id:"rect3793"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.08333333333333333",rx:"3",ry:"3",transform:"rotate(-60 50 50)",width:"25",x:"72",y:"47",id:"rect3795"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.16666666666666666",rx:"3",ry:"3",transform:"rotate(-30 50 50)",width:"25",x:"72",y:"47",id:"rect3797"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.25",rx:"3",ry:"3",transform:"rotate(0 50 50)",width:"25",x:"72",y:"47",id:"rect3799"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.3333333333333333",rx:"3",ry:"3",transform:"rotate(30 50 50)",width:"25",x:"72",y:"47",id:"rect3801"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.4166666666666667",rx:"3",ry:"3",transform:"rotate(60 50 50)",width:"25",x:"72",y:"47",id:"rect3803"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5",rx:"3",ry:"3",transform:"rotate(90 50 50)",width:"25",x:"72",y:"47",id:"rect3805"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5833333333333334",rx:"3",ry:"3",transform:"rotate(120 50 50)",width:"25",x:"72",y:"47",id:"rect3807"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.6666666666666666",rx:"3",ry:"3",transform:"rotate(150 50 50)",width:"25",x:"72",y:"47",id:"rect3809"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.75",rx:"3",ry:"3",transform:"rotate(180 50 50)",width:"25",x:"72",y:"47",id:"rect3811"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.8333333333333334",rx:"3",ry:"3",transform:"rotate(210 50 50)",width:"25",x:"72",y:"47",id:"rect3813"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.9166666666666666",rx:"3",ry:"3",transform:"rotate(240 50 50)",width:"25",x:"72",y:"47",id:"rect3815"}))};var sr={optionButton:"jf",optionIcon:"zf",reactionIcon:"Xf",timestamp:"Yf",messageActionButton:"Cf",messageActionButtonText:"Af",messageDangerActionButtonText:"Mf",copyIcon:"Sf",replyIcon:"Ef",binIcon:"If",mentionIcon:"Rf",flagIcon:"Uf"};var v3e=t=>{var e=P(t,[]);return te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21"},e),te.createElement("path",{d:"M10 8.78369C10.8125 8.78369 11.5 9.47119 11.5 10.2837C11.5 11.1274 10.8125 11.7837 10 11.7837C9.15625 11.7837 8.5 11.1274 8.5 10.2837C8.5 9.47119 9.15625 8.78369 10 8.78369ZM8.5 5.53369C8.5 4.72119 9.15625 4.03369 10 4.03369C10.8125 4.03369 11.5 4.72119 11.5 5.53369C11.5 6.37744 10.8125 7.03369 10 7.03369C9.15625 7.03369 8.5 6.37744 8.5 5.53369ZM8.5 15.0337C8.5 14.2212 9.15625 13.5337 10 13.5337C10.8125 13.5337 11.5 14.2212 11.5 15.0337C11.5 15.8774 10.8125 16.5337 10 16.5337C9.15625 16.5337 8.5 15.8774 8.5 15.0337Z"}))},VH=v3e;var jH={popover:"Bf",fixed:"Df"};var M3e=i=>{var a=i,{isOpen:e,content:t,fixed:o=!1,children:r}=a,n=P(a,["isOpen","content","fixed","children"]);return te.createElement(Popover,d({containerClassName:gr(jH.popover,{fixed:!1}),isOpen:e,content:t},n),r)},GH=M3e;var P3e=e=>te.createElement("svg",d({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M1.4375 10.5586C0.84375 9.99609 0.84375 9.02734 1.4375 8.46484L6.9375 2.96484C7.875 1.99609 9.5 2.68359 9.5 4.02734V6.52734C13.7812 6.65234 19 7.49609 19 12.8398C19 15.1211 17.7812 17.0273 15.9375 18.2461C14.7812 19.0273 13.25 17.9336 13.6875 16.5586C14.4375 14.1211 14.0625 12.8398 9.5 12.5586V14.9961C9.5 16.3398 7.875 17.0273 6.9375 16.0586L1.4375 10.5586ZM2.5 9.49609L8 14.9961V11.0273C13.125 11.0586 16.6562 12.0586 15.0938 16.9961C16.25 16.2461 17.5 14.9336 17.5 12.8398C17.5 8.37109 12.4688 8.02734 8 8.02734V3.99609L2.5 9.49609Z",fill:"currenColor"})),QH=P3e;var _3e=e=>te.createElement("svg",d({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M16.5312 5.03992C16.7812 5.28992 17 5.75867 17 6.10242V14.4774C17 15.3212 16.3125 15.9774 15.5 15.9774H13V17.4774C13 18.3212 12.3125 18.9774 11.5 18.9774H4.5C3.65625 18.9774 3 18.3212 3 17.4774V7.47742C3 6.66492 3.65625 5.97742 4.5 5.97742H7V4.47742C7 3.66492 7.65625 2.97742 8.5 2.97742H13.875C14.2188 2.97742 14.6875 3.19617 14.9375 3.44617L16.5312 5.03992ZM11.3125 17.4774C11.4062 17.4774 11.5 17.4149 11.5 17.2899V15.9774H8.5C7.65625 15.9774 7 15.3212 7 14.4774V7.47742H4.6875C4.5625 7.47742 4.5 7.57117 4.5 7.66492V17.2899C4.5 17.4149 4.5625 17.4774 4.6875 17.4774H11.3125ZM15.3125 14.4774C15.4062 14.4774 15.5 14.4149 15.5 14.2899V7.97742H12.75C12.3125 7.97742 12 7.66492 12 7.22742V4.47742H8.6875C8.5625 4.47742 8.5 4.57117 8.5 4.66492V14.2899C8.5 14.4149 8.5625 14.4774 8.6875 14.4774H15.3125ZM15.5 6.47742V6.19617C15.5 6.13367 15.4688 6.10242 15.4375 6.07117L13.9062 4.53992C13.875 4.50867 13.8438 4.47742 13.7812 4.47742H13.5V6.47742H15.5Z",fill:"currenColor"})),qH=_3e;var T3e=e=>te.createElement("svg",d({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M12.875 4.375C13.0625 4.375 13.25 4.5625 13.25 4.75V5.125C13.25 5.33594 13.0625 5.5 12.875 5.5H12.5L11.9844 13.4453C11.9609 14.0312 11.4453 14.5 10.8594 14.5H5.11719C4.53125 14.5 4.01562 14.0312 3.99219 13.4453L3.5 5.5H3.125C2.91406 5.5 2.75 5.33594 2.75 5.125V4.75C2.75 4.5625 2.91406 4.375 3.125 4.375H5.04688L5.84375 3.0625C6.03125 2.75781 6.45312 2.5 6.80469 2.5H9.17188C9.52344 2.5 9.94531 2.75781 10.1328 3.0625L10.9297 4.375H12.875ZM6.80469 3.625L6.35938 4.375H9.61719L9.17188 3.625H6.80469ZM10.8594 13.375L11.3516 5.5H4.625L5.11719 13.375H10.8594Z"})),hu=T3e;var k3e=o=>{var r=o,{color:e="#FA4D30"}=r,t=P(r,["color"]);return te.createElement("svg",d({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),te.createElement("path",{d:"M10.5 2.99609C11.5938 2.99609 12.7812 2.62109 13.9062 2.12109C14.875 1.71484 16 2.43359 16 3.49609V10.9961C16 11.5273 15.7188 11.9961 15.3125 12.2773C14.4688 12.8086 13.125 13.4961 11.2812 13.4961C9.15625 13.4961 7.75 12.4961 6.21875 12.4961C4.46875 12.4961 3.40625 12.8711 2.25 13.4023V15.9961C2.25 16.2773 2 16.4961 1.75 16.4961H1.25C0.96875 16.4961 0.75 16.2773 0.75 15.9961V3.30859C0.28125 3.05859 0 2.55859 0 1.99609C0 1.15234 0.71875 0.464844 1.59375 0.527344C2.3125 0.558594 2.90625 1.12109 2.96875 1.83984C2.96875 1.87109 3 1.96484 3 1.99609C3 2.15234 2.9375 2.37109 2.90625 2.49609C3.59375 2.21484 4.4375 1.99609 5.4375 1.99609C7.5625 1.99609 8.96875 2.99609 10.5 2.99609ZM14.5 10.9961V3.49609C13.5 3.96484 11.8438 4.49609 10.5 4.49609C8.625 4.49609 7.3125 3.49609 5.4375 3.49609C4.125 3.49609 2.90625 4.02734 2.25 4.49609V11.7461C3.21875 11.3086 4.875 10.9961 6.21875 10.9961C8.09375 10.9961 9.40625 11.9961 11.2812 11.9961C12.5938 11.9961 13.8125 11.4961 14.5 10.9961Z",fill:e}))},Cu=k3e;var XH=({isOwner:e,isModerator:t,isFlagged:o,action:r,containerRef:n})=>{let[i,a]=useState(!1),s=useRef(null),l=()=>{r.onCopy&&r.onCopy(),a(!1);},c=()=>{r.onReply&&r.onReply(),a(!1);},p=()=>{r.onDelete&&r.onDelete(),a(!1);},u=()=>{r.onFlag&&r.onFlag(),a(!1);},g=()=>{r.onUnflag&&r.onUnflag(),a(!1);};return te.createElement(te.Fragment,null,te.createElement(GH,{positions:["bottom","top"],onClickOutside:()=>a(!1),isOpen:i,align:"start",parentElement:(n==null?void 0:n.current)||void 0,content:te.createElement(te.Fragment,null,te.createElement("div",{className:sr.messageActionButton,onClick:c},te.createElement("div",{className:sr.messageActionButtonText},te.createElement(N.Body,null,"Reply")),te.createElement(QH,{className:sr.replyIcon})),te.createElement("div",{className:sr.messageActionButton,onClick:l},te.createElement("div",{className:sr.messageActionButtonText},te.createElement(N.Body,null,"Copy")),te.createElement(qH,{className:sr.copyIcon})),(t||!e)&&te.createElement("div",{className:sr.messageActionButton,onClick:o?g:u},te.createElement("div",{className:sr.messageDangerActionButtonText},te.createElement(N.Body,null,o?"Unreport":"Report")),te.createElement(Cu,{className:sr.flagIcon})),(e||t)&&te.createElement("div",{className:sr.messageActionButton,onClick:p},te.createElement("div",{className:sr.messageDangerActionButtonText},te.createElement(N.Body,null,"Delete")),te.createElement(hu,{className:sr.binIcon})))},te.createElement("div",{className:sr.optionButton,ref:s,onClick:()=>{a(!i);}},te.createElement(VH,{className:sr.optionIcon}))))};var vu={messageItemContainer:"Ff",userDisplayName:"Hf",avatar:"Lf",moderatorBadge:"Tf"};var B3e=({avatarUrl:e,displayName:t,children:o})=>te.createElement("div",{className:vu.messageItemContainer},te.createElement("div",{className:vu.avatar},te.createElement(bt,{avatarUrl:e,defaultImage:te.createElement(ds,null)})),te.createElement("div",null,te.createElement("div",{className:vu.userDisplayName},te.createElement(N.CaptionBold,null,t)),o)),YH=B3e;var Ts={messageBubble:"Cr",messageRepliedBubble:"Vf",messageParentContainer:"qf",messageParentDisplayName:"Gf",messageParentText:"Jf",messageChildContainer:"Kf",messageChildText:"Nf"};var D3e=e=>Dt({fetcher:MessageRepository.getMessage,params:e,shouldCall:!!e}),RH=D3e;var xu={mentionText:"Of",hyperlink:"Pf"};var eF={hyperlink:"Qf"};var U3e=({linkClassName:e,children:t})=>te.createElement($Z,{options:{target:"_blank",render:({attributes:o,content:r})=>te.createElement("a",d({className:e||eF.hyperlink},o),r)}},t),n9=U3e;var z3e=({message:e,className:t})=>{var n,i,a;let o=(n=e.metadata)==null?void 0:n.mentioned,r=o==null?void 0:o.sort((s,l)=>s.index-l.index);if(r!=null&&r.length){let s=((i=e.data)==null?void 0:i.text)||"",l=[],c=0;r.forEach(u=>{let g=u.index,f=u.index+u.length+1,y=s.slice(c,g),C=s.slice(g,f);y&&l.push({text:y,isMention:!1}),l.push({text:C,isMention:!0}),c=f;});let p=s.slice(c);return p&&l.push({text:p,isMention:!1}),te.createElement(N.Body,{className:t},l.map((u,g)=>u.isMention?te.createElement("span",{key:g,className:xu.mentionText},u.text):te.createElement("span",{key:g},te.createElement(n9,{linkClassName:xu.hyperlink},u.text))))}return te.createElement(N.Body,{className:t},te.createElement(n9,{linkClassName:xu.hyperlink},(a=e.data)==null?void 0:a.text))},i9=z3e;var $3e=({message:e})=>{var r,n,i;let{currentUserId:t}=X(),o=(n=(r=e.metadata)==null?void 0:r.mentioned)==null?void 0:n.some(a=>a.userId===t||a.type==="channel");if(e&&e.parentId){let a=RH(e.parentId),s=ne(a==null?void 0:a.creatorId);return !a||!s?null:te.createElement("div",{className:Ts.messageRepliedBubble},te.createElement("div",{className:Ts.messageParentContainer},te.createElement("div",{className:Ts.messageParentDisplayName},te.createElement(N.BodyBold,null,s.displayName)),te.createElement(N.Body,{className:Ts.messageParentText},(i=a.data)==null?void 0:i.text)),te.createElement("div",{className:Ts.messageChildContainer},te.createElement(i9,{className:Ts.messageChildText,message:e})))}return te.createElement("div",{"data-mentioned":o,className:Ts.messageBubble},te.createElement(i9,{message:e}))},oF=$3e;var p2=e=>{let{client:t}=X();return {isModerator:useMemo(()=>{if(!e)return !1;let r=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").currentUser())||!1,n=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").channel(e))||!1;return r||n},[e])}};var rF=e=>te.createElement("svg",d({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0766 3.686C11.6827 3.45305 12.3021 3.33948 12.9061 3.3335C14.7179 3.31558 16.3937 4.2689 17.1729 5.89093L17.1895 5.92546L17.202 5.9624C17.6819 7.39004 17.5517 8.83248 17.0292 10.1008C16.7326 9.72289 16.3721 9.39755 15.964 9.14106C16.2254 8.26924 16.2483 7.32915 15.9455 6.39919C15.3774 5.24797 14.2332 4.57487 12.9278 4.60378C12.4981 4.61329 12.0515 4.70045 11.6019 4.86956C11.1731 5.08422 10.8198 5.36694 10.5238 5.73675L10.0093 6.37992L9.47729 5.74959C8.38507 4.45434 6.19511 4.17996 4.72103 5.44206C3.63692 6.5523 3.60343 8.44184 4.37082 10.0205C5.31606 11.6937 7.28176 13.3534 9.14794 14.7202L9.15794 14.7275C9.27155 14.8082 9.38012 14.8942 9.48451 14.9769C9.57334 15.0473 9.65915 15.1152 9.74247 15.1755C9.83249 15.2407 9.91925 15.2913 9.98761 15.3273C10.0527 15.3006 10.1319 15.2662 10.2153 15.2157C10.2662 15.1848 10.3205 15.1506 10.3776 15.1136C10.6388 15.4735 10.9562 15.7901 11.3169 16.0503C11.1818 16.1421 11.0508 16.227 10.9257 16.3029C10.8808 16.33 10.8388 16.3568 10.7982 16.3826C10.5856 16.5181 10.4104 16.6296 10.0526 16.6594L9.96091 16.6666L9.87002 16.6497C9.46411 16.575 9.1867 16.3802 8.94112 16.2025C8.80472 16.1038 8.67845 16.0042 8.57194 15.9202C8.48669 15.8529 8.4141 15.7957 8.3591 15.7569L8.35494 15.7536L8.34994 15.7496C6.42696 14.342 4.31681 12.6298 3.18676 10.6147L3.17842 10.5987L3.17008 10.5834C2.21058 8.62424 2.1731 6.14474 3.7738 4.53473L3.79047 4.51786L3.80882 4.50181C5.63352 2.91773 8.30066 3.019 9.97595 4.41428C10.2872 4.13498 10.6374 3.8993 11.0216 3.71089L11.0491 3.69724L11.0766 3.686Z",fill:"currentColor"}),te.createElement("path",{d:"M13.6839 10.0507L13.6839 10.0501L13.6725 10.0522C13.5717 10.0706 13.4807 10.1238 13.4151 10.2025C13.3496 10.2811 13.3137 10.3803 13.3137 10.4827C13.3137 10.4827 13.3137 10.4827 13.3137 10.4827V12.2327H11.5637V12.2322L11.5527 12.2332L11.4964 12.2382L11.4964 12.2376L11.485 12.2397C11.3842 12.2581 11.2932 12.3113 11.2276 12.39C11.1621 12.4686 11.1262 12.5678 11.1262 12.6702H11.1257L11.1267 12.6812L11.1317 12.7375L11.1312 12.7375L11.1333 12.7489C11.1517 12.8496 11.2049 12.9407 11.2835 13.0063C11.3622 13.0718 11.4613 13.1077 11.5637 13.1077C11.5637 13.1077 11.5637 13.1077 11.5638 13.1077H13.3137V14.8577H13.3132L13.3142 14.8687L13.3192 14.925L13.3187 14.925L13.3208 14.9364C13.3392 15.0371 13.3924 15.1282 13.471 15.1938L13.5511 15.0977L13.471 15.1938C13.5497 15.2593 13.6489 15.2952 13.7513 15.2952L13.7513 15.2957L13.7623 15.2947L13.8185 15.2897L13.8186 15.2902L13.83 15.2881C13.9307 15.2697 14.0218 15.2165 14.0873 15.1379C14.1529 15.0592 14.1887 14.96 14.1887 14.8577C14.1887 14.8577 14.1887 14.8576 14.1887 14.8576V13.1077H15.9387V13.1082L15.9498 13.1072L16.006 13.1022L16.0061 13.1027L16.0175 13.1006C16.1182 13.0822 16.2093 13.029 16.2748 12.9504C16.3404 12.8717 16.3763 12.7725 16.3762 12.6701L16.3767 12.6701L16.3757 12.6591L16.3707 12.6028L16.3713 12.6028L16.3692 12.5914C16.3507 12.4907 16.2976 12.3996 16.2189 12.3341C16.1403 12.2685 16.0411 12.2326 15.9387 12.2327C15.9387 12.2327 15.9387 12.2327 15.9387 12.2327H14.1887V10.4827H14.1892L14.1882 10.4716L14.1832 10.4153L14.1838 10.4153L14.1817 10.4039C14.1632 10.3032 14.1101 10.2121 14.0314 10.1466C13.9527 10.081 13.8536 10.0451 13.7512 10.0452V10.0447L13.7402 10.0457L13.6839 10.0507Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.25"}));var bu=o=>_(void 0,[o],function*({reactionName:e,message:t}){let r=t.myReactions||[];if(r.includes(e)){yield ReactionRepository.removeReaction("message",t.messageId,e);return}r.length>0&&(yield ReactionRepository.removeReaction("message",t.messageId,r[0])),yield ReactionRepository.addReaction("message",t.messageId,e);});var l9={quickReactionIcon:"Wf",quickReactionIconContainer:"Ar"};var Iu=({pageId:e="*",componentId:t="*",message:o,onSelectReaction:r})=>{let n="message_quick_reaction",{config:i}=A({pageId:e,componentId:t,elementId:n}),{config:a}=bi(),s=useCallback(()=>{a&&i.reaction&&a.find(l=>l.name===i.reaction)&&bu({reactionName:i.reaction,message:o}),r&&r();},[a,i,o]);return te.createElement("div",{className:l9.quickReactionIconContainer},te.createElement(rF,{className:l9.quickReactionIcon,onClick:s}))};var m9={reactionPickerContainer:"Zf",reactionButton:"u"};var d9=({message:e,onSelectReaction:t})=>{let{config:o}=bi(),r=n=>{bu({reactionName:n,message:e});};return o?te.createElement("div",{className:m9.reactionPickerContainer},o.map(n=>{var i;return te.createElement("img",{"data-active":(i=e.myReactions)==null?void 0:i.includes(n.name),key:n.name,src:n.image,alt:n.name,className:m9.reactionButton,onClick:()=>{r(n.name),t&&t(n.name);}})})):null};var wu={reactionContainer:"_f",reactionPickerWrap:"eb",reactionButton:"rb"};var aF=({pageId:e="*",componentId:t="*",message:o,containerRef:r})=>{let [n,i]=useState(!1),[a,s]=useState(!1),[l,c]=useState(!1);te.useState();let g=useRef(null),f=useRef(a);useEffect(()=>{f.current=a;},[a]);let y=useCallback(()=>{if(!f.current)return;let I=setTimeout(()=>{f.current&&i(!0);},500);return ()=>clearTimeout(I)},[]),C=useRef(l);useEffect(()=>{C.current=l;},[l]);let v=useCallback(()=>{setTimeout(()=>{C.current||i(!1);},1e3);},[]),h=useCallback(I=>{g.current&&!g.current.contains(I.target)&&i(!1);},[]),x=()=>{if(!g.current||!(r!=null&&r.current))return "translate(-50%, 0px)";let I=r.current.getBoundingClientRect(),w=g.current.getBoundingClientRect();if(!I||!w)return "translate(-50%, 0px)";jv(Number(Vv("--asc-spacing-s1").replace("rem","")));let S=w.right-I.right,L=I.left-w.left;return S>0?`translate(calc(-50% - ${S}px), 0px)`:L>0?`translate(calc(-50% + ${L}px), 0px)`:"translate(-50%, 0px)"},b=I=>{h(I);},M=()=>{s(!1),c(!1),i(!1);};return useEffect(()=>(document.addEventListener("mousedown",b),document.addEventListener("touchstart",h),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h);}),[]),useEffect(()=>{a?!n&&y():n&&v();},[a,n]),te.createElement("div",{className:wu.reactionContainer},n&&te.createElement("div",{className:wu.reactionPickerWrap,style:{transform:x()},ref:g,onMouseEnter:()=>c(!0),onMouseLeave:()=>{c(!1);}},te.createElement(d9,{message:o,onSelectReaction:M})),te.createElement("div",{className:wu.reactionButton,onMouseEnter:()=>{s(!0);},onMouseLeave:()=>{s(!1);}},te.createElement(Iu,{message:o,onSelectReaction:M,pageId:e,componentId:t})))};var g2={reactionPreviewContainer:"Mr",reactionIconContainer:"c",reactionIcon:"ab",reactionCount:"ob",fallbackIcon:"tb"};var g9=({message:e,onClick:t})=>{let{config:o}=bi(),r=e.reactions?useMemo(()=>Object.entries(e.reactions).sort((n,i)=>i[1]-n[1]).filter(n=>n[1]>0).slice(0,3).sort((n,i)=>n[1]-i[1]),[e==null?void 0:e.reactions]):[];return e!=null&&e.reactionsCount?te.createElement("div",{className:g2.reactionPreviewContainer,"data-myreaction":(e==null?void 0:e.myReactions)&&!!(e!=null&&e.myReactions.length),onClick:t},te.createElement("div",{className:g2.reactionIconContainer},r.map(n=>{let i=o.find(a=>a.name===n[0]);return te.createElement(te.Fragment,null,i?te.createElement("img",{className:g2.reactionIcon,src:i.image,alt:i.name}):te.createElement(Fm,{className:g2.fallbackIcon,backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-shade3")}))})),te.createElement("div",{className:g2.reactionCount},Hm(e.reactionsCount))):null};var Wn={messageItemContainer:"ib",messageItemContainerInner:"Sr",messageBubbleWrap:"lb",messageReaction:"sb",messageDeletedBubble:"cb",messageOptionsWrap:"nb",binIcon:"db",optionIcon:"mb",flagIcon:"pb",timestamp:"gb",reactionListSheet:"hb",reactionListContainer:"fb",reactionListBackdrop:"bb"};var Y3e=({pageId:e="*",componentId:t="*",elementId:o="*",message:r,avatarUrl:n,userDisplayName:i,containerRef:a,action:s})=>{let l=X(),c=r.creatorId===l.currentUserId,{isModerator:p}=p2(r.channelId),[u,g]=useState(void 0);return te.createElement(te.Fragment,null,te.createElement(YH,{avatarUrl:n,displayName:i},te.createElement("div",{className:Wn.messageItemContainerInner,"data-reactions":!!r.reactionsCount},r.isDeleted?te.createElement("div",{className:Wn.messageDeletedBubble},te.createElement(hu,{className:Wn.binIcon}),te.createElement("div",null,te.createElement(N.Body,null,"This message was deleted"))):te.createElement("div",{className:Wn.messageBubbleWrap},te.createElement(oF,{message:r}),te.createElement("div",{className:Wn.messageReaction},te.createElement(g9,{message:r,onClick:()=>g(r)})),s&&te.createElement(XH,{containerRef:a,isOwner:c,isModerator:p,action:s,isFlagged:r.flagCount>0}),te.createElement(aF,{message:r,containerRef:a,pageId:e,componentId:t}),r.flagCount>0&&te.createElement(Cu,{className:Wn.flagIcon}),te.createElement("div",{className:Wn.timestamp},un(r.createdAt).format("HH:mm A"))))),u&&te.createElement(C1,{isOpen:!0,onClose:()=>g(void 0),className:Wn.reactionListSheet},te.createElement(C1.Container,{className:Wn.reactionListContainer},te.createElement(C1.Header,null),te.createElement(C1.Content,null,te.createElement(Om,{pageId:e,referenceId:u.messageId,referenceType:"message"}))),te.createElement(C1.Backdrop,{className:Wn.reactionListBackdrop})))},Pu=Y3e;var f9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="sender_message_bubble",a=ne(o.creatorId),s=le({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return te.createElement(Pu,{message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n,pageId:e,componentId:t,elementId:i})};var y9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="receiver_message_bubble",{user:a}=Cr(o.creatorId),s=it({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return te.createElement(Pu,{pageId:e,componentId:t,elementId:i,message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n})};var h9=(r,n)=>_(void 0,[r,n],function*(e,{onSuccess:t,onError:o}){try{yield MessageRepository.deleteMessage(e),t&&t();}catch(i){o&&o(i);}});var C9=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.flagMessage(e),t&&t();}catch(r){o&&o(r);}});var sF=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.unflagMessage(e),t&&t();}catch(r){o&&o(r);}});var v9={icon:"ub"};var b9=createContext({liveChatNotifications:[],liveChatNotificationFunction:{success:()=>{},error:()=>{},show:()=>{}}}),s5e=3e3,mF=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,d({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||s5e);};return te.createElement(b9.Provider,{value:{liveChatNotifications:t,liveChatNotificationFunction:{success:i=>n(E(d({},i),{icon:te.createElement(y0,{className:v9.icon})})),error:i=>n(E(d({},i),{icon:te.createElement(Y1,{className:v9.icon})})),show:i=>n(i)}}},e)},dF=()=>{let{liveChatNotifications:e}=useContext(b9);return e},f2=()=>{let{liveChatNotificationFunction:e}=useContext(b9);return e};var cF=()=>{let e=f2(),{formatMessage:t}=useIntl();return r=>_(void 0,null,function*(){yield navigator.clipboard.writeText(r),e.success({content:t({id:"livechat.notification.copy.message"})});})};var Z1={infiniteScrollContainer:"vb",loadingIndicatorWrap:"xb",loadingIndicator:"wb",infiniteScrollInner:"yb",customStatusContainer:"kb",iconContainer:"jb"};var _u=({pageId:e="*",channel:t,replyMessage:o})=>{let r="message_list",n=X(),i=useRef(null),[a,s]=useState(void 0),{confirm:l}=et(),c=f2(),p=cF(),{themeStyles:u}=re({pageId:e,componentId:r}),{messages:g,hasMore:f,loadMore:y,isLoading:C,error:v}=kc({subChannelId:t.channelId,sortBy:"segmentDesc",limit:10,includeDeleted:!0}),h=g,x=b=>{l({title:"Delete this message?",content:"This message will also be removed from your friend\u2019s devices.",cancelText:"Cancel",okText:"Delete",onOk:()=>h9(b,{onError:()=>c.error({content:"Unable to delete message. Please try again."})})});};return useEffect(()=>{let b=()=>{i.current&&s(i.current.clientHeight);},M=new ResizeObserver(b);return i.current&&M.observe(i.current),()=>{i.current&&M.unobserve(i.current);}},[]),v?te.createElement("div",{className:Z1.customStatusContainer,ref:i,style:u},te.createElement("div",{className:Z1.iconContainer},te.createElement(i5,null)),te.createElement(N.Caption,null,"Couldn't load chat")):te.createElement("div",{className:Z1.infiniteScrollContainer,ref:i,style:u},i.current&&te.createElement(eR,{className:Z1.infiniteScrollInner,scrollableTarget:i.current,scrollThreshold:.7,hasMore:f,next:y,loader:C?te.createElement("div",{className:Z1.loadingIndicatorWrap},te.createElement(zH,{className:Z1.loadingIndicator})):null,inverse:!0,dataLength:h.length,height:i.current.clientHeight},h.map((b,M)=>b.creatorId===n.currentUserId?te.createElement(f9,{message:b,action:t.isMuted?void 0:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)}},key:b.messageId,containerRef:i,pageId:e,componentId:r}):te.createElement(y9,{message:b,action:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)},onFlag:()=>C9(b.messageId,()=>c.success({content:"Message reported"}),()=>c.error({content:"This message failed to be reported. Please try again."})),onUnflag:()=>sF(b.messageId,()=>c.success({content:"Message unreported"}),()=>c.error({content:"This message failed to be unreported. Please try again."}))},key:b.messageId,containerRef:i,pageId:e,componentId:r}))))};var g5e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},e),te.createElement("path",{d:"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"})),uF=g5e;var I9={homeIndicatorContainer:"zb",homeIndicator:"Xb"};var Tu=()=>te.createElement("div",{className:I9.homeIndicatorContainer},te.createElement("div",{className:I9.homeIndicator}));var In={sendButton:"Yb",reactionButton:"Cb",sendButtonContainer:"Ab",composeBarContainer:"Mb",optionContainer:"Sb",composeBar:"Eb",composeBarLoading:"Ib",mentionText:"Rb",editorPlaceholder:"Ub",editorContainer:"Er",editorRoot:"Bb",editorParagraph:"Db",editorContainer__mentionTextInput_item:"Ir",editorLink:"Rr",userMentionItem__item:"M",allMentionItem__item:"S",userMentionItem__avatar:"Fb",allMentionItem__atSign:"Hb",userMentionItem__displayName:"Lb",allMentionItem__displayName:"Tb"};var ku=({channelId:e,memberships:t,search:o,limit:r=20,shouldCall:n=!0})=>{let s=pt({fetcher:ChannelRepository.Membership.searchMembers,params:{channelId:e,search:o||"",memberships:t,limit:r,includeDeleted:!1},shouldCall:!!e&&n}),{items:i}=s,a=P(s,["items"]);return d({channelMembers:i},a)};var M5e=e=>{var o,r;let t=(()=>{switch(screen.orientation.type){case"landscape-primary":case"landscape-secondary":return .5;case"portrait-secondary":case"portrait-primary":return .75;default:return .5}})();return e.visualViewport?((o=e.visualViewport)==null?void 0:o.height)*((r=e.visualViewport)==null?void 0:r.scale)/e.screen.height<t:!1},fF=({commandPriority:e,onEnter:t})=>{let[o]=useLexicalComposerContext();return useEffect(()=>{o.registerCommand(KEY_ENTER_COMMAND,r=>{let n=$getSelection();if(!$isRangeSelection(n)||M5e(window))return !1;let i=r;return i.preventDefault(),i.shiftKey?o.dispatchCommand(INSERT_PARAGRAPH_COMMAND,void 0):(t(),!0)},e);},[o,t]),null};function yF({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return te.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.allMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},te.createElement("div",{className:Aa.allMentionItem__atSign},"@"),te.createElement("p",{className:Aa.allMentionItem__displayName},e.data.displayName))}var V5e=200,j5e=e=>{let[t,o]=useState(null),{isModerator:r}=p2(e||void 0),{channelMembers:n}=ku({search:t,channelId:e,memberships:["member"],limit:20}),i=s=>{o(s);};return {suggestions:useMemo(()=>{let s=n.map(({user:l,userId:c})=>({userId:(l==null?void 0:l.userId)||c,displayName:l==null?void 0:l.displayName}));return r&&(t===""||/^al*l*$/i.test(t||""))?[{userId:"all",displayName:"All"},...s]:s},[r,n]),queryString:t,onQueryChange:i}},G5e=[AutoLinkNode,LinkNode,Vi],Su=({pageId:e="*",channel:t,composeAction:{replyMessage:o,mentionMessage:r,clearReplyMessage:n,clearMention:i}})=>{var M;let a="message_composer",s=useRef(null),l=useRef(null),{themeStyles:c,uiReference:p,config:u,accessibilityId:g}=re({pageId:e,componentId:a}),{confirm:f}=et(),y=f2(),{onQueryChange:C,suggestions:v}=j5e(t.channelId),{mutateAsync:h}=useMutation({mutationFn:I=>MessageRepository.createMessage(I),onSuccess:()=>{var I;(I=l.current)==null||I.update(()=>{$getRoot().clear();}),n&&n();},onError:I=>{let w=I.message,k="Your message wasn't sent. Please try again.";w==="Amity SDK (400308): Text contain blocked word"?k="Your message wasn't sent as it contains a blocked word.":w==="Amity SDK (400309): Data contain link that is not in whitelist"?k="Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.":w==="Amity SDK (400302): User is muted"&&(k="User is muted"),y.error({content:k});}}),x=()=>{if(!t||!l.current)return;let{mentioned:I,mentionees:w,text:k}=il(l.current);if((k==null?void 0:k.trim().length)!==0){if(k.trim().length>(typeof(u==null?void 0:u.message_limit)=="number"?u==null?void 0:u.message_limit:V5e)){f({title:"Unable to send message",content:"Your message is too long. Please shorten your message and try again.",okText:"Ok"});return}h({tags:[],subChannelId:t.channelId,data:{text:k.trim()},dataType:"text",mentionees:w,metadata:{mentioned:I},parentId:(o==null?void 0:o.messageId)||void 0});}},b=al({namespace:p,theme:{root:In.editorRoot,placeholder:In.editorPlaceholder,paragraph:In.editorParagraph,link:In.editorLink},nodes:G5e});return te.createElement("div",{className:In.composeBarContainer,"data-qa-anchor":g,style:c},te.createElement("div",{className:In.composeBar},te.createElement("div",{ref:s,className:In.optionContainer}),te.createElement("div",{className:In.editorContainer},te.createElement(LexicalComposer,{initialConfig:b},te.createElement(RichTextPlugin,{contentEditable:te.createElement(ContentEditable,null),placeholder:(M=te.createElement("span",{className:In.editorPlaceholder},u.placeholder_text))!=null?M:null,ErrorBoundary:O5e}),te.createElement(HistoryPlugin,null),te.createElement(AutoFocusPlugin,null),te.createElement(ll,null),te.createElement(sl,null),te.createElement(EditorRefPlugin,{editorRef:l}),te.createElement(fF,{onEnter:x,commandPriority:COMMAND_PRIORITY_LOW}),te.createElement(ml,{suggestions:v,getSuggestionId:I=>I.userId,onQueryChange:C,$createNode:I=>La({text:`@${I.displayName||""}`,data:I}),menuRenderFn:(I,{options:w,selectedIndex:k,setHighlightedIndex:S,selectOptionAndCleanUp:L})=>!s.current||w.length===0?null:ox.createPortal(te.createElement(te.Fragment,null,w.map((D,H)=>D.data.userId==="all"?te.createElement(yF,{isSelected:k===H,onClick:()=>{S(H),L(D);},onMouseEnter:()=>{S(H);},key:D.key,option:D}):te.createElement(Da,{isSelected:k===H,onClick:()=>{S(H),L(D);},onMouseEnter:()=>{S(H);},key:D.key,option:D}))),s.current),commandPriority:COMMAND_PRIORITY_HIGH}))),te.createElement("div",{className:In.sendButtonContainer},te.createElement(uF,{className:In.sendButton,onClick:()=>x()}))),te.createElement(Tu,null))};var CF=({channelId:e})=>{let r=kn({fetcher:ChannelRepository.getChannel,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return d({channel:t},o)};var ht={composeBarContainer:"Vb",composeBar:"qb",textInputContainer:"Gb",composeBarLoading:"Jb",replyPlaceholderContainer:"Kb",replyAvatar:"Nb",replyProfile:"Ob",replyProfileName:"Pb",replyProfileMessage:"Qb",replyDismiss:"Wb",notificationPosition:"Zb",messageListPlaceholder:"_b",mutedChannelContainer:"eu",mutedIcon:"ru",commentAltIcon:"au",banStatePanel:"ou"};var W5e=({children:e})=>te.createElement(te.Fragment,null,te.createElement("div",{className:ht.messageListPlaceholder},e),te.createElement("div",{className:ht.composeBarContainer},te.createElement("div",{className:ht.composeBar},te.createElement("div",{className:ht.textInputContainer},te.createElement("div",{className:ht.composeBarLoading},te.createElement(vm,{width:20,height:20}),te.createElement("span",null,te.createElement(N.Body,null,"Loading chat..."))))),te.createElement(Tu,null))),Nu=W5e;var vF=({replyMessage:e,onDismiss:t})=>{var r,n;let o=ne(e.creatorId);return o?te.createElement("div",{className:ht.replyPlaceholderContainer},te.createElement("div",{className:ht.replyAvatar},te.createElement(bt,{avatarUrl:(r=o.avatar)==null?void 0:r.fileUrl,defaultImage:te.createElement(ds,null)})),te.createElement("div",{className:ht.replyProfile},te.createElement("div",{className:ht.replyProfileName},`Replying to ${o.displayName}`),te.createElement("div",{className:ht.replyProfileMessage},(n=e.data)==null?void 0:n.text)),te.createElement("div",{className:ht.replyDismiss},te.createElement(R1,{onClick:t,width:"20",height:"20"}))):null};var K5e=({children:e})=>te.createElement("div",{className:ht.messageListPlaceholder},e),xF=K5e;var M9={notifications:"tu",notificationContainer:"iu",appear:"Ur"};var bF=({className:e,content:t,icon:o})=>te.createElement("div",{className:gr(M9.notificationContainer,e)},o,te.createElement(N.Body,null,t)),P9=()=>{let e=dF();return te.createElement("div",{className:M9.notifications},e.map(t=>te.createElement(bF,E(d({},t),{key:t.id}))))};var Y5e=e=>te.createElement("svg",d({width:"23",height:"21",viewBox:"0 0 23 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M21.7988 17.7605C22.0449 17.9363 22.1152 18.2878 21.9043 18.5339L21.5527 18.9558C21.3418 19.2019 20.9902 19.2722 20.7793 19.0613L-0.244141 2.60815C-0.490234 2.43237 -0.560547 2.08081 -0.349609 1.83472L0.00195312 1.37769C0.212891 1.16675 0.564453 1.09644 0.810547 1.30737L21.7988 17.7605ZM12.5527 7.49487C13.3262 7.91675 13.8887 8.69019 14.0645 9.53394L11.5684 7.60034C11.8496 7.35425 12.2363 7.31909 12.5527 7.49487ZM13.6074 6.15894C13.2207 5.91284 13.1152 5.3855 13.3613 4.99878C13.6074 4.61206 14.1348 4.47144 14.5215 4.71753C16.3848 5.91284 17.5449 7.9519 17.5449 10.1667C17.5449 10.8347 17.4395 11.4324 17.2637 12.03L15.7871 10.8699C15.8223 10.6589 15.8574 10.4128 15.8574 10.1667C15.8574 8.54956 15.0137 7.03784 13.6074 6.15894ZM15.4707 3.31128C15.084 3.06519 14.9785 2.53784 15.2246 2.11597C15.5059 1.72925 16.0332 1.62378 16.4199 1.86987C19.2324 3.73315 20.9199 6.8269 20.9199 10.1667C20.9199 11.6082 20.6035 12.9441 20.041 14.2097L18.6699 13.1199C19.0215 12.2058 19.1973 11.2214 19.1973 10.1667C19.1973 7.42456 17.8262 4.823 15.4707 3.31128ZM9.66992 4.29565V6.08862L7.49023 4.40112L8.22852 3.698C8.36914 3.52222 8.58008 3.41675 8.79102 3.41675C9.24805 3.41675 9.66992 3.76831 9.66992 4.29565ZM7.98242 14.0691V11.1863L9.66992 12.5222V16.073C9.66992 16.6003 9.24805 16.9167 8.79102 16.9167C8.58008 16.9167 8.36914 16.8464 8.22852 16.6707L5.09961 13.5417H1.51367C1.02148 13.5417 0.669922 13.1902 0.669922 12.698V7.6355C0.669922 7.17847 1.02148 6.79175 1.51367 6.79175H2.35742L4.50195 8.47925H2.35742V11.8542H5.76758L7.98242 14.0691Z"})),_9=Y5e;var wF={inputTextContainer:"lu",invalid:"su",disabled:"cu",baseInputStyle:"nu",mentionContainer:"du","live-chat-mention-input":"Br","live-chat-mention-input__suggestions__list":"mu",mentions_mention:"pu",mentions__highlighter:"gu"};var eue=e=>te.createElement("svg",d({width:"49",height:"49",viewBox:"0 0 49 49",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M37.96 7C40.4209 7 42.46 9.03906 42.46 11.5V31.75C42.46 34.2812 40.4209 36.25 37.96 36.25H27.835L19.0459 42.8594C18.835 43 18.6943 43 18.5537 43C18.0615 43 17.71 42.7188 17.71 42.1562V36.25H10.96C8.42871 36.25 6.45996 34.2812 6.45996 31.75V11.5C6.45996 9.03906 8.42871 7 10.96 7H37.96ZM40.21 31.75V11.5C40.21 10.3047 39.1553 9.25 37.96 9.25H10.96C9.69434 9.25 8.70996 10.3047 8.70996 11.5V31.75C8.70996 33.0156 9.69434 34 10.96 34H19.96V39.3438L26.4287 34.4922L27.0615 34H37.96C39.1553 34 40.21 33.0156 40.21 31.75ZM24.46 25.5625C25.374 25.5625 26.1475 26.3359 26.1475 27.25C26.1475 28.2344 25.374 28.9375 24.46 28.9375C23.4756 28.9375 22.7725 28.2344 22.7725 27.25C22.7725 26.3359 23.4756 25.5625 24.46 25.5625ZM23.8271 23.875C23.5459 23.875 23.2646 23.6641 23.2646 23.3828L22.7725 15.5078C22.7725 15.1562 22.9834 14.875 23.335 14.875H25.5146C25.8662 14.875 26.0771 15.1562 26.0771 15.5078L25.585 23.3828C25.585 23.6641 25.3037 23.875 25.0225 23.875H23.8271Z"})),PF=eue;var oue=({pageId:e="*",channel:t})=>{var C;let o=fu(),{isModerator:r}=p2(t.channelId),n=X().currentUserId,{channelMembers:i}=ku({channelId:t.channelId,memberships:["member","banned","muted"]}),a=i.find(v=>v.userId===n),[s,l]=useState(void 0),[c,p]=useState(void 0),[u,g]=useState(0),f=useRef(null),y=useRef(null);return useEffect(()=>{var v,h;(v=y.current)!=null&&v.clientHeight&&((h=y.current)==null?void 0:h.clientHeight)>0&&g(y.current.clientHeight-30);},[(C=y.current)==null?void 0:C.clientHeight]),o?a!=null&&a.isBanned?te.createElement(xF,null,te.createElement("div",{className:ht.banStatePanel},te.createElement(PF,{className:ht.commentAltIcon}),te.createElement(N.Heading,null,"You are banned from chat"),te.createElement(N.Body,null,"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned."))):te.createElement(te.Fragment,null,te.createElement(_u,{channel:t,replyMessage:l,pageId:e}),o&&te.createElement(te.Fragment,null,te.createElement("div",{ref:f,className:wF.mentionContainer}),!r&&t.isMuted?te.createElement("div",{className:ht.mutedChannelContainer},te.createElement(_9,{width:20,height:20,className:ht.mutedIcon}),te.createElement(N.Body,null,"This channel has been set to read-only by the channel moderator")):a!=null&&a.isMuted?te.createElement("div",{className:ht.mutedChannelContainer},te.createElement(_9,{width:20,height:20,className:ht.mutedIcon}),te.createElement(N.Body,null,"You\u2019ve been muted by the channel moderator")):null,s&&te.createElement(vF,{replyMessage:s,onDismiss:()=>l(void 0)}),te.createElement("div",{className:ht.notificationPosition,style:{bottom:u}},te.createElement(P9,null)),te.createElement("div",{ref:y},te.createElement(Su,{pageId:e,disabled:!r&&t.isMuted||(a==null?void 0:a.isMuted),channel:t,suggestionRef:f,composeAction:{replyMessage:s,mentionMessage:c,clearReplyMessage:()=>l(void 0),clearMention:()=>p(void 0)}})))):te.createElement(Nu,null)},TF=oue;var rue=({pageId:e="*",channel:t})=>t?te.createElement(TF,{channel:t,pageId:e}):te.createElement(Nu,null),SF=rue;var k9={messageListHeaderWrap:"hu",liveChat:"fu"};var NF=({channelId:e})=>{let{channel:t}=CF({channelId:e}),o="live_chat",{themeStyles:r}=Re({pageId:o}),n=useRef(null);return te.createElement(mF,null,te.createElement("div",{className:k9.liveChat,ref:n,style:r},te.createElement("div",{className:k9.messageListHeaderWrap},te.createElement(yu,{channel:t,pageId:o})),te.createElement(SF,{channel:t,pageId:o})))};var Ie={storyPreview_title:"bu",contentWrapper:"uu",storyPreviewWrapper:"vu",storyPreview_description:"xu",storyPreviewContainer:"wu",headerContainer:"yu",progressBar:"Dr",progressFill:"ku",userInfo:"ju",storyPreviewTitle:"Fr",nameContainer:"zu",hyperLinkContainer:"Xu",mediaContainer:"Hr",media:"Yu",avatarContainer:"Lr",imageFit:"Cu",imageCover:"Au",headerContent:"Mu",userInfoContent:"Su",shadowOverlay:"Eu",pulse:"Tr",skeleton:"n",textSkeleton:"Iu",nameSkeleton:"Ru",timeSkeleton:"Uu"};var sue=e=>te.createElement("svg",d({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),te.createElement("path",{d:"M19.8462 12C20.7625 12 21.6413 12.356 22.2893 12.9898C22.9373 13.6235 23.3013 14.4831 23.3013 15.3793C23.3013 16.2756 22.9373 17.1351 22.2893 17.7688C21.6413 18.4026 20.7625 18.7586 19.8462 18.7586C18.9298 18.7586 18.051 18.4026 17.403 17.7688C16.755 17.1351 16.391 16.2756 16.391 15.3793C16.391 14.4831 16.755 13.6235 17.403 12.9898C18.051 12.356 18.9298 12 19.8462 12ZM12.9359 14.4138C13.4887 14.4138 14.0021 14.5586 14.4463 14.8193C14.2982 16.2 14.7128 17.571 15.5618 18.6428C15.0682 19.5697 14.081 20.2069 12.9359 20.2069C12.1504 20.2069 11.3972 19.9017 10.8418 19.3585C10.2864 18.8153 9.97436 18.0786 9.97436 17.3103C9.97436 16.5421 10.2864 15.8054 10.8418 15.2622C11.3972 14.719 12.1504 14.4138 12.9359 14.4138ZM26.7564 14.4138C27.5419 14.4138 28.2951 14.719 28.8505 15.2622C29.4059 15.8054 29.7179 16.5421 29.7179 17.3103C29.7179 18.0786 29.4059 18.8153 28.8505 19.3585C28.2951 19.9017 27.5419 20.2069 26.7564 20.2069C25.6113 20.2069 24.6241 19.5697 24.1305 18.6428C24.9795 17.571 25.3941 16.2 25.246 14.8193C25.6903 14.5586 26.2036 14.4138 26.7564 14.4138ZM13.4295 24.3103C13.4295 22.3117 16.3022 20.6897 19.8462 20.6897C23.3901 20.6897 26.2628 22.3117 26.2628 24.3103V26H13.4295V24.3103ZM8 26V24.5517C8 23.2097 9.86577 22.08 12.3929 21.7517C11.8105 22.4083 11.4551 23.3159 11.4551 24.3103V26H8ZM31.6923 26H28.2372V24.3103C28.2372 23.3159 27.8818 22.4083 27.2994 21.7517C29.8265 22.08 31.6923 23.2097 31.6923 24.5517V26Z",fill:"white"})),Bu=sue;var EF=({width:e="100%",height:t="100%"})=>te.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:e,height:t}},te.createElement("div",{className:Ie.storyPreviewContainer},te.createElement("div",{className:Ie.shadowOverlay}),te.createElement("div",{className:Ie.headerContainer},te.createElement("div",{className:Ie.headerContent},te.createElement("div",{className:Ie.userInfo},te.createElement("div",{className:Ie.userInfoContent},te.createElement("div",{className:gr(Ie.avatarContainer,Ie.skeleton)}),te.createElement("div",{className:Ie.textSkeleton},te.createElement("div",{className:gr(Ie.nameSkeleton,Ie.skeleton)}),te.createElement("div",{className:gr(Ie.timeSkeleton,Ie.skeleton)})))))),te.createElement("div",{className:Ie.contentWrapper},te.createElement("div",{className:gr(Ie.mediaContainer,Ie.skeleton)}))));var AF=({mediaType:e,hyperLink:t,width:o="100%",height:r="100%",onPlay:n,onPause:i,avatar:a,title:s,duration:l=5e3,isOfficial:c=!0,imageMode:p})=>{var B,z,V,K;let[u,g]=useState(!0),[f,y]=useState(0),[C,v]=useState([]),h=useRef(null),x=useRef(null),[b,M]=useState(!0),[I,w]=useState(!1),k,S=()=>{g(!0),n&&n();},L=()=>{g(!1),i&&i();},D=()=>{(e==null?void 0:e.type)==="video"&&h.current?(h.current.currentTime=0,h.current.play()):(e==null?void 0:e.type)==="image"&&g(!1);},H=()=>{(e==null?void 0:e.type)==="video"&&h.current&&(h.current.currentTime=0,h.current.play(),y(0));},$=()=>{u?(L(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.pause()):(S(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.play());};return useEffect(()=>{let U=j=>_(void 0,null,function*(){let Z=new Image;Z.crossOrigin="Anonymous",Z.src=j,Z.onload=()=>{let Q=new Lde().getPalette(Z,2);if(Q){let T=Q.map(F=>`rgb(${F[0]}, ${F[1]}, ${F[2]})`);v(T),M(!1);}},Z.onerror=()=>{console.error("Error loading image for color extraction"),v([]),M(!1);};});return e!=null&&e.url&&(e==null?void 0:e.type)==="image"?U(e.url):(v([]),M(!1)),()=>{v([]),M(!0);}},[e==null?void 0:e.url]),useEffect(()=>(u?k=setInterval(()=>{if((e==null?void 0:e.type)==="video"&&h.current){let U=h.current.currentTime,j=h.current.duration,Z=U/j*100;y(Z),Z>=100&&(clearInterval(k),D());}else (e==null?void 0:e.type)==="image"&&I&&y(U=>U>=100?(clearInterval(k),D(),100):U+100/(l/100));},100):clearInterval(k),()=>{clearInterval(k);}),[u,e,l,I]),b?te.createElement(EF,null):te.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:o,height:r}},te.createElement("div",{className:Ie.storyPreviewContainer},te.createElement("div",{className:Ie.headerContainer},te.createElement("div",{className:Ie.progressBar},te.createElement("div",{className:Ie.progressFill,style:{width:`${f}%`}})),te.createElement("div",{className:Ie.headerContent},te.createElement("div",{className:Ie.userInfo},te.createElement("div",{className:Ie.userInfoContent},te.createElement("div",{className:Ie.avatarContainer},te.createElement(bt,{avatarUrl:a,defaultImage:te.createElement(Bu,null)})),te.createElement(N.BodyBold,{className:Ie.storyPreviewTitle},te.createElement("span",{className:Ie.nameContainer},s," ",c&&te.createElement(p1,{fill:"white"})))),(e==null?void 0:e.type)==="video"&&te.createElement("div",{onClick:$},u?te.createElement(As,{width:24,height:24}):te.createElement(To,{width:24,height:24}))))),te.createElement("div",{className:Ie.contentWrapper},te.createElement("div",{className:Ie.mediaContainer,style:{background:`linear-gradient(
|
|
5390
|
+
`,a3e=e=>{let t=v4$1();return te.createElement(i3e,d({xmlns:"http://www.w3.org/2000/svg",width:"17",height:"16",viewBox:"0 0 17 16",fill:"none"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.52453 4C9.52453 4.31559 9.26869 4.57143 8.9531 4.57143C8.63751 4.57143 8.38167 4.31559 8.38167 4V0.571429C8.38167 0.255837 8.63751 0 8.9531 0C9.26869 0 9.52453 0.255837 9.52453 0.571428V4ZM7.23891 5.03082C7.51222 4.87303 7.60586 4.52355 7.44807 4.25024L5.73378 1.28101C5.57599 1.0077 5.22651 0.914056 4.9532 1.07185C4.67989 1.22965 4.58624 1.57913 4.74404 1.85244L6.45832 4.82167C6.61612 5.09498 6.9656 5.18862 7.23891 5.03082ZM5.77458 5.50525C6.04789 5.66304 6.14153 6.01252 5.98374 6.28583C5.82594 6.55914 5.47646 6.65278 5.20315 6.49499L2.23392 4.7807C1.96061 4.62291 1.86697 4.27343 2.02476 4.00012C2.18256 3.72681 2.53204 3.63316 2.80535 3.79096L5.77458 5.50525ZM5.52455 8.00013C5.52455 7.68454 5.26872 7.4287 4.95312 7.4287H1.52455C1.20896 7.4287 0.953125 7.68454 0.953125 8.00013C0.953125 8.31572 1.20896 8.57156 1.52455 8.57156H4.95313C5.26872 8.57156 5.52455 8.31572 5.52455 8.00013ZM5.20327 9.50543C5.47658 9.34764 5.82606 9.44128 5.98385 9.71459C6.14165 9.9879 6.048 10.3374 5.77469 10.4952L2.80546 12.2095C2.53215 12.3673 2.18267 12.2736 2.02488 12.0003C1.86708 11.727 1.96073 11.3775 2.23404 11.2197L5.20327 9.50543ZM7.23874 10.9693C6.96543 10.8115 6.61595 10.9051 6.45815 11.1784L4.74387 14.1476C4.58607 14.4209 4.67971 14.7704 4.95302 14.9282C5.22633 15.086 5.57581 14.9924 5.73361 14.7191L7.44789 11.7498C7.60569 11.4765 7.51205 11.127 7.23874 10.9693ZM8.95292 11.4287C8.63732 11.4287 8.38149 11.6845 8.38149 12.0001V15.4287C8.38149 15.7443 8.63732 16.0001 8.95292 16.0001C9.26851 16.0001 9.52435 15.7443 9.52435 15.4287V12.0001C9.52435 11.6845 9.26851 11.4287 8.95292 11.4287ZM10.6674 5.03064C10.9407 5.18843 11.2901 5.09479 11.4479 4.82148L13.1622 1.85225C13.32 1.57894 13.2264 1.22946 12.9531 1.07166C12.6798 0.913868 12.3303 1.00751 12.1725 1.28082L10.4582 4.25005C10.3004 4.52336 10.394 4.87284 10.6674 5.03064ZM12.7028 6.4947C12.4295 6.65249 12.08 6.55885 11.9222 6.28554C11.7644 6.01223 11.8581 5.66275 12.1314 5.50496L15.1006 3.79067C15.3739 3.63287 15.7234 3.72652 15.8812 3.99983C16.039 4.27314 15.9453 4.62262 15.672 4.78041L12.7028 6.4947ZM12.3816 8C12.3816 8.31559 12.6374 8.57143 12.953 8.57143H16.3816C16.6972 8.57143 16.953 8.31559 16.953 8C16.953 7.68441 16.6972 7.42857 16.3816 7.42857H12.953C12.6374 7.42857 12.3816 7.68441 12.3816 8ZM12.1315 10.4946C11.8582 10.3368 11.7646 9.98737 11.9224 9.71406C12.0801 9.44075 12.4296 9.3471 12.7029 9.5049L15.6722 11.2192C15.9455 11.377 16.0391 11.7265 15.8813 11.9998C15.7235 12.2731 15.3741 12.3667 15.1007 12.2089L12.1315 10.4946ZM10.6673 10.9693C10.3939 11.1271 10.3003 11.4766 10.4581 11.7499L12.1724 14.7191C12.3302 14.9924 12.6797 15.0861 12.953 14.9283C13.2263 14.7705 13.3199 14.421 13.1621 14.1477L11.4478 11.1785C11.29 10.9052 10.9406 10.8115 10.6673 10.9693Z",fill:`url(#paint_${t})`}),te.createElement("defs",null,te.createElement("radialGradient",{id:`paint_${t}`,cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(8.95312 8) scale(8)"},te.createElement("stop",{offset:"0.669733",stopColor:"white"}),te.createElement("stop",{offset:"0.716307",stopColor:"white",stopOpacity:"0.01"}))))},DH=a3e;var FH={DIRECT_CHAT:2,ONLY_ME_CHAT:1};function c3e(e,t){var i,a,s;if((i=e==null?void 0:e.metadata)!=null&&i.isDirectChat&&(e==null?void 0:e.memberCount)===FH.ONLY_ME_CHAT)return "Me";if(!((a=e==null?void 0:e.metadata)!=null&&a.isDirectChat)&&(e!=null&&e.displayName))return e==null?void 0:e.displayName;let{firstname:o="",lastname:r=""}=(s=t==null?void 0:t.metadata)!=null?s:{},n=trim(`${o}${r}`);return (t==null?void 0:t.displayName)||n||(t==null?void 0:t.userId)||e.channelId}function r9(o){return _(this,arguments,function*({avatarFileId:e,avatarCustomUrl:t}){if(t)return t;if(e){let r=yield FileRepository.getFile(e);return FileRepository.fileUrlWithSize(r.data.fileUrl,"small")}return null})}function p3e(e,t,o){return _(this,null,function*(){var r,n;return (e==null?void 0:e.memberCount)===FH.ONLY_ME_CHAT?r9({avatarCustomUrl:o==null?void 0:o.avatarUrl}):(r=e==null?void 0:e.metadata)!=null&&r.isDirectChat&&(t!=null&&t.avatarUrl)?r9({avatarCustomUrl:t.avatarUrl}):r9({avatarFileId:e==null?void 0:e.avatarFileId,avatarCustomUrl:(n=e==null?void 0:e.metadata)==null?void 0:n.avatarCustomUrl})})}function u3e({channel:e}){var p,u,g;let{currentUserId:t}=ol(),[o,r]=useState(null),n=(p=e==null?void 0:e.metadata)!=null&&p.isDirectChat?((g=(u=e==null?void 0:e.metadata)==null?void 0:u.userIds)!=null?g:[]).find(f=>f!==t):null,i=ne(t),a=ne(n),s=le({fileId:i==null?void 0:i.avatarFileId}),l=le({fileId:a==null?void 0:a.avatarFileId});return useEffect(()=>{function f(){return _(this,null,function*(){r(null);let y=yield p3e(e,{avatarUrl:(a==null?void 0:a.avatarCustomUrl)||l},{avatarUrl:(i==null?void 0:i.avatarCustomUrl)||s});r(y);})}f();},[a==null?void 0:a.avatarCustomUrl,e,s,i==null?void 0:i.avatarCustomUrl]),{chatName:useMemo(()=>e==null?void 0:c3e(e,a),[e,a]),chatAvatar:o,type:e==null?void 0:e.type}}var OH=u3e;var d2={messageListHeader:"uf",displayName:"vf",memberCount:"xf",memberIcon:"wf",avatar:"yf"};var yu=({channel:e,pageId:t="*"})=>{let o="chat_header",{themeStyles:r}=re({pageId:t,componentId:o}),{chatName:n,chatAvatar:i}=OH({channel:e}),a=fu();return te.createElement("div",{className:d2.messageListHeader,style:r},te.createElement("div",{className:d2.avatar},te.createElement(bt,{avatarUrl:i,defaultImage:te.createElement(BH,null)})),te.createElement("div",null,te.createElement("div",{className:d2.displayName},te.createElement(N.Title,null,n||"Loading...")),te.createElement("div",{className:d2.memberCount},a?te.createElement(te.Fragment,null,te.createElement(AH,{className:d2.memberIcon}),te.createElement(N.Caption,null,lb((e==null?void 0:e.memberCount)||0)," ",`${(e==null?void 0:e.memberCount)||0} ${(e==null?void 0:e.memberCount)===1?"member":"members"}`)):te.createElement(te.Fragment,null,te.createElement(DH,{width:20,height:20}),te.createElement(N.Caption,null,"Waiting for connection...")))))};var UH={spinner:"kf",rotate:"Yr"};var zH=o=>{var r=o,{className:e}=r,t=P(r,["className"]);return te.createElement("svg",d({width:"25",height:"25",xmlns:"http://www.w3.org/2000/svg","aria-label":"Loading...",viewBox:"0 0 100 100",version:"1.1",className:gr(UH.spinner,e)},t),te.createElement("defs",{id:"defs3821"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0",rx:"3",ry:"3",transform:"rotate(-90 50 50)",width:"25",x:"72",y:"47",id:"rect3793"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.08333333333333333",rx:"3",ry:"3",transform:"rotate(-60 50 50)",width:"25",x:"72",y:"47",id:"rect3795"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.16666666666666666",rx:"3",ry:"3",transform:"rotate(-30 50 50)",width:"25",x:"72",y:"47",id:"rect3797"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.25",rx:"3",ry:"3",transform:"rotate(0 50 50)",width:"25",x:"72",y:"47",id:"rect3799"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.3333333333333333",rx:"3",ry:"3",transform:"rotate(30 50 50)",width:"25",x:"72",y:"47",id:"rect3801"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.4166666666666667",rx:"3",ry:"3",transform:"rotate(60 50 50)",width:"25",x:"72",y:"47",id:"rect3803"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5",rx:"3",ry:"3",transform:"rotate(90 50 50)",width:"25",x:"72",y:"47",id:"rect3805"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.5833333333333334",rx:"3",ry:"3",transform:"rotate(120 50 50)",width:"25",x:"72",y:"47",id:"rect3807"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.6666666666666666",rx:"3",ry:"3",transform:"rotate(150 50 50)",width:"25",x:"72",y:"47",id:"rect3809"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.75",rx:"3",ry:"3",transform:"rotate(180 50 50)",width:"25",x:"72",y:"47",id:"rect3811"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.8333333333333334",rx:"3",ry:"3",transform:"rotate(210 50 50)",width:"25",x:"72",y:"47",id:"rect3813"}),te.createElement("rect",{fill:"#555555",height:"6",opacity:"0.9166666666666666",rx:"3",ry:"3",transform:"rotate(240 50 50)",width:"25",x:"72",y:"47",id:"rect3815"}))};var sr={optionButton:"jf",optionIcon:"zf",reactionIcon:"Xf",timestamp:"Yf",messageActionButton:"Cf",messageActionButtonText:"Sf",messageDangerActionButtonText:"Af",copyIcon:"Mf",replyIcon:"Bf",binIcon:"Ef",mentionIcon:"If",flagIcon:"Rf"};var v3e=t=>{var e=P(t,[]);return te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"20",height:"21",viewBox:"0 0 20 21"},e),te.createElement("path",{d:"M10 8.78369C10.8125 8.78369 11.5 9.47119 11.5 10.2837C11.5 11.1274 10.8125 11.7837 10 11.7837C9.15625 11.7837 8.5 11.1274 8.5 10.2837C8.5 9.47119 9.15625 8.78369 10 8.78369ZM8.5 5.53369C8.5 4.72119 9.15625 4.03369 10 4.03369C10.8125 4.03369 11.5 4.72119 11.5 5.53369C11.5 6.37744 10.8125 7.03369 10 7.03369C9.15625 7.03369 8.5 6.37744 8.5 5.53369ZM8.5 15.0337C8.5 14.2212 9.15625 13.5337 10 13.5337C10.8125 13.5337 11.5 14.2212 11.5 15.0337C11.5 15.8774 10.8125 16.5337 10 16.5337C9.15625 16.5337 8.5 15.8774 8.5 15.0337Z"}))},VH=v3e;var jH={popover:"Uf",fixed:"Df"};var M3e=i=>{var a=i,{isOpen:e,content:t,fixed:o=!1,children:r}=a,n=P(a,["isOpen","content","fixed","children"]);return te.createElement(Popover,d({containerClassName:gr(jH.popover,{fixed:!1}),isOpen:e,content:t},n),r)},GH=M3e;var P3e=e=>te.createElement("svg",d({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M1.4375 10.5586C0.84375 9.99609 0.84375 9.02734 1.4375 8.46484L6.9375 2.96484C7.875 1.99609 9.5 2.68359 9.5 4.02734V6.52734C13.7812 6.65234 19 7.49609 19 12.8398C19 15.1211 17.7812 17.0273 15.9375 18.2461C14.7812 19.0273 13.25 17.9336 13.6875 16.5586C14.4375 14.1211 14.0625 12.8398 9.5 12.5586V14.9961C9.5 16.3398 7.875 17.0273 6.9375 16.0586L1.4375 10.5586ZM2.5 9.49609L8 14.9961V11.0273C13.125 11.0586 16.6562 12.0586 15.0938 16.9961C16.25 16.2461 17.5 14.9336 17.5 12.8398C17.5 8.37109 12.4688 8.02734 8 8.02734V3.99609L2.5 9.49609Z",fill:"currenColor"})),QH=P3e;var _3e=e=>te.createElement("svg",d({width:"20",height:"21",viewBox:"0 0 20 21",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M16.5312 5.03992C16.7812 5.28992 17 5.75867 17 6.10242V14.4774C17 15.3212 16.3125 15.9774 15.5 15.9774H13V17.4774C13 18.3212 12.3125 18.9774 11.5 18.9774H4.5C3.65625 18.9774 3 18.3212 3 17.4774V7.47742C3 6.66492 3.65625 5.97742 4.5 5.97742H7V4.47742C7 3.66492 7.65625 2.97742 8.5 2.97742H13.875C14.2188 2.97742 14.6875 3.19617 14.9375 3.44617L16.5312 5.03992ZM11.3125 17.4774C11.4062 17.4774 11.5 17.4149 11.5 17.2899V15.9774H8.5C7.65625 15.9774 7 15.3212 7 14.4774V7.47742H4.6875C4.5625 7.47742 4.5 7.57117 4.5 7.66492V17.2899C4.5 17.4149 4.5625 17.4774 4.6875 17.4774H11.3125ZM15.3125 14.4774C15.4062 14.4774 15.5 14.4149 15.5 14.2899V7.97742H12.75C12.3125 7.97742 12 7.66492 12 7.22742V4.47742H8.6875C8.5625 4.47742 8.5 4.57117 8.5 4.66492V14.2899C8.5 14.4149 8.5625 14.4774 8.6875 14.4774H15.3125ZM15.5 6.47742V6.19617C15.5 6.13367 15.4688 6.10242 15.4375 6.07117L13.9062 4.53992C13.875 4.50867 13.8438 4.47742 13.7812 4.47742H13.5V6.47742H15.5Z",fill:"currenColor"})),qH=_3e;var T3e=e=>te.createElement("svg",d({width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M12.875 4.375C13.0625 4.375 13.25 4.5625 13.25 4.75V5.125C13.25 5.33594 13.0625 5.5 12.875 5.5H12.5L11.9844 13.4453C11.9609 14.0312 11.4453 14.5 10.8594 14.5H5.11719C4.53125 14.5 4.01562 14.0312 3.99219 13.4453L3.5 5.5H3.125C2.91406 5.5 2.75 5.33594 2.75 5.125V4.75C2.75 4.5625 2.91406 4.375 3.125 4.375H5.04688L5.84375 3.0625C6.03125 2.75781 6.45312 2.5 6.80469 2.5H9.17188C9.52344 2.5 9.94531 2.75781 10.1328 3.0625L10.9297 4.375H12.875ZM6.80469 3.625L6.35938 4.375H9.61719L9.17188 3.625H6.80469ZM10.8594 13.375L11.3516 5.5H4.625L5.11719 13.375H10.8594Z"})),hu=T3e;var k3e=o=>{var r=o,{color:e="#FA4D30"}=r,t=P(r,["color"]);return te.createElement("svg",d({width:"16",height:"17",viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),te.createElement("path",{d:"M10.5 2.99609C11.5938 2.99609 12.7812 2.62109 13.9062 2.12109C14.875 1.71484 16 2.43359 16 3.49609V10.9961C16 11.5273 15.7188 11.9961 15.3125 12.2773C14.4688 12.8086 13.125 13.4961 11.2812 13.4961C9.15625 13.4961 7.75 12.4961 6.21875 12.4961C4.46875 12.4961 3.40625 12.8711 2.25 13.4023V15.9961C2.25 16.2773 2 16.4961 1.75 16.4961H1.25C0.96875 16.4961 0.75 16.2773 0.75 15.9961V3.30859C0.28125 3.05859 0 2.55859 0 1.99609C0 1.15234 0.71875 0.464844 1.59375 0.527344C2.3125 0.558594 2.90625 1.12109 2.96875 1.83984C2.96875 1.87109 3 1.96484 3 1.99609C3 2.15234 2.9375 2.37109 2.90625 2.49609C3.59375 2.21484 4.4375 1.99609 5.4375 1.99609C7.5625 1.99609 8.96875 2.99609 10.5 2.99609ZM14.5 10.9961V3.49609C13.5 3.96484 11.8438 4.49609 10.5 4.49609C8.625 4.49609 7.3125 3.49609 5.4375 3.49609C4.125 3.49609 2.90625 4.02734 2.25 4.49609V11.7461C3.21875 11.3086 4.875 10.9961 6.21875 10.9961C8.09375 10.9961 9.40625 11.9961 11.2812 11.9961C12.5938 11.9961 13.8125 11.4961 14.5 10.9961Z",fill:e}))},Cu=k3e;var XH=({isOwner:e,isModerator:t,isFlagged:o,action:r,containerRef:n})=>{let[i,a]=useState(!1),s=useRef(null),l=()=>{r.onCopy&&r.onCopy(),a(!1);},c=()=>{r.onReply&&r.onReply(),a(!1);},p=()=>{r.onDelete&&r.onDelete(),a(!1);},u=()=>{r.onFlag&&r.onFlag(),a(!1);},g=()=>{r.onUnflag&&r.onUnflag(),a(!1);};return te.createElement(te.Fragment,null,te.createElement(GH,{positions:["bottom","top"],onClickOutside:()=>a(!1),isOpen:i,align:"start",parentElement:(n==null?void 0:n.current)||void 0,content:te.createElement(te.Fragment,null,te.createElement("div",{className:sr.messageActionButton,onClick:c},te.createElement("div",{className:sr.messageActionButtonText},te.createElement(N.Body,null,"Reply")),te.createElement(QH,{className:sr.replyIcon})),te.createElement("div",{className:sr.messageActionButton,onClick:l},te.createElement("div",{className:sr.messageActionButtonText},te.createElement(N.Body,null,"Copy")),te.createElement(qH,{className:sr.copyIcon})),(t||!e)&&te.createElement("div",{className:sr.messageActionButton,onClick:o?g:u},te.createElement("div",{className:sr.messageDangerActionButtonText},te.createElement(N.Body,null,o?"Unreport":"Report")),te.createElement(Cu,{className:sr.flagIcon})),(e||t)&&te.createElement("div",{className:sr.messageActionButton,onClick:p},te.createElement("div",{className:sr.messageDangerActionButtonText},te.createElement(N.Body,null,"Delete")),te.createElement(hu,{className:sr.binIcon})))},te.createElement("div",{className:sr.optionButton,ref:s,onClick:()=>{a(!i);}},te.createElement(VH,{className:sr.optionIcon}))))};var vu={messageItemContainer:"Ff",userDisplayName:"Hf",avatar:"Lf",moderatorBadge:"Tf"};var B3e=({avatarUrl:e,displayName:t,children:o})=>te.createElement("div",{className:vu.messageItemContainer},te.createElement("div",{className:vu.avatar},te.createElement(bt,{avatarUrl:e,defaultImage:te.createElement(ds,null)})),te.createElement("div",null,te.createElement("div",{className:vu.userDisplayName},te.createElement(N.CaptionBold,null,t)),o)),YH=B3e;var Ts={messageBubble:"Cr",messageRepliedBubble:"Vf",messageParentContainer:"qf",messageParentDisplayName:"Gf",messageParentText:"Jf",messageChildContainer:"Kf",messageChildText:"Nf"};var D3e=e=>Dt({fetcher:MessageRepository.getMessage,params:e,shouldCall:!!e}),RH=D3e;var xu={mentionText:"Of",hyperlink:"Pf"};var eF={hyperlink:"Qf"};var U3e=({linkClassName:e,children:t})=>te.createElement($Z,{options:{target:"_blank",render:({attributes:o,content:r})=>te.createElement("a",d({className:e||eF.hyperlink},o),r)}},t),n9=U3e;var z3e=({message:e,className:t})=>{var n,i,a;let o=(n=e.metadata)==null?void 0:n.mentioned,r=o==null?void 0:o.sort((s,l)=>s.index-l.index);if(r!=null&&r.length){let s=((i=e.data)==null?void 0:i.text)||"",l=[],c=0;r.forEach(u=>{let g=u.index,f=u.index+u.length+1,y=s.slice(c,g),C=s.slice(g,f);y&&l.push({text:y,isMention:!1}),l.push({text:C,isMention:!0}),c=f;});let p=s.slice(c);return p&&l.push({text:p,isMention:!1}),te.createElement(N.Body,{className:t},l.map((u,g)=>u.isMention?te.createElement("span",{key:g,className:xu.mentionText},u.text):te.createElement("span",{key:g},te.createElement(n9,{linkClassName:xu.hyperlink},u.text))))}return te.createElement(N.Body,{className:t},te.createElement(n9,{linkClassName:xu.hyperlink},(a=e.data)==null?void 0:a.text))},i9=z3e;var $3e=({message:e})=>{var r,n,i;let{currentUserId:t}=X(),o=(n=(r=e.metadata)==null?void 0:r.mentioned)==null?void 0:n.some(a=>a.userId===t||a.type==="channel");if(e&&e.parentId){let a=RH(e.parentId),s=ne(a==null?void 0:a.creatorId);return !a||!s?null:te.createElement("div",{className:Ts.messageRepliedBubble},te.createElement("div",{className:Ts.messageParentContainer},te.createElement("div",{className:Ts.messageParentDisplayName},te.createElement(N.BodyBold,null,s.displayName)),te.createElement(N.Body,{className:Ts.messageParentText},(i=a.data)==null?void 0:i.text)),te.createElement("div",{className:Ts.messageChildContainer},te.createElement(i9,{className:Ts.messageChildText,message:e})))}return te.createElement("div",{"data-mentioned":o,className:Ts.messageBubble},te.createElement(i9,{message:e}))},oF=$3e;var p2=e=>{let{client:t}=X();return {isModerator:useMemo(()=>{if(!e)return !1;let r=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").currentUser())||!1,n=(t==null?void 0:t.hasPermission("MUTE_CHANNEL").channel(e))||!1;return r||n},[e])}};var rF=e=>te.createElement("svg",d({width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.0766 3.686C11.6827 3.45305 12.3021 3.33948 12.9061 3.3335C14.7179 3.31558 16.3937 4.2689 17.1729 5.89093L17.1895 5.92546L17.202 5.9624C17.6819 7.39004 17.5517 8.83248 17.0292 10.1008C16.7326 9.72289 16.3721 9.39755 15.964 9.14106C16.2254 8.26924 16.2483 7.32915 15.9455 6.39919C15.3774 5.24797 14.2332 4.57487 12.9278 4.60378C12.4981 4.61329 12.0515 4.70045 11.6019 4.86956C11.1731 5.08422 10.8198 5.36694 10.5238 5.73675L10.0093 6.37992L9.47729 5.74959C8.38507 4.45434 6.19511 4.17996 4.72103 5.44206C3.63692 6.5523 3.60343 8.44184 4.37082 10.0205C5.31606 11.6937 7.28176 13.3534 9.14794 14.7202L9.15794 14.7275C9.27155 14.8082 9.38012 14.8942 9.48451 14.9769C9.57334 15.0473 9.65915 15.1152 9.74247 15.1755C9.83249 15.2407 9.91925 15.2913 9.98761 15.3273C10.0527 15.3006 10.1319 15.2662 10.2153 15.2157C10.2662 15.1848 10.3205 15.1506 10.3776 15.1136C10.6388 15.4735 10.9562 15.7901 11.3169 16.0503C11.1818 16.1421 11.0508 16.227 10.9257 16.3029C10.8808 16.33 10.8388 16.3568 10.7982 16.3826C10.5856 16.5181 10.4104 16.6296 10.0526 16.6594L9.96091 16.6666L9.87002 16.6497C9.46411 16.575 9.1867 16.3802 8.94112 16.2025C8.80472 16.1038 8.67845 16.0042 8.57194 15.9202C8.48669 15.8529 8.4141 15.7957 8.3591 15.7569L8.35494 15.7536L8.34994 15.7496C6.42696 14.342 4.31681 12.6298 3.18676 10.6147L3.17842 10.5987L3.17008 10.5834C2.21058 8.62424 2.1731 6.14474 3.7738 4.53473L3.79047 4.51786L3.80882 4.50181C5.63352 2.91773 8.30066 3.019 9.97595 4.41428C10.2872 4.13498 10.6374 3.8993 11.0216 3.71089L11.0491 3.69724L11.0766 3.686Z",fill:"currentColor"}),te.createElement("path",{d:"M13.6839 10.0507L13.6839 10.0501L13.6725 10.0522C13.5717 10.0706 13.4807 10.1238 13.4151 10.2025C13.3496 10.2811 13.3137 10.3803 13.3137 10.4827C13.3137 10.4827 13.3137 10.4827 13.3137 10.4827V12.2327H11.5637V12.2322L11.5527 12.2332L11.4964 12.2382L11.4964 12.2376L11.485 12.2397C11.3842 12.2581 11.2932 12.3113 11.2276 12.39C11.1621 12.4686 11.1262 12.5678 11.1262 12.6702H11.1257L11.1267 12.6812L11.1317 12.7375L11.1312 12.7375L11.1333 12.7489C11.1517 12.8496 11.2049 12.9407 11.2835 13.0063C11.3622 13.0718 11.4613 13.1077 11.5637 13.1077C11.5637 13.1077 11.5637 13.1077 11.5638 13.1077H13.3137V14.8577H13.3132L13.3142 14.8687L13.3192 14.925L13.3187 14.925L13.3208 14.9364C13.3392 15.0371 13.3924 15.1282 13.471 15.1938L13.5511 15.0977L13.471 15.1938C13.5497 15.2593 13.6489 15.2952 13.7513 15.2952L13.7513 15.2957L13.7623 15.2947L13.8185 15.2897L13.8186 15.2902L13.83 15.2881C13.9307 15.2697 14.0218 15.2165 14.0873 15.1379C14.1529 15.0592 14.1887 14.96 14.1887 14.8577C14.1887 14.8577 14.1887 14.8576 14.1887 14.8576V13.1077H15.9387V13.1082L15.9498 13.1072L16.006 13.1022L16.0061 13.1027L16.0175 13.1006C16.1182 13.0822 16.2093 13.029 16.2748 12.9504C16.3404 12.8717 16.3763 12.7725 16.3762 12.6701L16.3767 12.6701L16.3757 12.6591L16.3707 12.6028L16.3713 12.6028L16.3692 12.5914C16.3507 12.4907 16.2976 12.3996 16.2189 12.3341C16.1403 12.2685 16.0411 12.2326 15.9387 12.2327C15.9387 12.2327 15.9387 12.2327 15.9387 12.2327H14.1887V10.4827H14.1892L14.1882 10.4716L14.1832 10.4153L14.1838 10.4153L14.1817 10.4039C14.1632 10.3032 14.1101 10.2121 14.0314 10.1466C13.9527 10.081 13.8536 10.0451 13.7512 10.0452V10.0447L13.7402 10.0457L13.6839 10.0507Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"0.25"}));var bu=o=>_(void 0,[o],function*({reactionName:e,message:t}){let r=t.myReactions||[];if(r.includes(e)){yield ReactionRepository.removeReaction("message",t.messageId,e);return}r.length>0&&(yield ReactionRepository.removeReaction("message",t.messageId,r[0])),yield ReactionRepository.addReaction("message",t.messageId,e);});var l9={quickReactionIcon:"Wf",quickReactionIconContainer:"Sr"};var Iu=({pageId:e="*",componentId:t="*",message:o,onSelectReaction:r})=>{let n="message_quick_reaction",{config:i}=A({pageId:e,componentId:t,elementId:n}),{config:a}=bi(),s=useCallback(()=>{a&&i.reaction&&a.find(l=>l.name===i.reaction)&&bu({reactionName:i.reaction,message:o}),r&&r();},[a,i,o]);return te.createElement("div",{className:l9.quickReactionIconContainer},te.createElement(rF,{className:l9.quickReactionIcon,onClick:s}))};var m9={reactionPickerContainer:"Zf",reactionButton:"u"};var d9=({message:e,onSelectReaction:t})=>{let{config:o}=bi(),r=n=>{bu({reactionName:n,message:e});};return o?te.createElement("div",{className:m9.reactionPickerContainer},o.map(n=>{var i;return te.createElement("img",{"data-active":(i=e.myReactions)==null?void 0:i.includes(n.name),key:n.name,src:n.image,alt:n.name,className:m9.reactionButton,onClick:()=>{r(n.name),t&&t(n.name);}})})):null};var wu={reactionContainer:"_f",reactionPickerWrap:"eb",reactionButton:"rb"};var aF=({pageId:e="*",componentId:t="*",message:o,containerRef:r})=>{let [n,i]=useState(!1),[a,s]=useState(!1),[l,c]=useState(!1);te.useState();let g=useRef(null),f=useRef(a);useEffect(()=>{f.current=a;},[a]);let y=useCallback(()=>{if(!f.current)return;let I=setTimeout(()=>{f.current&&i(!0);},500);return ()=>clearTimeout(I)},[]),C=useRef(l);useEffect(()=>{C.current=l;},[l]);let v=useCallback(()=>{setTimeout(()=>{C.current||i(!1);},1e3);},[]),h=useCallback(I=>{g.current&&!g.current.contains(I.target)&&i(!1);},[]),x=()=>{if(!g.current||!(r!=null&&r.current))return "translate(-50%, 0px)";let I=r.current.getBoundingClientRect(),w=g.current.getBoundingClientRect();if(!I||!w)return "translate(-50%, 0px)";jv(Number(Vv("--asc-spacing-s1").replace("rem","")));let S=w.right-I.right,L=I.left-w.left;return S>0?`translate(calc(-50% - ${S}px), 0px)`:L>0?`translate(calc(-50% + ${L}px), 0px)`:"translate(-50%, 0px)"},b=I=>{h(I);},M=()=>{s(!1),c(!1),i(!1);};return useEffect(()=>(document.addEventListener("mousedown",b),document.addEventListener("touchstart",h),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("touchstart",h);}),[]),useEffect(()=>{a?!n&&y():n&&v();},[a,n]),te.createElement("div",{className:wu.reactionContainer},n&&te.createElement("div",{className:wu.reactionPickerWrap,style:{transform:x()},ref:g,onMouseEnter:()=>c(!0),onMouseLeave:()=>{c(!1);}},te.createElement(d9,{message:o,onSelectReaction:M})),te.createElement("div",{className:wu.reactionButton,onMouseEnter:()=>{s(!0);},onMouseLeave:()=>{s(!1);}},te.createElement(Iu,{message:o,onSelectReaction:M,pageId:e,componentId:t})))};var g2={reactionPreviewContainer:"Ar",reactionIconContainer:"c",reactionIcon:"ab",reactionCount:"ob",fallbackIcon:"tb"};var g9=({message:e,onClick:t})=>{let{config:o}=bi(),r=e.reactions?useMemo(()=>Object.entries(e.reactions).sort((n,i)=>i[1]-n[1]).filter(n=>n[1]>0).slice(0,3).sort((n,i)=>n[1]-i[1]),[e==null?void 0:e.reactions]):[];return e!=null&&e.reactionsCount?te.createElement("div",{className:g2.reactionPreviewContainer,"data-myreaction":(e==null?void 0:e.myReactions)&&!!(e!=null&&e.myReactions.length),onClick:t},te.createElement("div",{className:g2.reactionIconContainer},r.map(n=>{let i=o.find(a=>a.name===n[0]);return te.createElement(te.Fragment,null,i?te.createElement("img",{className:g2.reactionIcon,src:i.image,alt:i.name}):te.createElement(Fm,{className:g2.fallbackIcon,backgroundColor:getComputedStyle(document.documentElement).getPropertyValue("--asc-color-base-shade3")}))})),te.createElement("div",{className:g2.reactionCount},Hm(e.reactionsCount))):null};var Wn={messageItemContainer:"ib",messageItemContainerInner:"Mr",messageBubbleWrap:"lb",messageReaction:"sb",messageDeletedBubble:"cb",messageOptionsWrap:"nb",binIcon:"db",optionIcon:"mb",flagIcon:"pb",timestamp:"gb",reactionListSheet:"hb",reactionListContainer:"fb",reactionListBackdrop:"bb"};var Y3e=({pageId:e="*",componentId:t="*",elementId:o="*",message:r,avatarUrl:n,userDisplayName:i,containerRef:a,action:s})=>{let l=X(),c=r.creatorId===l.currentUserId,{isModerator:p}=p2(r.channelId),[u,g]=useState(void 0);return te.createElement(te.Fragment,null,te.createElement(YH,{avatarUrl:n,displayName:i},te.createElement("div",{className:Wn.messageItemContainerInner,"data-reactions":!!r.reactionsCount},r.isDeleted?te.createElement("div",{className:Wn.messageDeletedBubble},te.createElement(hu,{className:Wn.binIcon}),te.createElement("div",null,te.createElement(N.Body,null,"This message was deleted"))):te.createElement("div",{className:Wn.messageBubbleWrap},te.createElement(oF,{message:r}),te.createElement("div",{className:Wn.messageReaction},te.createElement(g9,{message:r,onClick:()=>g(r)})),s&&te.createElement(XH,{containerRef:a,isOwner:c,isModerator:p,action:s,isFlagged:r.flagCount>0}),te.createElement(aF,{message:r,containerRef:a,pageId:e,componentId:t}),r.flagCount>0&&te.createElement(Cu,{className:Wn.flagIcon}),te.createElement("div",{className:Wn.timestamp},un(r.createdAt).format("HH:mm A"))))),u&&te.createElement(C1,{isOpen:!0,onClose:()=>g(void 0),className:Wn.reactionListSheet},te.createElement(C1.Container,{className:Wn.reactionListContainer},te.createElement(C1.Header,null),te.createElement(C1.Content,null,te.createElement(Om,{pageId:e,referenceId:u.messageId,referenceType:"message"}))),te.createElement(C1.Backdrop,{className:Wn.reactionListBackdrop})))},Pu=Y3e;var f9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="sender_message_bubble",a=ne(o.creatorId),s=le({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return te.createElement(Pu,{message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n,pageId:e,componentId:t,elementId:i})};var y9=({pageId:e="*",componentId:t="*",message:o,containerRef:r,action:n})=>{let i="receiver_message_bubble",{user:a}=Cr(o.creatorId),s=it({fileId:a==null?void 0:a.avatarFileId,imageSize:"small"});return te.createElement(Pu,{pageId:e,componentId:t,elementId:i,message:o,userDisplayName:a==null?void 0:a.displayName,avatarUrl:s,containerRef:r,action:n})};var h9=(r,n)=>_(void 0,[r,n],function*(e,{onSuccess:t,onError:o}){try{yield MessageRepository.deleteMessage(e),t&&t();}catch(i){o&&o(i);}});var C9=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.flagMessage(e),t&&t();}catch(r){o&&o(r);}});var sF=(e,t,o)=>_(void 0,null,function*(){try{yield MessageRepository.unflagMessage(e),t&&t();}catch(r){o&&o(r);}});var v9={icon:"ub"};var b9=createContext({liveChatNotifications:[],liveChatNotificationFunction:{success:()=>{},error:()=>{},show:()=>{}}}),s5e=3e3,mF=({children:e})=>{let[t,o]=useState([]),r=i=>o&&o(a=>a.filter(s=>s.id!==i)),n=i=>{let a=Date.now();o(s=>[...s,d({id:a},i)]),setTimeout(()=>{r(a);},(i==null?void 0:i.duration)||s5e);};return te.createElement(b9.Provider,{value:{liveChatNotifications:t,liveChatNotificationFunction:{success:i=>n(E(d({},i),{icon:te.createElement(y0,{className:v9.icon})})),error:i=>n(E(d({},i),{icon:te.createElement(Y1,{className:v9.icon})})),show:i=>n(i)}}},e)},dF=()=>{let{liveChatNotifications:e}=useContext(b9);return e},f2=()=>{let{liveChatNotificationFunction:e}=useContext(b9);return e};var cF=()=>{let e=f2(),{formatMessage:t}=useIntl();return r=>_(void 0,null,function*(){yield navigator.clipboard.writeText(r),e.success({content:t({id:"livechat.notification.copy.message"})});})};var Z1={infiniteScrollContainer:"vb",loadingIndicatorWrap:"xb",loadingIndicator:"wb",infiniteScrollInner:"yb",customStatusContainer:"kb",iconContainer:"jb"};var _u=({pageId:e="*",channel:t,replyMessage:o})=>{let r="message_list",n=X(),i=useRef(null),[a,s]=useState(void 0),{confirm:l}=et(),c=f2(),p=cF(),{themeStyles:u}=re({pageId:e,componentId:r}),{messages:g,hasMore:f,loadMore:y,isLoading:C,error:v}=kc({subChannelId:t.channelId,sortBy:"segmentDesc",limit:10,includeDeleted:!0}),h=g,x=b=>{l({title:"Delete this message?",content:"This message will also be removed from your friend\u2019s devices.",cancelText:"Cancel",okText:"Delete",onOk:()=>h9(b,{onError:()=>c.error({content:"Unable to delete message. Please try again."})})});};return useEffect(()=>{let b=()=>{i.current&&s(i.current.clientHeight);},M=new ResizeObserver(b);return i.current&&M.observe(i.current),()=>{i.current&&M.unobserve(i.current);}},[]),v?te.createElement("div",{className:Z1.customStatusContainer,ref:i,style:u},te.createElement("div",{className:Z1.iconContainer},te.createElement(i5,null)),te.createElement(N.Caption,null,"Couldn't load chat")):te.createElement("div",{className:Z1.infiniteScrollContainer,ref:i,style:u},i.current&&te.createElement(eR,{className:Z1.infiniteScrollInner,scrollableTarget:i.current,scrollThreshold:.7,hasMore:f,next:y,loader:C?te.createElement("div",{className:Z1.loadingIndicatorWrap},te.createElement(zH,{className:Z1.loadingIndicator})):null,inverse:!0,dataLength:h.length,height:i.current.clientHeight},h.map((b,M)=>b.creatorId===n.currentUserId?te.createElement(f9,{message:b,action:t.isMuted?void 0:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)}},key:b.messageId,containerRef:i,pageId:e,componentId:r}):te.createElement(y9,{message:b,action:{onReply:()=>o(b),onDelete:()=>x(b.messageId),onCopy:()=>{var I,w;return ((I=b.data)==null?void 0:I.text)&&p((w=b.data)==null?void 0:w.text)},onFlag:()=>C9(b.messageId,()=>c.success({content:"Message reported"}),()=>c.error({content:"This message failed to be reported. Please try again."})),onUnflag:()=>sF(b.messageId,()=>c.success({content:"Message unreported"}),()=>c.error({content:"This message failed to be unreported. Please try again."}))},key:b.messageId,containerRef:i,pageId:e,componentId:r}))))};var g5e=e=>te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512"},e),te.createElement("path",{d:"M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"})),uF=g5e;var I9={homeIndicatorContainer:"zb",homeIndicator:"Xb"};var Tu=()=>te.createElement("div",{className:I9.homeIndicatorContainer},te.createElement("div",{className:I9.homeIndicator}));var In={sendButton:"Yb",reactionButton:"Cb",sendButtonContainer:"Sb",composeBarContainer:"Ab",optionContainer:"Mb",composeBar:"Bb",composeBarLoading:"Eb",mentionText:"Ib",editorPlaceholder:"Rb",editorContainer:"Br",editorRoot:"Ub",editorParagraph:"Db",editorContainer__mentionTextInput_item:"Er",editorLink:"Ir",userMentionItem__item:"A",allMentionItem__item:"M",userMentionItem__avatar:"Fb",allMentionItem__atSign:"Hb",userMentionItem__displayName:"Lb",allMentionItem__displayName:"Tb"};var ku=({channelId:e,memberships:t,search:o,limit:r=20,shouldCall:n=!0})=>{let s=pt({fetcher:ChannelRepository.Membership.searchMembers,params:{channelId:e,search:o||"",memberships:t,limit:r,includeDeleted:!1},shouldCall:!!e&&n}),{items:i}=s,a=P(s,["items"]);return d({channelMembers:i},a)};var M5e=e=>{var o,r;let t=(()=>{switch(screen.orientation.type){case"landscape-primary":case"landscape-secondary":return .5;case"portrait-secondary":case"portrait-primary":return .75;default:return .5}})();return e.visualViewport?((o=e.visualViewport)==null?void 0:o.height)*((r=e.visualViewport)==null?void 0:r.scale)/e.screen.height<t:!1},fF=({commandPriority:e,onEnter:t})=>{let[o]=useLexicalComposerContext();return useEffect(()=>{o.registerCommand(KEY_ENTER_COMMAND,r=>{let n=$getSelection();if(!$isRangeSelection(n)||M5e(window))return !1;let i=r;return i.preventDefault(),i.shiftKey?o.dispatchCommand(INSERT_PARAGRAPH_COMMAND,void 0):(t(),!0)},e);},[o,t]),null};function yF({option:e,isSelected:t,onClick:o,onMouseEnter:r}){return te.createElement("li",{key:e.key,tabIndex:-1,"data-is-selected":t,className:Aa.allMentionItem__item,ref:e.setRefElement,role:"option","aria-selected":t,onMouseEnter:r,onClick:o},te.createElement("div",{className:Aa.allMentionItem__atSign},"@"),te.createElement("p",{className:Aa.allMentionItem__displayName},e.data.displayName))}var V5e=200,j5e=e=>{let[t,o]=useState(null),{isModerator:r}=p2(e||void 0),{channelMembers:n}=ku({search:t,channelId:e,memberships:["member"],limit:20}),i=s=>{o(s);};return {suggestions:useMemo(()=>{let s=n.map(({user:l,userId:c})=>({userId:(l==null?void 0:l.userId)||c,displayName:l==null?void 0:l.displayName}));return r&&(t===""||/^al*l*$/i.test(t||""))?[{userId:"all",displayName:"All"},...s]:s},[r,n]),queryString:t,onQueryChange:i}},G5e=[AutoLinkNode,LinkNode,Vi],Su=({pageId:e="*",channel:t,composeAction:{replyMessage:o,mentionMessage:r,clearReplyMessage:n,clearMention:i}})=>{var M;let a="message_composer",s=useRef(null),l=useRef(null),{themeStyles:c,uiReference:p,config:u,accessibilityId:g}=re({pageId:e,componentId:a}),{confirm:f}=et(),y=f2(),{onQueryChange:C,suggestions:v}=j5e(t.channelId),{mutateAsync:h}=useMutation({mutationFn:I=>MessageRepository.createMessage(I),onSuccess:()=>{var I;(I=l.current)==null||I.update(()=>{$getRoot().clear();}),n&&n();},onError:I=>{let w=I.message,k="Your message wasn't sent. Please try again.";w==="Amity SDK (400308): Text contain blocked word"?k="Your message wasn't sent as it contains a blocked word.":w==="Amity SDK (400309): Data contain link that is not in whitelist"?k="Your message wasn\u2019t sent as it contained a link that\u2019s not allowed.":w==="Amity SDK (400302): User is muted"&&(k="User is muted"),y.error({content:k});}}),x=()=>{if(!t||!l.current)return;let{mentioned:I,mentionees:w,text:k}=il(l.current);if((k==null?void 0:k.trim().length)!==0){if(k.trim().length>(typeof(u==null?void 0:u.message_limit)=="number"?u==null?void 0:u.message_limit:V5e)){f({title:"Unable to send message",content:"Your message is too long. Please shorten your message and try again.",okText:"Ok"});return}h({tags:[],subChannelId:t.channelId,data:{text:k.trim()},dataType:"text",mentionees:w,metadata:{mentioned:I},parentId:(o==null?void 0:o.messageId)||void 0});}},b=al({namespace:p,theme:{root:In.editorRoot,placeholder:In.editorPlaceholder,paragraph:In.editorParagraph,link:In.editorLink},nodes:G5e});return te.createElement("div",{className:In.composeBarContainer,"data-qa-anchor":g,style:c},te.createElement("div",{className:In.composeBar},te.createElement("div",{ref:s,className:In.optionContainer}),te.createElement("div",{className:In.editorContainer},te.createElement(LexicalComposer,{initialConfig:b},te.createElement(RichTextPlugin,{contentEditable:te.createElement(ContentEditable,null),placeholder:(M=te.createElement("span",{className:In.editorPlaceholder},u.placeholder_text))!=null?M:null,ErrorBoundary:O5e}),te.createElement(HistoryPlugin,null),te.createElement(AutoFocusPlugin,null),te.createElement(ll,null),te.createElement(sl,null),te.createElement(EditorRefPlugin,{editorRef:l}),te.createElement(fF,{onEnter:x,commandPriority:COMMAND_PRIORITY_LOW}),te.createElement(ml,{suggestions:v,getSuggestionId:I=>I.userId,onQueryChange:C,$createNode:I=>La({text:`@${I.displayName||""}`,data:I}),menuRenderFn:(I,{options:w,selectedIndex:k,setHighlightedIndex:S,selectOptionAndCleanUp:L})=>!s.current||w.length===0?null:ox.createPortal(te.createElement(te.Fragment,null,w.map((D,H)=>D.data.userId==="all"?te.createElement(yF,{isSelected:k===H,onClick:()=>{S(H),L(D);},onMouseEnter:()=>{S(H);},key:D.key,option:D}):te.createElement(Da,{isSelected:k===H,onClick:()=>{S(H),L(D);},onMouseEnter:()=>{S(H);},key:D.key,option:D}))),s.current),commandPriority:COMMAND_PRIORITY_HIGH}))),te.createElement("div",{className:In.sendButtonContainer},te.createElement(uF,{className:In.sendButton,onClick:()=>x()}))),te.createElement(Tu,null))};var CF=({channelId:e})=>{let r=kn({fetcher:ChannelRepository.getChannel,params:e,shouldCall:!!e}),{item:t}=r,o=P(r,["item"]);return d({channel:t},o)};var ht={composeBarContainer:"Vb",composeBar:"qb",textInputContainer:"Gb",composeBarLoading:"Jb",replyPlaceholderContainer:"Kb",replyAvatar:"Nb",replyProfile:"Ob",replyProfileName:"Pb",replyProfileMessage:"Qb",replyDismiss:"Wb",notificationPosition:"Zb",messageListPlaceholder:"_b",mutedChannelContainer:"eu",mutedIcon:"ru",commentAltIcon:"au",banStatePanel:"ou"};var W5e=({children:e})=>te.createElement(te.Fragment,null,te.createElement("div",{className:ht.messageListPlaceholder},e),te.createElement("div",{className:ht.composeBarContainer},te.createElement("div",{className:ht.composeBar},te.createElement("div",{className:ht.textInputContainer},te.createElement("div",{className:ht.composeBarLoading},te.createElement(vm,{width:20,height:20}),te.createElement("span",null,te.createElement(N.Body,null,"Loading chat..."))))),te.createElement(Tu,null))),Nu=W5e;var vF=({replyMessage:e,onDismiss:t})=>{var r,n;let o=ne(e.creatorId);return o?te.createElement("div",{className:ht.replyPlaceholderContainer},te.createElement("div",{className:ht.replyAvatar},te.createElement(bt,{avatarUrl:(r=o.avatar)==null?void 0:r.fileUrl,defaultImage:te.createElement(ds,null)})),te.createElement("div",{className:ht.replyProfile},te.createElement("div",{className:ht.replyProfileName},`Replying to ${o.displayName}`),te.createElement("div",{className:ht.replyProfileMessage},(n=e.data)==null?void 0:n.text)),te.createElement("div",{className:ht.replyDismiss},te.createElement(R1,{onClick:t,width:"20",height:"20"}))):null};var K5e=({children:e})=>te.createElement("div",{className:ht.messageListPlaceholder},e),xF=K5e;var M9={notifications:"tu",notificationContainer:"iu",appear:"Rr"};var bF=({className:e,content:t,icon:o})=>te.createElement("div",{className:gr(M9.notificationContainer,e)},o,te.createElement(N.Body,null,t)),P9=()=>{let e=dF();return te.createElement("div",{className:M9.notifications},e.map(t=>te.createElement(bF,E(d({},t),{key:t.id}))))};var Y5e=e=>te.createElement("svg",d({width:"23",height:"21",viewBox:"0 0 23 21",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M21.7988 17.7605C22.0449 17.9363 22.1152 18.2878 21.9043 18.5339L21.5527 18.9558C21.3418 19.2019 20.9902 19.2722 20.7793 19.0613L-0.244141 2.60815C-0.490234 2.43237 -0.560547 2.08081 -0.349609 1.83472L0.00195312 1.37769C0.212891 1.16675 0.564453 1.09644 0.810547 1.30737L21.7988 17.7605ZM12.5527 7.49487C13.3262 7.91675 13.8887 8.69019 14.0645 9.53394L11.5684 7.60034C11.8496 7.35425 12.2363 7.31909 12.5527 7.49487ZM13.6074 6.15894C13.2207 5.91284 13.1152 5.3855 13.3613 4.99878C13.6074 4.61206 14.1348 4.47144 14.5215 4.71753C16.3848 5.91284 17.5449 7.9519 17.5449 10.1667C17.5449 10.8347 17.4395 11.4324 17.2637 12.03L15.7871 10.8699C15.8223 10.6589 15.8574 10.4128 15.8574 10.1667C15.8574 8.54956 15.0137 7.03784 13.6074 6.15894ZM15.4707 3.31128C15.084 3.06519 14.9785 2.53784 15.2246 2.11597C15.5059 1.72925 16.0332 1.62378 16.4199 1.86987C19.2324 3.73315 20.9199 6.8269 20.9199 10.1667C20.9199 11.6082 20.6035 12.9441 20.041 14.2097L18.6699 13.1199C19.0215 12.2058 19.1973 11.2214 19.1973 10.1667C19.1973 7.42456 17.8262 4.823 15.4707 3.31128ZM9.66992 4.29565V6.08862L7.49023 4.40112L8.22852 3.698C8.36914 3.52222 8.58008 3.41675 8.79102 3.41675C9.24805 3.41675 9.66992 3.76831 9.66992 4.29565ZM7.98242 14.0691V11.1863L9.66992 12.5222V16.073C9.66992 16.6003 9.24805 16.9167 8.79102 16.9167C8.58008 16.9167 8.36914 16.8464 8.22852 16.6707L5.09961 13.5417H1.51367C1.02148 13.5417 0.669922 13.1902 0.669922 12.698V7.6355C0.669922 7.17847 1.02148 6.79175 1.51367 6.79175H2.35742L4.50195 8.47925H2.35742V11.8542H5.76758L7.98242 14.0691Z"})),_9=Y5e;var wF={inputTextContainer:"lu",invalid:"su",disabled:"cu",baseInputStyle:"nu",mentionContainer:"du","live-chat-mention-input":"Ur","live-chat-mention-input__suggestions__list":"mu",mentions_mention:"pu",mentions__highlighter:"gu"};var eue=e=>te.createElement("svg",d({width:"49",height:"49",viewBox:"0 0 49 49",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("path",{d:"M37.96 7C40.4209 7 42.46 9.03906 42.46 11.5V31.75C42.46 34.2812 40.4209 36.25 37.96 36.25H27.835L19.0459 42.8594C18.835 43 18.6943 43 18.5537 43C18.0615 43 17.71 42.7188 17.71 42.1562V36.25H10.96C8.42871 36.25 6.45996 34.2812 6.45996 31.75V11.5C6.45996 9.03906 8.42871 7 10.96 7H37.96ZM40.21 31.75V11.5C40.21 10.3047 39.1553 9.25 37.96 9.25H10.96C9.69434 9.25 8.70996 10.3047 8.70996 11.5V31.75C8.70996 33.0156 9.69434 34 10.96 34H19.96V39.3438L26.4287 34.4922L27.0615 34H37.96C39.1553 34 40.21 33.0156 40.21 31.75ZM24.46 25.5625C25.374 25.5625 26.1475 26.3359 26.1475 27.25C26.1475 28.2344 25.374 28.9375 24.46 28.9375C23.4756 28.9375 22.7725 28.2344 22.7725 27.25C22.7725 26.3359 23.4756 25.5625 24.46 25.5625ZM23.8271 23.875C23.5459 23.875 23.2646 23.6641 23.2646 23.3828L22.7725 15.5078C22.7725 15.1562 22.9834 14.875 23.335 14.875H25.5146C25.8662 14.875 26.0771 15.1562 26.0771 15.5078L25.585 23.3828C25.585 23.6641 25.3037 23.875 25.0225 23.875H23.8271Z"})),PF=eue;var oue=({pageId:e="*",channel:t})=>{var C;let o=fu(),{isModerator:r}=p2(t.channelId),n=X().currentUserId,{channelMembers:i}=ku({channelId:t.channelId,memberships:["member","banned","muted"]}),a=i.find(v=>v.userId===n),[s,l]=useState(void 0),[c,p]=useState(void 0),[u,g]=useState(0),f=useRef(null),y=useRef(null);return useEffect(()=>{var v,h;(v=y.current)!=null&&v.clientHeight&&((h=y.current)==null?void 0:h.clientHeight)>0&&g(y.current.clientHeight-30);},[(C=y.current)==null?void 0:C.clientHeight]),o?a!=null&&a.isBanned?te.createElement(xF,null,te.createElement("div",{className:ht.banStatePanel},te.createElement(PF,{className:ht.commentAltIcon}),te.createElement(N.Heading,null,"You are banned from chat"),te.createElement(N.Body,null,"You won\u2019t be able to participate in this chat until you\u2019ve been unbanned."))):te.createElement(te.Fragment,null,te.createElement(_u,{channel:t,replyMessage:l,pageId:e}),o&&te.createElement(te.Fragment,null,te.createElement("div",{ref:f,className:wF.mentionContainer}),!r&&t.isMuted?te.createElement("div",{className:ht.mutedChannelContainer},te.createElement(_9,{width:20,height:20,className:ht.mutedIcon}),te.createElement(N.Body,null,"This channel has been set to read-only by the channel moderator")):a!=null&&a.isMuted?te.createElement("div",{className:ht.mutedChannelContainer},te.createElement(_9,{width:20,height:20,className:ht.mutedIcon}),te.createElement(N.Body,null,"You\u2019ve been muted by the channel moderator")):null,s&&te.createElement(vF,{replyMessage:s,onDismiss:()=>l(void 0)}),te.createElement("div",{className:ht.notificationPosition,style:{bottom:u}},te.createElement(P9,null)),te.createElement("div",{ref:y},te.createElement(Su,{pageId:e,disabled:!r&&t.isMuted||(a==null?void 0:a.isMuted),channel:t,suggestionRef:f,composeAction:{replyMessage:s,mentionMessage:c,clearReplyMessage:()=>l(void 0),clearMention:()=>p(void 0)}})))):te.createElement(Nu,null)},TF=oue;var rue=({pageId:e="*",channel:t})=>t?te.createElement(TF,{channel:t,pageId:e}):te.createElement(Nu,null),SF=rue;var k9={messageListHeaderWrap:"hu",liveChat:"fu"};var NF=({channelId:e})=>{let{channel:t}=CF({channelId:e}),o="live_chat",{themeStyles:r}=Re({pageId:o}),n=useRef(null);return te.createElement(mF,null,te.createElement("div",{className:k9.liveChat,ref:n,style:r},te.createElement("div",{className:k9.messageListHeaderWrap},te.createElement(yu,{channel:t,pageId:o})),te.createElement(SF,{channel:t,pageId:o})))};var Ie={storyPreview_title:"bu",contentWrapper:"uu",storyPreviewWrapper:"vu",storyPreview_description:"xu",storyPreviewContainer:"wu",headerContainer:"yu",progressBar:"Dr",progressFill:"ku",userInfo:"ju",storyPreviewTitle:"Fr",nameContainer:"zu",hyperLinkContainer:"Xu",mediaContainer:"Hr",media:"Yu",avatarContainer:"Lr",imageFit:"Cu",imageCover:"Su",headerContent:"Au",userInfoContent:"Mu",shadowOverlay:"Bu",pulse:"Tr",skeleton:"n",textSkeleton:"Eu",nameSkeleton:"Iu",timeSkeleton:"Ru"};var sue=e=>te.createElement("svg",d({width:"100%",height:"100%",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),te.createElement("rect",{width:"40",height:"40",rx:"20",fill:"#D9E5FC"}),te.createElement("path",{d:"M19.8462 12C20.7625 12 21.6413 12.356 22.2893 12.9898C22.9373 13.6235 23.3013 14.4831 23.3013 15.3793C23.3013 16.2756 22.9373 17.1351 22.2893 17.7688C21.6413 18.4026 20.7625 18.7586 19.8462 18.7586C18.9298 18.7586 18.051 18.4026 17.403 17.7688C16.755 17.1351 16.391 16.2756 16.391 15.3793C16.391 14.4831 16.755 13.6235 17.403 12.9898C18.051 12.356 18.9298 12 19.8462 12ZM12.9359 14.4138C13.4887 14.4138 14.0021 14.5586 14.4463 14.8193C14.2982 16.2 14.7128 17.571 15.5618 18.6428C15.0682 19.5697 14.081 20.2069 12.9359 20.2069C12.1504 20.2069 11.3972 19.9017 10.8418 19.3585C10.2864 18.8153 9.97436 18.0786 9.97436 17.3103C9.97436 16.5421 10.2864 15.8054 10.8418 15.2622C11.3972 14.719 12.1504 14.4138 12.9359 14.4138ZM26.7564 14.4138C27.5419 14.4138 28.2951 14.719 28.8505 15.2622C29.4059 15.8054 29.7179 16.5421 29.7179 17.3103C29.7179 18.0786 29.4059 18.8153 28.8505 19.3585C28.2951 19.9017 27.5419 20.2069 26.7564 20.2069C25.6113 20.2069 24.6241 19.5697 24.1305 18.6428C24.9795 17.571 25.3941 16.2 25.246 14.8193C25.6903 14.5586 26.2036 14.4138 26.7564 14.4138ZM13.4295 24.3103C13.4295 22.3117 16.3022 20.6897 19.8462 20.6897C23.3901 20.6897 26.2628 22.3117 26.2628 24.3103V26H13.4295V24.3103ZM8 26V24.5517C8 23.2097 9.86577 22.08 12.3929 21.7517C11.8105 22.4083 11.4551 23.3159 11.4551 24.3103V26H8ZM31.6923 26H28.2372V24.3103C28.2372 23.3159 27.8818 22.4083 27.2994 21.7517C29.8265 22.08 31.6923 23.2097 31.6923 24.5517V26Z",fill:"white"})),Bu=sue;var EF=({width:e="100%",height:t="100%"})=>te.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:e,height:t}},te.createElement("div",{className:Ie.storyPreviewContainer},te.createElement("div",{className:Ie.shadowOverlay}),te.createElement("div",{className:Ie.headerContainer},te.createElement("div",{className:Ie.headerContent},te.createElement("div",{className:Ie.userInfo},te.createElement("div",{className:Ie.userInfoContent},te.createElement("div",{className:gr(Ie.avatarContainer,Ie.skeleton)}),te.createElement("div",{className:Ie.textSkeleton},te.createElement("div",{className:gr(Ie.nameSkeleton,Ie.skeleton)}),te.createElement("div",{className:gr(Ie.timeSkeleton,Ie.skeleton)})))))),te.createElement("div",{className:Ie.contentWrapper},te.createElement("div",{className:gr(Ie.mediaContainer,Ie.skeleton)}))));var AF=({mediaType:e,hyperLink:t,width:o="100%",height:r="100%",onPlay:n,onPause:i,avatar:a,title:s,duration:l=5e3,isOfficial:c=!0,imageMode:p})=>{var B,z,V,K;let[u,g]=useState(!0),[f,y]=useState(0),[C,v]=useState([]),h=useRef(null),x=useRef(null),[b,M]=useState(!0),[I,w]=useState(!1),k,S=()=>{g(!0),n&&n();},L=()=>{g(!1),i&&i();},D=()=>{(e==null?void 0:e.type)==="video"&&h.current?(h.current.currentTime=0,h.current.play()):(e==null?void 0:e.type)==="image"&&g(!1);},H=()=>{(e==null?void 0:e.type)==="video"&&h.current&&(h.current.currentTime=0,h.current.play(),y(0));},$=()=>{u?(L(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.pause()):(S(),(e==null?void 0:e.type)==="video"&&h.current&&h.current.play());};return useEffect(()=>{let U=j=>_(void 0,null,function*(){let Z=new Image;Z.crossOrigin="Anonymous",Z.src=j,Z.onload=()=>{let Q=new Lde().getPalette(Z,2);if(Q){let T=Q.map(F=>`rgb(${F[0]}, ${F[1]}, ${F[2]})`);v(T),M(!1);}},Z.onerror=()=>{console.error("Error loading image for color extraction"),v([]),M(!1);};});return e!=null&&e.url&&(e==null?void 0:e.type)==="image"?U(e.url):(v([]),M(!1)),()=>{v([]),M(!0);}},[e==null?void 0:e.url]),useEffect(()=>(u?k=setInterval(()=>{if((e==null?void 0:e.type)==="video"&&h.current){let U=h.current.currentTime,j=h.current.duration,Z=U/j*100;y(Z),Z>=100&&(clearInterval(k),D());}else (e==null?void 0:e.type)==="image"&&I&&y(U=>U>=100?(clearInterval(k),D(),100):U+100/(l/100));},100):clearInterval(k),()=>{clearInterval(k);}),[u,e,l,I]),b?te.createElement(EF,null):te.createElement("div",{className:Ie.storyPreviewWrapper,style:{width:o,height:r}},te.createElement("div",{className:Ie.storyPreviewContainer},te.createElement("div",{className:Ie.headerContainer},te.createElement("div",{className:Ie.progressBar},te.createElement("div",{className:Ie.progressFill,style:{width:`${f}%`}})),te.createElement("div",{className:Ie.headerContent},te.createElement("div",{className:Ie.userInfo},te.createElement("div",{className:Ie.userInfoContent},te.createElement("div",{className:Ie.avatarContainer},te.createElement(bt,{avatarUrl:a,defaultImage:te.createElement(Bu,null)})),te.createElement(N.BodyBold,{className:Ie.storyPreviewTitle},te.createElement("span",{className:Ie.nameContainer},s," ",c&&te.createElement(p1,{fill:"white"})))),(e==null?void 0:e.type)==="video"&&te.createElement("div",{onClick:$},u?te.createElement(As,{width:24,height:24}):te.createElement(To,{width:24,height:24}))))),te.createElement("div",{className:Ie.contentWrapper},te.createElement("div",{className:Ie.mediaContainer,style:{background:`linear-gradient(
|
|
5391
5391
|
180deg,
|
|
5392
5392
|
${C[0]||"#000"} 0%,
|
|
5393
5393
|
${C[1]||"#000"} 100%
|
|
5394
|
-
)`}},(e==null?void 0:e.type)==="video"?te.createElement("video",{ref:h,src:e.url,className:Ie.media,loop:!0,autoPlay:!0,muted:!0,onEnded:H}):te.createElement(te.Fragment,null,!b&&C.length>0&&te.createElement("img",{ref:x,src:e==null?void 0:e.url,alt:"Story",onLoad:()=>w(!0),className:gr(Ie.media,{[Ie.imageFit]:p==="fit",[Ie.imageCover]:p==="fill"})})),te.createElement("div",{className:Ie.shadowOverlay})),te.createElement("div",{className:Ie.hyperLinkContainer},((z=(B=t[0])==null?void 0:B.data)==null?void 0:z.url)&&te.createElement(vi,{href:t[0].data.url.startsWith("http")?t[0].data.url:`https://${t[0].data.url}`,target:"_blank",rel:"noopener noreferrer"},te.createElement(yw,{lines:1},te.createElement("span",null,((K=(V=t[0])==null?void 0:V.data)==null?void 0:K.customText)||t[0].data.url)))))))};var Ze={containerWrapper:"
|
|
5394
|
+
)`}},(e==null?void 0:e.type)==="video"?te.createElement("video",{ref:h,src:e.url,className:Ie.media,loop:!0,autoPlay:!0,muted:!0,onEnded:H}):te.createElement(te.Fragment,null,!b&&C.length>0&&te.createElement("img",{ref:x,src:e==null?void 0:e.url,alt:"Story",onLoad:()=>w(!0),className:gr(Ie.media,{[Ie.imageFit]:p==="fit",[Ie.imageCover]:p==="fill"})})),te.createElement("div",{className:Ie.shadowOverlay})),te.createElement("div",{className:Ie.hyperLinkContainer},((z=(B=t[0])==null?void 0:B.data)==null?void 0:z.url)&&te.createElement(vi,{href:t[0].data.url.startsWith("http")?t[0].data.url:`https://${t[0].data.url}`,target:"_blank",rel:"noopener noreferrer"},te.createElement(yw,{lines:1},te.createElement("span",null,((K=(V=t[0])==null?void 0:V.data)==null?void 0:K.customText)||t[0].data.url)))))))};var Ze={containerWrapper:"Uu",storyPreviewAvatar:"Du",storyPreviewContainer:"d",thumbnailMedia:"B",thumbnailInfo:"Fu",userInfo:"Hu",storyPreviewTitle:"Lu",nameContainer:"Tu",hyperLinkContainer:"Vu",hyperlink__icon:"qu",hyperlink:"Gu",thumbnailImage:"Ju",imageFit:"Ku",imageCover:"Nu",hyperlinkPosition:"Ou",hyperlinkIcon:"Pu",hyperlinkText:"Qu",header:"Wu",skeleton:"Zu",pulse:"Vr",avatarSkeleton:"_u",textSkeleton:"e1",nameSkeleton:"r1",timeSkeleton:"a1",skeletonContainer:"o1",shadowOverlay:"t1",fallbackThumbnail:"i1"};var DF=()=>te.createElement("div",{className:gr(Ze.skeletonContainer,Ze.skeleton)},te.createElement("div",{className:Ze.header},te.createElement("div",{className:gr(Ze.avatarSkeleton,Ze.skeleton)}),te.createElement("div",{className:Ze.textSkeleton},te.createElement("div",{className:gr(Ze.nameSkeleton,Ze.skeleton)}),te.createElement("div",{className:gr(Ze.timeSkeleton,Ze.skeleton)}))));var FF=({thumbnailUrl:e,hyperLink:t,avatar:o,title:r,isOfficial:n=!1,onClick:i,imageMode:a="fill"})=>{var C,v,h,x;let[s,l]=useState(""),[c,p]=useState(!1),[u,g]=useState(!0),f=useRef(null);useEffect(()=>{if(g(!0),p(!1),!e){l(""),p(!0),g(!1);return}let b=new Image;return b.crossOrigin="anonymous",b.src=e,b.onload=()=>{if(f.current){let M=new Lde;try{let I=M.getPalette(b,2);if(I){let w=`linear-gradient(
|
|
5395
5395
|
180deg,
|
|
5396
5396
|
rgb(${I[0].join(",")}) 0%,
|
|
5397
5397
|
rgb(${I[1].join(",")}) 100%
|
|
5398
|
-
)`;l(w);}}catch(I){console.error("Error extracting colors:",I),l("");}}g(!1);},b.onerror=()=>{p(!0),g(!1);},()=>{b.onload=null,b.onerror=null;}},[e]);let y=()=>c||!e?te.createElement("div",{className:Ze.fallbackThumbnail},te.createElement(N.Body,null,"No Image Available")):te.createElement(te.Fragment,null,te.createElement("img",{ref:f,src:e,alt:"Story Thumbnail",className:gr(Ze.thumbnailImage,{[Ze.imageFit]:a==="fit",[Ze.imageCover]:a==="fill"}),crossOrigin:"anonymous"}),te.createElement("div",{className:Ze.shadowOverlay}));return u?te.createElement(DF,null):te.createElement("div",{className:Ze.containerWrapper,onClick:i,style:{background:s||"#000"}},te.createElement("div",{className:Ze.storyPreviewContainer},te.createElement("div",{className:Ze.thumbnailMedia},y()),te.createElement("div",{className:Ze.thumbnailInfo},te.createElement("div",{className:Ze.userInfo},te.createElement("div",{className:Ze.storyPreviewAvatar},te.createElement(bt,{avatarUrl:o,defaultImage:te.createElement(Bu,null)})),te.createElement(N.BodyBold,{className:Ze.storyPreviewTitle},te.createElement("span",{className:Ze.nameContainer},te.createElement(yw,{lines:1},te.createElement("span",null,r))," ",n&&te.createElement(p1,{width:12,height:12,fill:"white"}))))),((v=(C=t[0])==null?void 0:C.data)==null?void 0:v.url)&&te.createElement("a",{href:t[0].data.url,className:gr(Ze.hyperlink,Ze.hyperlinkPosition)},te.createElement(Md,{className:Ze.hyperlinkIcon}),te.createElement("span",{className:Ze.hyperlinkText},((x=(h=t[0])==null?void 0:h.data)==null?void 0:x.customText)||t[0].data.url))))};var yue=({type:e,targetId:t})=>{let o="story_page",{AmityStoryViewPageBehavior:r}=It(),{onBack:n,goToViewStoryPage:i,goToDraftStoryPage:a,onClickCommunity:s}=Be();return e==="communityFeed"?te.createElement(ru,{pageId:o,communityId:t,onBack:n,onClose:l=>s(l),onSwipeDown:l=>s(l),onClickCommunity:l=>s(l),goToDraftStoryPage:(l,c,p,u)=>a(l,c,p,u)}):e==="globalFeed"?te.createElement(nu,{pageId:o,targetId:t,onChangePage:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClose:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onSwipeDown:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClickStory:l=>i({storyType:"globalFeed",targetId:l,targetType:"community"}),goToDraftStoryPage:(l,c,p,u)=>a(l,c,p,u),onClickCommunity:l=>s(l)}):null},E9=yue;var Ai={selectStoryTargetPage:"l1",selectStoryTargetPage__topBar:"s1",selectStoryTargetPage__timeline:"c1",selectStoryTargetPage__line:"n1",selectStoryTargetPage__myCommunities__container:"d1",selectStoryTargetPage__myCommunities:"m1",selectStoryTargetPage__communityAvatar:"p1",selectStoryTargetPage__closeButton:"g1",selectStoryTargetPage__title:"h1"};function B9(){let e="select_story_target_page",{themeStyles:t}=Re({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityStoryTargetSelectionPage:s}=It(),{file:l,setFile:c}=yi(),[p,u]=useState(null),[g,f]=useState(null),y=h=>{f(h);},C=h=>{h&&h.length>0&&g&&c(h[0]);},v=r.map(h=>te.createElement(FileTrigger,{key:h.communityId,onSelect:C},te.createElement(O,{onPress:()=>y(h.communityId)},te.createElement("div",{className:Ai.selectStoryTargetPage__myCommunities},te.createElement("div",{className:Ai.selectStoryTargetPage__communityAvatar},te.createElement(Zr,{pageId:e,community:h})),te.createElement(pa,{pageId:e,community:h}),te.createElement("div",null,h.isOfficial&&te.createElement(S1,null),!h.isPublic&&te.createElement(N1,null))))));return Bo({onIntersect:()=>{n&&a===!1&&i();},node:p}),useEffect(()=>{var h;l&&((h=s==null?void 0:s.goToStoryCreationPage)==null||h.call(s,{targetId:g,targetType:"community",mediaType:l&&(l!=null&&l.type.includes("image"))?{type:"image",url:URL.createObjectURL(l)}:{type:"video",url:URL.createObjectURL(l)},storyType:"globalFeed"}));},[l]),te.createElement("div",{className:Ai.selectStoryTargetPage,style:t},te.createElement("div",{className:Ai.selectStoryTargetPage__topBar},te.createElement(Nr,{imgClassName:Ai.selectStoryTargetPage__closeButton,pageId:e,onPress:o}),te.createElement(F1,{pageId:e,titleClassName:Ai.selectStoryTargetPage__title}),te.createElement("div",null)),te.createElement("div",{className:Ai.selectStoryTargetPage__line}),te.createElement("div",{className:Ai.selectStoryTargetPage__myCommunities},"My Communities"),te.createElement("div",{className:Ai.selectStoryTargetPage__myCommunities__container},v),te.createElement("div",{ref:h=>u(h)}))}var Di={selectPostTargetPage:"f1",selectPostTargetPage__topBar:"b1",selectPostTargetPage__timeline:"u1",selectPostTargetPage__line:"v1",selectPostTargetPage__myCommunities:"x1",selectPostTargetPage__communityAvatar:"w1",selectPostTargetPage__closeButton:"y1",selectPostTargetPage__title:"k1"};var L9={myTimelineAvatar:"j1",myTimelineAvatar__userAvatar:"z1"};function A9({pageId:e="*",componentId:t="*",userId:o}){let r="my_timeline_avatar",{accessibilityId:n,isExcluded:i}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement("div",{className:L9.myTimelineAvatar,"data-qa-anchor":n},te.createElement(Wo,{className:L9.myTimelineAvatar__userAvatar,userId:o}))}var $F={myTimelineText:"X1"};function D9({pageId:e="*",componentId:t="*"}){let o="my_timeline_text",{accessibilityId:r,config:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:o});return i?null:te.createElement(N.Body,{className:$F.myTimelineText,style:d({},a),"data-qa-anchor":r},n.text)}function H9(){let e="select_post_target_page",{themeStyles:t}=Re({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityPostTargetSelectionPage:s}=It(),[l,c]=useState(null),{currentUserId:p}=De(),{user:u}=Cr(p);Bo({onIntersect:()=>{n&&a===!1&&i();},node:l});let g=r.map(f=>te.createElement("div",{onClick:()=>{var y;(y=s==null?void 0:s.goToPostComposerPage)==null||y.call(s,{targetId:f.communityId,targetType:"community",mode:"create",community:f});},key:f.communityId,className:Di.selectPostTargetPage__timeline},te.createElement("div",{className:Di.selectPostTargetPage__communityAvatar},te.createElement(Zr,{pageId:e,community:f})),te.createElement(pa,{pageId:e,community:f}),te.createElement("div",null,f.isOfficial&&te.createElement(S1,null),!f.isPublic&&te.createElement(N1,null))));return te.createElement("div",{className:Di.selectPostTargetPage,style:t},te.createElement("div",{className:Di.selectPostTargetPage__topBar},te.createElement(Nr,{imgClassName:Di.selectPostTargetPage__closeButton,pageId:e,onPress:o}),te.createElement(F1,{pageId:e,titleClassName:Di.selectPostTargetPage__title}),te.createElement("div",null)),te.createElement(O,{onPress:()=>{var f;(f=s==null?void 0:s.goToPostComposerPage)==null||f.call(s,{mode:"create",targetId:null,targetType:"user",community:void 0});},className:Di.selectPostTargetPage__timeline},te.createElement(A9,{pageId:e,userId:u==null?void 0:u.userId}),te.createElement(D9,{pageId:e})),te.createElement("div",{className:Di.selectPostTargetPage__line}),te.createElement("div",{className:Di.selectPostTargetPage__myCommunities},"My Communities"),g,te.createElement("div",{ref:f=>c(f)}))}var VF={myCommunitiesSearchPage:"Y1"};function zc(e,t){let n=pt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return d({communities:o},r)}function O9(){let e="my_communities_search_page",{themeStyles:t}=Re({pageId:e}),[o,r]=useState(""),{communities:n,isLoading:i,hasMore:a,loadMore:s}=zc({displayName:o,limit:20,membership:"member"});return te.createElement("div",{className:VF.myCommunitiesSearchPage,style:t},te.createElement(Wm,{pageId:e,search:l=>r(l)}),o.length>0&&te.createElement(hs,{pageId:e,communityCollection:n,isLoading:i,onLoadMore:()=>{a&&i===!1&&s();}}))}var jF={socialGlobalSearchPage:"C1",socialGlobalSearchPage__tabs:"A1",socialGlobalSearchPage__postContents:"M1"};var Du={tabsRoot:"S1",tabsList:"E1",tabsTrigger:"qr"};var U9=({tabs:e,activeTab:t,onTabChange:o,pageId:r="*",componentId:n="*",elementId:i="*"})=>{let{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:r,componentId:n,elementId:i});return te.createElement(ks.Root,{style:u,className:Du.tabsRoot,value:t,onValueChange:g=>o(g)},te.createElement(ks.List,{className:Du.tabsList},e.map(g=>te.createElement(ks.Trigger,{value:g.value,className:Du.tabsTrigger},te.createElement(N.Title,null,g.label)))),e.map(g=>te.createElement(ks.Content,{value:g.value},g.content())))};var Bue=()=>{let[e,t]=useState(""),[o,r]=useState("community"),n=useMemo(()=>o==="user"&&e.length>0,[o,e]),i=zc({displayName:e,limit:20},o==="community"&&e.length>0),a=dl({displayName:e,limit:20,enabled:n}),s=useCallback(l=>{t(l);},[t]);return {userCollection:a,communityCollection:i,searchType:o,search:s,searchValue:e,setSearchType:r}};function $9(){let e="social_global_search_page",{themeStyles:t}=Re({pageId:e}),[o,r]=useState("communities"),{userCollection:n,communityCollection:i,search:a,searchValue:s,setSearchType:l}=Bue(),c=[{value:"communities",label:"Communities",content:()=>te.createElement(hs,{pageId:e,communityCollection:i.communities,isLoading:i.isLoading,onLoadMore:()=>{i.hasMore&&i.isLoading===!1&&i.loadMore();}})},{value:"users",label:"Users",content:()=>te.createElement(x5,{pageId:e,userCollection:n.users,isLoading:n.isLoading,onLoadMore:()=>{n.hasMore&&n.isLoading===!1&&n.loadMore();}})}];return te.createElement("div",{className:jF.socialGlobalSearchPage,style:t},te.createElement(Wm,{pageId:e,search:a}),s.length>0&&te.createElement(U9,{pageId:e,tabs:c,activeTab:o,onTabChange:p=>{r(p),l(p==="communities"?"community":"user");}}))}var Kn={postDetailPage:"I1",postDetailPage__container:"Gr",postDetailPage__topBar:"R1",postDetailPage__topBar__title:"U1",postDetailPage__topBar__menuBar:"B1",postDetailPage__backIcon:"D1",postDetailPage__comments__divider:"Jr","skeleton-pulse":"Kr",postDetailPage__reactions_and_comments:"F1",postDetailPage__reactionsBar:"H1",postDetailPage__commentsCount:"L1",postDetailPage__comments:"T1",postDetailPage__divider:"V1",postDetailPage__notMember:"q1"};function V9({id:e,hideTarget:t,category:o}){let r="post_detail_page",{post:n,isLoading:i}=_i(e),{themeStyles:a}=Re({pageId:r}),{onBack:s}=Be(),[l,c]=useState(),{setDrawerData:p,removeDrawerData:u}=qm(),{community:g}=_t({communityId:(n==null?void 0:n.targetType)==="community"?n.targetId:null});return te.createElement("div",{className:Kn.postDetailPage,style:a},te.createElement("div",{className:Kn.postDetailPage__container},te.createElement("div",null,i?te.createElement(ac,{pageId:r}):n?te.createElement(hn,{pageId:r,post:n,category:o!=null?o:"general",style:"detail",hideTarget:t}):null),te.createElement("div",{className:Kn.postDetailPage__comments__divider,"data-is-loading":i}),te.createElement("div",{className:Kn.postDetailPage__comments},n&&te.createElement(Od,{referenceId:n.postId,referenceType:"post",onClickReply:f=>c(f)}))),te.createElement("div",{className:Kn.postDetailPage__topBar},te.createElement(Mm,{pageId:r,defaultClassName:Kn.postDetailPage__backIcon,onPress:()=>s()}),te.createElement(N.Title,{className:Kn.postDetailPage__topBar__title},"Post"),te.createElement("div",{className:Kn.postDetailPage__topBar__menuBar},te.createElement(ec,{pageId:r,onClick:()=>p({content:te.createElement(N5,{post:n,onCloseMenu:()=>u(),pageId:r})})}))),(n==null?void 0:n.targetType)==="community"&&!(g!=null&&g.isJoined)?te.createElement("div",null,te.createElement("div",{className:Kn.postDetailPage__divider}),te.createElement(N.Body,{className:Kn.postDetailPage__notMember},"Join community to interact with all posts")):n&&te.createElement(Ed,{referenceId:n.postId,referenceType:"post",replyTo:l,onCancelReply:()=>c(void 0),community:g}))}var Hu={communityProfilePage__container:"G1",communityProfilePage__header:"J1",communityProfilePage__content:"K1",communityProfilePage__refreshIndicator:"N1",communityProfilePage__tabContainer:"Nr",sticky:"O1",communityProfilePage__createPostButton:"P1",communityProfilePage__pullToRefresh:"Q1",communityProfilePage__pullToRefresh__spinner:"W1",spin:"Z1"};var Vo={communityProfileSkeleton__container:"_1",communityProfileSkeleton__headerImage:"Or",communityProfileSkeleton__content:"ev",communityProfileSkeleton__title:"Pr",communityProfileSkeleton__category__container:"rv",communityProfileSkeleton__category__item:"av",communityProfileSkeleton__description:"Qr",communityProfileSkeleton__communityInfo__container:"ov",communityProfileSkeleton__communityInfo__info:"tv",communityProfileSkeleton__storyTab:"iv",communityProfileSkeleton__storyTab__title:"lv",pulse:"Wr",communityProfileSkeleton__tag:"sv",communityProfileSkeleton__stat:"cv",communityProfileSkeleton__avatar:"nv",communityProfileSkeleton__username:"dv"};var GF=()=>te.createElement("div",{className:Vo.communityProfileSkeleton__container},te.createElement("div",{className:Vo.communityProfileSkeleton__headerImage}),te.createElement("div",{className:Vo.communityProfileSkeleton__content},te.createElement("div",{className:Vo.communityProfileSkeleton__title}),te.createElement("div",{className:Vo.communityProfileSkeleton__category__container},te.createElement("div",{className:Vo.communityProfileSkeleton__category__item}),te.createElement("div",{className:Vo.communityProfileSkeleton__category__item}),te.createElement("div",{className:Vo.communityProfileSkeleton__category__item})),te.createElement("div",{className:Vo.communityProfileSkeleton__description}),te.createElement("div",{className:Vo.communityProfileSkeleton__description}),te.createElement("div",{className:Vo.communityProfileSkeleton__communityInfo__container},te.createElement("div",{className:Vo.communityProfileSkeleton__communityInfo__info}),te.createElement("div",{className:Vo.communityProfileSkeleton__communityInfo__info})),te.createElement("div",{className:Vo.communityProfileSkeleton__storyTab}),te.createElement("div",{className:Vo.communityProfileSkeleton__storyTab__title})));var Fu={emptyPinnedPost__container:"mv",emptyPinnedPost__text:"pv",emptyPinnedPost__icon:"gv"};var G9=({pageId:e="*"})=>{let t="empty_pinned_post",{config:o,accessibilityId:r,isExcluded:n,themeStyles:i}=re({pageId:e,componentId:t});return n?null:te.createElement("div",{"data-qa-anchor":r,className:Fu.emptyPinnedPost__container,style:i},te.createElement(q5,{className:Fu.emptyPinnedPost__icon}),te.createElement(N.Title,{className:Fu.emptyPinnedPost__text},"No pinned post yet"))};var Ou={communityPin__container:"hv",communityPin__feed:"fv"};var Z9=({pageId:e="*",communityId:t})=>{let o="community_pin",{accessibilityId:r,themeStyles:n,isExcluded:i}=re({pageId:e,componentId:o});if(i)return null;let{community:a}=_t({communityId:t,shouldCall:!!t}),{AmityCommunityProfilePageBehavior:s}=It();yc({communityId:t,level:SubscriptionLevels.POST});let{pinnedPost:l,isLoading:c,refresh:p}=hc({communityId:t}),u=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic);useEffect(()=>{p();},[]);let g=l.filter(h=>h.placement==="announcement"&&l.some(x=>x.placement==="default"&&x.referenceId===h.referenceId)),f=l.filter(h=>h.placement==="default").filter(h=>!g.some(x=>x.referenceId===h.referenceId)),y=l.filter(h=>h.placement==="default"),C=()=>c?te.createElement(Cc,null):g&&g.map(({post:h})=>te.createElement(O,{onPress:()=>{var x;(x=s==null?void 0:s.goToPostDetailPage)==null||x.call(s,{postId:h.postId,hideTarget:!0,category:"pin_and_announcement"});},className:Ou.communityPin__feed},te.createElement(hn,{key:h.postId,post:h,category:"pin_and_announcement",style:"feed",hideTarget:!0,onClick:()=>{var x;return (x=s==null?void 0:s.goToPostDetailPage)==null?void 0:x.call(s,{postId:h.postId,hideTarget:!0,category:h.category})},onPostDeleted:()=>p()}))),v=()=>{let h=g.length>0?f:y;return c?te.createElement(Cc,null):h.map(({post:x})=>te.createElement(O,{onPress:()=>{var b;(b=s==null?void 0:s.goToPostDetailPage)==null||b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"});},className:Ou.communityPin__feed},te.createElement(hn,{key:x.postId,post:x,category:"pin",style:"feed",hideTarget:!0,onClick:()=>{var b;return (b=s==null?void 0:s.goToPostDetailPage)==null?void 0:b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"})},onPostDeleted:()=>p()})))};return te.createElement("div",{"data-qa-anchor":r,className:Ou.communityPin__container,style:n},u||a!=null&&a.isPublic?l.length>0?te.createElement(te.Fragment,null,C(),v()):te.createElement(G9,null):te.createElement(fc,null))};var ZF=({props:e,className:t})=>te.createElement("div",{className:t},te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),te.createElement("defs",null,te.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},te.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),te.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"})))));var Q9=({communityId:e})=>{let{activeTab:t}=V5(),o="community_profile_page",{themeStyles:r,accessibilityId:n}=Re({pageId:o}),{community:i}=_t({communityId:e,shouldCall:!!e}),a=useRef(null),s=useRef(0),[l,c]=useState(0),[p,u]=useState(0),g=()=>{switch(t){case"community_feed":return te.createElement(J5,{pageId:o,communityId:e});case"community_pin":return te.createElement(Z9,{pageId:o,communityId:e});default:return null}},f=()=>_(void 0,null,function*(){u(y=>y+1);});return te.createElement("div",{ref:a,"data-qa-anchor":n,className:Hu.communityProfilePage__container,style:r,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{s.current=y.touches[0].clientY;},onTouchMove:y=>{let C=y.touches[0].clientY;s.current>C||c(Math.min(C-s.current,100));},onTouchEnd:y=>{s.current=0,l>=75&&f(),c(0);}},te.createElement("div",{style:{"--asc-pull-to-refresh-height":`${l}px`},className:Hu.communityProfilePage__pullToRefresh},te.createElement(ZF,{className:Hu.communityProfilePage__pullToRefresh__spinner})),i?te.createElement(W5,{community:i}):te.createElement(GF,null),te.createElement("div",{key:p},g()))};
|
|
5398
|
+
)`;l(w);}}catch(I){console.error("Error extracting colors:",I),l("");}}g(!1);},b.onerror=()=>{p(!0),g(!1);},()=>{b.onload=null,b.onerror=null;}},[e]);let y=()=>c||!e?te.createElement("div",{className:Ze.fallbackThumbnail},te.createElement(N.Body,null,"No Image Available")):te.createElement(te.Fragment,null,te.createElement("img",{ref:f,src:e,alt:"Story Thumbnail",className:gr(Ze.thumbnailImage,{[Ze.imageFit]:a==="fit",[Ze.imageCover]:a==="fill"}),crossOrigin:"anonymous"}),te.createElement("div",{className:Ze.shadowOverlay}));return u?te.createElement(DF,null):te.createElement("div",{className:Ze.containerWrapper,onClick:i,style:{background:s||"#000"}},te.createElement("div",{className:Ze.storyPreviewContainer},te.createElement("div",{className:Ze.thumbnailMedia},y()),te.createElement("div",{className:Ze.thumbnailInfo},te.createElement("div",{className:Ze.userInfo},te.createElement("div",{className:Ze.storyPreviewAvatar},te.createElement(bt,{avatarUrl:o,defaultImage:te.createElement(Bu,null)})),te.createElement(N.BodyBold,{className:Ze.storyPreviewTitle},te.createElement("span",{className:Ze.nameContainer},te.createElement(yw,{lines:1},te.createElement("span",null,r))," ",n&&te.createElement(p1,{width:12,height:12,fill:"white"}))))),((v=(C=t[0])==null?void 0:C.data)==null?void 0:v.url)&&te.createElement("a",{href:t[0].data.url,className:gr(Ze.hyperlink,Ze.hyperlinkPosition)},te.createElement(Md,{className:Ze.hyperlinkIcon}),te.createElement("span",{className:Ze.hyperlinkText},((x=(h=t[0])==null?void 0:h.data)==null?void 0:x.customText)||t[0].data.url))))};var yue=({type:e,targetId:t})=>{let o="story_page",{AmityStoryViewPageBehavior:r}=It(),{onBack:n,goToViewStoryPage:i,goToDraftStoryPage:a,onClickCommunity:s}=Be();return e==="communityFeed"?te.createElement(ru,{pageId:o,communityId:t,onBack:n,onClose:l=>s(l),onSwipeDown:l=>s(l),onClickCommunity:l=>s(l),goToDraftStoryPage:(l,c,p,u)=>a(l,c,p,u)}):e==="globalFeed"?te.createElement(nu,{pageId:o,targetId:t,onChangePage:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClose:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onSwipeDown:()=>{var l;return (l=r==null?void 0:r.onCloseAction)==null?void 0:l.call(r)},onClickStory:l=>i({storyType:"globalFeed",targetId:l,targetType:"community"}),goToDraftStoryPage:(l,c,p,u)=>a(l,c,p,u),onClickCommunity:l=>s(l)}):null},E9=yue;var Ai={selectStoryTargetPage:"l1",selectStoryTargetPage__topBar:"s1",selectStoryTargetPage__timeline:"c1",selectStoryTargetPage__line:"n1",selectStoryTargetPage__myCommunities__container:"d1",selectStoryTargetPage__myCommunities:"m1",selectStoryTargetPage__communityAvatar:"p1",selectStoryTargetPage__closeButton:"g1",selectStoryTargetPage__title:"h1"};function B9(){let e="select_story_target_page",{themeStyles:t}=Re({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityStoryTargetSelectionPage:s}=It(),{file:l,setFile:c}=yi(),[p,u]=useState(null),[g,f]=useState(null),y=h=>{f(h);},C=h=>{h&&h.length>0&&g&&c(h[0]);},v=r.map(h=>te.createElement(FileTrigger,{key:h.communityId,onSelect:C},te.createElement(O,{onPress:()=>y(h.communityId)},te.createElement("div",{className:Ai.selectStoryTargetPage__myCommunities},te.createElement("div",{className:Ai.selectStoryTargetPage__communityAvatar},te.createElement(Zr,{pageId:e,community:h})),te.createElement(pa,{pageId:e,community:h}),te.createElement("div",null,h.isOfficial&&te.createElement(S1,null),!h.isPublic&&te.createElement(N1,null))))));return Bo({onIntersect:()=>{n&&a===!1&&i();},node:p}),useEffect(()=>{var h;l&&((h=s==null?void 0:s.goToStoryCreationPage)==null||h.call(s,{targetId:g,targetType:"community",mediaType:l&&(l!=null&&l.type.includes("image"))?{type:"image",url:URL.createObjectURL(l)}:{type:"video",url:URL.createObjectURL(l)},storyType:"globalFeed"}));},[l]),te.createElement("div",{className:Ai.selectStoryTargetPage,style:t},te.createElement("div",{className:Ai.selectStoryTargetPage__topBar},te.createElement(Nr,{imgClassName:Ai.selectStoryTargetPage__closeButton,pageId:e,onPress:o}),te.createElement(F1,{pageId:e,titleClassName:Ai.selectStoryTargetPage__title}),te.createElement("div",null)),te.createElement("div",{className:Ai.selectStoryTargetPage__line}),te.createElement("div",{className:Ai.selectStoryTargetPage__myCommunities},"My Communities"),te.createElement("div",{className:Ai.selectStoryTargetPage__myCommunities__container},v),te.createElement("div",{ref:h=>u(h)}))}var Di={selectPostTargetPage:"f1",selectPostTargetPage__topBar:"b1",selectPostTargetPage__timeline:"u1",selectPostTargetPage__line:"v1",selectPostTargetPage__myCommunities:"x1",selectPostTargetPage__communityAvatar:"w1",selectPostTargetPage__closeButton:"y1",selectPostTargetPage__title:"k1"};var L9={myTimelineAvatar:"j1",myTimelineAvatar__userAvatar:"z1"};function A9({pageId:e="*",componentId:t="*",userId:o}){let r="my_timeline_avatar",{accessibilityId:n,isExcluded:i}=A({pageId:e,componentId:t,elementId:r});return i?null:te.createElement("div",{className:L9.myTimelineAvatar,"data-qa-anchor":n},te.createElement(Wo,{className:L9.myTimelineAvatar__userAvatar,userId:o}))}var $F={myTimelineText:"X1"};function D9({pageId:e="*",componentId:t="*"}){let o="my_timeline_text",{accessibilityId:r,config:n,isExcluded:i,themeStyles:a}=A({pageId:e,componentId:t,elementId:o});return i?null:te.createElement(N.Body,{className:$F.myTimelineText,style:d({},a),"data-qa-anchor":r},n.text)}function H9(){let e="select_post_target_page",{themeStyles:t}=Re({pageId:e}),{onBack:o}=Be(),{communities:r,hasMore:n,loadMore:i,isLoading:a}=H1({queryParams:{sortBy:"displayName",limit:20,membership:"member"}}),{AmityPostTargetSelectionPage:s}=It(),[l,c]=useState(null),{currentUserId:p}=De(),{user:u}=Cr(p);Bo({onIntersect:()=>{n&&a===!1&&i();},node:l});let g=r.map(f=>te.createElement("div",{onClick:()=>{var y;(y=s==null?void 0:s.goToPostComposerPage)==null||y.call(s,{targetId:f.communityId,targetType:"community",mode:"create",community:f});},key:f.communityId,className:Di.selectPostTargetPage__timeline},te.createElement("div",{className:Di.selectPostTargetPage__communityAvatar},te.createElement(Zr,{pageId:e,community:f})),te.createElement(pa,{pageId:e,community:f}),te.createElement("div",null,f.isOfficial&&te.createElement(S1,null),!f.isPublic&&te.createElement(N1,null))));return te.createElement("div",{className:Di.selectPostTargetPage,style:t},te.createElement("div",{className:Di.selectPostTargetPage__topBar},te.createElement(Nr,{imgClassName:Di.selectPostTargetPage__closeButton,pageId:e,onPress:o}),te.createElement(F1,{pageId:e,titleClassName:Di.selectPostTargetPage__title}),te.createElement("div",null)),te.createElement(O,{onPress:()=>{var f;(f=s==null?void 0:s.goToPostComposerPage)==null||f.call(s,{mode:"create",targetId:null,targetType:"user",community:void 0});},className:Di.selectPostTargetPage__timeline},te.createElement(A9,{pageId:e,userId:u==null?void 0:u.userId}),te.createElement(D9,{pageId:e})),te.createElement("div",{className:Di.selectPostTargetPage__line}),te.createElement("div",{className:Di.selectPostTargetPage__myCommunities},"My Communities"),g,te.createElement("div",{ref:f=>c(f)}))}var VF={myCommunitiesSearchPage:"Y1"};function zc(e,t){let n=pt({fetcher:CommunityRepository.getCommunities,params:e,shouldCall:t}),{items:o}=n,r=P(n,["items"]);return d({communities:o},r)}function O9(){let e="my_communities_search_page",{themeStyles:t}=Re({pageId:e}),[o,r]=useState(""),{communities:n,isLoading:i,hasMore:a,loadMore:s}=zc({displayName:o,limit:20,membership:"member"});return te.createElement("div",{className:VF.myCommunitiesSearchPage,style:t},te.createElement(Wm,{pageId:e,search:l=>r(l)}),o.length>0&&te.createElement(hs,{pageId:e,communityCollection:n,isLoading:i,onLoadMore:()=>{a&&i===!1&&s();}}))}var jF={socialGlobalSearchPage:"C1",socialGlobalSearchPage__tabs:"S1",socialGlobalSearchPage__postContents:"A1"};var Du={tabsRoot:"M1",tabsList:"B1",tabsTrigger:"qr"};var U9=({tabs:e,activeTab:t,onTabChange:o,pageId:r="*",componentId:n="*",elementId:i="*"})=>{let{accessibilityId:a,config:s,defaultConfig:l,isExcluded:c,uiReference:p,themeStyles:u}=A({pageId:r,componentId:n,elementId:i});return te.createElement(ks.Root,{style:u,className:Du.tabsRoot,value:t,onValueChange:g=>o(g)},te.createElement(ks.List,{className:Du.tabsList},e.map(g=>te.createElement(ks.Trigger,{value:g.value,className:Du.tabsTrigger},te.createElement(N.Title,null,g.label)))),e.map(g=>te.createElement(ks.Content,{value:g.value},g.content())))};var Bue=()=>{let[e,t]=useState(""),[o,r]=useState("community"),n=useMemo(()=>o==="user"&&e.length>0,[o,e]),i=zc({displayName:e,limit:20},o==="community"&&e.length>0),a=dl({displayName:e,limit:20,enabled:n}),s=useCallback(l=>{t(l);},[t]);return {userCollection:a,communityCollection:i,searchType:o,search:s,searchValue:e,setSearchType:r}};function $9(){let e="social_global_search_page",{themeStyles:t}=Re({pageId:e}),[o,r]=useState("communities"),{userCollection:n,communityCollection:i,search:a,searchValue:s,setSearchType:l}=Bue(),c=[{value:"communities",label:"Communities",content:()=>te.createElement(hs,{pageId:e,communityCollection:i.communities,isLoading:i.isLoading,onLoadMore:()=>{i.hasMore&&i.isLoading===!1&&i.loadMore();}})},{value:"users",label:"Users",content:()=>te.createElement(x5,{pageId:e,userCollection:n.users,isLoading:n.isLoading,onLoadMore:()=>{n.hasMore&&n.isLoading===!1&&n.loadMore();}})}];return te.createElement("div",{className:jF.socialGlobalSearchPage,style:t},te.createElement(Wm,{pageId:e,search:a}),s.length>0&&te.createElement(U9,{pageId:e,tabs:c,activeTab:o,onTabChange:p=>{r(p),l(p==="communities"?"community":"user");}}))}var Kn={postDetailPage:"E1",postDetailPage__container:"Gr",postDetailPage__topBar:"I1",postDetailPage__topBar__title:"R1",postDetailPage__topBar__menuBar:"U1",postDetailPage__backIcon:"D1",postDetailPage__comments__divider:"Jr","skeleton-pulse":"Kr",postDetailPage__reactions_and_comments:"F1",postDetailPage__reactionsBar:"H1",postDetailPage__commentsCount:"L1",postDetailPage__comments:"T1",postDetailPage__divider:"V1",postDetailPage__notMember:"q1"};function V9({id:e,hideTarget:t,category:o}){let r="post_detail_page",{post:n,isLoading:i}=_i(e),{themeStyles:a}=Re({pageId:r}),{onBack:s}=Be(),[l,c]=useState(),{setDrawerData:p,removeDrawerData:u}=qm(),{community:g}=_t({communityId:(n==null?void 0:n.targetType)==="community"?n.targetId:null});return te.createElement("div",{className:Kn.postDetailPage,style:a},te.createElement("div",{className:Kn.postDetailPage__container},te.createElement("div",null,i?te.createElement(ac,{pageId:r}):n?te.createElement(hn,{pageId:r,post:n,category:o!=null?o:"general",style:"detail",hideTarget:t}):null),te.createElement("div",{className:Kn.postDetailPage__comments__divider,"data-is-loading":i}),te.createElement("div",{className:Kn.postDetailPage__comments},n&&te.createElement(Od,{referenceId:n.postId,referenceType:"post",onClickReply:f=>c(f)}))),te.createElement("div",{className:Kn.postDetailPage__topBar},te.createElement(Mm,{pageId:r,defaultClassName:Kn.postDetailPage__backIcon,onPress:()=>s()}),te.createElement(N.Title,{className:Kn.postDetailPage__topBar__title},"Post"),te.createElement("div",{className:Kn.postDetailPage__topBar__menuBar},te.createElement(ec,{pageId:r,onClick:()=>p({content:te.createElement(N5,{post:n,onCloseMenu:()=>u(),pageId:r})})}))),(n==null?void 0:n.targetType)==="community"&&!(g!=null&&g.isJoined)?te.createElement("div",null,te.createElement("div",{className:Kn.postDetailPage__divider}),te.createElement(N.Body,{className:Kn.postDetailPage__notMember},"Join community to interact with all posts")):n&&te.createElement(Ed,{referenceId:n.postId,referenceType:"post",replyTo:l,onCancelReply:()=>c(void 0),community:g}))}var Hu={communityProfilePage__container:"G1",communityProfilePage__header:"J1",communityProfilePage__content:"K1",communityProfilePage__refreshIndicator:"N1",communityProfilePage__tabContainer:"Nr",sticky:"O1",communityProfilePage__createPostButton:"P1",communityProfilePage__pullToRefresh:"Q1",communityProfilePage__pullToRefresh__spinner:"W1",spin:"Z1"};var Vo={communityProfileSkeleton__container:"_1",communityProfileSkeleton__headerImage:"Or",communityProfileSkeleton__content:"ev",communityProfileSkeleton__title:"Pr",communityProfileSkeleton__category__container:"rv",communityProfileSkeleton__category__item:"av",communityProfileSkeleton__description:"Qr",communityProfileSkeleton__communityInfo__container:"ov",communityProfileSkeleton__communityInfo__info:"tv",communityProfileSkeleton__storyTab:"iv",communityProfileSkeleton__storyTab__title:"lv",pulse:"Wr",communityProfileSkeleton__tag:"sv",communityProfileSkeleton__stat:"cv",communityProfileSkeleton__avatar:"nv",communityProfileSkeleton__username:"dv"};var GF=()=>te.createElement("div",{className:Vo.communityProfileSkeleton__container},te.createElement("div",{className:Vo.communityProfileSkeleton__headerImage}),te.createElement("div",{className:Vo.communityProfileSkeleton__content},te.createElement("div",{className:Vo.communityProfileSkeleton__title}),te.createElement("div",{className:Vo.communityProfileSkeleton__category__container},te.createElement("div",{className:Vo.communityProfileSkeleton__category__item}),te.createElement("div",{className:Vo.communityProfileSkeleton__category__item}),te.createElement("div",{className:Vo.communityProfileSkeleton__category__item})),te.createElement("div",{className:Vo.communityProfileSkeleton__description}),te.createElement("div",{className:Vo.communityProfileSkeleton__description}),te.createElement("div",{className:Vo.communityProfileSkeleton__communityInfo__container},te.createElement("div",{className:Vo.communityProfileSkeleton__communityInfo__info}),te.createElement("div",{className:Vo.communityProfileSkeleton__communityInfo__info})),te.createElement("div",{className:Vo.communityProfileSkeleton__storyTab}),te.createElement("div",{className:Vo.communityProfileSkeleton__storyTab__title})));var Fu={emptyPinnedPost__container:"mv",emptyPinnedPost__text:"pv",emptyPinnedPost__icon:"gv"};var G9=({pageId:e="*"})=>{let t="empty_pinned_post",{config:o,accessibilityId:r,isExcluded:n,themeStyles:i}=re({pageId:e,componentId:t});return n?null:te.createElement("div",{"data-qa-anchor":r,className:Fu.emptyPinnedPost__container,style:i},te.createElement(q5,{className:Fu.emptyPinnedPost__icon}),te.createElement(N.Title,{className:Fu.emptyPinnedPost__text},"No pinned post yet"))};var Ou={communityPin__container:"hv",communityPin__feed:"fv"};var Z9=({pageId:e="*",communityId:t})=>{let o="community_pin",{accessibilityId:r,themeStyles:n,isExcluded:i}=re({pageId:e,componentId:o});if(i)return null;let{community:a}=_t({communityId:t,shouldCall:!!t}),{AmityCommunityProfilePageBehavior:s}=It();yc({communityId:t,level:SubscriptionLevels.POST});let{pinnedPost:l,isLoading:c,refresh:p}=hc({communityId:t}),u=(a==null?void 0:a.isJoined)&&!(a!=null&&a.isPublic);useEffect(()=>{p();},[]);let g=l.filter(h=>h.placement==="announcement"&&l.some(x=>x.placement==="default"&&x.referenceId===h.referenceId)),f=l.filter(h=>h.placement==="default").filter(h=>!g.some(x=>x.referenceId===h.referenceId)),y=l.filter(h=>h.placement==="default"),C=()=>c?te.createElement(Cc,null):g&&g.map(({post:h})=>te.createElement(O,{onPress:()=>{var x;(x=s==null?void 0:s.goToPostDetailPage)==null||x.call(s,{postId:h.postId,hideTarget:!0,category:"pin_and_announcement"});},className:Ou.communityPin__feed},te.createElement(hn,{key:h.postId,post:h,category:"pin_and_announcement",style:"feed",hideTarget:!0,onClick:()=>{var x;return (x=s==null?void 0:s.goToPostDetailPage)==null?void 0:x.call(s,{postId:h.postId,hideTarget:!0,category:h.category})},onPostDeleted:()=>p()}))),v=()=>{let h=g.length>0?f:y;return c?te.createElement(Cc,null):h.map(({post:x})=>te.createElement(O,{onPress:()=>{var b;(b=s==null?void 0:s.goToPostDetailPage)==null||b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"});},className:Ou.communityPin__feed},te.createElement(hn,{key:x.postId,post:x,category:"pin",style:"feed",hideTarget:!0,onClick:()=>{var b;return (b=s==null?void 0:s.goToPostDetailPage)==null?void 0:b.call(s,{postId:x.postId,hideTarget:!0,category:"pin"})},onPostDeleted:()=>p()})))};return te.createElement("div",{"data-qa-anchor":r,className:Ou.communityPin__container,style:n},u||a!=null&&a.isPublic?l.length>0?te.createElement(te.Fragment,null,C(),v()):te.createElement(G9,null):te.createElement(fc,null))};var ZF=({props:e,className:t})=>te.createElement("div",{className:t},te.createElement("svg",d({xmlns:"http://www.w3.org/2000/svg",width:"21",height:"20",viewBox:"0 0 21 20",fill:"none"},e),te.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M11.1122 5C11.1122 5.39449 10.7924 5.71429 10.3979 5.71429C10.0035 5.71429 9.68366 5.39449 9.68366 5V0.714286C9.68366 0.319797 10.0035 0 10.3979 0C10.7924 0 11.1122 0.319797 11.1122 0.714286V5ZM8.25509 6.28846C8.59673 6.09122 8.71378 5.65437 8.51654 5.31273L6.37368 1.60119C6.17644 1.25955 5.73959 1.1425 5.39795 1.33975C5.05631 1.53699 4.93926 1.97384 5.1365 2.31548L7.27936 6.02702C7.4766 6.36865 7.91346 6.48571 8.25509 6.28846ZM6.42496 6.88141C6.7666 7.07865 6.88366 7.51551 6.68641 7.85714C6.48917 8.19878 6.05232 8.31583 5.71068 8.11859L1.99914 5.97573C1.6575 5.77849 1.54045 5.34164 1.7377 5C1.93494 4.65836 2.37179 4.54131 2.71343 4.73855L6.42496 6.88141ZM6.11224 10C6.11224 9.60551 5.79244 9.28571 5.39795 9.28571H1.11223C0.717746 9.28571 0.397949 9.60551 0.397949 10C0.397949 10.3945 0.717746 10.7143 1.11224 10.7143H5.39795C5.79244 10.7143 6.11224 10.3945 6.11224 10ZM5.71068 11.8814C6.05232 11.6842 6.48917 11.8012 6.68641 12.1429C6.88366 12.4845 6.7666 12.9213 6.42497 13.1186L2.71343 15.2614C2.37179 15.4587 1.93494 15.3416 1.7377 15C1.54045 14.6584 1.6575 14.2215 1.99914 14.0243L5.71068 11.8814ZM8.25509 13.7115C7.91345 13.5143 7.4766 13.6313 7.27936 13.973L5.1365 17.6845C4.93926 18.0262 5.05631 18.463 5.39795 18.6603C5.73959 18.8575 6.17644 18.7404 6.37368 18.3988L8.51654 14.6873C8.71378 14.3456 8.59673 13.9088 8.25509 13.7115ZM10.3979 14.2857C10.0035 14.2857 9.68366 14.6055 9.68366 15V19.2857C9.68366 19.6802 10.0035 20 10.3979 20C10.7924 20 11.1122 19.6802 11.1122 19.2857V15C11.1122 14.6055 10.7924 14.2857 10.3979 14.2857ZM12.5408 6.28846C12.8824 6.48571 13.3193 6.36865 13.5165 6.02702L15.6594 2.31548C15.8566 1.97384 15.7396 1.53699 15.3979 1.33975C15.0563 1.1425 14.6195 1.25956 14.4222 1.60119L12.2794 5.31273C12.0821 5.65437 12.1992 6.09122 12.5408 6.28846ZM15.0852 8.11859C14.7436 8.31583 14.3067 8.19878 14.1095 7.85714C13.9122 7.51551 14.0293 7.07866 14.3709 6.88141L18.0825 4.73855C18.4241 4.54131 18.861 4.65836 19.0582 5C19.2554 5.34164 19.1384 5.77849 18.7968 5.97573L15.0852 8.11859ZM14.6837 10C14.6837 10.3945 15.0035 10.7143 15.3979 10.7143H19.6837C20.0782 10.7143 20.3979 10.3945 20.3979 10C20.3979 9.60551 20.0782 9.28571 19.6837 9.28571H15.3979C15.0035 9.28571 14.6837 9.60551 14.6837 10ZM14.3709 13.1186C14.0293 12.9213 13.9122 12.4845 14.1095 12.1429C14.3067 11.8012 14.7436 11.6842 15.0852 11.8814L18.7968 14.0243C19.1384 14.2215 19.2554 14.6584 19.0582 15C18.861 15.3416 18.4241 15.4587 18.0825 15.2614L14.3709 13.1186ZM12.5408 13.7115C12.1992 13.9088 12.0821 14.3456 12.2794 14.6873L14.4222 18.3988C14.6195 18.7404 15.0563 18.8575 15.3979 18.6603C15.7396 18.463 15.8566 18.0262 15.6594 17.6845L13.5165 13.973C13.3193 13.6313 12.8824 13.5143 12.5408 13.7115Z",fill:"url(#paint0_angular_1709_10374)"}),te.createElement("defs",null,te.createElement("radialGradient",{id:"paint0_angular_1709_10374",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"translate(10.3979 10) scale(10)"},te.createElement("stop",{offset:"0.669733",stopColor:"#595F67"}),te.createElement("stop",{offset:"0.716307",stopColor:"#262626",stopOpacity:"0.01"})))));var Q9=({communityId:e})=>{let{activeTab:t}=V5(),o="community_profile_page",{themeStyles:r,accessibilityId:n}=Re({pageId:o}),{community:i}=_t({communityId:e,shouldCall:!!e}),a=useRef(null),s=useRef(0),[l,c]=useState(0),[p,u]=useState(0),g=()=>{switch(t){case"community_feed":return te.createElement(J5,{pageId:o,communityId:e});case"community_pin":return te.createElement(Z9,{pageId:o,communityId:e});default:return null}},f=()=>_(void 0,null,function*(){u(y=>y+1);});return te.createElement("div",{ref:a,"data-qa-anchor":n,className:Hu.communityProfilePage__container,style:r,onDrag:y=>y.stopPropagation(),onTouchStart:y=>{s.current=y.touches[0].clientY;},onTouchMove:y=>{let C=y.touches[0].clientY;s.current>C||c(Math.min(C-s.current,100));},onTouchEnd:y=>{s.current=0,l>=75&&f(),c(0);}},te.createElement("div",{style:{"--asc-pull-to-refresh-height":`${l}px`},className:Hu.communityProfilePage__pullToRefresh},te.createElement(ZF,{className:Hu.communityProfilePage__pullToRefresh__spinner})),i?te.createElement(W5,{community:i}):te.createElement(GF,null),te.createElement("div",{key:p},g()))};
|
|
5399
5399
|
|
|
5400
5400
|
export { fe as AmityAvatar, Dm as AmityCommentTrayComponent, J5 as AmityCommunityFeedComponent, W5 as AmityCommunityHeaderComponent, kL as AmityCommunityPinnedPostComponent, Q9 as AmityCommunityProfilePage, hs as AmityCommunitySearchResultComponent, u5 as AmityCreatePostMenuComponent, C5 as AmityDetailedMediaAttachmentComponent, Hf as AmityDraftStoryPage, Xm as AmityEmptyNewsFeedComponent, O6 as AmityExpandableText, L5 as AmityGlobalFeedComponent, yu as AmityLiveChatHeader, Su as AmityLiveChatMessageComposeBar, _u as AmityLiveChatMessageList, Iu as AmityLiveChatMessageQuickReaction, d9 as AmityLiveChatMessageReactionPicker, g9 as AmityLiveChatMessageReactionPreview, NF as AmityLiveChatPage, h5 as AmityMediaAttachmentComponent, E5 as AmityMyCommunitiesComponent, O9 as AmityMyCommunitiesSearchPage, A5 as AmityNewsFeedComponent, Hg as AmityPostComposerPage, X2 as AmityPostContainer, hn as AmityPostContentComponent, qa as AmityPostDetail, V9 as AmityPostDetailPage, Q6 as AmityPostEngagementBar, H9 as AmityPostTargetSelectionPage, Om as AmityReactionListComponent, $9 as AmitySocialGlobalSearchPage, sf as AmitySocialHomePage, F5 as AmitySocialHomePageTab, O5 as AmitySocialHomeTopNavigationComponent, AF as AmityStoryPreview, FF as AmityStoryPreviewThumbnail, $m as AmityStoryTabComponent, B9 as AmityStoryTargetSelectionPage, Wm as AmityTopSearchBarComponent, e9 as AmityUIKitManager, Jpe as AmityUiKitChat, s1 as AmityUiKitFeed, hY as AmityUiKitProvider, Zce as AmityUiKitSocial, x5 as AmityUserSearchResultComponent, E9 as AmityViewStoryPage, _d as ExplorePage, NH as amityAddChatMembers, EH as amityRemoveChatMembers, R as useAmityNavigation, ol as useAmitySDK, ne as useAmityUser };
|