@apolitical/component-library 10.1.14 → 10.1.15
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/constants/stats.d.ts +2 -2
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/constants/stats.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const NUMBER_OF_USERS = "
|
|
2
|
-
export declare const NUMBER_OF_COUNTRIES = "
|
|
1
|
+
export declare const NUMBER_OF_USERS = "500,000+";
|
|
2
|
+
export declare const NUMBER_OF_COUNTRIES = "170+";
|
package/index.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<%s {...props} />
|
|
24
24
|
React keys must be passed directly to JSX without using spread:
|
|
25
25
|
let props = %s;
|
|
26
|
-
<%s key={someKey} {...props} />`,j,Y,re,Y),k[Y+j]=!0)}if(Y=null,R!==void 0&&(n(R),Y=""+R),s(q)&&(n(q.key),Y=""+q.key),"key"in q){R={};for(var Q in q)Q!=="key"&&(R[Q]=q[Q])}else R=q;return Y&&o(R,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,Y,R,i(),H,z)}function d(b){f(b)?b._store&&(b._store.validated=1):typeof b=="object"&&b!==null&&b.$$typeof===B&&(b._payload.status==="fulfilled"?f(b._payload.value)&&b._payload.value._store&&(b._payload.value._store.validated=1):b._store&&(b._store.validated=1))}function f(b){return typeof b=="object"&&b!==null&&b.$$typeof===g}var m=E,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),C=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),L=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,P=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(b){return b()}};var U,D={},X=m.react_stack_bottom_frame.bind(m,a)(),Z=M(r(a)),k={};no.Fragment=y,no.jsx=function(b,q,R){var j=1e4>L.recentlyCreatedOwnerStacks++;return c(b,q,R,!1,j?Error("react-stack-top-frame"):X,j?M(r(b)):Z)},no.jsxs=function(b,q,R){var j=1e4>L.recentlyCreatedOwnerStacks++;return c(b,q,R,!0,j?Error("react-stack-top-frame"):X,j?M(r(b)):Z)}}()),no}process.env.NODE_ENV==="production"?rh.exports=Tx():rh.exports=_x();var h=rh.exports;const Cx=50,xx=8,y4=(e,t)=>{if(!e)return!1;const n=E.useRef(null),r=t||n;return E.useEffect(()=>{const i=r.current,a=()=>{if(i){const s=parseInt(i.style.height.replace("px",""))||0,o=i.scrollHeight,l=Math.abs(o-s);o!==s&&l>xx&&(i.style.height=`${o}px`,i.scrollHeight>=Cx?i.classList.contains("single-line")&&i.classList.remove("single-line"):i.classList.contains("single-line")||i.classList.add("single-line"))}};if(i)return a(),i.addEventListener("input",a),()=>i.removeEventListener("input",a)},[]),r},E4=()=>{const[e,t]=E.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return E.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},Ss=(e,t)=>{const n=E.useRef(!1);E.useEffect(()=>{n.current?e():n.current=!0},t)};function il(e,t,n){var r=this,i=E.useRef(null),a=E.useRef(0),s=E.useRef(null),o=E.useRef([]),l=E.useRef(),u=E.useRef(),c=E.useRef(e),d=E.useRef(!0);c.current=e;var f=typeof window<"u",m=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,y="maxWait"in n,v="debounceOnServer"in n&&!!n.debounceOnServer,T=y?Math.max(+n.maxWait||0,t):null;E.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var _=E.useMemo(function(){var C=function($){var F=o.current,L=l.current;return o.current=l.current=null,a.current=$,u.current=c.current.apply(L,F)},w=function($,F){m&&cancelAnimationFrame(s.current),s.current=m?requestAnimationFrame($):setTimeout($,F)},x=function($){if(!d.current)return!1;var F=$-i.current;return!i.current||F>=t||F<0||y&&$-a.current>=T},S=function($){return s.current=null,p&&o.current?C($):(o.current=l.current=null,u.current)},N=function $(){var F=Date.now();if(x(F))return S(F);if(d.current){var L=t-(F-i.current),O=y?Math.min(L,T-(F-a.current)):L;w($,O)}},B=function(){if(f||v){var $=Date.now(),F=x($);if(o.current=[].slice.call(arguments),l.current=r,i.current=$,F){if(!s.current&&d.current)return a.current=i.current,w(N,t),g?C(i.current):u.current;if(y)return w(N,t),C(i.current)}return s.current||w(N,t),u.current}};return B.cancel=function(){s.current&&(m?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,o.current=i.current=l.current=s.current=null},B.isPending=function(){return!!s.current},B.flush=function(){return s.current?S(Date.now()):u.current},B},[g,y,t,T,p,m,f,v]);return _}function b4(e,t,n){var r=n===void 0?{}:n,i=r.leading,a=r.trailing;return il(e,t,{maxWait:t,leading:i===void 0||i,trailing:a===void 0||a})}let z1;const Wi=(e=!0,t=!1,n="window")=>{if(!e)return;const[r,i]=E.useState(0)||[!1,()=>{}],a=n==="window"?[]:[n];E.useEffect(()=>(o(),window.addEventListener("resize",u),window.addEventListener("hashchange",u),window.addEventListener("hiddenSectionVisible",l),()=>{clearTimeout(z1),u.flush(),window.removeEventListener("resize",u),window.removeEventListener("hashchange",u),window.removeEventListener("hiddenSectionVisible",l)}),a);const s=()=>{if(n)return n==="window"?window.innerWidth:n.offsetWidth},o=()=>{i(s())},l=({detail:c})=>{const{id:d}=c;n==="window"||!n.closest(`#${d}`)||s()===r||o()},u=b4(()=>{s()!==r&&(t&&(clearTimeout(z1),document.body.classList.add("is-resizing"),z1=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},js=(e,t)=>{Array.isArray(t)||(t=[t]);const n=Kn(e);return t.forEach(({type:r,value:i})=>{hx(n,r,i)}),n},T4=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},_4=(e,t,n)=>{let r=n.mobile;for(const i in t){const a=parseInt(String(t[i]));if(e>=a)r=n[a];else if(e<a)break}return r},C4=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),x4=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()).replace(/[&\s]+/g,""),w4=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),wx=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()),Yn="https://assets.apolitical.co/",ls={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},mm="apolitical_locale",So={ARTICLE:"microcourseArticle",DISCUSSION:"microcourseDiscussion",QUIZ:"assessmentQuiz"},ih="SU:",al="DELETED",A4="Invalid token error: Logging user out...",Ax="250,000+",Sx="160+",Aa=/@{{([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})}}/g,S4=new RegExp("(?<=^|\\s)@([A-Za-z]+(?:[- ]?[A-Za-z]*)*)$"),pm={LOCAL_STORAGE:{},SESSION_STORAGE:{EMAIL:"email"}};function kx(e){return e?{"--icon":`url(${Yn}icons/${e}.svg)`}:{}}const va={milliseconds:{inSecond:1e3,inMinute:6e4,inHour:36e5,inDay:864e5},year:{weeks:52,days:365}},k4=(e,t="en")=>new Date(e).toLocaleString(t,{day:"numeric",month:"short"}),gm=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),ah=e=>{let t;const n=yc(),r=yc(new Date(e));try{t=n.getTime()-r.getTime()}catch{return""}const i=t/va.milliseconds.inHour,a=Math.floor(t/va.milliseconds.inDay);if(a<1)return i<1?{path:"now"}:{path:"hours",number:Math.floor(i)};if(a<7)return{path:"days",number:a};const s=Math.floor(a/7);return s<=va.year.weeks?{path:"weeks",number:s}:{path:"years",number:Math.floor(a/va.year.days)}},yc=e=>{const n=(e||new Date).toUTCString();return new Date(n)},Dx=(e,t,n)=>{let r;const i=yc(),a=yc(new Date(e));try{r=i.getTime()-a.getTime()}catch{return!1}switch(n){case"seconds":return r/va.milliseconds.inSecond<=t;case"minutes":return r/va.milliseconds.inMinute<=t;case"hours":return r/va.milliseconds.inHour<=t}return!1},Ox=(e,t)=>{const n=new Date(e);return Math.abs(new Date().getTime()-n.getTime())/(1e3*60*60*24)<t},rg=e=>new Promise(t=>setTimeout(t,e));function D4(e){const t=document.cookie.match(new RegExp("(^|;\\s*)"+e+"=([^;]*)"));return t?decodeURIComponent(t[2]):null}const Nx=()=>{let e=!1;return typeof window<"u"&&(e=!!(window&&window.location&&window.location.href&&window.location.href.includes("localhost"))),e},Vt={apolitical:"Apolitical",language_en:"English",language_fr:"French","language_fr-CA":"French Canadian",language_id:"Indonesian",language_pt:"Portuguese",language_es:"Spanish","language_es-419":"Spanish (Latin America)",language_ar:"Arabic",language_pl:"Polish",language_it:"Italian",language_ja:"Japanese",language_sr:"Serbian",language_ko:"Korean",language_de:"German",language_pt_BR:"Portuguese (Brazil)",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",card_carousel_viewAll:"View all",card_label_communityPage:"Community",card_label_event:"Event",card_label_learningHub:"Programme",card_label_listPage:"List",card_label_microcourse:"Course",card_label_qaQuestion:"Q&A",card_label_solutionArticle:"Article",card_bootcamp:"Email boot camp",card_ended:"Ended",card_new:"New",card_registered:"Registered",card_partner:"{partner} and {number} more",card_contributors_event:"Multiple speakers",card_contributors_solutionArticle:"Multiple authors",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_member_type_owner:"Owner",card_member_type_member:"Member",card_member_count:"{count} members",card_cta_people:"View profile",card_cta_communityPage:"Join now",card_cta_event:"Register now",card_cta_microcourse:"Enrol now",card_cta_communityPage_loading:"Joining...",card_cta_event_loading:"Registering...",card_cta_microcourse_loading:"Enrolling...",card_cta_communityPage_done:"Joined",card_cta_event_done:"Registered",card_cta_microcourse_done:"Enrolled",carousel_pagination_previous:"previous",carousel_pagination_previousSlide:"Previous slide",carousel_pagination_next:"next",carousel_pagination_nextSlide:"Next slide",carousel_pagination_slide:"Slide {number} of {total}",carousel_pagination_ariaLive:"On {direction} slide: {count, plural, one {1 card} other {# cards}} available",carousel_pagination_ariaLive_slide:"On slide {slide}: {count, plural, one {1 card} other {# cards}} available",activitySection_notFoundError:"Post not found",activitySection_language_switcher_info:"Our global community means you might see replies in other languages, even with a filter.",activitySection_language_switcher_all_languages_option:"Languages: All",activitiesFeed_sorting_label:"Choose feed sorting method",activitiesFeed_rankingMethod_recent:"Recent",activitiesFeed_rankingMethod_popular:"Popular",activitiesFeed_rankingMethod_internalTesting:"Testing",activitiesFeed_noActivities_inCategories:"There are no posts of this type yet.",activitiesFeed_noActivities:"Activities will appear here.",activitiesFeed_noActivities_button:"Explore Communities",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",community_sortSuccess:"Feed ordered by {order}",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_options_menu:"Options menu",joinCommunityButton_leaving:"Leaving...",joinCommunityButton_closed_tooltip:"Please contact the admin of this closed community if you would like to join it.",joinCommunityButton_aria_live:"You are {action} this community",member_apolitical:"Apolitical",member_community:"Community post",member_deleted:"Deleted user",member_profile:"Update profile",member_createdAt_community:"{time} ago in <link>{community}</link>",member_createdNow_community:"now in <link>{community}</link>",membersList:"Members",membersList_owner:"Owner",membersList_profile:"Update profile",membersList_modal_title:"Update profile",courseStructure_section:"{number, plural, =0 {Start here} other {Section #}}",courseStructure_section_end:"End here",courseStructure_time_left:"left",courseStructure_time_completed:"Completed",courseProgression_done:"<percent>{number}%</percent> done",courseProgression_timeLeft:"left","lessonType_analyse-data":"Analyse data","lessonType_analyse-scenarios":"Analyse scenarios","lessonType_attend-webinar":"Attend webinar","lessonType_brainstorm-ideas":"Brainstorm ideas","lessonType_discuss-with-peers":"Discuss with peers","lessonType_discuss-with-team":"Discuss with team","lessonType_do-activity":"Do activity","lessonType_do-assessment":"Do assessment","lessonType_explore-casebook":"Explore casebook","lessonType_fill-out-workbook":"Fill out workbook","lessonType_fill-out-worksheet":"Fill out worksheet","lessonType_investigate-interview":"Investigate interview","lessonType_listen-to-audio":"Listen to audio","lessonType_listen-to-audiocast":"Listen to audiocast","lessonType_listen-to-podcast":"Listen to podcast","lessonType_read-article":"Read article","lessonType_read-article-by-expert":"Read article by expert","lessonType_read-article-by-public-servant":"Read article by public servant","lessonType_read-conclusion":"Read conclusion","lessonType_read-infographic":"Read infographic","lessonType_read-introduction":"Read introduction","lessonType_read-resource":"Read resource","lessonType_reflect-on-content":"Reflect on content","lessonType_share-experiences":"Share experiences","lessonType_take-quiz":"Take quiz","lessonType_use-toolkit":"Use toolkit","lessonType_watch-video":"Watch video","lessonType_watch-webinar":"Watch webinar",markCompleteButton:"Mark as complete",markCompleteButton_completed:"Lesson complete",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_edit:"Edit",discussion_action_poll:"poll",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_pinned_post:"Pinned Post",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
|
|
26
|
+
<%s key={someKey} {...props} />`,j,Y,re,Y),k[Y+j]=!0)}if(Y=null,R!==void 0&&(n(R),Y=""+R),s(q)&&(n(q.key),Y=""+q.key),"key"in q){R={};for(var Q in q)Q!=="key"&&(R[Q]=q[Q])}else R=q;return Y&&o(R,typeof b=="function"?b.displayName||b.name||"Unknown":b),u(b,Y,R,i(),H,z)}function d(b){f(b)?b._store&&(b._store.validated=1):typeof b=="object"&&b!==null&&b.$$typeof===B&&(b._payload.status==="fulfilled"?f(b._payload.value)&&b._payload.value._store&&(b._payload.value._store.validated=1):b._store&&(b._store.validated=1))}function f(b){return typeof b=="object"&&b!==null&&b.$$typeof===g}var m=E,g=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),C=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),B=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),F=Symbol.for("react.client.reference"),L=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=Object.prototype.hasOwnProperty,P=Array.isArray,M=console.createTask?console.createTask:function(){return null};m={react_stack_bottom_frame:function(b){return b()}};var U,D={},X=m.react_stack_bottom_frame.bind(m,a)(),Z=M(r(a)),k={};no.Fragment=y,no.jsx=function(b,q,R){var j=1e4>L.recentlyCreatedOwnerStacks++;return c(b,q,R,!1,j?Error("react-stack-top-frame"):X,j?M(r(b)):Z)},no.jsxs=function(b,q,R){var j=1e4>L.recentlyCreatedOwnerStacks++;return c(b,q,R,!0,j?Error("react-stack-top-frame"):X,j?M(r(b)):Z)}}()),no}process.env.NODE_ENV==="production"?rh.exports=Tx():rh.exports=_x();var h=rh.exports;const Cx=50,xx=8,y4=(e,t)=>{if(!e)return!1;const n=E.useRef(null),r=t||n;return E.useEffect(()=>{const i=r.current,a=()=>{if(i){const s=parseInt(i.style.height.replace("px",""))||0,o=i.scrollHeight,l=Math.abs(o-s);o!==s&&l>xx&&(i.style.height=`${o}px`,i.scrollHeight>=Cx?i.classList.contains("single-line")&&i.classList.remove("single-line"):i.classList.contains("single-line")||i.classList.add("single-line"))}};if(i)return a(),i.addEventListener("input",a),()=>i.removeEventListener("input",a)},[]),r},E4=()=>{const[e,t]=E.useState(window.location.pathname),n=()=>{const r=window.location.pathname;t(r)};return E.useEffect(()=>(window.addEventListener("popstate",n),()=>{window.removeEventListener("popstate",n)}),[]),e},Ss=(e,t)=>{const n=E.useRef(!1);E.useEffect(()=>{n.current?e():n.current=!0},t)};function il(e,t,n){var r=this,i=E.useRef(null),a=E.useRef(0),s=E.useRef(null),o=E.useRef([]),l=E.useRef(),u=E.useRef(),c=E.useRef(e),d=E.useRef(!0);c.current=e;var f=typeof window<"u",m=!t&&t!==0&&f;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var g=!!(n=n||{}).leading,p=!("trailing"in n)||!!n.trailing,y="maxWait"in n,v="debounceOnServer"in n&&!!n.debounceOnServer,T=y?Math.max(+n.maxWait||0,t):null;E.useEffect(function(){return d.current=!0,function(){d.current=!1}},[]);var _=E.useMemo(function(){var C=function($){var F=o.current,L=l.current;return o.current=l.current=null,a.current=$,u.current=c.current.apply(L,F)},w=function($,F){m&&cancelAnimationFrame(s.current),s.current=m?requestAnimationFrame($):setTimeout($,F)},x=function($){if(!d.current)return!1;var F=$-i.current;return!i.current||F>=t||F<0||y&&$-a.current>=T},S=function($){return s.current=null,p&&o.current?C($):(o.current=l.current=null,u.current)},N=function $(){var F=Date.now();if(x(F))return S(F);if(d.current){var L=t-(F-i.current),O=y?Math.min(L,T-(F-a.current)):L;w($,O)}},B=function(){if(f||v){var $=Date.now(),F=x($);if(o.current=[].slice.call(arguments),l.current=r,i.current=$,F){if(!s.current&&d.current)return a.current=i.current,w(N,t),g?C(i.current):u.current;if(y)return w(N,t),C(i.current)}return s.current||w(N,t),u.current}};return B.cancel=function(){s.current&&(m?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,o.current=i.current=l.current=s.current=null},B.isPending=function(){return!!s.current},B.flush=function(){return s.current?S(Date.now()):u.current},B},[g,y,t,T,p,m,f,v]);return _}function b4(e,t,n){var r=n===void 0?{}:n,i=r.leading,a=r.trailing;return il(e,t,{maxWait:t,leading:i===void 0||i,trailing:a===void 0||a})}let z1;const Wi=(e=!0,t=!1,n="window")=>{if(!e)return;const[r,i]=E.useState(0)||[!1,()=>{}],a=n==="window"?[]:[n];E.useEffect(()=>(o(),window.addEventListener("resize",u),window.addEventListener("hashchange",u),window.addEventListener("hiddenSectionVisible",l),()=>{clearTimeout(z1),u.flush(),window.removeEventListener("resize",u),window.removeEventListener("hashchange",u),window.removeEventListener("hiddenSectionVisible",l)}),a);const s=()=>{if(n)return n==="window"?window.innerWidth:n.offsetWidth},o=()=>{i(s())},l=({detail:c})=>{const{id:d}=c;n==="window"||!n.closest(`#${d}`)||s()===r||o()},u=b4(()=>{s()!==r&&(t&&(clearTimeout(z1),document.body.classList.add("is-resizing"),z1=setTimeout(()=>{document.body.classList.remove("is-resizing")},550)),o())},500,{leading:!0});return r},js=(e,t)=>{Array.isArray(t)||(t=[t]);const n=Kn(e);return t.forEach(({type:r,value:i})=>{hx(n,r,i)}),n},T4=e=>{const t=[];return e.forEach(n=>{const r=parseInt(n);isNaN(r)||t.push(r)}),t.sort((n,r)=>n-r)},_4=(e,t,n)=>{let r=n.mobile;for(const i in t){const a=parseInt(String(t[i]));if(e>=a)r=n[a];else if(e<a)break}return r},C4=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),x4=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()).replace(/[&\s]+/g,""),w4=(e="")=>e.charAt(0).toUpperCase()+e.slice(1),wx=(e="")=>e.replace(/(?:^\w|[A-Z]|\b\w)/g,t=>t.toUpperCase()),Yn="https://assets.apolitical.co/",ls={general:"hello@apolitical.co",support:"concierge@apolitical.co","data-protection":{default:"dpo@apolitical.co",eu:"dpo.agl@apolitical.foundation"}},mm="apolitical_locale",So={ARTICLE:"microcourseArticle",DISCUSSION:"microcourseDiscussion",QUIZ:"assessmentQuiz"},ih="SU:",al="DELETED",A4="Invalid token error: Logging user out...",Ax="500,000+",Sx="170+",Aa=/@{{([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})}}/g,S4=new RegExp("(?<=^|\\s)@([A-Za-z]+(?:[- ]?[A-Za-z]*)*)$"),pm={LOCAL_STORAGE:{},SESSION_STORAGE:{EMAIL:"email"}};function kx(e){return e?{"--icon":`url(${Yn}icons/${e}.svg)`}:{}}const va={milliseconds:{inSecond:1e3,inMinute:6e4,inHour:36e5,inDay:864e5},year:{weeks:52,days:365}},k4=(e,t="en")=>new Date(e).toLocaleString(t,{day:"numeric",month:"short"}),gm=(e,t="en")=>new Date(e).toLocaleString(t,{weekday:"long",day:"numeric",month:"short",year:"numeric"}),ah=e=>{let t;const n=yc(),r=yc(new Date(e));try{t=n.getTime()-r.getTime()}catch{return""}const i=t/va.milliseconds.inHour,a=Math.floor(t/va.milliseconds.inDay);if(a<1)return i<1?{path:"now"}:{path:"hours",number:Math.floor(i)};if(a<7)return{path:"days",number:a};const s=Math.floor(a/7);return s<=va.year.weeks?{path:"weeks",number:s}:{path:"years",number:Math.floor(a/va.year.days)}},yc=e=>{const n=(e||new Date).toUTCString();return new Date(n)},Dx=(e,t,n)=>{let r;const i=yc(),a=yc(new Date(e));try{r=i.getTime()-a.getTime()}catch{return!1}switch(n){case"seconds":return r/va.milliseconds.inSecond<=t;case"minutes":return r/va.milliseconds.inMinute<=t;case"hours":return r/va.milliseconds.inHour<=t}return!1},Ox=(e,t)=>{const n=new Date(e);return Math.abs(new Date().getTime()-n.getTime())/(1e3*60*60*24)<t},rg=e=>new Promise(t=>setTimeout(t,e));function D4(e){const t=document.cookie.match(new RegExp("(^|;\\s*)"+e+"=([^;]*)"));return t?decodeURIComponent(t[2]):null}const Nx=()=>{let e=!1;return typeof window<"u"&&(e=!!(window&&window.location&&window.location.href&&window.location.href.includes("localhost"))),e},Vt={apolitical:"Apolitical",language_en:"English",language_fr:"French","language_fr-CA":"French Canadian",language_id:"Indonesian",language_pt:"Portuguese",language_es:"Spanish","language_es-419":"Spanish (Latin America)",language_ar:"Arabic",language_pl:"Polish",language_it:"Italian",language_ja:"Japanese",language_sr:"Serbian",language_ko:"Korean",language_de:"German",language_pt_BR:"Portuguese (Brazil)",dates_now:"now",dates_hours:"{number}h",dates_days:"{number}d",dates_weeks:"{number}w",dates_years:"{number}y",card_carousel_viewAll:"View all",card_label_communityPage:"Community",card_label_event:"Event",card_label_learningHub:"Programme",card_label_listPage:"List",card_label_microcourse:"Course",card_label_qaQuestion:"Q&A",card_label_solutionArticle:"Article",card_bootcamp:"Email boot camp",card_ended:"Ended",card_new:"New",card_registered:"Registered",card_partner:"{partner} and {number} more",card_contributors_event:"Multiple speakers",card_contributors_solutionArticle:"Multiple authors",card_answers:"{number, plural, =0 {0 answers} one {# answer} other {# answers}}",card_time_ago:"{time} ago",card_time_read:"{time} min read",card_watch:"Watch recording",card_member_type_owner:"Owner",card_member_type_member:"Member",card_member_count:"{count} members",card_cta_people:"View profile",card_cta_communityPage:"Join now",card_cta_event:"Register now",card_cta_microcourse:"Enrol now",card_cta_communityPage_loading:"Joining...",card_cta_event_loading:"Registering...",card_cta_microcourse_loading:"Enrolling...",card_cta_communityPage_done:"Joined",card_cta_event_done:"Registered",card_cta_microcourse_done:"Enrolled",carousel_pagination_previous:"previous",carousel_pagination_previousSlide:"Previous slide",carousel_pagination_next:"next",carousel_pagination_nextSlide:"Next slide",carousel_pagination_slide:"Slide {number} of {total}",carousel_pagination_ariaLive:"On {direction} slide: {count, plural, one {1 card} other {# cards}} available",carousel_pagination_ariaLive_slide:"On slide {slide}: {count, plural, one {1 card} other {# cards}} available",activitySection_notFoundError:"Post not found",activitySection_language_switcher_info:"Our global community means you might see replies in other languages, even with a filter.",activitySection_language_switcher_all_languages_option:"Languages: All",activitiesFeed_sorting_label:"Choose feed sorting method",activitiesFeed_rankingMethod_recent:"Recent",activitiesFeed_rankingMethod_popular:"Popular",activitiesFeed_rankingMethod_internalTesting:"Testing",activitiesFeed_noActivities_inCategories:"There are no posts of this type yet.",activitiesFeed_noActivities:"Activities will appear here.",activitiesFeed_noActivities_button:"Explore Communities",communityDetails_members:"Members",communityDetails_viewAll:"View all",communityDetails_invite:"Invite colleagues",community_joinToPost:"Join community to create a post.",community_sortSuccess:"Feed ordered by {order}",joinCommunityButton:"Join community",joinCommunityButton_short:"Join",joinCommunityButton_joining:"Joining...",joinCommunityButton_member:"Member",joinCommunityButton_member_aria:"Leave community",joinCommunityButton_options_menu:"Options menu",joinCommunityButton_leaving:"Leaving...",joinCommunityButton_closed_tooltip:"Please contact the admin of this closed community if you would like to join it.",joinCommunityButton_aria_live:"You are {action} this community",member_apolitical:"Apolitical",member_community:"Community post",member_deleted:"Deleted user",member_profile:"Update profile",member_createdAt_community:"{time} ago in <link>{community}</link>",member_createdNow_community:"now in <link>{community}</link>",membersList:"Members",membersList_owner:"Owner",membersList_profile:"Update profile",membersList_modal_title:"Update profile",courseStructure_section:"{number, plural, =0 {Start here} other {Section #}}",courseStructure_section_end:"End here",courseStructure_time_left:"left",courseStructure_time_completed:"Completed",courseProgression_done:"<percent>{number}%</percent> done",courseProgression_timeLeft:"left","lessonType_analyse-data":"Analyse data","lessonType_analyse-scenarios":"Analyse scenarios","lessonType_attend-webinar":"Attend webinar","lessonType_brainstorm-ideas":"Brainstorm ideas","lessonType_discuss-with-peers":"Discuss with peers","lessonType_discuss-with-team":"Discuss with team","lessonType_do-activity":"Do activity","lessonType_do-assessment":"Do assessment","lessonType_explore-casebook":"Explore casebook","lessonType_fill-out-workbook":"Fill out workbook","lessonType_fill-out-worksheet":"Fill out worksheet","lessonType_investigate-interview":"Investigate interview","lessonType_listen-to-audio":"Listen to audio","lessonType_listen-to-audiocast":"Listen to audiocast","lessonType_listen-to-podcast":"Listen to podcast","lessonType_read-article":"Read article","lessonType_read-article-by-expert":"Read article by expert","lessonType_read-article-by-public-servant":"Read article by public servant","lessonType_read-conclusion":"Read conclusion","lessonType_read-infographic":"Read infographic","lessonType_read-introduction":"Read introduction","lessonType_read-resource":"Read resource","lessonType_reflect-on-content":"Reflect on content","lessonType_share-experiences":"Share experiences","lessonType_take-quiz":"Take quiz","lessonType_use-toolkit":"Use toolkit","lessonType_watch-video":"Watch video","lessonType_watch-webinar":"Watch webinar",markCompleteButton:"Mark as complete",markCompleteButton_completed:"Lesson complete",discussion_action_answer:"answer",discussion_action_comment:"comment",discussion_action_edit:"Edit",discussion_action_poll:"poll",discussion_action_post:"post",discussion_action_response:"response",discussion_action_reply:"reply",discussion_action_question:"question",discussion_edited:"Edited",discussion_delete_title:"Delete {action}",discussion_delete_text:"<p>Are you sure you want to delete your {action}?</p><p>This can't be undone.</p>",discussion_delete_cancel:"Cancel",discussion_delete_delete:"Delete",discussion_delete_error:"We are unable to delete your {action} at the moment. Please try again later or contact us if problem persists.",discussion_pinned_post:"Pinned Post",discussion_reply:"Reply",discussion_report_subject:"Report a post on Apolitical",discussion_report_body:`I'd like to report the {contentType} <{contentSlug}> at {contentUrl}.
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
Please explain why you're reporting this post. Reasons could include: inappropriate language, harassment, spam, hate speech, false information, among others. Include as much detail as you feel comfortable.
|
package/index.mjs
CHANGED
|
@@ -524,7 +524,7 @@ const Ma = (e = !0, t = !1, n = "window") => {
|
|
|
524
524
|
ARTICLE: "microcourseArticle",
|
|
525
525
|
DISCUSSION: "microcourseDiscussion",
|
|
526
526
|
QUIZ: "assessmentQuiz"
|
|
527
|
-
}, H0 = "SU:", kc = "DELETED", G3 = "Invalid token error: Logging user out...", vae = "
|
|
527
|
+
}, H0 = "SU:", kc = "DELETED", G3 = "Invalid token error: Logging user out...", vae = "500,000+", yae = "170+", Io = /@{{([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})}}/g, Y3 = new RegExp("(?<=^|\\s)@([A-Za-z]+(?:[- ]?[A-Za-z]*)*)$"), p4 = {
|
|
528
528
|
LOCAL_STORAGE: {},
|
|
529
529
|
SESSION_STORAGE: {
|
|
530
530
|
EMAIL: "email"
|