@apolitical/component-library 4.1.11-4519.0 → 4.1.11-4519.1
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/index.js +1 -1
- package/index.mjs +19 -18
- package/package.json +1 -1
- package/user/member/member.d.ts +3 -1
package/index.js
CHANGED
|
@@ -34,7 +34,7 @@ Please explain why you're reporting this post. Reasons could include: inappropri
|
|
|
34
34
|
|
|
35
35
|
Thank you for helping to protect the Apolitical community from abusive content.`,discussion_form_title:"Write your {action}",discussion_form_placeholder:"Write a {action}...",discussion_form_label:"Your {action}",discussion_form_explainer:"Try to make your {action} specific and practical. Be respectful and kind. See our <a>community guidelines</a>",discussion_form_success:"Your {action} has been submitted.",discussion_form_post:"Post",discussion_form_posting:"Posting...",discussion_form_save:"Save",discussion_form_saving:"Saving...",discussion_form_cancel:"Cancel",discussion_form_submitting:"Submitting...",discussion_form_placeholder_post:"Write something...",discussion_form_error:"We are unable to process your {action} right now. Please try again later or contact us if the problem persists",discussion_form_error_tooLong:"Please keep your content to {maxLength, plural, one {1 character} other {# characters}}.",discussion_form_error_tooMany:"You have posted too many times in a row. Please wait and try again.",discussion_form_error_loggedOut:"Please log in to submit your {action}.",discussion_form_error_noPermission:"You do not have permission to {action}.",discussion_form_error_alreadyExists:"This {action} already exists.",discussion_form_title_question:"Start a conversation",discussion_form_placeholder_question:"Ask your question here",discussion_form_explainer_question:"Unsure what you can post? See our <a>community guidelines</a>.",discussion_likes:"{number, plural, =0 {0 likes} one {# like} other {# likes}}",discussion_likes_short:"{number}",discussion_likes_more:"and {number} more...",discussion_likes_like:"Like this {action}",discussion_likes_unlike:"Unlike {action}",discussion_likes_show:"Show who liked this {action}",discussion_moreMenu_edit:"Edit",discussion_moreMenu_delete:"Delete",discussion_moreMenu_report:"Report",discussion_comments_screenReader:"See {count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_comments:"{count, plural, =0 {0 comments} one {# comment} other {# comments}}",discussion_responses_answer:"Answers",discussion_responses_comment:"Comments",discussion_responses_title:"{action} ({count})",discussion_responses_empty:"Be the first to respond",discussion_responses_empty_answer:"Be the first to answer this question",discussion_responses_placeholder:"Write a comment...",discussion_thread_show:"Show {count} {count, select, 1 {reply} other {replies}}",discussion_thread_hide:"Hide replies",discussion_thread_loadMore:"Load more replies",contactFooter_title:"Contact us",contactFooter_text:"We're always open to new ideas, so please reach out to see how we can collaborate.",contactFooter_phone:"+44 203 608 2241",contactFooter_email:"hello@apolitical.co",contactForm_name:"Name",contactForm_email:"Email address",contactForm_organisation:"Government department or organisation",contactForm_interests:"I'm interested in",contactForm_interests_publishingCourse:"Publishing or creating a course",contactForm_interests_buyingCourse:"Buying courses for my team",contactForm_interests_learningExperience:"Customised learning experiences",contactForm_interests_somethingElse:"Something else",contactForm_message:"Message",dropdown_menu_multiselect_all:"All",dropdown_menu_multiselect_none:"None",emailHelperTextBox_fallback_title:"Who can join",emailHelperTextBox_fallback_text:"Apolitical is a private community for public servants and policymakers.",emailHelperTextBox_default_title:"Who can join",emailHelperTextBox_default_text:"Apolitical is a private community for public servants and policymakers. <link>Learn more</link>.",emailHelperTextBox_autoApproved_title:"Email check",emailHelperTextBox_autoApproved_text:"Great! Looks like you are using a **government email domain we recognise.** You will be **auto-approved** once you sign up.",emailHelperTextBox_unrecognisedEmail_title:"Not a recognised government email",emailHelperTextBox_unrecognisedEmail_text:"To confirm you work in government or policy, please add more details below. <link>Learn more</link>.",emailHelperTextBox_pendingApproval_title:"Email is pending approval",emailHelperTextBox_pendingApproval_text:"Looks like this email has been used to sign up to Apolitical before, but <strong>we have not yet approved it.</strong> If you cannot wait to join, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_emailUnverified_title:"Hello again!",emailHelperTextBox_emailUnverified_text:"It looks like you're already an Apolitical member. To access your account, please verify your email address. <link>Click here to get a verification code sent to your email</link>.",emailHelperTextBox_emailAlreadyExists_title:"Email is already registered",emailHelperTextBox_emailAlreadyExists_text:"Looks like this email has been used to sign up to Apolitical before, try <link>logging in</link> instead. If you're still having issues, contact <mail>concierge@apolitical.co</mail>.",emailHelperTextBox_error_verificationFailedToSend_title:"Verification code failed to send",emailHelperTextBox_error_verificationFailedToSend_text:"Error details: <em>{error}</em>{br}<link>Click here to try again</link>.{br}If you continue to have problems, contact us at <mail>concierge@apolitical.co</mail>",emailHelperTextBox_error_noFunction:"Cannot resend verification code.",form_fieldWrapper_required:"required",form_fieldWrapper_characterLimit:"Character limit:",form_fieldWrapper_characterLimit_aria_default:"You have {remaining, plural, =0 {no characters} one {1 character} other {# characters}} remaining.",form_fieldWrapper_characterLimit_aria_over:"You are {over, plural, one {1 character} other {# characters}} over the limit. Please shorten your text to {limit} characters.",form_error_generalError:"Sorry, something has gone. Please refresh the page and try again.",form_error_required:"Please fill in this required field",form_error_numbers:"Numbers are not allowed in this text field",form_error_email:"Please enter a valid email address",form_error_url:"Please enter a valid URL",form_cancel:"Cancel",form_submit:"Submit",form_submitting:"Submitting form...",form_submitted:"Submitted",form_success:"Thank you for submitting the form!",inviteForm_email_placeholder:"Add email addresses...",inviteForm_title:"Know someone who might like to join this workshop?",inviteForm_label:"Invite your colleagues by typing or pasting their emails below",inviteForm_ctaMessage:"Send",inviteForm_success:"Invitation Sent!",inviteForm_error:"Something went wrong!",inviteForm_ctaTryAgain:"Try again!",inviteForm_ctaSendMoreInvites:"Send more invites",inviteForm_ctaDone:"Done",inputAutocomplete_placeholder:"Start typing...",passwordRules_unmatched_text:"Passwords do not match",passwordRules_intro:"We advise you not to use your name or email in your password.",passwordRules_rule_label:"Password",passwordRules_rule_8Characters:"must be longer than 8 characters",passwordRules_rule_numberSymbol:"must include a number and a symbol",passwordRules_rule_lowercaseUppercase:"must include both lower and upper case characters",passwordRules_notMet:"Your password does not meet this requirement",passwordRules_currentPassword_label:"Current password",passwordRules_newPassword_label:"New password",passwordRules_confirmPassword_label:"Confirm new password",profile_image_change_uploading_text:"Uploading image...",profile_image_change_cta_with_picture:"Change photo",profile_image_change_cta_without_picture:"+ Add profile photo",profile_image_change_error:"There was an error uploading the image. Please try a different file format or reduce the file size to less than 5MB. Contact us if problem persists.",ratings_text:"Rate answer",ratings_stars:"{number} out of {total}",ratings_low:"this is incorrect or confusing",ratings_high:"this is a fantastic answer",ratings_success:"Thank you!",richTextEditor_placeholder:"Write something...",richTextEditor_toolbar:"Formatting options",richTextEditor_bold:"Bold",richTextEditor_italic:"Italic",richTextEditor_strikeThrough:"Strikethrough",richTextEditor_link:"Link",richTextEditor_link_text:"Text:",richTextEditor_link_text_aria:"Text to be linked:",richTextEditor_link_url:"Link:",richTextEditor_link_placeholder:"Type or paste URL",richTextEditor_link_error_required:"Please enter a URL to link to",richTextEditor_link_open:"Open: {link}",richTextEditor_link_open_text:"Opens in a new window",richTextEditor_link_edit:"Edit",richTextEditor_link_remove:"Remove",richTextEditor_link_button:"Add link",richTextEditor_ol_list:"Numbered list",richTextEditor_ul_list:"Bullet-point list",richTextEditor_block_quote:"Quote",search_label:"Search for:",search_placeholder:"Ask Apolitical",search_clear:"Clear search",search_cta:"Search",showpassword_show:"Show",showpassword_hide:"Hide",showpassword_aria_show:"Your password is hidden. Click to show.",showpassword_aria_hide:"Your password is visible. Click to hide.",signup_title:"Sign up",signup_full_name:"Full name",signup_full_name_placeholder:"Lionel Messi",signup_email_address:"Work email",signup_email_address_placeholder:"lionel.messi@argentina.gov",signup_job_title:"Job title",signup_job_title_placeholder:"e.g. Senior Policy Advisor",signup_organization:"Organisation",signup_organization_placeholder:"e.g. Department of Justice",signup_url:"Link to official government bio / LinkedIn <small>(optional)</small>",signup_url_placeholder:"https://organisation.com/bio",signup_expectation:"What do you want to know<small>Optional, but we will use your response to build the session!</small>",signup_expectation_placeholder:"What do you want to know?",signup_terms:"I accept Apolitical's <terms>Terms of Service</terms>, <privacy>Privacy Policy</privacy> and that I'll get essential emails for my use of Apolitical",signup_error:"We're really sorry, but we've had a problem trying to sign you up. This could be an issue with our system, so we suggest you try again later.",signup_button_join:"Join for free",signup_button_login:"Log in",signup_submitting:"Submitting form...",signup_success_title:"Thank you for applying to join Apolitical!",signup_success_text:"<p>Once we've vetted your application, you'll get a secure login link to help you get started.</p><p>Please note that trust is everything to our community, so you can't login until your identity has been verified.</p>",tableOfContents:"Table of contents",timeToComplete_hours:"{time, plural, =0 {} one {1 hour} other {# hours}}",timeToComplete_hours_short:"{time}h",timeToComplete_minutes:"{time, plural, =0 {} one {1 minute} other {# minutes}}",timeToComplete_minutes_short:"{time}m",timeToComplete_range:"{early} - {late}",timeToComplete_range_aria:"between {early} and {late}",tooltip_loading:"Loading...",return_to_nav_button:"Back to top",progressTracker:"Step {current} of {total}",cookieBanner_title:"Cookies and your privacy",cookieBanner_text:"We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",cookieBanner_buttons_settings:"Change my settings",cookieBanner_buttons_reject:"Reject all",cookieBanner_buttons_accept:"Accept all",footer_platform:"Platform",footer_platform_events:"Events",footer_platform_courses:"Courses",footer_platform_qanda:"Q&A",footer_platform_articles:"Articles",footer_platform_communities:"Communities",footer_community:"Community",footer_community_support:"Support FAQ",footer_community_post:"Post on Apolitical",footer_community_join:"Who can join",footer_community_guidelines:"Guidelines & values",footer_company:"Company",footer_company_news:"News",footer_company_story:"Our story",footer_company_team:"Meet our team",footer_company_careers:"Careers",footer_company_partner:"Partner with us",footer_company_contact:"Get in touch",footer_legal:"Legal",footer_legal_privacy:"Privacy policy",footer_legal_terms:"Terms & conditions",footer_legal_cookie:"Cookie policy",footer_legal_accessibility:"Accessibility statement",footer_legal_ai:"AI principles",footer_legal_dataProtection:"Data protection officer",footer_legal_euDataProtection:"EU data protection officer",footer_contact:"Contact",footer_contact_correspondence:"Correspondence address",footer_contact_correspondence_address:"251 Southwark Bridge Road{br}London, SE1 6FL{br}United Kingdom",footer_contact_registered:"Registered address",footer_contact_registered_address:"20–22 Wenlock Road{br}London, N1 7GU{br}United Kingdom",footer_contact_berlin:"Berlin address",footer_contact_berlin_address:"Torstraße 220{br}10115 Berlin{br}Germany",footer_contact_support:"For platform support",footer_contact_business:"For business inquiries",footer_social_linkedin:"LinkedIn",footer_social_twitter:"Twitter",footer_social_facebook:"Facebook",footer_copyright:"Copyright © {currentYear} Apolitical Group Limited",header_skip:"Skip to main content",header_search_show:"Show search bar",header_search_hide:"Close search bar",header_menu_show:"Show navigation",header_menu_hide:"Close navigation",header_home_loggedOut:"Home",header_home_loggedIn:"My Home",header_topics:"Topics",header_topics_explore:"Explore",header_topics_explore_events:"Events",header_topics_explore_courses:"Courses","header_topics_explore_q-and-a":"Q&A",header_topics_explore_articles:"Articles",header_topics_explore_communities:"Communities",header_topics_topics:"Topics",header_topics_topics_climate:"Climate","header_topics_topics_cities-and-local-government":"Cities and local government","header_topics_topics_digital-and-data":"Digital and data",header_topics_topics_education:"Education","header_topics_topics_equity-justice-and-inclusion":"Equity, justice and inclusion","header_topics_topics_health-and-social-care":"Health and social care",header_topics_topics_innovation:"Innovation","header_topics_topics_leadership-and-skills":"Leadership and skills","header_topics_topics_life-in-government":"Life in government",header_topics_topics_policymaking:"Policymaking","header_topics_topics_transport-and-infrastructure":"Transport and infrastructure","header_topics_topics_work-and-the-economy":"Work and the economy",header_partners:"For partners",header_account:"My account",header_account_show:"Show account menu",header_account_hide:"Close account menu",header_account_profile:"My profile",header_account_settings:"Settings & privacy","header_account_log-out":"Log out",header_buttons_login:"Log in",header_buttons_signup:"Sign up",pageLayout_error:"An error occurred while rendering this page. Please refresh the page or try again later.",loadingBlock_loading:"Loading...",loadingBlock_almostDone:"Almost done...",loadingBlock_complete:"Complete!",progressBar:"{number}% loaded",inviteModal_title:"You’re registered",inviteModal_formTitle:"Know someone who might like to join this workshop?",inviteModal_formLabel:"Invite your colleagues by typing or pasting their emails below.",inviteModal_cta:"Send",overlay_close:"Close",breadcrumbs_label:"Go back to:",breadcrumbs_currentPage:"Current page:",filters_all:"Show all",filters_disabled:"{name} - no results",languageSwitcher_label:"I would like to read this article in...",languageSwitcher_translation_original:"original language",languageSwitcher_translation_human:"translated by person",languageSwitcher_translation_machine:"translated by machine",languageSwitcher_selected:"{language} - currently selected",languageSwitcher_disclaimer:"This content is machine translated and will occasionally get gendered language or other direct translations wrong. We’re trying to resolve this but in the meantime, if you notice something very wrong, let us know at <link>{email}</link>",loadMore_button:"Load more",loadMore_endOfFeed:"You're all caught up",loadMore_error:"We're having trouble loading more content. Please refresh the page or try again later.",moreMenu:"See more options",navigationMenu_links_homepage:"Home",navigationMenu_links_events:"Events",navigationMenu_links_microcourses:"Courses","navigationMenu_links_q-and-a":"Q&A",navigationMenu_links_articles:"Articles",navigationMenu_links_communities:"Communities",navigationMenu_profile:"My profile",shareLinks_label:"Share",shareLinks_link_linkedin:"Share on LinkedIn",shareLinks_link_twitter:"Share on Twitter",shareLinks_link_facebook:"Share on Facebook",shareLinks_link_email:"Share by email","shareLinks_link_clipboard-copy":"Copy the link",tags_community:"From the community",edit_section_placeholder_description:"Add some details",edit_section_placeholder_cta:"add",notFoundError_title:"We can't find that page",notFoundError_text:"Sorry about that. We all mess up sometimes - read some ‘fail’ stories below.",notFoundError_post_1:"Why public servants must learn to fail — and 3 tips for how to do it",notFoundError_post_2:"What failure has taught me",notFoundError_post_3:"How to learn from failure without causing a scandal",notFoundError_cta:"View more articles",collapsibleSection_summary:"Find out more",contentTypeLabel_event:"Event",contentTypeLabel_learningHub:"Programme",contentTypeLabel_listPage:"List",contentTypeLabel_microcourse:"Course",contentTypeLabel_qaQuestion:"Q&A",contentTypeLabel_solutionArticle:"Article",contentTypeLabel_communityPage:"Community",hideShowTextBox_hide:"View less",hideShowTextBox_show:"View more",markdown_collapsibleSection_summary:"Resources",markdown_skip_video:"Skip past video",markdown_skip_padlet:"Skip past interactive board",markdown_skip_poll:"Skip past poll",markdown_skip:"Skip to next section",markdown_iframe_title:"Course information",markdown_iframe_video:"Video",markdown_iframe_padlet:"Interactive board",markdown_iframe_poll:"Poll"},Eh={...Jn,languageSwitcher_label:"Me gustaría leer este artículo en...",languageSwitcher_translation_original:"idioma original",languageSwitcher_translation_human:"traducido por un humano",languageSwitcher_translation_machine:"traducido por máquina",languageSwitcher_disclaimer:"Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"},kh={...Jn,languageSwitcher_label:"Je voudrais lire cet article dans...",languageSwitcher_translation_original:"langue originale",languageSwitcher_translation_human:"traduit par un humain",languageSwitcher_translation_machine:"traduit par machine",languageSwitcher_disclaimer:"Ce contenu est traduit automatiquement et contiendra d’évantuelles erreurs de genre ou d’autres traductions directes. Nous essayons de résoudre ce problème, mais en attendant, si vous remarquez une erreur importante, faites-le nous savoir à <link>{email}</link>",collapsibleSection_summary:"En savoir plus"},_h={...Jn,languageSwitcher_label:"Eu gostaria de ler este artigo em...",languageSwitcher_translation_original:"linguagem original",languageSwitcher_translation_human:"traduzido por um humano",languageSwitcher_translation_machine:"traduzido por máquina",languageSwitcher_disclaimer:"Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"},Bh=Object.freeze(Object.defineProperty({__proto__:null,en:Jn,es:Eh,fr:kh,pt:_h},Symbol.toStringTag,{value:"Module"})),$a=(e,t=Jn)=>e in t,Ft=(e,t,n,r,a={})=>{let i="";return $a(`${t}_${n}`)?i=e({id:`${t}_${n}`},a):i=e({id:t},{[r]:n,...a}),i},Ah=(e,t,n)=>{if(!e||e===0)return"0";t||(t=0),n||(n=["k","m","b","t"]);let r=e.toString();t=Math.pow(10,t);for(let a=n.length-1;a>=0;a--){const i=Math.pow(10,(a+1)*3);if(i<=e){e=Math.round(e*t/i)/t,e===1e3&&a<n.length-1&&(e=1,a++),r=`${e}${n[a]}`;break}}return r},oa=(e,t)=>C.Children.map(e,n=>Object.is(n,null)?n:C.cloneElement(n,{...t})),Bc=(e=0)=>{setTimeout(()=>{const t=document.querySelector(".splash-screen");t&&t.remove(),window.prerenderReady=!0},e)},Ac=e=>{const t=e.startsWith("http")?e:`https://${e}`,r=new URL(t).hostname;return{full:t,pretty:r}},Fh=(e="")=>e.replace(/\s+/g,"").length>0,ts=e=>{const t=e.length>8,n=/[0-9]/.test(e)&&/[`!@#$%^&*()_+\-=[\]{}£;':"\\|,.<>/?~]/.test(e),r=new RegExp("^(?=.*?[A-Z])(?=.*?[a-z])").test(e);return{isValid:t&&n&&r,matchingRules:{isMoreThanEightCharacters:t,includesNumberAndSymbol:n,includesLowerAndUppercase:r}}};const we=({variant:e="primary",size:t="medium",styling:n={muted:!1,fullWidth:!1},icon:r=!1,href:a=!1,element:i="button",onClick:s=!1,className:o="",disabled:l=!1,tooltip:u="",screenreaderText:c=!1,children:f=!1,...m})=>{const g=Gn(typeof t=="object"),{showTooltip:h,tooltipProps:y}=js(!!u);if(typeof t=="object"&&typeof g=="number"){const E=Object.assign({},t),k=yc(Object.keys(E));t=Dc(g,k,E)}!l&&u&&(u="");const v=[];typeof t=="string"&&v.push(t),r&&(v.push("icon"),typeof r=="object"?(v.push(r.icon),r.position?v.push(r.position):v.push("left"),r.hover&&v.push(`hover_${r.hover}`),r.animate&&(v.push("animate"),typeof r.animate=="string"&&v.push(r.animate))):(v.push(r),!r.includes("right")&&!r.includes("left")&&v.push("left"))),n.muted&&v.push("muted"),n.fullWidth&&v.push("full-width");const x={...m,className:Y(e,o,v,{"no-text":!f,disabled:l,button:a}),onClick:E=>{(!a||a[0]==="#")&&s&&(E.preventDefault(),E.stopPropagation()),s&&s(E)},disabled:typeof l=="object"&&"isClickable"in l?!l.isClickable:l};a&&(i="a",x.href=a);const A=C.createElement(i,x,f||(c?d.jsx($e,{showOnFocus:!1,children:c}):null));return l&&u?d.jsxs("span",{className:"button-container",...y,children:[d.jsx(Qn,{isOpen:h,children:u}),A]}):A},wn=({buttons:e,wrappers:t=[],className:n="",...r})=>{const a=e.length>1?"ul":"p",i=e.map((s,o)=>{var l;return a==="p"?d.jsx(we,{...s},o):d.jsx("li",{className:((l=t[o])==null?void 0:l.className)||"",children:d.jsx(we,{...s})},o)});return C.createElement(a,{className:Y("button-wrapper",n),...r,children:i})};const en=({className:e="",maxWidth:t=!1})=>{const n=t?{"--max-width":`${t/16}rem`}:{};return d.jsx("hr",{className:Y(e,{"has-max-width":t}),style:n})},Oo={card:{range:[{height:320,width:320},{height:425,width:687},{height:510,width:768}],sizes:"(min-width: 1024px) 720px, 30vw"},responsiveCard:{range:[{height:125,width:200},{height:188,width:300},{height:313,width:500}],sizes:"(min-width: 1024px) 720px, 30vw"},banner:{range:[{height:124,width:425},{height:320,width:768},{height:510,width:1368}],sizes:"(min-width: 1024px) 975px, 50vw"},feed:{range:[{height:270,width:124},{height:320,width:425},{height:425,width:687}],sizes:"(min-width: 1024px) 510px, 20vw"},fallback:{range:[{height:124,width:375},{height:320,width:687},{height:510,width:990}],sizes:"(min-width: 1024px) 885px, 35vw"},thumbnail:{range:[{height:124,width:124},{height:320,width:320},{height:510,width:510}],sizes:"(min-width: 1024px) 453px, 20vw"}},Th=({aspect:e,range:t,sizes:n})=>{const{range:r,sizes:a}=e?Oo[e]:Oo.fallback;return{range:t&&t.length>0?t:r,sizes:n||a}},Sh=({format:e,height:t,query:n,width:r})=>{let a=`w=${r}&h=${t}`;return a=e?`${a}&fm=${e}`:a,a=n?`${a}&${n}`:a,a},ai=({format:e,range:t,url:n,query:r})=>t.map(({height:a,width:i})=>`${n}?${Sh({format:e,height:a,query:r,width:i})} ${i}w`).join(", ");const Xn=({image:e,className:t,testId:n})=>{const{description:r,height:a,type:i,query:s,url:o,width:l,loading:u,decoding:c,fetchPriority:f}=e,{range:m,sizes:p}=Th(e),g=ai({format:"avif",query:s,range:m,url:o}),h=ai({format:"webp",query:s,range:m,url:o}),y=ai({format:"",query:s,range:m,url:o});return i&&i.includes("svg")?d.jsx("picture",{className:t,children:d.jsx("img",{src:o,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:l,height:a,"data-testid":n||"image"})}):d.jsxs("picture",{className:t,children:[i!=="image/gif"&&d.jsx("source",{type:"image/avif",srcSet:g,sizes:p,"data-testid":"source"}),d.jsx("source",{type:"image/webp",srcSet:h,sizes:p,"data-testid":"source"}),d.jsx("img",{srcSet:y,sizes:p,src:o,alt:r,loading:u||"lazy",decoding:c||"async",fetchpriority:f||"auto",width:l,height:a,"data-testid":n||"image"})]})};const jh=({image:e,className:t="",testId:n})=>d.jsx("div",{className:`image-container ${t}`,"data-testid":n||"image-container",children:e&&d.jsx(Xn,{image:{...e},className:"image"})}),En=({href:e,children:t,fallbackElement:n,className:r="",onClick:a,gtmContext:i,gtmType:s,...o})=>{if(e){const l={...o};return a&&(l.onClick=a),i&&(l["data-gtm-event-context"]=i),s&&(l["data-gtm-event-type"]=s),d.jsx("a",{href:e,className:Y("gtm-trackable",r),...l,children:t})}return n?C.createElement(n,{children:t,className:r,...o}):d.jsx(d.Fragment,{children:t})},Fc=({children:e})=>typeof document=="object"?dc.createPortal(e,document.body):null;const Oh=({currentStep:e=1,steps:t=1})=>d.jsxs(d.Fragment,{children:[d.jsx($e,{children:d.jsx(ue.FormattedMessage,{id:"progressTracker",values:{current:e,total:t}})}),d.jsx("div",{className:"progress-tracker",children:d.jsx("div",{className:"dots-wrapper",children:new Array(t).fill("").map((n,r)=>{const a=r+1;return d.jsxs("div",{className:"dot-wrapper",children:[d.jsx("div",{className:Y("dot",{active:a===e,completed:a<e}),"data-testid":"progress-dot"}),d.jsx("div",{className:Y("line",{active:a<e})})]},r)})})})]});const Ph=({elementId:e,offset:t=20})=>{const n=ue.useIntl(),r=()=>{const a=document.getElementById(e);if(!a)return;const i=document.getElementById("header");i&&window.scrollTo({top:a.offsetTop-i.clientHeight-t})};return d.jsx(we,{variant:"secondary",className:"return-to-nav",onClick:r,"data-gtm-event-context":"ListPageMobile","data-gtm-event-type":"back-to-nav-button-click",screenreaderText:n.formatMessage({id:"return_to_nav_button"})})};const Nh=({items:e,className:t="",...n})=>d.jsx("ul",{className:Y("buckets",t),...n,children:e.map(({title:r,text:a,link:i,...s},o)=>d.jsx("li",{className:"bucket text-medium",children:d.jsxs("a",{href:i,...s,children:[d.jsx("p",{className:"title",children:r}),d.jsx("p",{children:a})]})},o))}),Po=300,No="ease-in-out";class Rh{constructor(t){this.el=t,this.summary=t.querySelector("summary"),this.content=t.querySelector(".content"),this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.summary.addEventListener("click",n=>this.onClick(n))}cleanUp(){this.summary.removeEventListener("click",t=>this.onClick(t))}onClick(t){t.preventDefault(),t.stopPropagation(),this.el.style.overflow="hidden",this.isClosing||!this.el.open?this.open():(this.isExpanding||this.el.open)&&this.shrink()}shrink(){this.isClosing=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:Po,easing:No}),this.animation.onfinish=()=>this.onAnimationFinish(!1),this.animation.oncancel=()=>this.isClosing=!1}open(){this.el.style.height=`${this.el.offsetHeight}px`,this.el.open=!0,window.requestAnimationFrame(()=>this.expand())}expand(){this.isExpanding=!0;const t=`${this.el.offsetHeight}px`,n=`${this.summary.offsetHeight+this.content.offsetHeight}px`;this.animation&&this.animation.cancel(),this.animation=this.el.animate({height:[t,n]},{duration:Po,easing:No}),this.animation.onfinish=()=>this.onAnimationFinish(!0),this.animation.oncancel=()=>this.isExpanding=!1}onAnimationFinish(t){this.el.open=t,this.animation=null,this.isClosing=!1,this.isExpanding=!1,this.el.style.height=this.el.style.overflow=""}}const La=({label:e=!1,className:t="",children:n,shouldAnimate:r=!1})=>{const a=ue.useIntl(),i=C.useRef(null);return C.useEffect(()=>{let s;return r&&(s=new Rh(i.current)),()=>{r&&s&&s.cleanUp()}},[]),d.jsxs("details",{ref:i,className:Y("collapsible-section",t,{"should-animate":r}),children:[d.jsx("summary",{children:e||a.formatMessage({id:"collapsibleSection_summary"})}),d.jsx("div",{className:"content",children:n})]})},Ro={cube:"box",graduationCap:"graduation-cap",person:"user",speech:"speech-bubble_round",star:"star_empty_thin"},Mh=e=>{let t=e;return Object.keys(Ro).includes(e)&&(t=Ro[e]),`url(${Ht}icons/${t}.svg)`};const Mo={customCard:"custom",microcourse:"course",solutionArticle:"article",qaQuestion:"question",listPage:"list",learningHub:"learning-hub",communityPage:"communityPage"},Tc=({contentType:e,customIcon:t,customLabel:n,className:r=""})=>{const a=ue.useIntl(),i=t?{"--custom-icon":Mh(t)}:{},s=$a(`contentTypeLabel_${e}`)?a.formatMessage({id:`contentTypeLabel_${e}`}):!1;return!n&&!s?null:d.jsx("small",{className:Y("content-type-label text-small",e in Mo?Mo[e]:e,r,{"has-custom-icon":t}),style:i,"data-testid":"content-type-label",children:n||s})};const Ot=({variant:e="primary",icon:t,styling:n={},className:r="",children:a,...i})=>{const{showHighlight:s=!1,background:o="default"}=n,l=t?{"--icon":`url(${Ht}icons/${t}.svg)`}:{};return d.jsx("div",{className:Y("highlighted-text-box",e,r,{"has-icon":t,"show-highlight":s,[o]:o!=="default"}),style:l,...i,children:a})};const rn=({variant:e="empty",text:t=!1,button:n=!1,className:r=""})=>{let a=n&&!!Object.keys(n).length;const i=typeof n=="object"&&"breakpoints"in n,s=Gn(i);if(i&&typeof n=="object"&&typeof s=="number"){const f=Object.assign({},n.breakpoints),m=yc(Object.keys(f));a=Dc(s,m,f)}const{breakpoints:o,text:l="",component:u,...c}=n;return d.jsx(Ot,{variant:"subtle",className:Y("empty-state-box",e,r),children:d.jsxs(d.Fragment,{children:[t&&typeof t=="string"?d.jsx(Wt,{options:{forceBlock:!0},children:t}):t,a&&typeof n=="object"&&(u||d.jsx(we,{...c,variant:n.variant?n.variant:"secondary",children:l}))]})})};const ns=({children:e,...t})=>d.jsx("p",{...t,children:e}),Sc={q:ns,blockquote:ns};for(let e=1;e<=6;e++)Sc[`h${e}`]={component:ns,props:{className:"title"}};const jc=({type:e="default",className:t="",heading:n=!1,children:r})=>d.jsxs("div",{className:Y("helper-text-box text-small",e,t),children:[n&&d.jsx("p",{className:"title",children:n}),typeof r=="string"?d.jsx(Wt,{options:{wrapper:C.Fragment,forceBlock:!0,overrides:Sc},children:r}):d.jsx("p",{children:r})]});const Oc=({id:e,className:t="",show:n=!1,hide:r=!1,text:a,markdownOptions:i,children:s})=>{const o=ue.useIntl(),l=C.useRef(null);e||(e=Date.now().toString());const[u,c]=C.useState(""),[f,m]=C.useState("closed");C.useEffect(()=>{const h=l.current;if(h)return h.addEventListener("transitionend",p),()=>{h.removeEventListener("transitionend",p)}},[]),C.useEffect(()=>{if(!a||typeof a!="string")return;const h=a.split(`
|
|
36
36
|
`);c(h.length<3?`${a.substring(0,400)}...`:h.slice(0,3).join(`
|
|
37
|
-
`))},[a]),C.useEffect(()=>{f==="ready-to-close"&&m("closing")},[f]);const p=({propertyName:h})=>{h==="max-height"&&m(y=>y==="opening"?"open":y==="closing"?"closed":y)};if(!a)return null;const g=["opening","open"].includes(f);return d.jsxs(Ot,{variant:"subtle",className:Y("hide-show-text-box",t),children:[d.jsxs("div",{ref:l,id:e,className:Y("content",f),children:[d.jsx(Wt,{options:{forceBlock:!0,...i},children:f==="closed"?u:a}),f!=="closed"&&s]}),d.jsx("p",{className:"cta",children:d.jsx(we,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:Y({"rotate-180":g}),onClick:()=>{m(g?"ready-to-close":"opening")},"aria-expanded":g,"aria-controls":e,children:g?r||o.formatMessage({id:"hideShowTextBox_hide"}):n||o.formatMessage({id:"hideShowTextBox_show"})})})]})};const Ih=({element:e="ul",layout:t="vertical",variant:n="default",items:r=[],styling:a={},className:i=""})=>{const{hasBorder:s=!1,zebraStriping:o=!1}=a;return C.createElement(e,{className:Y("icon-bulleted-list text-medium",n,i,{"has-border":s,"has-zebra-stripes":o,[t]:e!=="dl"}),children:r.map((l,u)=>{const c={wrapper:C.Fragment,forceInline:!0},f={"--icon":`url(${Ht}icons/${l.icon}.svg)`};return e==="dl"?d.jsxs(C.Fragment,{children:[d.jsx("dt",{style:f,children:d.jsx(Wt,{options:c,children:l.dt||""})},`dt-${u}`),d.jsx("dd",{children:typeof l.text=="string"?d.jsx(Wt,{options:c,children:l.text}):l.text},`dd-${u}`)]},`dl-${u}`):d.jsx("li",{style:f,children:typeof l.text=="string"?d.jsx(Wt,{options:c,children:l.text}):l.text},u)})})},et=()=>C.Fragment,$h=({children:e})=>d.jsx(Ot,{variant:"secondary",children:e}),Lh=({children:e})=>typeof e=="object"&&Object.keys(e||{}).length===1?d.jsx("p",{className:"center",children:e}):d.jsx("div",{className:"center",children:e}),zh=["span","strong","h1","h2","h3","h4","h5","h6","p"],qh=({children:e})=>{const t=ue.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of C.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(C.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of C.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&C.isValidElement(s)){const o=s.type;if(zh.includes(o)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const a=n?n.toString():"";return d.jsx(La,{label:a,className:["Sources","Resources"].includes(a)?"discrete-links":"",children:r.map(i=>i)})},Wh=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return d.jsx(Ot,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return d.jsx(Ot,{variant:"primary",children:e});case"pink-textbox":return d.jsx(Ot,{variant:"tertiary",children:e});case"content":return typeof e=="object"&&Object.keys(e||{}).length===1?d.jsx("p",{children:e}):e;default:return d.jsx("div",{...t,children:e})}return d.jsx("div",{...t,children:e})},Hh=e=>{const t=ue.useIntl(),n=Date.now().toString();let r="default";const a=e.src;return a.includes("youtube")||a.includes("vimeo")?r="video":a.includes("riddle")||a.includes("sli.do")?r="poll":a.includes("padlet")&&(r="padlet"),d.jsxs(d.Fragment,{children:[d.jsx($e,{element:"a",href:`#content-after-iframe-${n}`,onClick:i=>{var s;i.preventDefault(),i.stopPropagation(),(s=document.getElementById(`content-after-iframe-${n}`))==null||s.scrollIntoView({behavior:"smooth"})},children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})}),d.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),d.jsx("span",{id:`content-after-iframe-${n}`})]})},Io=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Uh=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,a=!1;for(const i of C.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&C.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||Io(i.props.children[0])==="button")&&(a=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!C.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&Io(r)==="button"&&(a=!0);else break}return a?(n={...n,className:"button primary medium"},d.jsx("p",{className:"center",children:d.jsx(we,{variant:"primary",size:"medium",...n,children:r})})):d.jsx("a",{...n,children:r})},rs=({children:e,...t})=>d.jsx("span",{className:Y({url:t==null?void 0:t.href}),children:e});const Vh={default:{a:Uh,CollapsibleSection:La,TextBox:Ot,CaseStudy:$h,style:et,details:qh,div:Wh,iframe:Hh,center:Lh},"text-only":{h1:et,h2:et,h3:et,h4:et,h5:et,h6:et,style:et,details:et,div:et,TextBox:et,CollapsibleSection:et,CaseStudy:et,blockquote:et,iframe:et,button:et}},Hn=({className:e="",options:t={},children:n,overrideType:r="default",styling:a={}})=>{if(!n)return null;const{highlightTitles:i=!1}=a;n=n.replace(/^<br\/?>/,"");const s={wrapper:C.Fragment,forceBlock:!0};let o=Vh[r];return t.overrides&&(o={...o,...t.overrides}),d.jsx("div",{className:Y("markdown-text",e,{"highlight-titles":i}),children:d.jsx(Wt,{options:{...s,...t,overrides:o},children:n})})};const Pc=({maxWidth:e=!1,title:t,subtitle:n,children:r,className:a=""})=>{const i=e?{"--max-width":`${e/16}rem`}:{};return d.jsxs("section",{className:Y("page-heading",a),children:[d.jsxs("div",{className:Y("content",{"has-max-width":e}),style:i,children:[t&&t.text&&C.createElement(t.element||"h1",{className:"title"},t.text),n&&n.text&&C.createElement(n.element||"h2",{className:"text-medium"},n.text)]}),r]})};const fn=({size:e="medium",variant:t="default",className:n="",icon:r,tooltip:a="",children:i,...s})=>{const o={"--icon":`url(${Ht}icons/${r}.svg)`},{showTooltip:l,tooltipProps:u}=js(!!a),c=d.jsx("span",{...u,className:Y("pill",e,t,n,{"has-icon":r}),style:o,...s,children:i});return a?d.jsxs("span",{className:"pill-wrapper",children:[d.jsx(Qn,{isOpen:l,children:a}),c]}):c};const xr=({element:e="p",children:t=null,className:n="",...r})=>C.createElement(e,{...r,className:Y("status-banner text-small",n),"aria-live":"assertive"},t);const Kh=({styling:e={},progress:t=0,text:n=!1,className:r=""})=>{const a=ue.useIntl(),{showText:i=!1,layout:s="bar",size:o="default",color:l="default"}=e,u=t>75?100:t>50?75:t>25?50:t>5?25:0,c={"--progress":`${t}%`};return d.jsx("span",{className:Y(`progress-bar section-${u}`,s,r,{[o]:o!=="default",[l!=="default"?l:""]:l!=="default"}),style:c,children:C.createElement(i?"span":$e,{className:i?"text":"",children:n||a.formatMessage({id:"progressBar"},{number:t})})})},Ps=C.memo(Kh);const ii="loadingBlock_",Zh=({progress:e=0,steps:t=!1,className:n=""})=>{const r=ue.useIntl();t||(t={0:{text:r.formatMessage({id:`${ii}loading`})},75:{text:r.formatMessage({id:`${ii}almostDone`})},100:{text:r.formatMessage({id:`${ii}complete`})}});let a=null;const i=Object.keys(t);for(let o=0;o<i.length&&!(e<parseInt(i[o]));o++)a=i[o];const s=a&&t[a].icon?{"--icon":`url(${Ht}icons/${t[a].icon}.svg)`}:{};return d.jsxs(Ot,{className:Y("loading-block",n,{"has-icon":a&&t[a].icon}),variant:"subtle",style:s,children:[a&&d.jsx("span",{className:"step",children:t[a].text}),d.jsx(Ps,{progress:e})]})},Yh=C.memo(Zh);const wt=({element:e="div",className:t="",...n})=>d.jsx(Ia,{element:e,className:Y("loading-placeholder",t),...n});const as={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],heading:["title"],cards:["card","card","card","card"],carousel:["cards","controls"],"carousel-with-title":["title","cards","controls"],answers:["text","text","text"],"text-page":["title","text","text","text","text","subtitle","text","text","text","text","subtitle","text","text","text","text"],"form-with-answers":["question","subtitle","form","answers","answers","answers","answers","answers"],"general-website-page":["banner","text-page"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"],"course-navigation":["button","button"],"course-lesson-page":["breadcrumb","course-navigation","text-page"],"course-lesson-quiz":["text-page","quiz-box"]},Nc=(e,t)=>e in as?d.jsx("div",{className:e,children:as[e].map((n,r)=>Nc(n,r))},t):d.jsx(wt,{className:e},t),Ns=({layout:e="overview-page",...t})=>d.jsx("div",{className:Y("loading-state",e),...t,children:as[e].map((n,r)=>Nc(n,r))}),Rc=e=>{const t=e&&e.toUpperCase().trim().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},$r=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Gh=e=>{const t=Math.ceil(26/$r.length),n=Rc(e).toLowerCase();if(n==="")return $r[0];const r=n.charCodeAt(0)-96;for(let a=0;a<$r.length;a++)if(r<=t*(a+1))return $r[a]};const $o=256,an=({className:e="",src:t="",name:n,alt:r,width:a=$o,height:i=$o,...s})=>{const[o,l]=C.useState(!1),u=C.useRef(null);r==="no-alt"?r="":r==null&&(r=n),C.useEffect(()=>{const m=u.current;if(!m)return;const p=m.getContext("2d");if(!p)return;const g=a,h=i;typeof window<"u"&&window.devicePixelRatio&&(m.width=g*window.devicePixelRatio,m.height=h*window.devicePixelRatio,p.scale(window.devicePixelRatio,window.devicePixelRatio)),p.fillStyle=Gh(n),p.fillRect(0,0,g,h),p.font=`${g/3}px Arial`,p.textAlign="center",p.fillStyle="white",p.fillText(Rc(n),g/2,h/1.6)},[n]);let f=!1;return t&&t!==""&&!o&&(t.includes("http")||t.includes("//"))&&(f=!0),d.jsx("figure",{className:Y("profile-picture",e,{error:o}),...s,children:f?d.jsx("img",{src:t,alt:r,onError:()=>{l(!0)},width:a,height:i}):d.jsx("canvas",{ref:u})})},Rs=e=>e==="apolitical"?{image:`${Ht}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ht}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail},Qh=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const a=e!=="",i=t!=="",s=n!=="";if(!a&&!i&&!s)return"";const o=`${e}${a&&i?` — ${t}`:t}`;let l=`${o}${(a||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=o),l.length>r&&(l=qn(l,r)),l};const jr=({element:e="div",member:t="community",additionalContent:n=!1,styling:r={},gtmContext:a="member",gtmType:i="member-click",className:s=""})=>{const o=ue.useIntl(),{size:l="medium"}=r,u=Rs(t);u.name||(u.name=o.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:c,image:f}=u;let{url:m}=u;t.link!==void 0&&(t.link===!1?m=void 0:m=t.link);const p=Qh(u),g=n&&n.createdAt?es(n.createdAt):!1,h=n&&n.createdAt?Os(n.createdAt):"";return C.createElement(e,{className:Y("member text-medium",l,s),children:d.jsxs(En,{href:m,gtmType:i,gtmContext:a,onClick:y=>{y==null||y.stopPropagation()},children:[d.jsx(an,{name:c,src:f}),d.jsxs("p",{className:"details",children:[d.jsx("strong",{children:c}),n&&d.jsxs("span",{className:"additional-content",children:[n.createdAt&&g&&d.jsx("span",{className:"date",title:h,"aria-label":h,children:o.formatMessage({id:`dates_${g.path}`},{number:g.number})}),n.didEdit&&d.jsx("em",{children:o.formatMessage({id:"discussion_edited"})})]}),p&&d.jsx("small",{className:Y({"text-medium":l==="large"}),children:p})]})]})})};const Lo={small:24,medium:48},Ms=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:a,showGap:i,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,multipleText:l,className:u="",...c})=>{const f=ue.useIntl();return!n||n.length===0?null:C.createElement(e,{...c,className:Y("contributors",u,a,{"has-gap":i}),children:d.jsxs(d.Fragment,{children:[d.jsx("ul",{children:n.map((m,p)=>{let g,h="";if(p<o){const{name:y="",image:v=""}=Rs(m);if(s)return d.jsx(wt,{element:"li",className:"contributor"},p);g=d.jsx(an,{name:y,src:v,width:Lo[a||"medium"],height:Lo[a||"medium"]})}else if(p===o){const y=(t||n.length)-o;g=d.jsxs("small",{className:Y({"large-number":y>99}),children:["+",Ah(y,0)]}),h="number-left"}return g?d.jsx("li",{className:Y("contributor",h),children:g},p):null})}),r&&d.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?f.formatMessage({id:`member_${n[0]}`}):qn(n[0].name||"",20):l||null})]})})};const Is=({limit:e,valueLength:t})=>{const n=ue.useIntl(),r="form_fieldWrapper_characterLimit";if(e===0)return null;const a=e-t,i=Math.abs(t-e);return d.jsxs("small",{className:Y("character-limit",{"near-limit":t>=.99*e,"approaching-limit":t>=.9*e&&t<.99*e}),"aria-live":"polite","aria-label":n.formatMessage({id:`${r}_aria_${a<0?"over":"default"}`},{remaining:a,over:i,limit:e}),children:[d.jsx("span",{className:"hidden",children:n.formatMessage({id:r})}),t," / ",e]})},za=e=>(e==null?void 0:e.toString().length)||0,Mc=(e,t=null)=>{const n={};return e===0||(n["data-character-limit"]=e,t&&(n.functions={onChange:r=>{za(r)>e&&(r=r==null?void 0:r.toString().slice(0,e)),t(r)}})),n};const Lr="emailHelperTextBox_",Ic=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const a=ue.useIntl(),[i,s]=C.useState({path:`${Lr}default`,type:"default",link:{},mail:{},error:""}),[o,l]=C.useState(!1),u=C.useCallback(p=>{p.preventDefault(),p.stopPropagation();const g=h=>{s({path:`${Lr}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:y=>u(y),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:h})};if(typeof r!="function"){g(a.formatMessage({id:`${Lr}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(h=>{g(h.message)}).finally(()=>{l(!1)})},[t,n,r]);C.useEffect(()=>{let p=Lr,g="default",h={},y={};switch(e){case"gov":p+="autoApproved",g="success";break;case"nonGov":p+="unrecognisedEmail",g="error",h={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",g="error",y={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",g="error",h={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:v=>u(v),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",g="error",h={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},y={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",h={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:p,type:g,link:h,mail:y})},[e]);const c={};return["link","mail"].forEach(p=>{c[p]=Object.keys(i[p]).length?g=>d.jsx("a",{...i[p],children:g}):g=>g}),d.jsx(jc,{type:i.type,heading:o?!1:a.formatMessage({id:`${i.path}_title`}),children:o?d.jsxs(d.Fragment,{children:[d.jsx(wt,{element:"span"}),d.jsx(wt,{element:"span"})]}):a.formatMessage({id:`${i.path}_text`},{...c,strong:p=>d.jsx("strong",{children:p}),em:p=>d.jsx("em",{children:p}),br:d.jsxs(d.Fragment,{children:[d.jsx("br",{}),d.jsx("br",{})]}),error:i.error})})},Pn=({className:e="",element:t="input",id:n,inputRef:r,functions:a={onChange:()=>{}},name:i=n,placeholder:s,type:o="text",value:l,...u})=>{const c=C.useRef(),f=r||c;return C.createElement(t,{ref:f,...u,type:o,id:n,name:i,className:Y(e,t,{"has-scrollbar":o==="textarea"&&f.current&&f.current.clientHeight<f.current.scrollHeight}),value:l,placeholder:s,...a,onChange:m=>{const p=m.target;a.onChange(p.value)}})};const An={UP:"ArrowUp",DOWN:"ArrowDown",ENTER:"Enter"},Jh=500,Xh=({id:e,name:t=e,value:n,placeholder:r,functions:a={onChange:()=>{},onKeyInput:async()=>new Promise(()=>{})},...i})=>{const{onChange:s=()=>{},onKeyInput:o=async()=>{}}=a,[{input:l,displayInput:u,debouncedInput:c},f]=C.useState({input:n,displayInput:n,debouncedInput:n}),[{predictions:m,activePredictionIndex:p,isPredictionSelected:g},h]=C.useState({predictions:[],activePredictionIndex:-1,isPredictionSelected:!!n}),{formatMessage:y}=ue.useIntl();r||(r=y({id:"inputAutocomplete_placeholder"})),C.useEffect(()=>{const E=setTimeout(()=>{g||f(k=>({...k,debouncedInput:l}))},Jh);return()=>{clearTimeout(E)}},[l,g]),C.useEffect(()=>{c&&!g?(async()=>{try{const k=await o(c)||[];h(F=>({...F,predictions:k}))}catch(k){console.error("Error fetching predictions:",k),h(F=>({...F,predictions:[]}))}})():h(E=>({...E,predictions:[]}))},[c,g]),C.useEffect(()=>{p>=0&&m[p]&&f(E=>({...E,displayInput:m[p].description}))},[p,m]);const v=E=>{[An.DOWN,An.UP,An.ENTER].includes(E.key)&&(E.preventDefault(),E.key===An.DOWN&&p<m.length-1?h(k=>({...k,activePredictionIndex:p+1})):E.key===An.UP&&p>0?h(k=>({...k,activePredictionIndex:p-1})):E.key===An.ENTER&&p>-1&&(s(m[p].description),f(k=>({...k,input:m[p].description})),h(k=>({...k,predictions:[],isPredictionSelected:!0}))))},x=E=>{s(E.target.value),f(k=>({...k,input:E.target.value,displayInput:E.target.value})),h(k=>({...k,activePredictionIndex:-1,isPredictionSelected:!1}))},A=E=>{s(E.description),f(k=>({...k,input:E.description,displayInput:E.description})),h(k=>({...k,isPredictionSelected:!0,predictions:[]}))};return d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:u,onChange:x,onKeyDown:v,placeholder:r,name:t,id:e,...i}),d.jsx("ul",{className:"predictions-list",children:m.map((E,k)=>d.jsx("li",{onClick:()=>A(E),onMouseEnter:()=>h(F=>({...F,activePredictionIndex:k})),className:Y("predictions-list-item",{active:k===p}),children:E.description},k))})]})};const $c=({className:e="",disabled:t,element:n="p",functions:r={onChange:()=>{}},id:a,inputRef:i,intlPath:s=!1,label:o,shownValue:l=!0,type:u="checkbox",value:c,...f})=>{const m=ue.useIntl(),{onChange:p,...g}=r,h=()=>{t||p(c?null:l)},y=d.jsxs(d.Fragment,{children:[d.jsx("input",{ref:i,id:a,name:a,type:u,value:l,checked:c,onKeyDown:v=>{(v.key==="Enter"||v.code==="Space")&&(v.preventDefault(),v.stopPropagation(),h())},readOnly:!0,disabled:t}),d.jsx("span",{className:"pretty-checkbox","data-testid":"pretty-checkbox"}),d.jsx("label",{htmlFor:a,children:o||m.formatMessage({id:s?`${s}_${a}`:a})})]});return C.createElement(n,{onClick:v=>{const x=v.target;x.nodeName.toLowerCase()==="a"||x.parentNode&&x.parentNode.nodeName.toLowerCase()==="a"||(v.preventDefault(),v.stopPropagation(),h())},className:Y("checkbox-wrapper",e),...f,...g},y)};const em=C.memo(function({direction:t="down"}){return d.jsx(Ia,{className:Y("rotating-chevron",`direction-${t}`)})});const tm=({className:e,options:t,initialValue:n,value:r,functions:a={onChange:()=>{},onMultiSelectSubmit:()=>{}},gtm:{context:i}={context:""},placeholder:s,multiSelect:o,multiSelectOptions:l,id:u})=>{const c=ue.useIntl(),[f,m]=C.useState(!1),p=r||n,g=Array.isArray(p)?[...p]:p?[p]:[],[h,y]=C.useState(g);let v;Array.isArray(h)&&h.length===1&&typeof h[0]=="string"?v=t&&h?t.find(O=>O.id===h[0]):t?t[0]:{id:"",label:""}:Array.isArray(h)&&h.length===1&&typeof h[0]!="string"?v=h[0]:v={id:"",label:""},C.useEffect(()=>{y(g)},[r,n]);const{onChange:x,onMultiSelectSubmit:A,...E}=a,k=O=>{if(o){let L=[];h!=null&&h.includes(O.id)?L=h.filter(R=>R!==O.id):L=[...h,O.id],y([...L]),x&&x([...L])}else y([O]),x&&x(O.id),m(!1)},F=O=>{if(O==="all"){const L=(t==null?void 0:t.map(R=>R.id))||[];y(L),x&&x(L)}else y([]),x&&x([])};return d.jsxs("div",{className:Y("dropdown-wrapper",e),children:[d.jsxs("button",{className:"input","aria-expanded":f,"aria-haspopup":"listbox","aria-controls":"dropdown-list",onClick:O=>{O.preventDefault(),O.stopPropagation(),m(!f)},"data-testid":"dropdown-selector",...E,children:[o?`${s} · ${h.length}`:v.label,d.jsx(em,{direction:f?"up":"down"})]}),d.jsx("select",{defaultValue:v.id,onChange:O=>{O.preventDefault(),O.stopPropagation();const L=t&&t.find(R=>R.id===O.target.value);k(L)},hidden:!f,...E,children:t==null?void 0:t.map(O=>d.jsx("option",{value:O.id,children:O.label},O.id))}),d.jsxs("div",{className:"menu-options input dropdown-menu",role:"menu",hidden:!f,children:[d.jsxs("div",{className:"dropdown-menu-list",children:[(l==null?void 0:l.topbar)&&d.jsxs("div",{className:"action-bar",children:[d.jsx("p",{children:`${h==null?void 0:h.length} selected`}),d.jsxs("ul",{children:[d.jsx("li",{children:d.jsx(we,{variant:"tertiary",size:"small",onClick:()=>F("all"),className:"gtm-trackable",children:c.formatMessage({id:"dropdown_menu_multiselect_all"})})}),d.jsx("li",{children:d.jsx(we,{variant:"tertiary",size:"small",onClick:()=>F("none"),className:"gtm-trackable",children:c.formatMessage({id:"dropdown_menu_multiselect_none"})})})]})]}),d.jsx("ul",{children:t==null?void 0:t.map(O=>{const L=O.id===v.id||(h==null?void 0:h.includes(O))||(h==null?void 0:h.includes(O.id));return d.jsx("li",{"data-testid":"dropdown-options",children:d.jsxs("button",{className:Y("gtm-trackable",{selected:L,"selected-single":L&&!o}),"data-gtm-event-type":`${O}-click`,"data-gtm-event-context":i,onClick:R=>{R.preventDefault(),R.stopPropagation(),k(O)},role:"menuitem","aria-current":L,"data-testid":L?"current-selection":"",children:[o&&d.jsx("span",{className:"pretty-checkbox","data-testid":"pretty-checkbox"}),d.jsx("span",{className:Y({"menu-option-label":o}),children:O.label})]})},O.id)})})]}),(l==null?void 0:l.submitSection)&&d.jsx("p",{className:"submit",children:d.jsx(we,{variant:"secondary",onClick:()=>{A&&A(h),document.dispatchEvent(new CustomEvent("dropdownMultiSelectSubmit",{detail:{id:u||"dropdown-multi-select",value:h}})),m(!1)},children:c.formatMessage({id:"form_submit"})})})]})]})};const nm=({className:e="",functions:t={onChange:()=>{}},intlPath:n=!1,id:r,label:a,multiSelect:i=!1,name:s,options:o,required:l,type:u="checkboxes",value:c,...f})=>{const m=ue.useIntl(),p=i?c:[],g=c;return d.jsx("ul",{...f,className:Y("options-wrapper",e),"data-testid":`ul-${r}`,children:o==null?void 0:o.map(({id:h,label:y=!1,value:v=h,disabled:x=!1})=>{const A=`${r}_${h}`,E=()=>{if(x)return;let k;if(i){const F=p==null?void 0:p.indexOf(v);Array.isArray(p)&&F>=0?(k=p,k.splice(F,1)):(!p||p.length===0?k=[]:k=p,k.push(v))}else k=g===v?void 0:v;t.onChange(k)};return d.jsx($c,{element:"li",id:A,type:u==="checkboxes"?"checkbox":"radio",shownValue:v,value:i?p==null?void 0:p.includes(v):g===v,functions:{...t,onChange:E},intlPath:n,label:y||m.formatMessage({id:n?`${n}_${h}`:h}),disabled:x},A)})})};const rm=({inputRef:e,type:t="password",gtm:{context:n}={context:void 0},...r})=>{const a=ue.useIntl(),i=C.useRef(),s=e||i,[o,l]=C.useState(!1),[u,c]=C.useState(t),f=()=>{var m;l(!o),c(o?"password":"text"),(m=s.current)==null||m.focus()};return d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:Y("show-password gtm-trackable",{"password-visible":o}),"data-gtm-event-context":n,"data-gtm-event-type":`${o?"hide":"show"}-password-click`,onClick:f,"aria-label":a.formatMessage({id:`showpassword_aria_${o?"hide":"show"}`}),children:a.formatMessage({id:`showpassword_${o?"hide":"show"}`})}),d.jsx(Pn,{inputRef:s,type:u,...r})]})};const Fn={text:{component:Pn},email:{component:Pn},url:{component:Pn},textarea:{component:Pn,props:{element:"textarea",rows:4,cols:10}},checkbox:{component:$c},checkboxes:{component:nm,props:{multiSelect:!0}},select:{component:tm},password:{component:rm},autocomplete:{component:Xh}},am=({id:e,intlPath:t=!1,className:n="",error:r,functions:a={onChange:()=>{}},limit:i=0,showRequiredLabels:s=!0,type:o,validation:l,value:u,submitOnEnter:c,...f})=>{const m=ue.useIntl(),p=l&&l.some(({condition:k})=>k==="required"),g=za(u),h=o&&Fn[o]&&Fn[o].component?Fn[o].component:Pn,y={};o&&["checkboxes"].includes(o)?y.element="span":y.htmlFor=e;let v={...f,id:e,name:e,className:r?"error":"",type:o,required:p,"aria-required":p,functions:mn(a),value:u};if(i>0){const k=Mc(i,a.onChange);v={...v,...k},k.functions&&typeof k.functions=="object"&&(v.functions={...v.functions,...k.functions})}o&&Fn[o]&&Fn[o].props&&(v={...v,...Fn[o].props}),o&&["checkboxes"].includes(o)&&(v.intlPath=`${t}_${e}`),r&&(v["aria-invalid"]=!0,v["aria-describedby"]=`error-${e}`);const x=f.label||m.formatMessage({id:t?`${t}_${e}`:e}),A=({...k})=>r?C.createElement(k.as||"dd",{id:`error-${e}`,className:"error text-small",role:"alert","aria-live":"assertive",...k},r):null;if(o&&["checkbox"].includes(o))return d.jsxs(d.Fragment,{children:[d.jsx(h,{...v,label:x,className:Y("field-wrapper",n)}),d.jsx(A,{as:"p"})]});const E=k=>C.createElement(k.element||"label",{...k,className:"checkboxes-label text-small","data-testid":`label-${e}`});return d.jsxs("dl",{className:Y("field-wrapper text-medium",n),children:[d.jsx("dt",{children:d.jsxs(E,{...y,children:[x,p&&s&&d.jsxs(d.Fragment,{children:[" ",d.jsxs("small",{children:["(",m.formatMessage({id:"form_fieldWrapper_required"}),")"]})]})]})}),d.jsxs("dd",{children:[d.jsx(h,{...v}),d.jsx(Is,{limit:i,valueLength:g})]}),d.jsx(A,{})]})},im=(e,t)=>{const{type:n,payload:r}=t,a=e.errors?mn(e.errors):{},i=e.values?mn(e.values):{};switch(n){case"toggleSubmitting":return{...e,isSubmitting:!e.isSubmitting};case"updateValue":if(r!=null&&r.key&&a[r==null?void 0:r.key]&&delete a[r==null?void 0:r.key],r!=null&&r.key){if(["isSubmitting","formSubmitted","errors"].includes(r==null?void 0:r.key))return{...e,errors:a,[r==null?void 0:r.key]:r==null?void 0:r.value};i[r==null?void 0:r.key]=r==null?void 0:r.value}return{...e,errors:a,values:i};case"addError":return r!=null&&r.key&&!a[r==null?void 0:r.key]&&(a[r==null?void 0:r.key]=r==null?void 0:r.value),{...e,errors:a};case"removeError":return r!=null&&r.key&&a[r==null?void 0:r.key]&&delete a[r==null?void 0:r.key],{...e,errors:a};case"submitForm":{const{fields:s=[],dispatch:o=()=>{},onSuccess:l=()=>{},onFailure:u=()=>{},intl:c}=r,f=mn(Object.keys(a));for(const m of s)if(m.validation)for(let p=0;p<m.validation.length;p++){const{condition:g="required",error:h=!1}=m.validation[p];let y=!1;if(typeof g=="function"){const v=g(i);v&&(y=h||v)}else{const v=i[m.id];switch(g){case"required":(!v||typeof v=="string"&&v.trim().length===0)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_required"})));break;case"no-numbers":{v&&!/^([^0-9]*)$/.test(v)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_numbers"})));break}case"valid-email":{v&&!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(v)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_email"})));break}case"valid-url":{v&&!/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(v)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_url"})));break}default:console.warn("WARNING! No field validation condition has been set")}}if(y){o({type:"addError",payload:{key:m.id,value:y}}),f.push(m.id);break}}return f.length===0?l(i):u(i,f),{...e,isSubmitting:!1}}case"formSubmitted":return{...e,isSubmitting:!1,formSubmitted:!0,errors:{}};case"formSubmittedAndReset":return{isSubmitting:!1,formSubmitted:!0,errors:{}};default:return e}};let si=null;const er=({element:e="form",fields:t,className:n="",id:r=t.length?`form__${t[0].id}`:"form",formRef:a,intlPath:i=!1,button:s={variant:"primary",size:"large",customOnSubmit:!1},secondaryActionButton:o={variant:"secondary",size:"large"},meta:l,gtm:u={context:"Form",event:"form-submit-click"},functions:{onSuccess:c=async()=>{},onCancel:f=()=>{},onCatch:m=()=>{},onFailure:p=()=>{}}={onSuccess:async()=>{},onCancel:()=>{},onCatch:()=>{},onFailure:()=>{}},...g})=>{const{customOnSubmit:h,hideButton:y,...v}=s,x=40,{shouldShowCancelButton:A=!1,shouldReset:E=!0,showRequiredLabels:k=!0,showSuccessMessage:F=!1}=l||{},O=ue.useIntl(),L={};t.length&&t.forEach(D=>{const W=D.id||D.name;W&&(L[W]=D.value||"")});const[R,T]=C.useReducer(im,{isSubmitting:!1,formSubmitted:!1,errors:{},values:L}),{errors:j,isSubmitting:w,formSubmitted:B,values:M}=R;C.useEffect(()=>{E&&B&&(si=setTimeout(()=>{T({type:"updateValue",payload:{key:"formSubmitted",value:!1}})},3e3))},[B]),C.useEffect(()=>()=>{si&&clearTimeout(si)},[]),C.useEffect(()=>{const D=W=>{T({type:"updateValue",payload:{key:W.detail.id,value:W.detail.value}})};return document.addEventListener("dropdownMultiSelectSubmit",D),()=>{document.removeEventListener("dropdownMultiSelectSubmit",D)}},[]);const I=C.useRef(null),q=a||I;if(!t.length)return null;s.text||(s.text=O.formatMessage({id:"form_submit"}));const Z=()=>{if(!w){if(T({type:"toggleSubmitting"}),s.disabled){typeof s.disabled=="object"&&s.disabled.isClickable&&T({type:"submitForm",payload:{fields:t,dispatch:T,intl:O}});return}T({type:"submitForm",payload:{fields:t,dispatch:T,onSuccess:async D=>{try{await c(D),T({type:E?"formSubmittedAndReset":"formSubmitted"})}catch(W){m(W),T({type:"updateValue",payload:{key:"isSubmitting",value:!1}})}},onFailure:(D,W)=>{p(D,W),T({type:"updateValue",payload:{key:"isSubmitting",value:!1}})},intl:O}})}},ne=[{...v,icon:B?{icon:"tick",position:"left"}:!1,className:"gtm-trackable",onClick:D=>{var _;if(D.preventDefault(),D.stopPropagation(),w)return;let W=0;if((_=q==null?void 0:q.current)!=null&&_.id){const S=document.getElementById(q.current.id);S&&(W=S.getBoundingClientRect().top+window.scrollY)}const X=document.getElementById("header");X&&(W=W-X.offsetHeight-x),W<0&&(W=0),window.scrollTo({top:W,behavior:"smooth"}),Z()},disabled:w||B||s.disabled,"data-gtm-event-context":u.context,"data-gtm-event-type":u.event,children:w||B?O.formatMessage({id:`form_${w?"submitting":"submitted"}`}):s.text}];return A&&ne.unshift({...o,className:"gtm-trackable","data-gtm-event-context":u.context,"data-gtm-event-type":u.event,disabled:w||B,onClick:f,children:o.text||O.formatMessage({id:"form_cancel"})}),d.jsxs(d.Fragment,{children:[C.createElement(e,{...g,id:r,className:Y("form",n),ref:q},d.jsxs(d.Fragment,{children:[j!=null&&j.general?d.jsx(rn,{variant:"error",text:O.formatMessage({id:"form_error_generalError"})}):null,(!E||!w&&!B||h)&&t.map((D,W)=>{const{id:X=D.name||W,component:_,functions:S={onChange:()=>{}},submitOnEnter:z=!1}=D;if(_)return d.jsx(_,{...D.props||{}},`component-${X}-${W}`);const $=M?M[X]:"",V={...S,onChange:te=>{T({type:"updateValue",payload:{key:X,value:te}}),S.onChange(te&&te.toString(),T)}};return z&&(V.onKeyDown=te=>{te.key==="Enter"&&(te.stopPropagation(),te.preventDefault(),Z()),S.onKeyDown&&S.onKeyDown(te)}),d.jsx(am,{intlPath:i,...D,showRequiredLabels:k,value:$,error:j==null?void 0:j[X],functions:V},X)}),y?null:(w||B)&&h?h:d.jsx(wn,{className:Y("cta",{center:w||B,submitted:B}),buttons:ne})]})),F&&B&&d.jsx(xr,{className:"success",children:typeof F=="string"?F:O.formatMessage({id:"form_success"})})]})};const zr="passwordRules_",Lc="isMoreThanEightCharacters",zc="includesNumberAndSymbol",qc="includesLowerAndUppercase",sm={[Lc]:"8Characters",[zc]:"numberSymbol",[qc]:"lowercaseUppercase"},om=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=ue.useIntl();return d.jsxs("aside",{className:Y("password-rules",t),children:[d.jsx("small",{children:n.formatMessage({id:`${zr}intro`})}),d.jsx("ul",{children:[Lc,zc,qc].map(r=>d.jsxs("li",{className:Y({matches:e[r]}),children:[d.jsxs($e,{children:[n.formatMessage({id:`${zr}rule_label`})," "]}),d.jsx("span",{children:n.formatMessage({id:`${zr}rule_${sm[r]}`})}),!e[r]&&d.jsxs($e,{element:"strong",children:[" ",n.formatMessage({id:`${zr}notMet`})]})]},`rule-${r}`))})]})},Wc=C.memo(om);const um=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:a=()=>{}},className:i="",hasLoaded:s=!1})=>{const o=ue.useIntl(),[l,u]=C.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const v=await n();u(x=>({...x,setUp:!0,id:v&&v.id,disabled:!1}))}catch(v){u(x=>({...x,setUp:!0,disabled:!0})),a(v)}};if(C.useEffect(()=>{s&&!l.setUp&&c()},[s]),!s)return d.jsx(wt,{className:"rating-placeholder"});const{id:f,rating:m,disabled:p}=l,g="ratings_",h={text:o.formatMessage({id:`${g}text`}),low:o.formatMessage({id:`${g}low`}),high:o.formatMessage({id:`${g}high`}),success:o.formatMessage({id:`${g}success`}),...e},y=async v=>{if(!(!f||p))try{u(x=>({...x,rating:v,disabled:!0})),await r({id:f,value:v})}catch(x){u(A=>({...A,rating:null})),a(x)}finally{u(x=>({...x,disabled:!1}))}};return d.jsxs("div",{className:Y("rating",i),children:[d.jsx("span",{className:"label",children:h[m?"success":"text"]}),d.jsx("ol",{children:Array.from(new Array(t).keys()).map(v=>{const x=v+1;return d.jsx("li",{className:Y({selected:m&&x<=m}),children:d.jsx(we,{variant:"tertiary",size:"small",icon:{icon:`star${!m||x>m?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${o.formatMessage({id:`${g}stars`},{number:x,total:t})}${x===1||x===t?` - ${h[x===1?"low":"high"]}`:""}`,onClick:A=>{A.preventDefault(),A.stopPropagation(),y(x)},disabled:p})},`rating-${x}`)})})]})};function lm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function is(e,t){return Array(t+1).join(e)}function cm(e){return e.replace(/^\n*/,"")}function dm(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
37
|
+
`))},[a]),C.useEffect(()=>{f==="ready-to-close"&&m("closing")},[f]);const p=({propertyName:h})=>{h==="max-height"&&m(y=>y==="opening"?"open":y==="closing"?"closed":y)};if(!a)return null;const g=["opening","open"].includes(f);return d.jsxs(Ot,{variant:"subtle",className:Y("hide-show-text-box",t),children:[d.jsxs("div",{ref:l,id:e,className:Y("content",f),children:[d.jsx(Wt,{options:{forceBlock:!0,...i},children:f==="closed"?u:a}),f!=="closed"&&s]}),d.jsx("p",{className:"cta",children:d.jsx(we,{variant:"tertiary",icon:{icon:"navigation_arrow",position:"left",animate:!0},styling:{muted:!0},className:Y({"rotate-180":g}),onClick:()=>{m(g?"ready-to-close":"opening")},"aria-expanded":g,"aria-controls":e,children:g?r||o.formatMessage({id:"hideShowTextBox_hide"}):n||o.formatMessage({id:"hideShowTextBox_show"})})})]})};const Ih=({element:e="ul",layout:t="vertical",variant:n="default",items:r=[],styling:a={},className:i=""})=>{const{hasBorder:s=!1,zebraStriping:o=!1}=a;return C.createElement(e,{className:Y("icon-bulleted-list text-medium",n,i,{"has-border":s,"has-zebra-stripes":o,[t]:e!=="dl"}),children:r.map((l,u)=>{const c={wrapper:C.Fragment,forceInline:!0},f={"--icon":`url(${Ht}icons/${l.icon}.svg)`};return e==="dl"?d.jsxs(C.Fragment,{children:[d.jsx("dt",{style:f,children:d.jsx(Wt,{options:c,children:l.dt||""})},`dt-${u}`),d.jsx("dd",{children:typeof l.text=="string"?d.jsx(Wt,{options:c,children:l.text}):l.text},`dd-${u}`)]},`dl-${u}`):d.jsx("li",{style:f,children:typeof l.text=="string"?d.jsx(Wt,{options:c,children:l.text}):l.text},u)})})},et=()=>C.Fragment,$h=({children:e})=>d.jsx(Ot,{variant:"secondary",children:e}),Lh=({children:e})=>typeof e=="object"&&Object.keys(e||{}).length===1?d.jsx("p",{className:"center",children:e}):d.jsx("div",{className:"center",children:e}),zh=["span","strong","h1","h2","h3","h4","h5","h6","p"],qh=({children:e})=>{const t=ue.useIntl();if(!e)return null;let n=t.formatMessage({id:"markdown_collapsibleSection_summary"});const r=[];for(const i of C.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number"))if(C.isValidElement(i)&&i.type==="summary"){if(i.props&&i.props.children){for(const s of C.Children.toArray(i.props.children))if(!(!s||typeof s=="string"||typeof s=="number")&&C.isValidElement(s)){const o=s.type;if(zh.includes(o)){for(n=s.props.children;typeof n!="string"&&(Array.isArray(n)&&n[0].props&&n[0].props.children&&n[0].props.children[0]);)n=n[0].props.children[0];break}}}}else r.push(i);const a=n?n.toString():"";return d.jsx(La,{label:a,className:["Sources","Resources"].includes(a)?"discrete-links":"",children:r.map(i=>i)})},Wh=({children:e,...t})=>{if(t.class)switch(t.class){case"casestudy":return d.jsx(Ot,{variant:"secondary",children:e});case"general-textbox":case"highlight-box":return d.jsx(Ot,{variant:"primary",children:e});case"pink-textbox":return d.jsx(Ot,{variant:"tertiary",children:e});case"content":return typeof e=="object"&&Object.keys(e||{}).length===1?d.jsx("p",{children:e}):e;default:return d.jsx("div",{...t,children:e})}return d.jsx("div",{...t,children:e})},Hh=e=>{const t=ue.useIntl(),n=Date.now().toString();let r="default";const a=e.src;return a.includes("youtube")||a.includes("vimeo")?r="video":a.includes("riddle")||a.includes("sli.do")?r="poll":a.includes("padlet")&&(r="padlet"),d.jsxs(d.Fragment,{children:[d.jsx($e,{element:"a",href:`#content-after-iframe-${n}`,onClick:i=>{var s;i.preventDefault(),i.stopPropagation(),(s=document.getElementById(`content-after-iframe-${n}`))==null||s.scrollIntoView({behavior:"smooth"})},children:t.formatMessage({id:`markdown_skip${r==="default"?"":`_${r}`}`})}),d.jsx("iframe",{...e,title:t.formatMessage({id:`markdown_iframe${r==="default"?"":`_${r}`}`})}),d.jsx("span",{id:`content-after-iframe-${n}`})]})},Io=e=>{let t="";return e&&typeof e!="string"&&typeof e!="number"&&typeof e!="boolean"&&"type"in e&&(t=e.type),t},Uh=({children:e,...t})=>{let n={...t};t.href&&(t.href.includes("http:")||t.href.includes("https:"))&&!t.target&&(n.target="_blank");let r=e,a=!1;for(const i of C.Children.toArray(e))if(!(!i||typeof i=="string"||typeof i=="number")&&C.isValidElement(i)){const s=i.type;if(["button","center","span","strong"].includes(s)&&i.props&&i.props.children&&i.props.children[0])for((s==="button"||Io(i.props.children[0])==="button")&&(a=!0),r=i.props.children[0];r&&typeof r!="string"&&!(typeof r=="boolean"||typeof r=="number"||!C.isValidElement(r));)if(r.props&&r.props.children&&r.props.children[0])r=r.props.children[0],r&&Io(r)==="button"&&(a=!0);else break}return a?(n={...n,className:"button primary medium"},d.jsx("p",{className:"center",children:d.jsx(we,{variant:"primary",size:"medium",...n,children:r})})):d.jsx("a",{...n,children:r})},rs=({children:e,...t})=>d.jsx("span",{className:Y({url:t==null?void 0:t.href}),children:e});const Vh={default:{a:Uh,CollapsibleSection:La,TextBox:Ot,CaseStudy:$h,style:et,details:qh,div:Wh,iframe:Hh,center:Lh},"text-only":{h1:et,h2:et,h3:et,h4:et,h5:et,h6:et,style:et,details:et,div:et,TextBox:et,CollapsibleSection:et,CaseStudy:et,blockquote:et,iframe:et,button:et}},Hn=({className:e="",options:t={},children:n,overrideType:r="default",styling:a={}})=>{if(!n)return null;const{highlightTitles:i=!1}=a;n=n.replace(/^<br\/?>/,"");const s={wrapper:C.Fragment,forceBlock:!0};let o=Vh[r];return t.overrides&&(o={...o,...t.overrides}),d.jsx("div",{className:Y("markdown-text",e,{"highlight-titles":i}),children:d.jsx(Wt,{options:{...s,...t,overrides:o},children:n})})};const Pc=({maxWidth:e=!1,title:t,subtitle:n,children:r,className:a=""})=>{const i=e?{"--max-width":`${e/16}rem`}:{};return d.jsxs("section",{className:Y("page-heading",a),children:[d.jsxs("div",{className:Y("content",{"has-max-width":e}),style:i,children:[t&&t.text&&C.createElement(t.element||"h1",{className:"title"},t.text),n&&n.text&&C.createElement(n.element||"h2",{className:"text-medium"},n.text)]}),r]})};const fn=({size:e="medium",variant:t="default",className:n="",icon:r,tooltip:a="",children:i,...s})=>{const o={"--icon":`url(${Ht}icons/${r}.svg)`},{showTooltip:l,tooltipProps:u}=js(!!a),c=d.jsx("span",{...u,className:Y("pill",e,t,n,{"has-icon":r}),style:o,...s,children:i});return a?d.jsxs("span",{className:"pill-wrapper",children:[d.jsx(Qn,{isOpen:l,children:a}),c]}):c};const xr=({element:e="p",children:t=null,className:n="",...r})=>C.createElement(e,{...r,className:Y("status-banner text-small",n),"aria-live":"assertive"},t);const Kh=({styling:e={},progress:t=0,text:n=!1,className:r=""})=>{const a=ue.useIntl(),{showText:i=!1,layout:s="bar",size:o="default",color:l="default"}=e,u=t>75?100:t>50?75:t>25?50:t>5?25:0,c={"--progress":`${t}%`};return d.jsx("span",{className:Y(`progress-bar section-${u}`,s,r,{[o]:o!=="default",[l!=="default"?l:""]:l!=="default"}),style:c,children:C.createElement(i?"span":$e,{className:i?"text":"",children:n||a.formatMessage({id:"progressBar"},{number:t})})})},Ps=C.memo(Kh);const ii="loadingBlock_",Zh=({progress:e=0,steps:t=!1,className:n=""})=>{const r=ue.useIntl();t||(t={0:{text:r.formatMessage({id:`${ii}loading`})},75:{text:r.formatMessage({id:`${ii}almostDone`})},100:{text:r.formatMessage({id:`${ii}complete`})}});let a=null;const i=Object.keys(t);for(let o=0;o<i.length&&!(e<parseInt(i[o]));o++)a=i[o];const s=a&&t[a].icon?{"--icon":`url(${Ht}icons/${t[a].icon}.svg)`}:{};return d.jsxs(Ot,{className:Y("loading-block",n,{"has-icon":a&&t[a].icon}),variant:"subtle",style:s,children:[a&&d.jsx("span",{className:"step",children:t[a].text}),d.jsx(Ps,{progress:e})]})},Yh=C.memo(Zh);const wt=({element:e="div",className:t="",...n})=>d.jsx(Ia,{element:e,className:Y("loading-placeholder",t),...n});const as={header:["logo","link","link","search"],sidebar:["text","text","text","text","text"],"cards-section":["subtitle","cards"],heading:["title"],cards:["card","card","card","card"],carousel:["cards","controls"],"carousel-with-title":["title","cards","controls"],answers:["text","text","text"],"text-page":["title","text","text","text","text","subtitle","text","text","text","text","subtitle","text","text","text","text"],"form-with-answers":["question","subtitle","form","answers","answers","answers","answers","answers"],"general-website-page":["banner","text-page"],"overview-page":["header","sidebar","title","text","cards-section","cards-section","footer"],"course-navigation":["button","button"],"course-lesson-page":["breadcrumb","course-navigation","text-page"],"course-lesson-quiz":["text-page","quiz-box"]},Nc=(e,t)=>e in as?d.jsx("div",{className:e,children:as[e].map((n,r)=>Nc(n,r))},t):d.jsx(wt,{className:e},t),Ns=({layout:e="overview-page",...t})=>d.jsx("div",{className:Y("loading-state",e),...t,children:as[e].map((n,r)=>Nc(n,r))}),Rc=e=>{const t=e&&e.toUpperCase().trim().split(" ");return Array.isArray(t)&&t.length>1&&t[0]!==""?t[1]===""?t[0][0]:t[0][0]+t[t.length-1][0]:e?e.substr(0,1):""},$r=["#5AB6A3","#A2D7AF","#806056","#3962B3"],Gh=e=>{const t=Math.ceil(26/$r.length),n=Rc(e).toLowerCase();if(n==="")return $r[0];const r=n.charCodeAt(0)-96;for(let a=0;a<$r.length;a++)if(r<=t*(a+1))return $r[a]};const $o=256,an=({className:e="",src:t="",name:n,alt:r,width:a=$o,height:i=$o,...s})=>{const[o,l]=C.useState(!1),u=C.useRef(null);r==="no-alt"?r="":r==null&&(r=n),C.useEffect(()=>{const m=u.current;if(!m)return;const p=m.getContext("2d");if(!p)return;const g=a,h=i;typeof window<"u"&&window.devicePixelRatio&&(m.width=g*window.devicePixelRatio,m.height=h*window.devicePixelRatio,p.scale(window.devicePixelRatio,window.devicePixelRatio)),p.fillStyle=Gh(n),p.fillRect(0,0,g,h),p.font=`${g/3}px Arial`,p.textAlign="center",p.fillStyle="white",p.fillText(Rc(n),g/2,h/1.6)},[n]);let f=!1;return t&&t!==""&&!o&&(t.includes("http")||t.includes("//"))&&(f=!0),d.jsx("figure",{className:Y("profile-picture",e,{error:o}),...s,children:f?d.jsx("img",{src:t,alt:r,onError:()=>{l(!0)},width:a,height:i}):d.jsx("canvas",{ref:u})})},Rs=e=>e==="apolitical"?{image:`${Ht}logos/member_apolitical.svg`}:e==="community"||typeof e=="object"&&!e.name?{image:`${Ht}logos/member_community.svg`}:{name:e.name,role:e.jobTitle||"",organisation:e.organization||"",country:e.location&&e.location.country||"",url:`/profiles/${e.id}`,image:e.image&&e.image.thumbnail},Qh=({role:e="",organisation:t="",country:n="",maximumCharacters:r=80})=>{const a=e!=="",i=t!=="",s=n!=="";if(!a&&!i&&!s)return"";const o=`${e}${a&&i?` — ${t}`:t}`;let l=`${o}${(a||i)&&s?`, ${n}`:n}`;return l.length>r&&(l=o),l.length>r&&(l=qn(l,r)),l};const jr=({element:e="div",member:t="community",additionalContent:n=!1,styling:r={},gtmContext:a="member",gtmType:i="member-click",className:s="",alt:o="no-alt"})=>{const l=ue.useIntl(),{size:u="medium"}=r,c=Rs(t);c.name||(c.name=l.formatMessage({id:`member_${typeof t=="string"?t:"community"}`}));const{name:f,image:m}=c;let{url:p}=c;t.link!==void 0&&(t.link===!1?p=void 0:p=t.link);const g=Qh(c),h=n&&n.createdAt?es(n.createdAt):!1,y=n&&n.createdAt?Os(n.createdAt):"";return C.createElement(e,{className:Y("member text-medium",u,s),children:d.jsxs(En,{href:p,gtmType:i,gtmContext:a,onClick:v=>{v==null||v.stopPropagation()},children:[d.jsx(an,{name:f,src:m,alt:o}),d.jsxs("p",{className:"details",children:[d.jsx("strong",{children:f}),n&&d.jsxs("span",{className:"additional-content",children:[n.createdAt&&h&&d.jsx("span",{className:"date",title:y,"aria-label":y,children:l.formatMessage({id:`dates_${h.path}`},{number:h.number})}),n.didEdit&&d.jsx("em",{children:l.formatMessage({id:"discussion_edited"})})]}),g&&d.jsx("small",{className:Y({"text-medium":u==="large"}),children:g})]})]})})};const Lo={small:24,medium:48},Ms=({element:e="div",contributors:{total:t,data:n}={total:void 0,data:[]},styling:{showText:r,size:a,showGap:i,showPlaceholders:s}={showText:!0,size:"medium",showGap:!0,showPlaceholders:!1},cutoff:o=2,multipleText:l,className:u="",...c})=>{const f=ue.useIntl();return!n||n.length===0?null:C.createElement(e,{...c,className:Y("contributors",u,a,{"has-gap":i}),children:d.jsxs(d.Fragment,{children:[d.jsx("ul",{children:n.map((m,p)=>{let g,h="";if(p<o){const{name:y="",image:v=""}=Rs(m);if(s)return d.jsx(wt,{element:"li",className:"contributor"},p);g=d.jsx(an,{name:y,src:v,width:Lo[a||"medium"],height:Lo[a||"medium"]})}else if(p===o){const y=(t||n.length)-o;g=d.jsxs("small",{className:Y({"large-number":y>99}),children:["+",Ah(y,0)]}),h="number-left"}return g?d.jsx("li",{className:Y("contributor",h),children:g},p):null})}),r&&d.jsx("span",{className:"label",children:typeof r=="string"?r:n.length===1?typeof n[0]=="string"?f.formatMessage({id:`member_${n[0]}`}):qn(n[0].name||"",20):l||null})]})})};const Is=({limit:e,valueLength:t})=>{const n=ue.useIntl(),r="form_fieldWrapper_characterLimit";if(e===0)return null;const a=e-t,i=Math.abs(t-e);return d.jsxs("small",{className:Y("character-limit",{"near-limit":t>=.99*e,"approaching-limit":t>=.9*e&&t<.99*e}),"aria-live":"polite","aria-label":n.formatMessage({id:`${r}_aria_${a<0?"over":"default"}`},{remaining:a,over:i,limit:e}),children:[d.jsx("span",{className:"hidden",children:n.formatMessage({id:r})}),t," / ",e]})},za=e=>(e==null?void 0:e.toString().length)||0,Mc=(e,t=null)=>{const n={};return e===0||(n["data-character-limit"]=e,t&&(n.functions={onChange:r=>{za(r)>e&&(r=r==null?void 0:r.toString().slice(0,e)),t(r)}})),n};const Lr="emailHelperTextBox_",Ic=({type:e,email:t,redirectPath:n,resendVerificationCode:r})=>{const a=ue.useIntl(),[i,s]=C.useState({path:`${Lr}default`,type:"default",link:{},mail:{},error:""}),[o,l]=C.useState(!1),u=C.useCallback(p=>{p.preventDefault(),p.stopPropagation();const g=h=>{s({path:`${Lr}error_verificationFailedToSend`,type:"error",link:{"data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:y=>u(y),href:"#","data-testid":"send-verify-email-click"},mail:{href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"ErrorVerifyingBox","data-gtm-event-type":"email-concierge-click"},error:h})};if(typeof r!="function"){g(a.formatMessage({id:`${Lr}error_noFunction`}));return}l(!0),r(t).then(()=>{localStorage.setItem("email",t),window.location.href=n||"/signup/verify-email"}).catch(h=>{g(h.message)}).finally(()=>{l(!1)})},[t,n,r]);C.useEffect(()=>{let p=Lr,g="default",h={},y={};switch(e){case"gov":p+="autoApproved",g="success";break;case"nonGov":p+="unrecognisedEmail",g="error",h={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"NonGovEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break;case"pending":p+="pendingApproval",g="error",y={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;case"verify":p+="emailUnverified",g="error",h={href:"#","data-gtm-event-context":"VerifyEmailBox","data-gtm-event-type":"SendEmailClick",className:"gtm-trackable",onClick:v=>u(v),"data-testid":"send-verify-email-click"};break;case"exists":p+="emailAlreadyExists",g="error",h={href:"/user-onboarding/login","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"login-click"},y={href:"mailto:concierge@apolitical.co",className:"gtm-trackable","data-gtm-event-context":"EmailExistsBox","data-gtm-event-type":"email-concierge-click"};break;default:p+="default",h={href:"https://about.apolitical.co/who-can-join-the-community","data-gtm-event-context":"DefaultEmailHelperTextBox","data-gtm-event-type":"LearnMoreClick"};break}s({...i,path:p,type:g,link:h,mail:y})},[e]);const c={};return["link","mail"].forEach(p=>{c[p]=Object.keys(i[p]).length?g=>d.jsx("a",{...i[p],children:g}):g=>g}),d.jsx(jc,{type:i.type,heading:o?!1:a.formatMessage({id:`${i.path}_title`}),children:o?d.jsxs(d.Fragment,{children:[d.jsx(wt,{element:"span"}),d.jsx(wt,{element:"span"})]}):a.formatMessage({id:`${i.path}_text`},{...c,strong:p=>d.jsx("strong",{children:p}),em:p=>d.jsx("em",{children:p}),br:d.jsxs(d.Fragment,{children:[d.jsx("br",{}),d.jsx("br",{})]}),error:i.error})})},Pn=({className:e="",element:t="input",id:n,inputRef:r,functions:a={onChange:()=>{}},name:i=n,placeholder:s,type:o="text",value:l,...u})=>{const c=C.useRef(),f=r||c;return C.createElement(t,{ref:f,...u,type:o,id:n,name:i,className:Y(e,t,{"has-scrollbar":o==="textarea"&&f.current&&f.current.clientHeight<f.current.scrollHeight}),value:l,placeholder:s,...a,onChange:m=>{const p=m.target;a.onChange(p.value)}})};const An={UP:"ArrowUp",DOWN:"ArrowDown",ENTER:"Enter"},Jh=500,Xh=({id:e,name:t=e,value:n,placeholder:r,functions:a={onChange:()=>{},onKeyInput:async()=>new Promise(()=>{})},...i})=>{const{onChange:s=()=>{},onKeyInput:o=async()=>{}}=a,[{input:l,displayInput:u,debouncedInput:c},f]=C.useState({input:n,displayInput:n,debouncedInput:n}),[{predictions:m,activePredictionIndex:p,isPredictionSelected:g},h]=C.useState({predictions:[],activePredictionIndex:-1,isPredictionSelected:!!n}),{formatMessage:y}=ue.useIntl();r||(r=y({id:"inputAutocomplete_placeholder"})),C.useEffect(()=>{const E=setTimeout(()=>{g||f(k=>({...k,debouncedInput:l}))},Jh);return()=>{clearTimeout(E)}},[l,g]),C.useEffect(()=>{c&&!g?(async()=>{try{const k=await o(c)||[];h(F=>({...F,predictions:k}))}catch(k){console.error("Error fetching predictions:",k),h(F=>({...F,predictions:[]}))}})():h(E=>({...E,predictions:[]}))},[c,g]),C.useEffect(()=>{p>=0&&m[p]&&f(E=>({...E,displayInput:m[p].description}))},[p,m]);const v=E=>{[An.DOWN,An.UP,An.ENTER].includes(E.key)&&(E.preventDefault(),E.key===An.DOWN&&p<m.length-1?h(k=>({...k,activePredictionIndex:p+1})):E.key===An.UP&&p>0?h(k=>({...k,activePredictionIndex:p-1})):E.key===An.ENTER&&p>-1&&(s(m[p].description),f(k=>({...k,input:m[p].description})),h(k=>({...k,predictions:[],isPredictionSelected:!0}))))},x=E=>{s(E.target.value),f(k=>({...k,input:E.target.value,displayInput:E.target.value})),h(k=>({...k,activePredictionIndex:-1,isPredictionSelected:!1}))},A=E=>{s(E.description),f(k=>({...k,input:E.description,displayInput:E.description})),h(k=>({...k,isPredictionSelected:!0,predictions:[]}))};return d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"text",value:u,onChange:x,onKeyDown:v,placeholder:r,name:t,id:e,...i}),d.jsx("ul",{className:"predictions-list",children:m.map((E,k)=>d.jsx("li",{onClick:()=>A(E),onMouseEnter:()=>h(F=>({...F,activePredictionIndex:k})),className:Y("predictions-list-item",{active:k===p}),children:E.description},k))})]})};const $c=({className:e="",disabled:t,element:n="p",functions:r={onChange:()=>{}},id:a,inputRef:i,intlPath:s=!1,label:o,shownValue:l=!0,type:u="checkbox",value:c,...f})=>{const m=ue.useIntl(),{onChange:p,...g}=r,h=()=>{t||p(c?null:l)},y=d.jsxs(d.Fragment,{children:[d.jsx("input",{ref:i,id:a,name:a,type:u,value:l,checked:c,onKeyDown:v=>{(v.key==="Enter"||v.code==="Space")&&(v.preventDefault(),v.stopPropagation(),h())},readOnly:!0,disabled:t}),d.jsx("span",{className:"pretty-checkbox","data-testid":"pretty-checkbox"}),d.jsx("label",{htmlFor:a,children:o||m.formatMessage({id:s?`${s}_${a}`:a})})]});return C.createElement(n,{onClick:v=>{const x=v.target;x.nodeName.toLowerCase()==="a"||x.parentNode&&x.parentNode.nodeName.toLowerCase()==="a"||(v.preventDefault(),v.stopPropagation(),h())},className:Y("checkbox-wrapper",e),...f,...g},y)};const em=C.memo(function({direction:t="down"}){return d.jsx(Ia,{className:Y("rotating-chevron",`direction-${t}`)})});const tm=({className:e,options:t,initialValue:n,value:r,functions:a={onChange:()=>{},onMultiSelectSubmit:()=>{}},gtm:{context:i}={context:""},placeholder:s,multiSelect:o,multiSelectOptions:l,id:u})=>{const c=ue.useIntl(),[f,m]=C.useState(!1),p=r||n,g=Array.isArray(p)?[...p]:p?[p]:[],[h,y]=C.useState(g);let v;Array.isArray(h)&&h.length===1&&typeof h[0]=="string"?v=t&&h?t.find(O=>O.id===h[0]):t?t[0]:{id:"",label:""}:Array.isArray(h)&&h.length===1&&typeof h[0]!="string"?v=h[0]:v={id:"",label:""},C.useEffect(()=>{y(g)},[r,n]);const{onChange:x,onMultiSelectSubmit:A,...E}=a,k=O=>{if(o){let L=[];h!=null&&h.includes(O.id)?L=h.filter(R=>R!==O.id):L=[...h,O.id],y([...L]),x&&x([...L])}else y([O]),x&&x(O.id),m(!1)},F=O=>{if(O==="all"){const L=(t==null?void 0:t.map(R=>R.id))||[];y(L),x&&x(L)}else y([]),x&&x([])};return d.jsxs("div",{className:Y("dropdown-wrapper",e),children:[d.jsxs("button",{className:"input","aria-expanded":f,"aria-haspopup":"listbox","aria-controls":"dropdown-list",onClick:O=>{O.preventDefault(),O.stopPropagation(),m(!f)},"data-testid":"dropdown-selector",...E,children:[o?`${s} · ${h.length}`:v.label,d.jsx(em,{direction:f?"up":"down"})]}),d.jsx("select",{defaultValue:v.id,onChange:O=>{O.preventDefault(),O.stopPropagation();const L=t&&t.find(R=>R.id===O.target.value);k(L)},hidden:!f,...E,children:t==null?void 0:t.map(O=>d.jsx("option",{value:O.id,children:O.label},O.id))}),d.jsxs("div",{className:"menu-options input dropdown-menu",role:"menu",hidden:!f,children:[d.jsxs("div",{className:"dropdown-menu-list",children:[(l==null?void 0:l.topbar)&&d.jsxs("div",{className:"action-bar",children:[d.jsx("p",{children:`${h==null?void 0:h.length} selected`}),d.jsxs("ul",{children:[d.jsx("li",{children:d.jsx(we,{variant:"tertiary",size:"small",onClick:()=>F("all"),className:"gtm-trackable",children:c.formatMessage({id:"dropdown_menu_multiselect_all"})})}),d.jsx("li",{children:d.jsx(we,{variant:"tertiary",size:"small",onClick:()=>F("none"),className:"gtm-trackable",children:c.formatMessage({id:"dropdown_menu_multiselect_none"})})})]})]}),d.jsx("ul",{children:t==null?void 0:t.map(O=>{const L=O.id===v.id||(h==null?void 0:h.includes(O))||(h==null?void 0:h.includes(O.id));return d.jsx("li",{"data-testid":"dropdown-options",children:d.jsxs("button",{className:Y("gtm-trackable",{selected:L,"selected-single":L&&!o}),"data-gtm-event-type":`${O}-click`,"data-gtm-event-context":i,onClick:R=>{R.preventDefault(),R.stopPropagation(),k(O)},role:"menuitem","aria-current":L,"data-testid":L?"current-selection":"",children:[o&&d.jsx("span",{className:"pretty-checkbox","data-testid":"pretty-checkbox"}),d.jsx("span",{className:Y({"menu-option-label":o}),children:O.label})]})},O.id)})})]}),(l==null?void 0:l.submitSection)&&d.jsx("p",{className:"submit",children:d.jsx(we,{variant:"secondary",onClick:()=>{A&&A(h),document.dispatchEvent(new CustomEvent("dropdownMultiSelectSubmit",{detail:{id:u||"dropdown-multi-select",value:h}})),m(!1)},children:c.formatMessage({id:"form_submit"})})})]})]})};const nm=({className:e="",functions:t={onChange:()=>{}},intlPath:n=!1,id:r,label:a,multiSelect:i=!1,name:s,options:o,required:l,type:u="checkboxes",value:c,...f})=>{const m=ue.useIntl(),p=i?c:[],g=c;return d.jsx("ul",{...f,className:Y("options-wrapper",e),"data-testid":`ul-${r}`,children:o==null?void 0:o.map(({id:h,label:y=!1,value:v=h,disabled:x=!1})=>{const A=`${r}_${h}`,E=()=>{if(x)return;let k;if(i){const F=p==null?void 0:p.indexOf(v);Array.isArray(p)&&F>=0?(k=p,k.splice(F,1)):(!p||p.length===0?k=[]:k=p,k.push(v))}else k=g===v?void 0:v;t.onChange(k)};return d.jsx($c,{element:"li",id:A,type:u==="checkboxes"?"checkbox":"radio",shownValue:v,value:i?p==null?void 0:p.includes(v):g===v,functions:{...t,onChange:E},intlPath:n,label:y||m.formatMessage({id:n?`${n}_${h}`:h}),disabled:x},A)})})};const rm=({inputRef:e,type:t="password",gtm:{context:n}={context:void 0},...r})=>{const a=ue.useIntl(),i=C.useRef(),s=e||i,[o,l]=C.useState(!1),[u,c]=C.useState(t),f=()=>{var m;l(!o),c(o?"password":"text"),(m=s.current)==null||m.focus()};return d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:Y("show-password gtm-trackable",{"password-visible":o}),"data-gtm-event-context":n,"data-gtm-event-type":`${o?"hide":"show"}-password-click`,onClick:f,"aria-label":a.formatMessage({id:`showpassword_aria_${o?"hide":"show"}`}),children:a.formatMessage({id:`showpassword_${o?"hide":"show"}`})}),d.jsx(Pn,{inputRef:s,type:u,...r})]})};const Fn={text:{component:Pn},email:{component:Pn},url:{component:Pn},textarea:{component:Pn,props:{element:"textarea",rows:4,cols:10}},checkbox:{component:$c},checkboxes:{component:nm,props:{multiSelect:!0}},select:{component:tm},password:{component:rm},autocomplete:{component:Xh}},am=({id:e,intlPath:t=!1,className:n="",error:r,functions:a={onChange:()=>{}},limit:i=0,showRequiredLabels:s=!0,type:o,validation:l,value:u,submitOnEnter:c,...f})=>{const m=ue.useIntl(),p=l&&l.some(({condition:k})=>k==="required"),g=za(u),h=o&&Fn[o]&&Fn[o].component?Fn[o].component:Pn,y={};o&&["checkboxes"].includes(o)?y.element="span":y.htmlFor=e;let v={...f,id:e,name:e,className:r?"error":"",type:o,required:p,"aria-required":p,functions:mn(a),value:u};if(i>0){const k=Mc(i,a.onChange);v={...v,...k},k.functions&&typeof k.functions=="object"&&(v.functions={...v.functions,...k.functions})}o&&Fn[o]&&Fn[o].props&&(v={...v,...Fn[o].props}),o&&["checkboxes"].includes(o)&&(v.intlPath=`${t}_${e}`),r&&(v["aria-invalid"]=!0,v["aria-describedby"]=`error-${e}`);const x=f.label||m.formatMessage({id:t?`${t}_${e}`:e}),A=({...k})=>r?C.createElement(k.as||"dd",{id:`error-${e}`,className:"error text-small",role:"alert","aria-live":"assertive",...k},r):null;if(o&&["checkbox"].includes(o))return d.jsxs(d.Fragment,{children:[d.jsx(h,{...v,label:x,className:Y("field-wrapper",n)}),d.jsx(A,{as:"p"})]});const E=k=>C.createElement(k.element||"label",{...k,className:"checkboxes-label text-small","data-testid":`label-${e}`});return d.jsxs("dl",{className:Y("field-wrapper text-medium",n),children:[d.jsx("dt",{children:d.jsxs(E,{...y,children:[x,p&&s&&d.jsxs(d.Fragment,{children:[" ",d.jsxs("small",{children:["(",m.formatMessage({id:"form_fieldWrapper_required"}),")"]})]})]})}),d.jsxs("dd",{children:[d.jsx(h,{...v}),d.jsx(Is,{limit:i,valueLength:g})]}),d.jsx(A,{})]})},im=(e,t)=>{const{type:n,payload:r}=t,a=e.errors?mn(e.errors):{},i=e.values?mn(e.values):{};switch(n){case"toggleSubmitting":return{...e,isSubmitting:!e.isSubmitting};case"updateValue":if(r!=null&&r.key&&a[r==null?void 0:r.key]&&delete a[r==null?void 0:r.key],r!=null&&r.key){if(["isSubmitting","formSubmitted","errors"].includes(r==null?void 0:r.key))return{...e,errors:a,[r==null?void 0:r.key]:r==null?void 0:r.value};i[r==null?void 0:r.key]=r==null?void 0:r.value}return{...e,errors:a,values:i};case"addError":return r!=null&&r.key&&!a[r==null?void 0:r.key]&&(a[r==null?void 0:r.key]=r==null?void 0:r.value),{...e,errors:a};case"removeError":return r!=null&&r.key&&a[r==null?void 0:r.key]&&delete a[r==null?void 0:r.key],{...e,errors:a};case"submitForm":{const{fields:s=[],dispatch:o=()=>{},onSuccess:l=()=>{},onFailure:u=()=>{},intl:c}=r,f=mn(Object.keys(a));for(const m of s)if(m.validation)for(let p=0;p<m.validation.length;p++){const{condition:g="required",error:h=!1}=m.validation[p];let y=!1;if(typeof g=="function"){const v=g(i);v&&(y=h||v)}else{const v=i[m.id];switch(g){case"required":(!v||typeof v=="string"&&v.trim().length===0)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_required"})));break;case"no-numbers":{v&&!/^([^0-9]*)$/.test(v)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_numbers"})));break}case"valid-email":{v&&!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(v)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_email"})));break}case"valid-url":{v&&!/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(v)&&(y=h||(c==null?void 0:c.formatMessage({id:"form_error_url"})));break}default:console.warn("WARNING! No field validation condition has been set")}}if(y){o({type:"addError",payload:{key:m.id,value:y}}),f.push(m.id);break}}return f.length===0?l(i):u(i,f),{...e,isSubmitting:!1}}case"formSubmitted":return{...e,isSubmitting:!1,formSubmitted:!0,errors:{}};case"formSubmittedAndReset":return{isSubmitting:!1,formSubmitted:!0,errors:{}};default:return e}};let si=null;const er=({element:e="form",fields:t,className:n="",id:r=t.length?`form__${t[0].id}`:"form",formRef:a,intlPath:i=!1,button:s={variant:"primary",size:"large",customOnSubmit:!1},secondaryActionButton:o={variant:"secondary",size:"large"},meta:l,gtm:u={context:"Form",event:"form-submit-click"},functions:{onSuccess:c=async()=>{},onCancel:f=()=>{},onCatch:m=()=>{},onFailure:p=()=>{}}={onSuccess:async()=>{},onCancel:()=>{},onCatch:()=>{},onFailure:()=>{}},...g})=>{const{customOnSubmit:h,hideButton:y,...v}=s,x=40,{shouldShowCancelButton:A=!1,shouldReset:E=!0,showRequiredLabels:k=!0,showSuccessMessage:F=!1}=l||{},O=ue.useIntl(),L={};t.length&&t.forEach(D=>{const W=D.id||D.name;W&&(L[W]=D.value||"")});const[R,T]=C.useReducer(im,{isSubmitting:!1,formSubmitted:!1,errors:{},values:L}),{errors:j,isSubmitting:w,formSubmitted:B,values:M}=R;C.useEffect(()=>{E&&B&&(si=setTimeout(()=>{T({type:"updateValue",payload:{key:"formSubmitted",value:!1}})},3e3))},[B]),C.useEffect(()=>()=>{si&&clearTimeout(si)},[]),C.useEffect(()=>{const D=W=>{T({type:"updateValue",payload:{key:W.detail.id,value:W.detail.value}})};return document.addEventListener("dropdownMultiSelectSubmit",D),()=>{document.removeEventListener("dropdownMultiSelectSubmit",D)}},[]);const I=C.useRef(null),q=a||I;if(!t.length)return null;s.text||(s.text=O.formatMessage({id:"form_submit"}));const Z=()=>{if(!w){if(T({type:"toggleSubmitting"}),s.disabled){typeof s.disabled=="object"&&s.disabled.isClickable&&T({type:"submitForm",payload:{fields:t,dispatch:T,intl:O}});return}T({type:"submitForm",payload:{fields:t,dispatch:T,onSuccess:async D=>{try{await c(D),T({type:E?"formSubmittedAndReset":"formSubmitted"})}catch(W){m(W),T({type:"updateValue",payload:{key:"isSubmitting",value:!1}})}},onFailure:(D,W)=>{p(D,W),T({type:"updateValue",payload:{key:"isSubmitting",value:!1}})},intl:O}})}},ne=[{...v,icon:B?{icon:"tick",position:"left"}:!1,className:"gtm-trackable",onClick:D=>{var _;if(D.preventDefault(),D.stopPropagation(),w)return;let W=0;if((_=q==null?void 0:q.current)!=null&&_.id){const S=document.getElementById(q.current.id);S&&(W=S.getBoundingClientRect().top+window.scrollY)}const X=document.getElementById("header");X&&(W=W-X.offsetHeight-x),W<0&&(W=0),window.scrollTo({top:W,behavior:"smooth"}),Z()},disabled:w||B||s.disabled,"data-gtm-event-context":u.context,"data-gtm-event-type":u.event,children:w||B?O.formatMessage({id:`form_${w?"submitting":"submitted"}`}):s.text}];return A&&ne.unshift({...o,className:"gtm-trackable","data-gtm-event-context":u.context,"data-gtm-event-type":u.event,disabled:w||B,onClick:f,children:o.text||O.formatMessage({id:"form_cancel"})}),d.jsxs(d.Fragment,{children:[C.createElement(e,{...g,id:r,className:Y("form",n),ref:q},d.jsxs(d.Fragment,{children:[j!=null&&j.general?d.jsx(rn,{variant:"error",text:O.formatMessage({id:"form_error_generalError"})}):null,(!E||!w&&!B||h)&&t.map((D,W)=>{const{id:X=D.name||W,component:_,functions:S={onChange:()=>{}},submitOnEnter:z=!1}=D;if(_)return d.jsx(_,{...D.props||{}},`component-${X}-${W}`);const $=M?M[X]:"",V={...S,onChange:te=>{T({type:"updateValue",payload:{key:X,value:te}}),S.onChange(te&&te.toString(),T)}};return z&&(V.onKeyDown=te=>{te.key==="Enter"&&(te.stopPropagation(),te.preventDefault(),Z()),S.onKeyDown&&S.onKeyDown(te)}),d.jsx(am,{intlPath:i,...D,showRequiredLabels:k,value:$,error:j==null?void 0:j[X],functions:V},X)}),y?null:(w||B)&&h?h:d.jsx(wn,{className:Y("cta",{center:w||B,submitted:B}),buttons:ne})]})),F&&B&&d.jsx(xr,{className:"success",children:typeof F=="string"?F:O.formatMessage({id:"form_success"})})]})};const zr="passwordRules_",Lc="isMoreThanEightCharacters",zc="includesNumberAndSymbol",qc="includesLowerAndUppercase",sm={[Lc]:"8Characters",[zc]:"numberSymbol",[qc]:"lowercaseUppercase"},om=({matchingRules:e={isMoreThanEightCharacters:!1,includesNumberAndSymbol:!1,includesLowerAndUppercase:!1},className:t=""})=>{const n=ue.useIntl();return d.jsxs("aside",{className:Y("password-rules",t),children:[d.jsx("small",{children:n.formatMessage({id:`${zr}intro`})}),d.jsx("ul",{children:[Lc,zc,qc].map(r=>d.jsxs("li",{className:Y({matches:e[r]}),children:[d.jsxs($e,{children:[n.formatMessage({id:`${zr}rule_label`})," "]}),d.jsx("span",{children:n.formatMessage({id:`${zr}rule_${sm[r]}`})}),!e[r]&&d.jsxs($e,{element:"strong",children:[" ",n.formatMessage({id:`${zr}notMet`})]})]},`rule-${r}`))})]})},Wc=C.memo(om);const um=({text:e={},topRating:t=5,functions:{createRating:n=()=>null,updateRating:r=()=>{},reportError:a=()=>{}},className:i="",hasLoaded:s=!1})=>{const o=ue.useIntl(),[l,u]=C.useState({setUp:!1,id:null,rating:null,disabled:!0}),c=async()=>{try{const v=await n();u(x=>({...x,setUp:!0,id:v&&v.id,disabled:!1}))}catch(v){u(x=>({...x,setUp:!0,disabled:!0})),a(v)}};if(C.useEffect(()=>{s&&!l.setUp&&c()},[s]),!s)return d.jsx(wt,{className:"rating-placeholder"});const{id:f,rating:m,disabled:p}=l,g="ratings_",h={text:o.formatMessage({id:`${g}text`}),low:o.formatMessage({id:`${g}low`}),high:o.formatMessage({id:`${g}high`}),success:o.formatMessage({id:`${g}success`}),...e},y=async v=>{if(!(!f||p))try{u(x=>({...x,rating:v,disabled:!0})),await r({id:f,value:v})}catch(x){u(A=>({...A,rating:null})),a(x)}finally{u(x=>({...x,disabled:!1}))}};return d.jsxs("div",{className:Y("rating",i),children:[d.jsx("span",{className:"label",children:h[m?"success":"text"]}),d.jsx("ol",{children:Array.from(new Array(t).keys()).map(v=>{const x=v+1;return d.jsx("li",{className:Y({selected:m&&x<=m}),children:d.jsx(we,{variant:"tertiary",size:"small",icon:{icon:`star${!m||x>m?"_empty":""}`,position:"left",hover:"star"},screenreaderText:`${o.formatMessage({id:`${g}stars`},{number:x,total:t})}${x===1||x===t?` - ${h[x===1?"low":"high"]}`:""}`,onClick:A=>{A.preventDefault(),A.stopPropagation(),y(x)},disabled:p})},`rating-${x}`)})})]})};function lm(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function is(e,t){return Array(t+1).join(e)}function cm(e){return e.replace(/^\n*/,"")}function dm(e){for(var t=e.length;t>0&&e[t-1]===`
|
|
38
38
|
`;)t--;return e.substring(0,t)}var fm=["ADDRESS","ARTICLE","ASIDE","AUDIO","BLOCKQUOTE","BODY","CANVAS","CENTER","DD","DIR","DIV","DL","DT","FIELDSET","FIGCAPTION","FIGURE","FOOTER","FORM","FRAMESET","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","HTML","ISINDEX","LI","MAIN","MENU","NAV","NOFRAMES","NOSCRIPT","OL","OUTPUT","P","PRE","SECTION","TABLE","TBODY","TD","TFOOT","TH","THEAD","TR","UL"];function $s(e){return Ls(e,fm)}var Hc=["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"];function Uc(e){return Ls(e,Hc)}function hm(e){return Kc(e,Hc)}var Vc=["A","TABLE","THEAD","TBODY","TFOOT","TH","TD","IFRAME","SCRIPT","AUDIO","VIDEO"];function mm(e){return Ls(e,Vc)}function pm(e){return Kc(e,Vc)}function Ls(e,t){return t.indexOf(e.nodeName)>=0}function Kc(e,t){return e.getElementsByTagName&&t.some(function(n){return e.getElementsByTagName(n).length})}var tt={};tt.paragraph={filter:"p",replacement:function(e){return`
|
|
39
39
|
|
|
40
40
|
`+e+`
|
package/index.mjs
CHANGED
|
@@ -2559,39 +2559,40 @@ const Wa = ({
|
|
|
2559
2559
|
styling: r = {},
|
|
2560
2560
|
gtmContext: a = "member",
|
|
2561
2561
|
gtmType: i = "member-click",
|
|
2562
|
-
className: s = ""
|
|
2562
|
+
className: s = "",
|
|
2563
|
+
alt: o = "no-alt"
|
|
2563
2564
|
}) => {
|
|
2564
|
-
const
|
|
2565
|
-
|
|
2565
|
+
const l = de(), { size: u = "medium" } = r, c = kc(t);
|
|
2566
|
+
c.name || (c.name = l.formatMessage({
|
|
2566
2567
|
id: `member_${typeof t == "string" ? t : "community"}`
|
|
2567
2568
|
}));
|
|
2568
|
-
const { name:
|
|
2569
|
-
let { url:
|
|
2570
|
-
t.link !== void 0 && (t.link === !1 ?
|
|
2571
|
-
const
|
|
2569
|
+
const { name: f, image: m } = c;
|
|
2570
|
+
let { url: p } = c;
|
|
2571
|
+
t.link !== void 0 && (t.link === !1 ? p = void 0 : p = t.link);
|
|
2572
|
+
const g = Lh(c), h = n && n.createdAt ? as(n.createdAt) : !1, y = n && n.createdAt ? yc(n.createdAt) : "";
|
|
2572
2573
|
return X.createElement(e, {
|
|
2573
|
-
className: Z("member text-medium",
|
|
2574
|
+
className: Z("member text-medium", u, s),
|
|
2574
2575
|
children: /* @__PURE__ */ d.jsxs(
|
|
2575
2576
|
rr,
|
|
2576
2577
|
{
|
|
2577
|
-
href:
|
|
2578
|
+
href: p,
|
|
2578
2579
|
gtmType: i,
|
|
2579
2580
|
gtmContext: a,
|
|
2580
|
-
onClick: (
|
|
2581
|
-
|
|
2581
|
+
onClick: (v) => {
|
|
2582
|
+
v == null || v.stopPropagation();
|
|
2582
2583
|
},
|
|
2583
2584
|
children: [
|
|
2584
|
-
/* @__PURE__ */ d.jsx(Fn, { name:
|
|
2585
|
+
/* @__PURE__ */ d.jsx(Fn, { name: f, src: m, alt: o }),
|
|
2585
2586
|
/* @__PURE__ */ d.jsxs("p", { className: "details", children: [
|
|
2586
|
-
/* @__PURE__ */ d.jsx("strong", { children:
|
|
2587
|
+
/* @__PURE__ */ d.jsx("strong", { children: f }),
|
|
2587
2588
|
n && /* @__PURE__ */ d.jsxs("span", { className: "additional-content", children: [
|
|
2588
|
-
n.createdAt &&
|
|
2589
|
-
{ id: `dates_${
|
|
2590
|
-
{ number:
|
|
2589
|
+
n.createdAt && h && /* @__PURE__ */ d.jsx("span", { className: "date", title: y, "aria-label": y, children: l.formatMessage(
|
|
2590
|
+
{ id: `dates_${h.path}` },
|
|
2591
|
+
{ number: h.number }
|
|
2591
2592
|
) }),
|
|
2592
|
-
n.didEdit && /* @__PURE__ */ d.jsx("em", { children:
|
|
2593
|
+
n.didEdit && /* @__PURE__ */ d.jsx("em", { children: l.formatMessage({ id: "discussion_edited" }) })
|
|
2593
2594
|
] }),
|
|
2594
|
-
|
|
2595
|
+
g && /* @__PURE__ */ d.jsx("small", { className: Z({ "text-medium": u === "large" }), children: g })
|
|
2595
2596
|
] })
|
|
2596
2597
|
]
|
|
2597
2598
|
}
|
package/package.json
CHANGED
package/user/member/member.d.ts
CHANGED
|
@@ -43,8 +43,10 @@ interface Props {
|
|
|
43
43
|
className?: string;
|
|
44
44
|
/** The language to use for the text */
|
|
45
45
|
locale?: string;
|
|
46
|
+
/** The alt text for the image */
|
|
47
|
+
alt?: string;
|
|
46
48
|
}
|
|
47
|
-
declare const Member: ({ element, member: memberDetails, additionalContent, styling, gtmContext, gtmType, className, }: Props) => React.DetailedReactHTMLElement<{
|
|
49
|
+
declare const Member: ({ element, member: memberDetails, additionalContent, styling, gtmContext, gtmType, className, alt, }: Props) => React.DetailedReactHTMLElement<{
|
|
48
50
|
className: string;
|
|
49
51
|
children: import("react/jsx-runtime").JSX.Element;
|
|
50
52
|
}, HTMLElement>;
|