"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[775],{71439:function(e,t,i){i.d(t,{l:function(){return eL}});var r=i(85893),l=i(87536),s=i(23435),n=i(35913),o=i(9061),a=i(67294),d=i(8438),c=i(13282),u=i(1604),m=i(78990);function f(e,t){return"".concat(e,"-").concat(t)}var h=i(64487),p=i(39709),x=i(69220),v=i(21843),g=i(13493),b=i(27248),j=i(71187),w=i(75330),y=i(8520),_=i(81075),S=i(24693),N=i(72657),C=i(86758),k=i(51240),F=i(54692),L=i(43407);let I=(0,a.createContext)(L.p.ShortForm);function T(e){return(0,r.jsx)(I.Provider,{value:e.formTheme,children:e.children})}function A(){return(0,a.useContext)(I)}var P=i(94184),R=i.n(P);function O(e){let{label:t}=e,i=A();return(0,r.jsx)(F._,{className:R()({"text-base-sm":i===L.p.ShortForm,"text-lg":i===L.p.LongForm},"font-[number:var(--font-semibold-relative)] inline-block pb-1.5"),children:t})}var z=i(32866),E=i(90258);function M(e){let{name:t,errors:i}=e;return(0,r.jsx)(E.x,{slot:"errorMessage",className:"text-xs text-[color:var(--input-invalid-color)] font-[number:var(--font-semibold-relative)]",children:(0,r.jsx)(z.B,{errors:i,name:t})})}function D(e){let{className:t}=e,i=R()("h-5 w-5",t);return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 19l-7-7 7-7"})})}function B(e){let{className:t}=e,i=R()("h-5 w-5",t);return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})}function V(e){let{className:t}=e,i=R()("h-5 w-5",t);return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:i,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5l7 7-7 7"})})}function U(e){let{field:t,fieldState:i,formState:l,label:s,inputTheme:n}=e,{value:o,disabled:a,...d}=t;return(0,r.jsxs)(b.Mt,{className:"[font-family:var(--regular-font-family)]",style:(0,k.n)(n,!0,!1),isInvalid:i.invalid,isDisabled:a,value:null!=o?o:null,...d,children:[(0,r.jsx)(O,{label:s}),(0,r.jsxs)("div",{children:[(0,r.jsxs)(j.Z,{className:R()("inline-flex rounded-[var(--rounded-md-relative)] border-rem-px border-solid","border-[color:var(--input-color)] pl-3 pr-2.5 py-1.5 items-center","data-[invalid=true]:border-[color:var(--input-invalid-color)]",{"opacity-60 disabled:hover:cursor-not-allowed":a}),children:[(0,r.jsx)(w.Wr,{className:"flex",children:e=>(0,r.jsx)(w.kE,{segment:e,className:R()({"opacity-70":!o},"outline-[color:var(--input-focus-color)] text-[color:var(--input-text-color)] outline-offset-2")})}),(0,r.jsx)(y.z,{className:"outline-[color:var(--input-focus-color)] ml-3.5 disabled:opacity-60 disabled:hover:cursor-not-allowed",isDisabled:a,children:(0,r.jsx)(B,{className:"mt-0.5"})})]}),(0,r.jsx)("div",{children:(0,r.jsx)(M,{name:d.name,errors:l.errors})})]}),(0,r.jsx)(_.J,{className:e=>{let{isEntering:t,isExiting:i}=e;return"bg-[color:var(--surface)] shadow-xl rounded-[var(--rounded-xl-relative)]\n                    text-[color:var(--onSurface)] border-solid border-rem-px border-[color:var(--separator)]\n                    ".concat(t?"animate-in fade-in placement-bottom:slide-in-from-top-1 placement-top:slide-in-from-bottom-1 ease-out duration-200":"","\n                    ").concat(i?"animate-out fade-out placement-bottom:slide-out-to-top-1 placement-top:slide-out-to-bottom-1 ease-in duration-150":"")},children:(0,r.jsx)(S.Vq,{className:"p-4",children:(0,r.jsxs)(N.f,{children:[(0,r.jsxs)("header",{className:"flex pb-5 justify-between items-center pl-4 pr-2.5",children:[(0,r.jsx)(C.X,{className:"[font-family:var(--header-font-family)] text-xl capitalize"}),(0,r.jsxs)("div",{className:"flex",children:[(0,r.jsx)(y.z,{slot:"previous",className:"focus-visible:ring-2 ring-[color:var(--onSurface)] outline-none mr-2.5 bg-[color:var(--primary)] rounded-full text-[color:var(--onPrimary)] active:scale-95 hover:scale-110 h-7 w-7",children:(0,r.jsx)(D,{className:"ml-0.75"})}),(0,r.jsx)(y.z,{slot:"next",className:"focus-visible:ring-2 ring-[color:var(--onSurface)] outline-none bg-[color:var(--primary)] rounded-full text-[color:var(--onPrimary)] active:scale-95 hover:scale-110 h-7 w-7",children:(0,r.jsx)(V,{className:"ml-1"})})]})]}),(0,r.jsxs)(N.TK,{className:"border-spacing-1 border-separate",children:[(0,r.jsx)(N.pg,{children:e=>(0,r.jsx)(N.mc,{className:"text-xs text-[color:var(--primary)] font-semibold",children:e})}),(0,r.jsx)(N.MU,{children:e=>(0,r.jsx)(N.VX,{date:e,className:"w-9 h-9 outline-none cursor-default rounded-full flex items-center justify-center data-[outside-month]:text-[color:var(--tertiary-onSurface)] hover:data-[outside-month]:bg-transparent hover:data-[outside-month]:cursor-default hover:bg-[color:var(--onSurface)] hover:text-[color:var(--surface)] hover:cursor-pointer data-[selected]:bg-[color:var(--primary)] data-[selected]:text-[color:var(--onPrimary)] focus-visible:ring-2 ring-[color:var(--onSurface)]"})})]})]})})})]})}var q=i(83587),H=i(15641),K=i(70652),Z=i(9542);let W=(0,a.forwardRef)(function(e,t){var i;let l=null===(i=e.useBorder)||void 0===i||i,s=R()({[String(e.className)]:e.className,"ring-1 ring-[color:var(--input-color)] focus:ring-[color:var(--input-focus-color)]":l,"focus:ring-2 data-[invalid=true]:ring-[color:var(--input-invalid-color)]":l},"placeholder:text-sm placeholder-[color:var(--input-text-color)] placeholder:opacity-70 bg-transparent","text-base rounded-[var(--rounded-md-relative)] block w-full transition border-none py-1.5","autofill:shadow-[inset_0_0_0px_1000px] autofill:shadow-[color:var(--input-autofill-bg-color)]","autofill:[-webkit-text-fill-color:var(--input-autofill-text-color)] text-[color:var(--input-text-color)]","disabled:opacity-60 disabled:hover:cursor-not-allowed focus:ring-0");return(0,r.jsx)(K.I,{ref:t,className:s,placeholder:e.placeholder,onClick:e.onClick,...e.testSelector&&(0,Z.K)(e.testSelector)})});function Q(e){let{questionId:t,relatedFormControlName:i,disabled:s,control:n,onChange:o,isSelected:d,setFocus:c,testSelector:u}=e,{trigger:m,getFieldState:h,resetField:p,formState:x}=(0,l.Gc)(),v=f(t,"text-field");return(0,a.useEffect)(()=>{if(d){x.submitCount>0&&m(v),c(v);return}let{invalid:e}=h(v);e&&p(v)},[d]),(0,r.jsx)(l.Qr,{control:n,name:v,disabled:s,rules:{required:d&&(0,g.t)("forms_required_field")},render:e=>{let{field:t,fieldState:l,formState:s}=e,{value:n,disabled:a,ref:d,...m}=t;return(0,r.jsxs)(H.n,{type:"text",inputMode:"text",isInvalid:l.invalid,value:null!=n?n:"",className:"w-full h-full flex flex-col",isDisabled:a,onFocus:()=>o(i),"aria-label":(0,g.t)("forms_screen_reader_custom_answer_option_aria_label"),...m,children:[(0,r.jsx)(W,{ref:d,className:"h-[2.75rem]",useBorder:!1,placeholder:(0,g.t)("forms_custom_answer_option_placeholder"),testSelector:u,onClick:()=>c(v)}),(0,r.jsx)("div",{className:"px-3",children:(0,r.jsx)(M,{name:m.name,errors:s.errors})})]})}})}let X=(0,a.forwardRef)(function(e,t){return(0,r.jsxs)("div",{className:R()({"hover:cursor-not-allowed opacity-60":e.disabled,"hover:cursor-pointer active:scale-[0.99] transition-all":!e.disabled,"hover:ring-[color:var(--primary)] hover:ring-2 hover:border-transparent":!e.disabled,"border-[color:var(--input-color)]":!e.isInvalid,"border-[color:var(--input-invalid-color)]":e.isInvalid,"border-[color:var(--primary)] bg-[color:var(--tertiary-primary)]":e.isSelected&&!e.isInvalid},"bg-[color:var(--surface)] rounded-[var(--rounded-lg-relative)] relative","border-rem-px border-[color:var(--input-color)] flex"),children:[(0,r.jsxs)(q.Y8,{ref:t,value:e.value,className:R()({"hover:cursor-not-allowed":e.disabled,"hover:cursor-pointer":!e.disabled,"pr-20 w-full":!e.children},"flex items-start py-3 pl-3.5 text-sm group rounded-[var(--rounded-lg-relative)]"),...(0,Z.K)("forms-radio-group-radio-button"),children:[(0,r.jsx)("div",{"aria-hidden":!0,className:R()({"opacity-60":e.disabled,"items-start before:mt-0.5":!e.children,"items-center":e.children},"inline-flex text-base-sm rounded-full before:mx-auto","before:content-[''] before:block before:w-4 before:h-4 before:box-border before:flex-shrink-0","before:border-rem-px before:border-solid before:border-[color:var(--input-color)]","before:rounded-full before:transition-all before:duration-200","group-data-[selected]:before:border-[color:var(--primary)]","group-data-[selected]:before:border-rem-5px h-5 w-5","group-data-[focus-visible]:ring-2 group-data-[focus-visible]:ring-[color:var(--primary)]")}),e.displayTextScreenReaderOnly?(0,r.jsx)("span",{className:"sr-only",children:e.displayText}):(0,r.jsx)("span",{className:"pl-3",children:e.displayText})]}),e.children&&(0,r.jsx)("div",{className:"w-full",children:e.children})]})});function $(e){let{dto:t,field:i,fieldState:l,formState:s,inputTheme:n,control:o,setFocus:a}=e,{value:d,disabled:c,onChange:u,ref:m,...h}=i,p=[...t.answerConfigurations].sort((e,t)=>{let{index:i}=e,{index:r}=t;return(null!=i?i:0)-(null!=r?r:0)}),x=null!=d?d:"";return(0,r.jsx)(q.Ee,{isInvalid:l.invalid,isDisabled:c,value:x,onChange:u,...h,children:(0,r.jsxs)("div",{style:(0,k.n)(n,!0,!1),children:[(0,r.jsx)(O,{label:t.displayText}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"space-y-1 inline-flex flex-col",children:[p.map((e,t)=>(0,r.jsx)("div",{children:(0,r.jsx)(X,{value:e.id,disabled:c,displayText:e.displayText,ref:0===t?m:null,isInvalid:l.invalid,isSelected:x===e.id})},e.id)),t.isCustomAnswerAllowed&&(()=>{let e=f(t.id,"related-form-control");return(0,r.jsx)(X,{value:e,disabled:c,displayText:(0,g.t)("forms_screen_reader_custom_answer_option_explenation"),displayTextScreenReaderOnly:!0,ref:0===p.length?m:null,isInvalid:l.invalid,isSelected:x===e,children:(0,r.jsx)(Q,{questionId:t.id,relatedFormControlName:e,disabled:c,control:o,onChange:u,isSelected:x===e,setFocus:a,testSelector:"forms-radio-group-radio-button-custom-answer"})})})()]})}),(0,r.jsx)(M,{name:h.name,errors:s.errors})]})})}var Y=i(34174);function G(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-6 h-6 fill-none stroke-[color:var(--onPrimary)] stroke-[0.1875rem] [stroke-dasharray:25] [stroke-dashoffset:25] transition-all duration-200 group-data-[selected]:[stroke-dashoffset:0]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"})})}let J=(0,a.forwardRef)(function(e,t){return(0,r.jsxs)("div",{className:R()({"hover:cursor-not-allowed opacity-60":e.disabled,"hover:cursor-pointer active:scale-[0.99] transition-all":!e.disabled,"hover:ring-2 hover:border-transparent":!e.disabled,"border-[color:var(--input-color)] hover:ring-[color:var(--primary)]":!e.isInvalid,"border-[color:var(--input-invalid-color)] hover:ring-[color:var(--input-invalid-color)]":e.isInvalid,"border-[color:var(--primary)] bg-[color:var(--tertiary-primary)]":e.isSelected&&!e.isInvalid},"flex border-rem-px bg-[color:var(--surface)] rounded-[var(--rounded-lg-relative)] relative"),children:[(0,r.jsxs)(Y.XZ,{ref:t,value:e.value,className:R()({"hover:cursor-not-allowed":e.disabled,"hover:cursor-pointer":!e.disabled,"pr-20 w-full":!e.children},"flex items-start py-3 pl-3.5 text-sm group rounded-[var(--rounded-lg-relative)]"),...(0,Z.K)("forms-checkbox-group-checkbox"),children:[(0,r.jsx)("div",{"aria-hidden":!0,className:"w-4 h-4 mt-0.5 flex border-rem-px border-[color:var(--input-color)] rounded transition-all duration-200 items-center justify-center group-data-[selected]:bg-[color:var(--primary)] group-data-[selected]:border-[color:var(--primary)] group-data-[focus-visible]:ring-2 group-data-[focus-visible]:ring-[color:var(--primary)] group-data-[focus-visible]:ring-offset-2",children:(0,r.jsx)(G,{})}),e.displayTextScreenReaderOnly?(0,r.jsx)("span",{className:"sr-only",children:e.displayText}):(0,r.jsx)("span",{className:"pl-3",children:e.displayText})]}),e.children&&(0,r.jsx)("div",{className:"w-full",children:e.children})]})});function ee(e){let{dto:t,field:i,fieldState:l,formState:s,inputTheme:n,control:o,setFocus:a,triggerValidationForField:d}=e,{value:c,disabled:u,onChange:m,ref:h,...p}=i,x=[...t.answerConfigurations].sort((e,t)=>{let{index:i}=e,{index:r}=t;return(null!=i?i:0)-(null!=r?r:0)}),v=null!=c?c:[];return(0,r.jsx)(Y.cO,{isDisabled:u,isInvalid:l.invalid,value:v,onChange:e=>{m(e),d()},...p,children:(0,r.jsxs)("div",{style:(0,k.n)(n,!0,!1),children:[(0,r.jsx)(O,{label:t.displayText}),(0,r.jsx)("div",{children:(0,r.jsxs)("div",{className:"space-y-1 inline-flex flex-col",children:[x.map((e,t)=>(0,r.jsx)("div",{children:(0,r.jsx)(J,{value:e.id,disabled:u,displayText:e.displayText,ref:0===t?h:null,isInvalid:l.invalid,isSelected:v.includes(e.id)})},e.id)),t.isCustomAnswerAllowed&&(()=>{let e=f(t.id,"related-form-control");return(0,r.jsx)(J,{value:e,disabled:u,displayText:(0,g.t)("forms_screen_reader_custom_answer_option_explenation"),displayTextScreenReaderOnly:!0,ref:0===x.length?h:null,isInvalid:l.invalid,isSelected:v.includes(e),children:(0,r.jsx)(Q,{questionId:t.id,relatedFormControlName:e,disabled:u,control:o,onChange:e=>{let t=[...v];t.includes(e)||t.push(e),m(t),d()},isSelected:v.includes(e),setFocus:a,testSelector:"forms-checkbox-group-checkbox-custom-answer"})})})()]})}),(0,r.jsx)(M,{name:p.name,errors:s.errors})]})})}function et(e){let{value:t,disabled:i,ref:l,...s}=e.field,n=A();return(0,r.jsxs)(H.n,{type:e.type,autoComplete:e.autoComplete,inputMode:e.inputMode,isInvalid:e.fieldState.invalid,value:null!=t?t:"",style:(0,k.n)(e.inputTheme,!0,!0),isDisabled:i,...s,children:[(0,r.jsx)(O,{label:e.label}),(0,r.jsx)(W,{ref:l,testSelector:e.testSelector,placeholder:e.placeholder,className:n===L.p.LongForm?"max-w-xs":null}),(0,r.jsx)(M,{name:s.name,errors:e.formState.errors})]})}var ei=i(40940);function er(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM7 9a1 1 0 000 2h6a1 1 0 100-2H7z",clipRule:"evenodd"})})}function el(){return(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",viewBox:"0 0 20 20",fill:"currentColor",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v2H7a1 1 0 100 2h2v2a1 1 0 102 0v-2h2a1 1 0 100-2h-2V7z",clipRule:"evenodd"})})}function es(e){let{value:t,disabled:i,ref:l,onChange:s,...n}=e.field,o=A();return(0,r.jsxs)(ei.Ki,{isInvalid:e.fieldState.invalid,value:null!=t?t:NaN,isDisabled:i,style:(0,k.n)(e.inputTheme,!0,!0),onInput:e=>{let t=e.currentTarget.value.replace(/\D/g,"");s(""===t?NaN:Number(t))},onChange:s,...n,children:[(0,r.jsx)(O,{label:e.label}),(0,r.jsxs)(j.Z,{className:R()({"max-w-xs":o===L.p.LongForm},"relative"),children:[(0,r.jsx)(W,{ref:l,className:"pr-[0.1953rem]",placeholder:(0,g.t)("forms_form_field_number_placeholder")}),(0,r.jsx)(y.z,{isDisabled:i,className:"absolute right-7 top-1/2 -translate-y-1/2 text-[color:var(--primary)] hover:scale-110 disabled:hover:scale-100 transition-[transform] active:scale-95 disabled:opacity-60 disabled:hover:cursor-not-allowed mr-1.5",slot:"decrement",...(0,Z.K)("forms-number-field-decrement"),children:(0,r.jsx)(er,{})}),(0,r.jsx)(y.z,{isDisabled:i,className:"absolute right-2 top-1/2 -translate-y-1/2 text-[color:var(--primary)] hover:scale-110 disabled:hover:scale-100 transition-[transform] active:scale-95 disabled:opacity-60 disabled:hover:cursor-not-allowed",slot:"increment",...(0,Z.K)("forms-number-field-increment"),children:(0,r.jsx)(el,{})})]}),(0,r.jsx)(M,{name:n.name,errors:e.formState.errors})]})}var en=i(35381);function eo(e){let{value:t,disabled:i,ref:l,...s}=e.field,n=A();return(0,r.jsxs)(H.n,{style:(0,k.n)(e.inputTheme,!0,!1),isInvalid:e.fieldState.invalid,isDisabled:i,value:null!=t?t:"",inputMode:"text",...s,children:[(0,r.jsx)(O,{label:e.dto.displayText}),(0,r.jsx)(en.K,{rows:3,ref:l,placeholder:e.placeholder,className:R()({"max-w-xl":n===L.p.LongForm},"placeholder-[color:var(--input-text-color)] placeholder:text-sm placeholder:opacity-70 bg-transparent","text-base text-[color:var(--input-text-color)] rounded-[var(--rounded-md-relative)] border-none block w-full transition","ring-1 ring-[color:var(--input-color)] focus:ring-2 focus:ring-[color:var(--input-focus-color)] disabled:opacity-60","disabled:hover:cursor-not-allowed data-[invalid=true]:ring-[color:var(--input-invalid-color)]"),...(0,Z.K)("forms-long-text-field")}),(0,r.jsx)(M,{name:s.name,errors:e.formState.errors})]})}var ea=i(71373),ed=i(29705),ec=i.n(ed);function eu(e,t,i){var r,l,s,n,o,a;let d=null!==(l=null==t?void 0:null===(r=t.result.find(t=>t.answerConfigurationId===e.id))||void 0===r?void 0:r.voteCount)&&void 0!==l?l:0,c=null!==(s=null==t?void 0:t.result.map(e=>e.voteCount).reduce((e,t)=>e+t))&&void 0!==s?s:0;return(i&&(c+=null!==(a=null===(n=i.selectedAnswerIds)||void 0===n?void 0:n.length)&&void 0!==a?a:0,(null===(o=i.selectedAnswerIds)||void 0===o?void 0:o.includes(e.id))&&d++),d&&c)?Math.round(d/c*100):0}function em(e){let{value:t,disabled:i,onChange:l,...s}=e.field,n=[...e.dto.answerConfigurations].sort((e,t)=>{let{index:i}=e,{index:r}=t;return(null!=i?i:0)-(null!=r?r:0)}),o=e.hasPollSubmission&&e.dto.pollShowResults;return(0,r.jsxs)(Y.cO,{style:{"--input-invalid-color":ec().colors.red[600]},isDisabled:i,isInvalid:e.fieldState.invalid,onChange:t=>{if(l(t),e.hasAttemptedSubmit&&e.triggerValidationForField(),"single-choice"===e.dto.pollMode){var i;null===(i=e.triggerSubmit)||void 0===i||i.call(e)}},value:null!=t?t:[],...s,children:[(0,r.jsx)("div",{className:"sr-only",children:(0,r.jsx)(O,{label:e.dto.displayText})}),(0,r.jsxs)("div",{className:"pt-0.5",style:(0,k.n)(e.inputTheme,!0,!1),"aria-live":"polite",children:["single-choice"===e.dto.pollMode&&!e.hasPollSubmission&&(0,r.jsx)("div",{className:"sr-only",children:(0,g.t)("forms_single_choice_poll_explenation")}),o&&(0,r.jsxs)("span",{className:"sr-only",children:[(0,g.t)("forms_result_screen_reader_description"),(0,r.jsx)("ul",{children:n.map(t=>(0,r.jsx)("li",{children:(0,g.t)("forms_result_screen_reader_alternative",{alternative:t.displayText,percentage:eu(t,e.publicPollResult,e.localSubmissionToAddToPollResults).toString()})},t.id))})]}),(0,r.jsx)("div",{className:"space-y-1","aria-hidden":o,children:n.map(t=>(0,r.jsx)(Y.XZ,{value:t.id,className:R()({"hover:cursor-not-allowed opacity-80":i,"hover:ring-[color:var(--primary)] hover:ring-2 hover:border-transparent":!i,"hover:cursor-pointer active:scale-[0.99]":!i},"data-[selected]:border-[color:var(--primary)] data-[selected]:bg-[color:var(--primary)]","data-[selected]:text-[color:var(--onPrimary)] bg-[color:var(--surface)] border-[color:var(--input-color)]","border-rem-px rounded-[var(--rounded-lg-relative)] p-3 flex items-center relative","transition-all text-sm data-[focus-visible]:ring-2 data-[focus-visible]:ring-[color:var(--primary)]","data-[focus-visible]:border-transparent group"),...(0,Z.K)("forms-poll-answer-option"),children:o?(0,r.jsxs)("div",{className:"flex justify-between w-full","aria-hidden":!0,children:[t.displayText,(0,r.jsxs)("span",{children:[eu(t,e.publicPollResult,e.localSubmissionToAddToPollResults),"%"]})]}):(0,r.jsxs)("div",{className:"flex justify-between w-full",children:[t.displayText,e.showSpinnerOnSelected?(0,r.jsxs)("span",{className:"hidden group-data-[selected]:block",children:[(0,r.jsx)("span",{className:"sr-only",children:(0,g.t)("forms_screen_reader_submitting_form_text")}),(0,r.jsx)(ea.X,{spinnerBackgroundCssVariable:"--onPrimary"})]}):(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"w-5 h-5 fill-none stroke-[color:var(--onPrimary)] stroke-[0.1875rem] [stroke-dasharray:25] [stroke-dashoffset:25] transition-all duration-200 group-data-[selected]:[stroke-dashoffset:0]","aria-hidden":!0,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})})]})},t.id))})]}),(0,r.jsx)(M,{name:s.name,errors:e.formState.errors})]})}var ef=i(86432),eh=i(54235);function ep(e){let{label:t,field:i,fieldState:l,formState:s,inputTheme:n}=e,{value:o,disabled:a,ref:d,...c}=i;return(0,r.jsxs)("div",{style:(0,k.n)(n,!0,!0),children:[(0,r.jsxs)(Y.XZ,{ref:d,isSelected:null!=o&&o,isDisabled:a,isInvalid:null==l?void 0:l.invalid,className:R()({"opacity-60 hover:cursor-not-allowed":a,"hover:cursor-pointer":!a},"inline-flex items-center gap-x-1.5 group text-sm"),...(0,Z.K)("forms-single-checkbox-field"),...c,children:[(0,r.jsx)("div",{className:"w-4 h-4 flex border-rem-px border-[color:var(--input-color)] rounded transition-all duration-200 items-center justify-center group-data-[selected]:bg-[color:var(--primary)] group-data-[selected]:border-[color:var(--primary)] group-data-[focus-visible]:ring-2 group-data-[focus-visible]:ring-[color:var(--primary)] group-data-[focus-visible]:ring-offset-2 group-data-[invalid=true]:ring-2 group-data-[invalid=true]:ring-[color:var(--input-invalid-color)] group-data-[invalid=true]:border-none",children:(0,r.jsx)(G,{})}),t]}),(0,r.jsx)("div",{children:(0,r.jsx)(M,{name:i.name,errors:s.errors})})]})}var ex=i(13974);let ev=u.z.string().regex(/^[a-zA-Z0-9-]+$/),eg=u.z.union([u.z.literal("feed"),u.z.literal("post")]),eb=u.z.object({contactId:ev.nullish(),formId:u.z.string(),selectedAnswerIds:u.z.string().array().optional(),formLocationOnSubmit:eg,postId:ev.nullable()});var ej=i(82550),ew=i(13406),ey=i(55769),e_=i(31225),eS=i(46655);function eN(e,t,i,r,l,s){if(!t.isPoll&&t.allowMultipleSubmissions)return;let n=(0,ej.q)(e.id,t.id,i,s,l);"anonymous"===i?eS.DU.setItem(n,r):eS.DU.setItemWithExpiry(n,r,604800)}var eC=i(49540);let ek=u.z.string().regex(/^(([^<>()[\]\\.,;:\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,}))$/);class eF{addMultipleChoicePollIsRequired(){this.validators.push(this.multipleChoicePollIsRequired)}addFieldIsRequired(){this.validators.push(this.fieldIsRequired)}addFieldIsValidPhoneNumber(e){this.validators.push(this.fieldIsValidPhoneNumber(e))}addFieldIsValidEmail(){this.validators.push(this.fieldIsValidEmail)}buildValidationRules(){return{validate:e=>{for(let t of this.validators){let i=t(e);if(!1===i||"string"==typeof i)return i}return!0}}}multipleChoicePollIsRequired(e){return Array.isArray(e)&&!!e.length||(0,g.t)("forms_required_multiple_choice_poll")}fieldIsRequired(e){return("string"==typeof e?!!(e=e.trim()):!("number"!=typeof e||Number.isNaN(e))||(Array.isArray(e)?!!e.length:!!e))||(0,g.t)("forms_required_field")}fieldIsValidPhoneNumber(e){return t=>!t||(0,m.r)(t,e)||(0,g.t)("forms_invalid_phone_number")}fieldIsValidEmail(e){return!e||ek.safeParse(e).success||(0,g.t)("forms_invalid_email")}constructor(){this.validators=[]}}function eL(e){var t,i,b;let j=(0,ef.K)(e.feed.id),w=function(e,t,i,r){let{trackFeedEvent:l,analytics:s}=(0,ey.z)(),{dispatch:n}=(0,e_.cq)();return async o=>{let a=eb.parse(await o.json()),d={formId:a.formId,selectedAnswerIds:a.selectedAnswerIds};!e.isPoll&&e.shouldFollowFeed&&!t&&a.contactId?(s.isDisabled&&s.enable(),l(ew.U.FOLLOW_FEED,i,a.contactId,{feed_follow_source:r.feedFollowSource}),n({type:"SET_CONTACT_ID",payload:{contactId:a.contactId,feedId:i.id}}),eN(i,e,a.contactId,d,a.formLocationOnSubmit,a.postId)):eN(i,e,t||"anonymous",d,a.formLocationOnSubmit,a.postId),(null==r?void 0:r.onSubmitSuccess)&&await r.onSubmitSuccess(),!e.isPoll&&e.redirectUrlAfterSubmit&&(location.href=e.redirectUrlAfterSubmit)}}(e.form,j,e.feed,e.options),{onSubmit:y,submitting:_,submitSuccess:S,genericErrorOccurred:N}=function(e,t,i,r,l,s,n,o,v){let[g,b]=(0,a.useState)(!1),[j,w]=(0,a.useState)(!1),[y,_]=(0,a.useState)(!1);return{onSubmit:async a=>{if(l){(0,p.F)();return}g&&b(!1);let j=function(e,t,i,r,l,s){let n={answers:[],formLocationOnSubmit:i,contactId:null!=l?l:null,postId:null!=s?s:null};return Object.keys(r).forEach(i=>{let l=t.isPoll?t.question:t.questions.find(e=>e.id===i);if(l){var s,o,a,h,p,x,v,g,b;let t=!1,j=[],w=r[i];switch(null==l?void 0:l.type){case"date":{let e=null;w?(e=(0,d.fW)(w,(0,c.iT)()).toString().replace(/\[.*\]$/,""),j.push({relatedAnswerConfigurationId:(null===(o=l.answerConfigurations)||void 0===o?void 0:null===(s=o[0])||void 0===s?void 0:s.id)||null,value:e})):t=!0;break}case"number":{let e=w?u.z.coerce.number().parse(w):null;e?j.push({relatedAnswerConfigurationId:(null===(h=l.answerConfigurations)||void 0===h?void 0:null===(a=h[0])||void 0===a?void 0:a.id)||null,value:e}):t=!0;break}case"name":case"email":case"long-text":case"phone":case"short-text":{let i=w?u.z.string().parse(w):null;if(i){if("phone"===l.type){let t=(0,m.I)(i,e);if(!t)throw Error("Invalid phone number, should not happen here.");i=t}j.push({relatedAnswerConfigurationId:(null===(x=l.answerConfigurations)||void 0===x?void 0:null===(p=x[0])||void 0===p?void 0:p.id)||null,value:i})}else t=!0;break}case"multiple-choice":case"poll":if(Array.isArray(w)&&w.length>0){let e=u.z.string().array().parse(w),t=null;e.forEach(e=>{let i=f(l.id,"related-form-control")===e&&"multiple-choice"===l.type;if(i)t=r[f(l.id,"text-field")];else{var s;t=u.z.string().parse(null===(s=l.answerConfigurations.map(e=>({id:e.id,displayText:e.displayText})).find(t=>t.id===e))||void 0===s?void 0:s.displayText)}j.push({relatedAnswerConfigurationId:i?null:e,value:u.z.string().parse(t)})})}else t=!0;break;case"single-choice":{let e=w?u.z.string().parse(w):null;if(e){let t=null!==(v=l.answerConfigurations.find(t=>t.id===e))&&void 0!==v?v:null,i=f(l.id,"related-form-control")===e;j.push({relatedAnswerConfigurationId:i?null:e,value:u.z.string().parse(i?r[f(l.id,"text-field")]:null==t?void 0:t.displayText)})}else t=!0;break}case"checkbox":{let e=!!w&&u.z.boolean().parse(w);j.push({relatedAnswerConfigurationId:(null===(b=l.answerConfigurations)||void 0===b?void 0:null===(g=b[0])||void 0===g?void 0:g.id)||null,value:e})}}n.answers.push({questionId:l.id,questionText:l.displayText,values:t?null:j})}}),n}(t,i,s,a,o,v);w(!0);let y="/api/feeds/".concat(e,"/forms/").concat(i.id,"/submissions");try{let e=await r.post(y,j);(null==e?void 0:e.ok)?(_(!0),await (null==n?void 0:n(e))):b(!0)}catch(e){h.Tb(e),(0,x.Q)("error",e),b(!0)}finally{w(!1)}},submitting:j,submitSuccess:y,genericErrorOccurred:g}}(e.feed.id,e.feed.locale.country,e.form,new eh.r(fetch),(0,ex.b)().enableRestrictedMode,e.formLocation,w,j,e.postId),C=!(!e.form.isPoll&&e.form.allowMultipleSubmissions)&&!0===e.options.hasFormSubmission||_||S,[k,F]=(0,a.useState)(!C&&!(e.form.isPoll&&"single-choice"===e.form.question.pollMode)),I=(0,l.cI)();i=e.form,b=I.resetField,(0,a.useEffect)(()=>{N&&i.isPoll&&"single-choice"===i.question.pollMode&&b(i.question.id)},[N]);let A=e.form.isPoll?[e.form.question]:[...e.form.questions].sort((e,t)=>{let{index:i}=e,{index:r}=t;return i-r}),P={"--input-color":"var(--secondary-onSurface)","--input-focus-color":"var(--primary)"},O=I.handleSubmit(y),z=A.length>4?L.p.LongForm:L.p.ShortForm,E=e.form.isPoll&&"multiple-choice"===e.form.question.pollMode,M=I.formState.submitCount>0;return(0,r.jsx)(T,{formTheme:z,children:(0,r.jsxs)(l.RV,{...I,children:[!1!==e.options.showTitle&&(0,r.jsx)("h2",{className:"[font-family:var(--header-font-family)] font-[number:var(--font-semibold-relative)] text-2xl",children:e.form.title}),!e.form.isPoll&&!1!==e.options.showDescription&&(0,r.jsx)("p",{className:"pt-2 pb-5 text-sm",children:e.form.description}),(0,r.jsxs)("form",{onSubmit:O,className:R()({"space-y-16 pt-6":z===L.p.LongForm,"space-y-4":z===L.p.ShortForm}),"aria-live":"polite",children:[A.map((t,i)=>{var s,n,o,a;let d=new eF;t.isRequired&&d.addFieldIsRequired();let c=()=>z===L.p.LongForm?(0,r.jsx)("div",{className:"text-sm font-semibold pb-1.5",children:i+1}):null;switch(t.type){case"number":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,rules:d.buildValidationRules(),disabled:C,render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(es,{label:t.displayText,field:i,fieldState:l,formState:s,inputTheme:P})}})]},t.id);case"single-choice":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,rules:d.buildValidationRules(),disabled:C,render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)($,{dto:t,field:i,fieldState:l,formState:s,inputTheme:P,control:I.control,setFocus:I.setFocus})}})]},t.id);case"multiple-choice":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(ee,{dto:t,field:i,fieldState:l,formState:s,inputTheme:P,control:I.control,triggerValidationForField:()=>{I.trigger(t.id)},setFocus:I.setFocus})}})]},t.id);case"name":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),defaultValue:t.fillWithContactData&&(null===(s=e.contact)||void 0===s?void 0:s.name)||null,render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(et,{type:"text",inputMode:"text",autoComplete:"name",label:t.displayText,field:i,fieldState:l,formState:s,inputTheme:P,testSelector:"forms-name-field",placeholder:(0,g.t)("forms_form_field_name_placeholder")})}})]},t.id);case"short-text":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(et,{type:"text",inputMode:"text",label:t.displayText,field:i,fieldState:l,formState:s,inputTheme:P,testSelector:"forms-short-text-field",placeholder:(0,g.t)("forms_form_field_short_text_placeholder")})}})]},t.id);case"long-text":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(eo,{dto:t,field:i,fieldState:l,formState:s,inputTheme:P,placeholder:(0,g.t)("forms_form_field_long_text_placeholder")})}})]},t.id);case"email":return d.addFieldIsValidEmail(),(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,defaultValue:t.fillWithContactData&&(null===(n=e.contact)||void 0===n?void 0:n.email)||null,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(et,{type:"email",autoComplete:"email",inputMode:"email",label:t.displayText,field:i,fieldState:l,formState:s,inputTheme:P,testSelector:"forms-email-field",placeholder:(0,g.t)("forms_form_field_email_placeholder")})}})]},t.id);case"phone":return d.addFieldIsValidPhoneNumber(e.feed.locale.country),(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,defaultValue:t.fillWithContactData&&(null===(o=e.contact)||void 0===o?void 0:o.phone)||null,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(et,{type:"tel",autoComplete:"tel",inputMode:"tel",label:t.displayText,field:i,fieldState:l,formState:s,inputTheme:P,testSelector:"forms-phone-field",placeholder:(0,g.t)("forms_form_field_phone_placeholder")})}})]},t.id);case"date":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(U,{field:i,fieldState:l,formState:s,label:t.displayText,inputTheme:P})}})]},t.id);case"poll":return S&&t.pollShowResults&&k&&F(!1),E&&d.addMultipleChoicePollIsRequired(),(0,r.jsx)("div",{children:(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),defaultValue:null===(a=e.options.poll)||void 0===a?void 0:a.showAnswersAsSelected,render:i=>{var l,s,n,o;let{field:a,fieldState:d,formState:c}=i;return(0,r.jsx)(em,{dto:t,inputTheme:P,triggerSubmit:O,field:a,fieldState:d,formState:c,showSpinnerOnSelected:_&&"single-choice"===t.pollMode,localSubmissionToAddToPollResults:null!==(n=null===(l=e.options.poll)||void 0===l?void 0:l.localSubmissionToAddToPollResults)&&void 0!==n?n:null,publicPollResult:null!==(o=null===(s=e.options.poll)||void 0===s?void 0:s.result)&&void 0!==o?o:null,hasPollSubmission:!!e.options.hasFormSubmission,triggerValidationForField:()=>{I.trigger(t.id)},hasAttemptedSubmit:M})}})},t.id);case"checkbox":return(0,r.jsxs)("div",{children:[c(),(0,r.jsx)(l.Qr,{control:I.control,name:t.id,disabled:C,rules:d.buildValidationRules(),render:e=>{let{field:i,fieldState:l,formState:s}=e;return(0,r.jsx)(ep,{label:t.displayText,field:i,fieldState:l,formState:s,inputTheme:P})}})]},t.id)}}),k&&(0,r.jsxs)("div",{className:"pt-4 flex flex-col items-end",children:[!I.formState.isValid&&M&&!E&&(0,r.jsx)("div",{className:"text-xs text-red-600 font-[number:var(--font-semibold-relative)]",children:(0,g.t)("forms_form_has_errors")}),_&&(0,r.jsx)("span",{className:"sr-only",children:(0,g.t)("forms_screen_reader_submitting_form_text")}),(0,r.jsx)("div",{className:"pt-2","aria-hidden":_,children:(0,r.jsx)(s.X,{type:"submit",feed:e.feed,kind:n.L.PrimaryLight,size:o.$.LgWide,className:"uppercase drop-shadow tracking-widest disabled:text-[color:var(--secondary-onSurface)] disabled:ring-[color:var(--secondary-onSurface)]",showSpinner:_,formNoValidate:!0,disabled:S||!I.formState.isValid&&M,...(0,Z.K)("forms-submit-button"),children:null!==(t=e.options.submitButtonText)&&void 0!==t?t:(0,g.t)("forms_default_submit_button_text")})})]})]}),!!e.options.formFeedbackOptions&&(0,r.jsx)(eC.A,{options:e.options.formFeedbackOptions,formIsPoll:e.form.isPoll}),N&&(0,r.jsx)(v.Z,{className:"mt-10",message:(0,g.t)("form_generic_error_message")})]})})}},49540:function(e,t,i){i.d(t,{A:function(){return c}});var r=i(85893),l=i(13786),s=i(13493),n=i(79771),o=i(94184),a=i.n(o);function d(e){let{message:t,show:i,className:l,...s}=e,o=a()({block:i,hidden:!i},"rounded-[var(--rounded-md-relative)] bg-[color:var(--surface)] border-rem-2px border-[color:var(--secondary-primary)] pl-2.5 pr-3.5 py-3");return l&&(o+=" ".concat(l)),(0,r.jsx)("div",{className:o,role:"alert",...s,children:(0,r.jsxs)("div",{className:"flex items-center text-[color:var(--onSurface)]",children:[(0,r.jsx)("div",{className:"flex-shrink-0",children:(0,r.jsx)(n.Z,{className:"h-5 w-5 text-[color:var(--primary)]","aria-hidden":"true"})}),(0,r.jsx)("div",{className:"ml-3 flex items-center",children:(0,r.jsx)("span",{className:"text-2sm",children:t})})]})})}function c(e){var t,i,n,o,a,c;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Z,{show:null!==(o=null===(t=e.options)||void 0===t?void 0:t.shouldShowSubmitSuccessMessage)&&void 0!==o&&o,message:null!==(a=null===(i=e.options)||void 0===i?void 0:i.customSubmitSuccessMessage)&&void 0!==a?a:(0,s.t)("forms_default_confirmation_text"),className:"mt-6 text-xs border-[color:var(--primary)] !text-[color:var(--primary)]"}),(0,r.jsx)(d,{className:"mt-6",show:null!==(c=null===(n=e.options)||void 0===n?void 0:n.shouldShowAlreadySubmittedMessage)&&void 0!==c&&c,message:e.formIsPoll?(0,s.t)("forms_poll_already_submitted"):(0,s.t)("forms_form_already_submitted")})]})}},43407:function(e,t,i){var r,l;i.d(t,{p:function(){return r}}),(l=r||(r={}))[l.OnSurface=0]="OnSurface",l[l.OnBackground=1]="OnBackground",l[l.ShortForm=2]="ShortForm",l[l.LongForm=3]="LongForm"},84453:function(e,t,i){i.d(t,{s:function(){return l}});var r=i(82550);class l{findFormSubmissionsForFormIds(e,t,i,r,l,s){let n=this.getLocalSubmissions(e,i,r,l,s),o=t.filter(e=>null==s?void 0:s.includes(e.formId));return this.searchSubmissions(e,o,n,i,r,l)}searchSubmissions(e,t,i,r,l,s){return t.length?this.mergeLocalAndApiSubmissions(e,t,i,r,l,s):i.length?i:[]}mergeLocalAndApiSubmissions(e,t,i,r,l,s){let n=[],o=t.map(e=>e.formId);for(let t of i)o.includes(t.formId)?this.cleanUpLocalFormSubmission(e,t.formId,r,l,s):n.push(t);return t.concat(n)}getLocalSubmissions(e,t,i,r,l){var s;return null!==(s=null==l?void 0:l.map(l=>this.getLocalSubmission(e,l,t,i,r)).filter(Boolean))&&void 0!==s?s:[]}getLocalSubmission(e,t,i,l,s){let n=(0,r.q)(e,t,i,l,s);if("anonymous"===i){let e=this.localStorageService.getItem(n);return e?JSON.parse(e):null}return this.localStorageService.getItemWithExpiry(n)}cleanUpLocalFormSubmission(e,t,i,l,s){this.localStorageService.removeItem((0,r.q)(e,t,i,l,s))}constructor(e){this.localStorageService=e}}},82550:function(e,t,i){i.d(t,{q:function(){return r}});function r(e,t,i,r,l){let s=r?"".concat(l,":").concat(r):l;return"knips:/feeds/".concat(e,"/contacts/").concat(i,"/forms/").concat(t,"/location/").concat(s,"/submission")}},5421:function(e,t,i){i.d(t,{O:function(){return c},Q:function(){return d}});var r=i(85893),l=i(25675),s=i.n(l),n=i(20525),o=i(94184),a=i.n(o);function d(e){let t=e.split(" ");return t.length>1&&(t=[t[0],t[t.length-1]]),t.reduce((e,t)=>0!==t.length&&t.trim()?"".concat(e).concat(t[0].toUpperCase()):e,"")}function c(e){var t;let{name:i,image:l,rounded:o=!0,prioritize:c=!1,objectFit:u="cover"}=e;return(0,r.jsxs)("div",{className:a()({"rounded-full":o},"relative inline-block overflow-hidden w-full h-full z-0"),children:[l&&(0,r.jsx)(s(),{src:l.src,alt:null!==(t=l.alt)&&void 0!==t?t:"",fill:!0,style:{objectFit:u},priority:c,"aria-hidden":!0,sizes:"40px"}),!l&&(0,r.jsx)("div",{className:"h-full w-full bg-[color:var(--primary)] text-[color:var(--onPrimary)] flex justify-center items-center",children:i?(0,r.jsx)("span",{className:"font-semibold","aria-hidden":!0,children:d(i)}):(0,r.jsx)("span",{className:"max-w-[1.25rem] max-h-5","aria-hidden":!0,children:(0,r.jsx)(n.f,{})})})]})}},69220:function(e,t,i){i.d(t,{Q:function(){return l}});var r=i(91926);function l(e){for(var t=arguments.length,i=Array(t>1?t-1:0),l=1;l<t;l++)i[l-1]=arguments[l];if((0,r.r8)())switch(e){case"warn":console.warn("\x1b[33m[WARN]\x1b[0m",...i);break;case"error":console.error("\x1b[31m[ERROR]\x1b[0m",...i);break;case"info":console.info("\x1b[92m[INFO]\x1b[0m",...i)}}},40677:function(e,t,i){i.d(t,{n:function(){return n}});var r=i(91926),l=i(71561),s=i(73988);function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shouldOnlySendMessageToFlutter:!1};if("true"===(0,l.H)("isMobile")){let{channel:t,json:i}=o(e);t.postMessage(i)}else{if(!(0,s.x)())return;let{channel:i,json:l}=o(e),n=t.shouldOnlySendMessageToFlutter&&(0,r.BB)()?r.sF:"*";i.postMessage(l,n)}}function o(e){return{channel:window[e.flutterChannelName]||window.parent,json:JSON.stringify(e)}}},99593:function(e,t,i){i.d(t,{l:function(){return l}});var r=i(73988);async function l(e,t){let i=!(0,r.x)(),l=e.currentTarget,s=l.target||"_self",n=l.href;i?(e.preventDefault(),await t(),open(n,s)):t()}},85448:function(e,t,i){i.d(t,{i:function(){return l}});var r=i(39709);function l(e,t){t&&(e.preventDefault(),e.stopPropagation(),(0,r.F)())}},51939:function(e,t,i){i.d(t,{A:function(){return n}});var r=i(73988),l=i(91926),s=i(64487);function n(e,t,i){return i?t:(0,r.x)()&&function(e){if(!/^https?:\/\//i.test(e))return!1;try{let t=new URL(e).host,i=(0,l.r8)()?location.host.replace(":".concat(l.wd),""):location.host;return t!==i}catch(t){return s.Tb(Error("Invalid URL (getLinkTarget)")),console.info("Invalid link:",e),!0}}(e)?"_top":t}},48678:function(e,t,i){i.d(t,{k:function(){return s}});var r=i(67294),l=i(51939);function s(e,t){let[i,s]=(0,r.useState)(t);return(0,r.useEffect)(()=>{e&&0!==e.length&&s((0,l.A)(e,t,!1))},[]),i}},15387:function(e,t,i){i.d(t,{Z:function(){return a}});var r=i(85893),l=i(94184),s=i.n(l),n=i(87882),o=i(16039);function a(e){let{text:t,onClick:i,className:l,alwaysUnderline:a,hoverUnderline:d}=e,c=s()({[String(o.F$)]:a,[String(o.vm)]:d,[String(l)]:!!l},n.d);return(0,r.jsx)("button",{className:c,onClick:i,children:t})}},30775:function(e,t,i){i.d(t,{B:function(){return er}});var r=i(85893),l=i(38760),s=i(68715),n=i(24354),o=i(97367),a=i(94184),d=i.n(a),c=i(35913),u=i(9061),m=i(59652),f=i(55769),h=i(13406),p=i(51939),x=i(99593),v=i(19795);function g(e){let{column:t,useBackground:i,baseTrackingParams:l,isTrackingEnabled:s=!0}=e,{trackEvent:n}=(0,f.z)(),a="filled"===t.ctaButtonStyle?i?c.L.PrimaryLight:c.L.PrimaryLightOnBackground:i?c.L.SecondaryAlt1:c.L.SecondaryAlt1OnBackground,d=function(e,t){(0,o.N)(t.trackingId,"column.trackingId");let i={box_column_tracking_id:t.trackingId};return t.title&&(i.box_column_title=t.title),t.leadingTitle&&(i.box_column_leading_title=t.leadingTitle),t.ctaButtonText&&(i.box_column_cta_text=t.ctaButtonText),t.ctaButtonLink&&(i.box_column_cta_link=t.ctaButtonLink),{...e,...i}}(l,t),g=t.ctaButtonLink,b=(0,p.A)(g,"_self",(0,v.C)());return(0,r.jsx)("div",{className:"mt-8",children:(0,r.jsx)(m.Q,{size:u.$.XlTall,kind:a,href:g,overrideThemeValues:t.buttonColors,target:b,onClick:e=>(0,x.l)(e,()=>s?n(h.U.FEED_ITEM_BOX_CTA_CLICKED,{data:d}):Promise.resolve()),children:t.ctaButtonText})})}function b(e){let{leadingTitle:t,title:i,centerTitles:l}=e;return(0,r.jsxs)("div",{className:d()({"sm:text-left":!l},"text-center"),children:[t&&(0,r.jsx)("span",{className:"inline text-base-sm uppercase tracking-widest",children:t}),i&&(0,r.jsx)("h2",{className:d()({"pt-2":t},"text-[1.8125rem] leading-[2.125rem] tracking-tight [font-family:var(--header-font-family)]"),children:i})]})}function j(e){let{image:t,center:i=!1}=e;return(0,r.jsx)("img",{src:t.src,alt:t.alt,className:d()({"mx-auto":i&&t.width&&100!==t.width},"w-full sm:w-[var(--image-width)]"),...t.width&&{style:{"--image-width":"".concat(t.width,"%")}}})}var w=i(94279),y=i(88607);function _(e){let{children:t,className:i}=e,l=d()("font-semibold text-2xl [font-family:var(--header-font-family)]",{[String(i)]:i});return(0,r.jsx)("h2",{className:l,children:t})}function S(e){let{children:t}=e;return(0,r.jsx)("h3",{className:"font-medium text-lg [font-family:var(--header-font-family)]",children:t})}var N=i(91820),C=i(92378),k=i(48678);function F(e){let{href:t,children:i,defaultTarget:l="_self"}=e,s=(0,k.k)(t,l);return(0,r.jsx)(C.F,{alwaysUnderline:!0,href:t,target:s,children:i})}let L={block:{h1:e=>{let{children:t}=e;return(0,r.jsx)(y.H1,{children:t})},h2:e=>{let{children:t}=e;return(0,r.jsx)(_,{children:t})},h3:e=>{let{children:t}=e;return(0,r.jsx)(S,{children:t})},normal:e=>{let{children:t}=e;return(0,r.jsx)(N.P,{children:t})}},marks:{link:e=>{let{value:t,children:i}=e;return(0,r.jsx)(F,{href:t.href,children:i})}},list:{bullet:e=>{let{children:t}=e;return(0,r.jsx)("ul",{className:"list-disc list-inside ml-0.75 my-2",children:t})},number:e=>{let{children:t}=e;return(0,r.jsx)("ol",{className:"list-decimal list-inside my-2",children:t})}},listItem:{bullet:e=>{let{children:t}=e;return(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"-ml-1.5",children:t})})},number:e=>{let{children:t}=e;return(0,r.jsx)("li",{children:(0,r.jsx)("span",{className:"ml-0.5",children:t})})}}};function I(e){let{portableTextValue:t}=e;return(0,r.jsx)(w.YI,{value:t,components:L})}function T(e){let{column:t,useBackground:i,baseTrackingParams:l,isTrackingEnabled:s=!0}=e,n=!!t.ctaButtonText&&!!t.ctaButtonLink;return(0,r.jsxs)("div",{className:"flex flex-col justify-between",children:[(0,r.jsxs)("div",{children:[(t.leadingTitle||t.title)&&(0,r.jsx)("div",{className:"mb-5",children:(0,r.jsx)(b,{leadingTitle:t.leadingTitle,title:t.title,centerTitles:t.centerText})}),t.image&&(0,r.jsx)("div",{className:d()({"sm:justify-start sm:mx-0":!t.centerText},"flex justify-center mx-auto max-w-[12.5rem] sm:max-w-none"),children:(0,r.jsx)(j,{image:t.image,center:t.centerText})}),t.text&&(0,r.jsx)("div",{className:d()({"mt-8":t.image,"mt-4":t.title&&t.leadingTitle,"mt-3":t.title&&!t.leadingTitle,"sm:text-left":!t.centerText},"text-center"),children:(0,r.jsx)(I,{portableTextValue:t.text})})]}),n&&(0,r.jsx)(g,{column:t,useBackground:i,baseTrackingParams:l,isTrackingEnabled:s})]})}var A=i(49759),P=i(86432);function R(e){var t;let{box:i,usePadding:l=!0,useBackground:s,feed:n,isTrackingEnabled:a=!0}=e,c=(0,P.K)(null==n?void 0:n.id),u=function(e,t,i){(0,o.N)(e.trackingId,"box.trackingId");let r={box_tracking_id:e.trackingId};return void 0!==e.locationInFeed&&null!==e.locationInFeed&&(r.location_in_feed=e.locationInFeed),t&&(r.feed_id=t.id,r.feed_name=t.name,r.feed_slug=t.slug),i&&(r.contact_id=i),r}(i,n,c),m=function(e){let{trackEvent:t}=(0,f.z)();return(0,A.o)(()=>t(h.U.FEED_ITEM_BOX_SEEN,{data:e}))}(function(e,t){if(e&&e.length>0)for(let i=0;i<e.length;i++){(0,o.N)(e[i].trackingId,"columns[".concat(i,"].trackingId"));let r={["box_column_".concat(i,"_tracking_id")]:e[i].trackingId},l=e[i].title;l&&(r["box_column_".concat(i,"_title")]=l);let s=e[i].leadingTitle;s&&(r["box_column_".concat(i,"_leading_title")]=s),t={...t,...r}}return t}(i.columns,u)),p=i.columns&&i.columns.length>1,x=null;return i.columns&&p&&(x={"--grid-item-min-width":"16.625rem","--grid-column-count":i.columnsPerRow||i.columns.length,"--gap-count":"calc(var(--grid-column-count) - 1)","--total-gap-width":"calc(var(--gap-count) * 2rem)","--grid-item--max-width":"calc((100% - var(--total-gap-width)) / var(--grid-column-count))"}),(0,r.jsxs)("div",{ref:a?m:null,className:d()({"px-5":l},"relative space-y-8"),children:[(i.leadingTitle||i.title)&&(0,r.jsx)(b,{leadingTitle:i.leadingTitle,title:i.title,centerTitles:i.centerBoxTitleAndLeadingTitle}),(0,r.jsx)("div",{...x&&{style:x},className:d()({"sm:grid sm:gap-8 space-y-8 sm:space-y-0":p,"grid-cols-[repeat(auto-fill,minmax(max(var(--grid-item-min-width),var(--grid-item--max-width)),1fr))]":p}),children:null===(t=i.columns)||void 0===t?void 0:t.map((e,t)=>(0,r.jsx)("div",{className:d()({"sm:justify-start":p&&!e.centerText},"flex items-center justify-center"),children:(0,r.jsx)(T,{column:e,useBackground:null==s||s,baseTrackingParams:u,isTrackingEnabled:a})},t))})]})}var O=i(91926),z=i(51081),E=i(13493),M=i(54235),D=i(21843),B=i(67294),V=i(56510),U=i(13786),q=i(13974),H=i(39709);function K(e){var t;let{feedId:i,personaPicker:l}=e,{enableRestrictedMode:n}=(0,q.b)(),a=(0,V.A)(i).contact,[d,c]=(0,B.useState)(null==a?void 0:a.personaId),[u,m]=(0,B.useState)(!1),[p,x]=(0,B.useState)(null),[v,g]=(0,B.useState)(!1);async function b(e){if(n){(0,H.F)();return}x(e),g(!0),u&&m(!1),(await new M.r(fetch).patch("/api/contacts/".concat(null==a?void 0:a.id,"/persona"),{personaId:e})).ok?c(e):(m(!0),g(!1)),x(null)}let j=function(e){let t=(0,P.K)(e.feed.id),{trackEvent:i}=(0,f.z)(),r=function(e,t){var i;let r={feed_id:t.feed.id,feed_name:t.feed.name,feed_slug:t.feed.slug,persona_ids:null===(i=t.personas)||void 0===i?void 0:i.map(e=>e.id)};return t.feed.category&&(r.persona_category=t.feed.category),e&&(r.contact_id=e),r}(t,e);return(0,A.o)(()=>i(h.U.FEED_ITEM_PERSONA_PICKER_SEEN,{data:r}))}(l);return(0,o.N)(l.feed.name,"feedName"),(0,r.jsx)(s.Z,{noShadowOnLessThanSm:!0,mediumShadow:!0,children:(0,r.jsx)("div",{className:"relative w-full",children:(0,r.jsxs)("div",{ref:j,className:"text-[color:var(--onSurface)] px-4",children:[(0,r.jsx)("h1",{className:"not-italic font-semibold text-[1.375rem] [font-family:var(--header-font-family)]",children:(0,E.t)("persona_title")}),(0,r.jsx)("div",{className:"not-italic font-semibold text-sm my-6",children:(0,E.t)("persona_desc")}),!d&&l.personas&&(null===(t=l.personas)||void 0===t?void 0:t.length)>0&&(0,r.jsx)("ul",{role:"list",children:l.personas.map((e,t)=>(0,r.jsx)("li",{children:(0,r.jsx)(z.x,{id:e.id,text:e.text.description,onClick:b,showSpinner:p===e.id,disabled:v})},t))}),(0,r.jsx)(U.Z,{message:(0,E.t)("persona_confirmation"),show:!!d,className:"rounded-[var(--rounded-xl-relative)]"}),u&&(0,r.jsx)("div",{className:"pt-8",children:(0,r.jsx)(D.Z,{message:(0,E.t)("error_label")})})]})})})}var Z=i(26031);function W(e){return Number.isFinite(e)}var Q=i(95410);function X(e){var t,i,l,s,n,o,a,c,u,m,f,h;let{children:p,useBackgroundColor:x,onlyPaddingBottom:v,postRoundedCornersOnMobile:g,width:b,height:j,margins:w,overrideStyles:y,useSeparatorOnPhone:_}=e,S=y;j&&(S={...S,"--feed-item-height-phone":j.phone,"--feed-item-height-desktop":j.desktop}),w&&(S={...S,"--feed-item-margin-top-phone":(null===(n=w.phone)||void 0===n?void 0:n.top)&&"".concat(null===(o=w.phone)||void 0===o?void 0:o.top,"px"),"--feed-item-margin-bottom-phone":(null===(a=w.phone)||void 0===a?void 0:a.bottom)&&"".concat(null===(c=w.phone)||void 0===c?void 0:c.bottom,"px"),"--feed-item-margin-top-desktop":(null===(u=w.desktop)||void 0===u?void 0:u.top)&&"".concat(null===(m=w.desktop)||void 0===m?void 0:m.top,"px"),"--feed-item-margin-bottom-desktop":(null===(f=w.desktop)||void 0===f?void 0:f.bottom)&&"".concat(null===(h=w.desktop)||void 0===h?void 0:h.bottom,"px")});let N=W(null==w?void 0:null===(t=w.phone)||void 0===t?void 0:t.top),C=W(null==w?void 0:null===(i=w.phone)||void 0===i?void 0:i.bottom),k=W(null==w?void 0:null===(l=w.desktop)||void 0===l?void 0:l.top),F=W(null==w?void 0:null===(s=w.desktop)||void 0===s?void 0:s.bottom),{borderStyle:L}=(0,Q.w)();return(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)("div",{className:d()({"mt-0":!N&&x&&!v&&!g,"mb-0":!C&&x&&!g,"mt-[var(--feed-item-margin-top-phone)]":N,"mb-[var(--feed-item-margin-bottom-phone)]":C,"sm:mt-4":!k&&x&&!v&&!g,"sm:mb-4":!F&&x&&!g,"sm:mt-[var(--feed-item-margin-top-desktop)]":k,"sm:mb-[var(--feed-item-margin-bottom-desktop)]":F,"pb-4":x&&v&&g,"py-4":x&&!v&&g,"text-[color:var(--onSurface)]":x,"text-[color:var(--onBackground)]":!x,[String(Z.X)]:!b||"default"===b,[String(Z.w)]:"extended"===b,"min-h-[var(--feed-item-height-phone)]":null==j?void 0:j.phone,"sm:h-auto":(null==j?void 0:j.phone)&&!(null==j?void 0:j.desktop),"sm:min-h-[var(--feed-item-height-desktop)]":null==j?void 0:j.desktop,"border-t-rem-px sm:border-none":_,"border-[color:var(--separator)]":"strokes"!==L,"border-[color:var(--primary)]":"strokes"===L},"mx-auto w-full"),...S&&{style:S},children:p})})}function $(e){let{children:t,width:i}=e;return(0,r.jsx)("div",{className:d()({["".concat(Z.X," mx-auto")]:!i||"default"===i,["".concat(Z.w," mx-auto")]:"extended"===i},"w-full"),children:t})}var Y=i(71439),G=i(47897),J=i(71087),ee=i(9542);let et=function(e){let{children:t,show:i}=e;return(0,r.jsx)("div",{"aria-hidden":!i,className:d()({"opacity-0 sr-only":!i,"opacity-100":i},"transition-opacity duration-500"),children:(0,r.jsx)("div",{className:d()({hidden:!i}),children:t})})};function ei(e){let{feed:t,forms:i}=e,l=(0,P.K)(t.id),n=(0,V.A)(t.id).contact,[o]=(0,B.useState)(i.forms),{trackFeedEvent:a}=(0,f.z)(),c=(0,A.o)(()=>a(h.U.FEED_ITEM_FORMS_SEEN,t,l,G.W.createEventParams(new J.n(["feed"]),{forms:o.map(e=>e.id)}))),[u,m]=(0,B.useState)(0),[p,x]=(0,B.useState)(!1),v=(0,B.useRef)(null),g=()=>{var e;u<o.length-1?m(u+1):x(!0),null===(e=v.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})};return(0,r.jsxs)("div",{className:"relative",...(0,ee.K)("forms-location-feed"),children:[(0,r.jsx)("div",{"aria-hidden":!0,ref:v,className:"absolute -top-6"}),(0,r.jsx)(s.Z,{noShadowOnLessThanSm:!0,mediumShadow:!0,children:(0,r.jsxs)("div",{ref:c,className:"px-4 relative w-full","aria-live":"polite",children:[o.length>1&&(0,r.jsxs)("div",{className:d()({hidden:p},"absolute right-4 top-1.5 text-sm text-[color:var(--secondary-onSurface)]"),children:[u+1," of ",o.length]}),(0,r.jsxs)("div",{children:[o.map((e,i)=>(0,r.jsx)(et,{show:u===i&&!p,children:(0,r.jsx)(Y.l,{feed:t,form:e,formLocation:"feed",contact:n,options:{onSubmitSuccess:g,submitButtonText:e.isPoll?null:e.submitButtonText,feedFollowSource:"web-feeds:feed-page-forms-form"}})},"".concat(e.id).concat((null==n?void 0:n.id)?n.id:""))),(0,r.jsxs)(et,{show:p,children:[(0,r.jsx)("h2",{className:"[font-family:var(--header-font-family)] font-[number:var(--font-semibold-relative)] text-2xl",children:(0,E.t)("forms_location_feed_confirmation_text_title")}),(0,r.jsx)("p",{className:"[font-family:var(--regular-font-family)] text-base-sm pt-1",children:o.length>1?(0,E.t)("forms_location_feed_confirmation_text_multiple_forms"):(0,E.t)("forms_location_feed_confirmation_text_single_form")})]})]})]})})]})}function er(e){var t,i;let{item:a,feed:d,prioritize:c,displayFeedLogoOnPost:u=!1,postRoundedCornersOnMobile:m=!1,useSeparatorOnPhone:f=!1,hideShareButton:h=!1,noShadowOnLessThanSm:p=!1,onlyPaddingBottom:x=!1,shouldDisplayAuthor:v,disableMaximizeMedia:g,openReadMoreLinksInTopWindow:b,trackReadMoreClicksAsEmbedClickEvent:j,isBoxOnSinglePostPage:w,blockFormDialogs:y}=e,_=null,S=!0,N=null;switch(a.type){case n.v_:(0,o.N)(d,"feed"),_=(0,r.jsx)("div",{className:"relative group/feed-item-post",children:(0,r.jsx)(s.Z,{roundedCornersOnMobile:m,noShadowOnLessThanSm:p,mediumShadow:!0,children:(0,r.jsx)(l.j,{feed:d,post:a,prioritize:c,displayFeedLogoOnPost:u,hideShareButton:h,shouldDisplayAuthor:v,disableMaximizeMedia:g,openReadMoreLinksInTopWindow:b,trackReadMoreClicksAsEmbedClickEvent:j,blockFormDialogs:y})})});break;case n.BZ:S=!0!==a.noBackgroundColor,N={"--surface":null===(t=a.colors)||void 0===t?void 0:t.surface,"--onSurface":null===(i=a.colors)||void 0===i?void 0:i.onSurface},_=(0,r.jsx)(s.Z,{roundedCornersOnMobile:m,noShadowOnLessThanSm:p,noBackgroundColor:!S,mediumShadow:!0,noShadow:a.noShadow,noRoundedCorners:"full"===a.width,backgroundImage:a.backgroundImage,contentPosition:a.contentPosition,isBoxOnSinglePostPage:w,children:(0,r.jsx)($,{width:a.contentWidth,children:(0,r.jsx)(R,{feed:d,box:a,useBackground:S})})});break;case n.Io:(0,o.N)(d,"feed"),_=(0,r.jsx)("div",{className:"relative",children:(0,r.jsx)(K,{feedId:d.id,personaPicker:a})},"personaPicker");break;case n.cY:(0,o.N)(d,"feed"),_=(0,r.jsx)(ei,{feed:d,forms:a});break;default:return function(e,t){if(!(0,O.r8)())return console.error(e),null;throw Error(e)}("Unsupported feed item type: ".concat(a.type,"."),0)}return(0,r.jsx)(X,{useBackgroundColor:S,onlyPaddingBottom:x,postRoundedCornersOnMobile:m,width:a.width,height:a.height,margins:a.margins,overrideStyles:N,useSeparatorOnPhone:f,children:_})}},26031:function(e,t,i){i.d(t,{X:function(){return r},w:function(){return l}});let r="md:max-w-[39.0625rem] xl:max-w-[45.3125rem]",l="xl:max-w-[76.5625rem]"},24354:function(e,t,i){i.d(t,{BZ:function(){return l},Io:function(){return s},cY:function(){return n},v_:function(){return r}});let r="post",l="box",s="persona-picker",n="forms"},38760:function(e,t,i){i.d(t,{j:function(){return tj}});var r=i(85893),l=i(72854),s=i(9061),n=i(35913),o=i(54542),a=i(54235),d=i(67294),c=i(13493),u=i(55769),m=i(86432),f=i(13406),h=i(94184),p=i.n(h),x=i(22920),v=i(33074),g=i(9542),b=i(13974);function j(e){let{feed:t,post:i,clapCount:h,showErrorMessage:j,hideErrorMessage:w,isDraft:y=!1,hideButtonChildrenOnBelowSm:_=!0}=e,{enableRestrictedMode:S}=(0,b.b)(),N=(0,u.z)(),C=(0,m.K)(t.id),[k,F]=(0,d.useState)(h);async function L(){if(!t.id||!i.id)return;if(y){(0,x.Am)((0,c.t)("draft_info_message"),{toastId:"draft-info-cta-claps"});return}null==w||w(),F(k+1);let e="/api/feeds/".concat(t.id,"/posts/").concat(i.id);if((await new a.r(fetch).post(e,{})).ok){N.trackPostEvent(f.U.FEED_POST_CLAPPED,t,i,C,{},S);return}null==j||j(),F(k)}return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)(l.z,{size:s.$.Md,kind:n.L.SecondaryAlt1,icon:(0,r.jsx)("span",{className:p()({"!-mr-1.25 sm:!mr-0":0===k}),children:(0,r.jsx)(o.O,{})}),className:"uppercase tracking-widest !rounded-full whitespace-nowrap !px-3.5 sm:!px-4",onClick:L,...(0,g.K)("post-clap-button"),children:[(0,r.jsxs)("span",{className:"sm:hidden",children:[(0,r.jsxs)("span",{className:"sr-only",children:[(0,c.t)("claps_screen_reader_prefix"),(0,v.g)(k)]}),k>0&&(0,r.jsx)("span",{"aria-hidden":!0,children:k})]}),(0,r.jsxs)("span",{className:p()({"hidden sm:inline":_}),children:[(0,r.jsx)("span",{className:"sr-only",children:(0,c.t)("claps_screen_reader_prefix")}),(0,v.g)(k)]})]})})}var w=i(99153),y=i(25655),_=i(26749),S=i(27535);function N(e){let{feed:t,post:i,isDraft:o=!1,hideButtonChildrenOnBelowSm:a=!0}=e,[h,p]=(0,d.useState)(!1),v=(0,m.K)(t.id),b=(0,u.z)(),j=(0,_.o)(i.text,i.id);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.z,{size:s.$.Md,kind:n.L.SecondaryAlt1,icon:(0,r.jsx)(w.F,{}),className:"uppercase tracking-widest !rounded-full !px-3.5 sm:!px-4",hideChildrenOnBelowSm:a,onClick:()=>{if(o){(0,x.Am)((0,c.t)("draft_info_message"),{toastId:"draft-info-cta-share"});return}b.trackPostEvent(f.U.POST_SHARED,t,i,v),p(!0)},...(0,g.K)("post-share-button"),children:(0,c.t)("share_label")}),(null==t?void 0:t.id)&&(0,r.jsx)(y.u,{show:h,onClose:()=>p(!1),url:S.eG.createAbsolute(t.uri,{postSlug:j}),feed:t})]})}var C=i(21843);function k(e){let{feed:t,post:i,clapCount:l,isDraft:s=!1,hideShareButton:n=!1,hideButtonChildrenOnBelowSm:o=!0}=e,[a,u]=(0,d.useState)(!1);return(0,r.jsxs)("div",{className:"flex flex-col items-start sm:pr-4",children:[(0,r.jsxs)("div",{className:"space-x-2 sm:space-x-4 flex",children:[t.features.claps&&(0,r.jsx)(j,{feed:t,post:i,clapCount:null!=l?l:0,hideButtonChildrenOnBelowSm:o,isDraft:s,showErrorMessage:()=>u(!0),hideErrorMessage:()=>u(!1)}),!n&&(0,r.jsx)(N,{feed:t,post:i,isDraft:s,hideButtonChildrenOnBelowSm:o})]}),a&&(0,r.jsx)("div",{className:"mt-2",children:(0,r.jsx)(C.Z,{message:(0,c.t)("clapping_error_message")})})]})}function F(e){let{alignment:t,children:i}=e,l="text-left";if(t)switch(t){case"right":l="text-right";break;case"center":l="text-center"}return(0,r.jsx)("div",{className:l,children:i})}var L=i(92378),I=i(19795);function T(e,t,i){let r=A(e);return"".concat(e).concat(r).concat(t,"=").concat(i)}function A(e){return e.includes("?")?"&":"?"}var P=i(51939);function R(e,t,i){let r;let l=(0,I.C)(),{enableRestrictedMode:s}=(0,b.b)(),n=(0,m.K)(e);return{link:s||l?t:i?function(e,t){if(!t)return e;{let i=A(e);return"".concat(e).concat(i,"contactId=").concat(t)}}(i,n):(r=T(r=t,"utm_source","knips"),r=T(r,"utm_medium","knips"),r=T(r,"utm_campaign","knips")),target:(0,P.A)(t,"_blank",s||l)}}function O(e){let{link:t,target:i}=R(e.feedId,e.url,e.urlRedirect),l=(0,m.K)(e.feedId),{trackEvent:s}=(0,u.z)();return(0,r.jsx)(L.F,{className:e.classes,href:t,target:i,alwaysUnderline:!0,shouldHandleAsPotentiallyExternalLink:!0,onClick:()=>{s(f.U.POST_BLOCK_ITEM_LINK_CLICK,{feed:e.feed,contactId:l,post:e.post})},children:e.children})}function z(e){var t,i,l;let s=(null===(t=e.item.styles)||void 0===t?void 0:t.includes("italic"))?"italic":null,n=(null===(i=e.item.styles)||void 0===i?void 0:i.includes("bold"))?"font-semibold":null,o=p()({[String(s)]:!!s,[String(n)]:!!n});if(e.item.linkId&&e.inlineLinks){let t=e.inlineLinks[e.item.linkId];if(t)return(0,r.jsx)(O,{classes:o,feedId:e.feedId,url:t.url,urlRedirect:t.urlRedirect,feed:e.feed,post:e.post,children:(0,r.jsx)(r.Fragment,{children:e.item.text})})}let a=(null===(l=e.item.styles)||void 0===l?void 0:l.includes("underline"))?"underline":null;return(o=p()({[String(a)]:!!a},o))?(0,r.jsx)("span",{className:o,children:e.item.text}):(0,r.jsx)("span",{children:e.item.text})}function E(e){let{feedId:t,spans:i,inlineLinks:l,text:s,feed:n,post:o}=e;return(null==i?void 0:i.length)?(0,r.jsx)(r.Fragment,{children:i.map((e,i)=>(0,r.jsx)(z,{item:e,inlineLinks:l,feedId:t,feed:n,post:o},i))}):(0,r.jsx)(r.Fragment,{children:s})}function M(e){var t;return(0,r.jsx)(F,{alignment:null!==(t=e.item.alignment)&&void 0!==t?t:"center",children:(0,r.jsx)("div",{className:p()({"my-12":!e.isFirst&&!e.isLast,"mb-12":e.isFirst&&!e.isLast,"mt-12":e.isLast&&!e.isFirst},"italic whitespace-pre-wrap px-4"),children:(0,r.jsx)(E,{feedId:e.feedId,spans:e.item.spans,inlineLinks:e.item.inlineLinks,text:e.item.text})})})}function D(e){return(0,r.jsx)("div",{className:p()({"my-4.5":!e.isFirst&&!e.isLast,"mb-4.5":e.isFirst&&!e.isLast,"mt-4.5":e.isLast&&!e.isFirst},"h-px bg-[color:var(--separator)] px-4")})}var B=i(86775),V=i(25675),U=i.n(V),q=i(2378),H=i(64305);let K={src:"/_next/static/media/maximize.afeee425.svg",height:27,width:27,blurWidth:0,blurHeight:0},Z={icon:{src:"/_next/static/media/play.2adbc8b0.png",height:86,width:65,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAYAAAAICAMAAADtGH4KAAAAGFBMVEX///////////////////////////////8pK8DIAAAACHRSTlMC/5XQ9D/xTYBTKckAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAAkSURBVHicY2BmZwABFkYmEMXGyMjMCuIxMjIywSi4IFgJRAMACfcAV1Zfba0AAAAASUVORK5CYII=",blurWidth:6,blurHeight:8},alt:"An icon symbolizing that media can be played."},W={src:"/_next/static/media/chevron-left.5b0eca43.svg",height:11,width:8,blurWidth:0,blurHeight:0},Q={src:"/_next/static/media/chevron-right.691ef6fd.svg",height:11,width:8,blurWidth:0,blurHeight:0};function X(e){let t=p()(H.hc,"absolute pt-1 pl-1 pr-0.75 pb-0.75 rounded-md top-4 right-4 z-20 transition-[transform] ease-in-out hover:cursor-pointer hover:scale-110 bg-black-100/40",{flex:!e.hideOnPhone,"hidden xs:flex":e.hideOnPhone});return(0,r.jsxs)("button",{className:t,onClick:e.onClick,children:[(0,r.jsx)("span",{className:"sr-only",children:e.buttonScreenReaderText}),(0,r.jsx)(U(),{src:K,width:26,height:26,alt:"An icon symbolizing the action of maximizing and image, video, or carousel.","aria-hidden":!0})]})}var $=i(93356),Y=i(85628),G=i.n(Y);function J(e){let{children:t,aspectRatio:i}=e,l=new(G())(i),s={height:l.d/(l.s*l.n)*80,maxWidth:80*i};return(0,r.jsx)("div",{style:{width:"".concat(80,"vw"),maxHeight:"".concat(80,"vh"),height:"".concat(s.height,"vw"),maxWidth:"".concat(s.maxWidth,"vh")},children:t})}function ee(e){let{link:t,target:i}=R(e.feedId,e.url,e.urlRedirect);return(0,r.jsx)(B.f,{href:t,target:i,shouldHandleAsPotentiallyExternalLink:!0,...(0,g.K)("post-blog-item-image-link"),children:e.children})}function et(e){var t,i,l;let[s,n]=(0,d.useState)(!1),o=100*(null!==(t=e.item.imageWidthFactor)&&void 0!==t?t:1),a=e.item.imageRatio>=1,u=(0,r.jsx)("div",{style:{"--blog-item-image-width":"".concat(o,"%")},className:p()({"mx-auto":100!==o},"relative p-0 w-[var(--blog-item-image-width)]"),children:(0,r.jsx)(q.U,{aspectRatio:e.item.imageRatio,children:(0,r.jsx)(U(),{src:e.item.imageUrl,alt:null!==(i=e.item.text)&&void 0!==i?i:(0,c.t)("blog_item_image_default_alt_text"),fill:!0,sizes:"(min-width: 460px) 735px, (min-width: 390px) 427px, 357px",priority:e.prioritize,...(0,g.K)("post-blog-item-image")})})});return e.item.url&&e.item.url.length>0&&(u=(0,r.jsx)(ee,{feedId:e.feedId,url:e.item.url,urlRedirect:e.item.urlRedirect,children:u})),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:p()({"my-5":!e.isFirst&&!e.isLast,"mb-5":e.isFirst&&!e.isLast,"mt-5":e.isLast&&!e.isFirst},"relative"),children:[(0,r.jsx)(X,{hideOnPhone:a,onClick:()=>n(!0),buttonScreenReaderText:(0,c.t)("maximize_image_button_screen_reader_text")}),u,null!==e.item.text&&(0,r.jsx)("div",{className:"text-center whitespace-pre-wrap text-sm mt-2.5",children:e.item.text})]}),(0,r.jsx)($.V,{show:s,closeDialog:()=>n(!1),title:(0,c.t)("blog_item_image_screen_reader_dialog_title"),description:(0,c.t)("blog_item_image_screen_reader_dialog_description"),options:{classes:{panelWrapper:"items-center justify-center"},srOnlyTitle:!0,srOnlyDescription:!0},children:(0,r.jsx)(J,{aspectRatio:e.item.imageRatio,children:(0,r.jsx)("div",{className:"relative overflow-hidden shadow-xl h-full",children:(0,r.jsx)(U(),{src:e.item.imageUrl,alt:null!==(l=e.item.text)&&void 0!==l?l:(0,c.t)("blog_item_image_default_alt_text"),fill:!0,sizes:"80vw",...(0,g.K)("post-blog-item-image")})})})})]})}var ei=i(59652),er=i(59431),el=i(15584);function es(e){var t,i,l,o;let{link:a,target:d}=R(e.feed.id,e.item.url,e.item.urlRedirect),c={"--btn-text-color":null!==(l=null===(t=e.item.blockColors)||void 0===t?void 0:t.onButton)&&void 0!==l?l:"var(--onPrimary)","--btn-bg-color":null!==(o=null===(i=e.item.blockColors)||void 0===i?void 0:i.button)&&void 0!==o?o:"var(--primary)"};return(0,r.jsx)("div",{className:p()({"my-5.5":!e.isFirst&&!e.isLast,"mb-5.5":e.isFirst&&!e.isLast,"mt-5.5 mb-0.5":e.isLast&&!e.isFirst},"flex flex-row px-4 text-center"),children:(0,r.jsx)(ei.Q,{className:"mx-auto",href:a,kind:n.L.PrimaryLight,size:s.$.LgBig,target:d,shouldHandleAsPotentiallyExternalLink:!0,...(0,g.K)("post-blog-item-link-button"),overrideThemeValues:(0,er.V)(e.feed.uri)?{...c,...(0,el.r)()}:c,children:e.item.text})})}function en(e){let t=p()({"mt-6 mb-0":!e.isFirst&&!e.isLast,"mb-1":e.isFirst&&!e.isLast,"mt-6":e.isLast&&!e.isFirst},"[font-family:var(--header-font-family)] whitespace-pre-wrap text-2xl leading-9 px-4");return(0,r.jsx)(F,{alignment:e.item.alignment,children:(0,r.jsx)("h1",{className:t,children:(0,r.jsx)(E,{feedId:e.feedId,spans:e.item.spans,inlineLinks:e.item.inlineLinks,text:e.item.text})})})}function eo(e){let t=p()({"mb-3":e.isFirst&&!e.isLast,"mt-5.5":e.isLast&&!e.isFirst||!e.isFirst&&!e.isLast},"[font-family:var(--header-font-family)] whitespace-pre-wrap text-xl leading-7 px-4");return(0,r.jsx)(F,{alignment:e.item.alignment,children:(0,r.jsx)("h2",{className:t,children:(0,r.jsx)(E,{feedId:e.feedId,spans:e.item.spans,inlineLinks:e.item.inlineLinks,text:e.item.text})})})}function ea(){return(0,r.jsx)("div",{className:"h-0.75 my-2.5"})}function ed(e){return e.item.text?(0,r.jsx)(F,{alignment:e.item.alignment,children:(0,r.jsx)("div",{className:p()({"my-2.5":!e.isFirst&&!e.isLast,"mb-2.5":e.isFirst&&!e.isLast,"mt-2.5":e.isLast&&!e.isFirst},"whitespace-pre-wrap px-4"),...(0,g.K)("post-blog-item-text-regular"),children:(0,r.jsx)(E,{feedId:e.feedId,spans:e.item.spans,inlineLinks:e.item.inlineLinks,text:e.item.text,feed:e.feed,post:e.post})})}):(0,r.jsx)(ea,{})}function ec(e){return(0,r.jsx)("li",{children:(0,r.jsx)("div",{className:p()({"my-1.5":!e.isFirst&&!e.isLast,"mb-1.5":e.isFirst&&!e.isLast,"mt-1.5":e.isLast&&!e.isFirst},"whitespace-pre-wrap"),...(0,g.K)("post-blog-item-text-list"),children:(0,r.jsx)(E,{feedId:e.feedId,spans:e.item.spans,inlineLinks:e.item.inlineLinks,text:e.item.text})})})}var eu=i(67677);function em(e,t){e.forEach((e,i)=>{let r=Math.abs(i-t);r>2?(e.li.style.opacity="0",e.li.setAttribute("aria-hidden","true")):(e.li.setAttribute("aria-hidden","false"),1===r?e.li.style.opacity=".8":2===r?e.li.style.opacity=".33":e.li.style.opacity="1")})}function ef(e){let{splideInstance:t,activeIndex:i,paginationClasses:l}=e,[s,n]=(0,d.useState)(10);return(0,d.useEffect)(()=>{t&&n(-(12*i)+10)},[i,!!t]),(0,r.jsx)("div",{style:{"--dot-indicator-container-width":"".concat(66,"px"),"--dot-indicator-gradient-width":"".concat(23,"px"),"--dot-indicator-left-position":"".concat(s,"px")},className:p()({[String(l)]:!!l},"h-7 w-[var(--dot-indicator-container-width)] absolute overflow-hidden mx-auto left-0 right-0"),children:(0,r.jsx)("ul",{className:"splide__pagination !flex-nowrap !transition-[left] !left-[var(--dot-indicator-left-position)] w-full !justify-start !flex"})})}function eh(e){var t,i,l;let{items:s,options:n,nextSlideButtonRef:o}=e,[a,u]=(0,d.useState)(null),[m,f]=(0,d.useState)(0);return(0,r.jsxs)(eu.tv,{"aria-label":(0,c.t)("carousel_aria_label"),hasTrack:!1,className:null==n?void 0:null===(t=n.classes)||void 0===t?void 0:t.slider,options:{i18n:{select:(0,c.t)("carousel_select_aria_label")},classes:{page:"splide__pagination__page !h-1.5 !w-1.5 !bg-transparent !border-rem-px !border-solid !border-[color:var(--onSurface)] hover:!scale-[1.3]"}},onPaginationMounted:e=>{em(e.Components.Pagination.items,0)},onReady:e=>u(e),onMove:(e,t,i,r)=>{em(e.Components.Pagination.items,r),f(r)},children:[(0,r.jsx)(eu.Gj,{className:null==n?void 0:null===(i=n.classes)||void 0===i?void 0:i.track,children:s.map((e,t)=>{var i,l;return(0,r.jsx)(eu.jw,{className:null==n?void 0:null===(i=n.classes)||void 0===i?void 0:i.slide,onClick:null==n?void 0:null===(l=n.slide)||void 0===l?void 0:l.onClick,...(0,g.K)("carousel-slide-".concat(t)),style:{"-webkit-transform":"translate3d(0,0,0)"},children:e},t)})}),(0,r.jsxs)("div",{className:"splide__arrows sr-only sm:not-sr-only",children:[(0,r.jsx)("button",{className:"splide__arrow splide__arrow--prev !bg-white !opacity-100 disabled:!opacity-30 hover:!opacity-90",...(0,g.K)("carousel-previous-slide-button"),children:(0,r.jsx)(U(),{width:10,height:14,src:W,alt:"An icon displaying a chevron pointing left.","aria-hidden":!0})}),(0,r.jsx)("button",{...o&&{ref:o},className:"splide__arrow splide__arrow--next !bg-white !opacity-100 disabled:!opacity-30 hover:!opacity-90",...(0,g.K)("carousel-next-slide-button"),children:(0,r.jsx)(U(),{width:10,height:14,src:Q,alt:"An icon displaying a chevron pointing right.","aria-hidden":!0})})]}),(0,r.jsx)(ef,{splideInstance:a,activeIndex:m,paginationClasses:null==n?void 0:null===(l=n.classes)||void 0===l?void 0:l.pagination})]})}function ep(e){var t,i,l,s;let n=null!==(i=e.withBlurredBackground)&&void 0!==i&&i;return(0,r.jsxs)(r.Fragment,{children:[n&&(0,r.jsx)("div",{className:"absolute inset-0 overflow-hidden bg-white","aria-hidden":!0,children:(0,r.jsx)("div",{className:"relative scale-[1.06] w-full h-full",children:(0,r.jsx)(U(),{src:e.image.src,alt:null!==(l=e.image.alt)&&void 0!==l?l:"",className:"blur-[10px]",fill:!0,style:{objectFit:"cover"},priority:e.priority,sizes:e.imageSizes})})}),(0,r.jsx)(U(),{src:e.image.src,alt:null!==(s=e.image.alt)&&void 0!==s?s:"",fill:!0,style:{objectFit:"contain"},priority:e.priority,sizes:e.imageSizes,className:e.fixScalingIssue?"scale-[1.0025]":void 0,title:null===(t=e.options)||void 0===t?void 0:t.title})]})}function ex(e,t){var i;return(0,r.jsx)(ep,{image:e,priority:null!==(i=e.priority)&&void 0!==i&&i,withBlurredBackground:t,imageSizes:"(min-width: 460px) 735px, (min-width: 390px) 427px, 357px",fixScalingIssue:!1,options:e.alt?{title:e.alt}:{}})}function ev(e){var t,i;let l=(t=e.images).every(e=>e.aspectRatio<1)?1.5:t.map(e=>e.aspectRatio).filter(e=>e>=1).reduce((e,t)=>t>e?t:e,0),[s,n]=(0,d.useState)(!1),o={inlineCarouselItems:[],dialogCarouselItems:[],originalData:[]};for(let t=0;t<e.images.length;t++){let s=function(e,t){let i=function(e,t){if(e<1)throw Error("Carousel aspect ratio less than 1 is not supported.");if(t<1&&1.5===e)return!0;if(e<t)throw Error("The carousel viewport ratio can't be a smaller number than the item it is rendering.");return t<e}(t,e.aspectRatio);return ex(e,i)}(e.images[t],l),n=(i=e.images[t],(0,r.jsx)(J,{aspectRatio:i.aspectRatio,children:(0,r.jsx)("div",{className:"relative shadow-xl h-full z-0",onClick:e=>e.stopPropagation(),children:ex(i)})}));o.inlineCarouselItems.push(s),o.dialogCarouselItems.push(n),o.originalData.push(e.images[t])}let a=(0,d.useRef)(null);return(0,r.jsxs)(q.U,{aspectRatio:l,children:[(0,r.jsx)(X,{onClick:()=>n(!0),buttonScreenReaderText:(0,c.t)("maximize_carousel_button_screen_reader_text")}),(0,r.jsx)(eh,{items:o.inlineCarouselItems,options:{classes:{slider:"h-full",track:"h-full",pagination:"!-bottom-8"}}}),(0,r.jsx)($.V,{show:s,closeDialog:()=>n(!1),title:(0,c.t)("image_carousel_aria_title"),description:(0,c.t)("image_carousel_aria_description"),initialFocus:a,options:{classes:{panel:"overflow-hidden w-full"},srOnlyDescription:!0,srOnlyTitle:!0},children:(0,r.jsx)(eh,{items:o.dialogCarouselItems,nextSlideButtonRef:a,options:{classes:{pagination:"!bottom-3",slider:"h-full",track:"h-full",slide:"h-full flex justify-center items-center"},slide:{onClick:()=>n(!1)}}})})]})}function eg(e){let t=e.item.mediaList.map((t,i)=>({src:t.imageUrl,alt:t.altText,aspectRatio:t.imageRatio,priority:e.prioritize&&0===i}));return(0,r.jsx)("div",{className:p()({"mt-4 mb-10":!e.isFirst&&!e.isLast,"mb-10":e.isFirst&&!e.isLast,"mt-4 mb-6":e.isLast&&!e.isFirst}),children:(0,r.jsx)(ev,{images:t})})}i(7461),i(37860);var eb=i(94395),ej=i.n(eb),ew=i(64487);function ey(e){let{autoplay:t,videoSources:i,poster:l,onPlayerReady:s,onFullscreenExit:n,onFullscreenChange:o,onPlay:a,onCanPlay:c,postId:u,shouldRequestFullscreenOnPlay:m=!1,feedColors:f}=e,[h,p]=(0,d.useState)(null),[x,v]=(0,d.useState)(null),b=(0,d.useCallback)(e=>{v(e)},[]);(0,d.useEffect)(()=>{if(!x)return;let e=ej()(x,{fill:!0,controls:!0,responsive:!0,preload:"auto",sources:[{src:i.videoUrl,type:"application/x-mpegURL"},{src:i.videoStorageUrl,type:"video/mp4"}],bigPlayButton:!1,poster:l,retryOnError:!0});return p(e),t&&setTimeout(()=>{var t;return null==e?void 0:null===(t=e.play())||void 0===t?void 0:t.catch(()=>{setTimeout(()=>{var t;return null==e?void 0:null===(t=e.play())||void 0===t?void 0:t.catch(e=>{ew.Tb(Error("Failed all video autoplay attempts. Post id: ".concat(u,"."),{cause:e}))})},50)})},50),s&&e.ready(()=>{s({play:()=>{function t(){e.isFullscreen()||(null==e?void 0:e.requestFullscreen()).catch(e=>{var t;(null===(t=e.stack)||void 0===t?void 0:t.includes("webkitEnterFullScreen"))||ew.Tb(Error("Exception caught when requesting fullscreen.",{cause:e}))})}return m&&(e.off("playing",t),e.on("playing",t)),null==e?void 0:e.play()},pause:()=>{e.pause()}})}),()=>{e.dispose()}},[x]),(0,d.useEffect)(()=>{if(h)(function(e,t,i){if(!t&&!i)return;let r=()=>{var r;!e.isFullscreen()&&t&&t(),null==i||i(null!==(r=e.isFullscreen())&&void 0!==r&&r)};e.off("fullscreenchange",r),e.on("fullscreenchange",r)})(h,n,o),a&&(h.off("play",a),h.on("play",a)),c&&(h.off("canplay",c),h.on("canplay",c))},[h,n,a]);let j={"--video-player-control-bar-bg-color":"".concat(f.surface,"CA"),"--video-player-load-progress-bg-color":"".concat(f.onSurface,"48"),"--video-player-slider-bg-color":"".concat(f.onSurface,"40")};return(0,r.jsx)("div",{"data-vjs-player":!0,style:j,children:(0,r.jsx)("video",{ref:b,className:"vjs-custom-styles video-js",...(0,g.K)("video-player")})})}function e_(e){let{posterUrl:t,prioritize:i,withBlurredBackground:l=!1,hidePlayButton:s=!1}=e;return(0,r.jsxs)("div",{className:"relative flex h-full cursor-pointer group",children:[(0,r.jsx)("div",{className:"h-full w-full absolute","aria-hidden":!0,children:(0,r.jsx)(ep,{image:{src:t,alt:""},priority:i,withBlurredBackground:l,fixScalingIssue:!l,imageSizes:"(min-width: 460px) 735px, (min-width: 390px) 427px, 357px"})}),!s&&(0,r.jsxs)("button",{className:"".concat(H.hc," backdrop-blur-[6px] bg-black-100/40 pl-[2.125rem] pr-7 pt-5\n                        pb-4.5 self-center mx-auto rounded-[var(--rounded-full-relative)] transition-all opacity-100 group-hover:scale-[1.2]"),...(0,g.K)("post-blog-item-video-play-button"),children:[(0,r.jsx)("span",{className:"sr-only",children:(0,c.t)("blog_items_video_screen_reader_play_button_text")}),(0,r.jsx)(U(),{src:Z.icon,alt:Z.alt,width:25,height:33,priority:i,"aria-hidden":!0})]})]})}var eS=i(11163);function eN(e){let t=(0,eS.useRouter)(),[i,r]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{t.query.showVideo===e.videoId&&r(!0)},[]),i}function eC(e,t){let i=new URL(window.location.href);i.searchParams.set(e,t),window.history.replaceState(null,"",i.toString())}var ek=i(99873),eF=i(29705),eL=i.n(eF);let eI={};for(let[e,t]of Object.entries(eL().screens))switch(e){case"xs":case"sm":case"md":case"lg":case"xl":case"2xl":eI[e]=Number(t.replace("px",""));break;case"fullscreen":case"recent-posts-carousel":case"sm-height":case"md-height":case"xxs":break;default:throw Error("Unsupported breakpoint key: ".concat(e,". Please add it to the Breakpoint type, as well as this switch."))}function eT(e){var t;let{video:i,prioritize:l,requestFullscreenOnPlay:s=!1,initVideo:n=!0,withBlurredPosterBackground:o=!1,onFullscreenChange:a,feed:h,post:x,enableScrollToVideo:v}=e,[g,b]=(0,d.useState)(null),[j,w]=(0,d.useState)(!1),[y,_]=(0,d.useState)(!1),[S,N]=(0,d.useState)(!0),{trackEvent:k}=(0,u.z)(),F=(0,m.K)(h.id),L=(0,eS.useRouter)(),I=eN(i);(0,d.useEffect)(()=>{!(window.innerWidth>=eI.md)&&v&&I&&i.videoId&&(N(!1),function(e){let t=document.getElementById(e);if(t){let e=t.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:e-40,behavior:"smooth"})}}(i.videoId))},[I]);let T=()=>{n&&(null==g||g.play().then(()=>w(!0)).catch(e=>{ew.Tb(Error("Failed video play attempt. Post id: ".concat(x.id,"."),{cause:e})),_(!0)})),i.videoId&&eC("showVideo",i.videoId)},A=(0,d.useCallback)(()=>{null==g||g.pause(),i.videoId&&(0,ek.h)("showVideo",L)},[g,L.query.contactId,L.asPath]);return(0,r.jsxs)("div",{id:null!==(t=i.videoId)&&void 0!==t?t:void 0,className:"h-full","aria-live":"polite",children:[(0,r.jsx)("div",{className:p()("absolute left-0 right-0 top-0 bottom-0 z-10",{hidden:j||y}),onClick:function(){T(),S&&k(f.U.LINK_CLICK,{feed:h,post:x,contactId:F,data:{event_name:"link_click",link_type:"post_video",link:window.location.href}})},"aria-hidden":j,children:(0,r.jsx)(e_,{withBlurredBackground:o,posterUrl:i.image.src,prioritize:l})}),n&&!y&&(0,r.jsx)("div",{className:"h-full","aria-hidden":!j,children:(0,r.jsx)(ey,{onPlayerReady:b,onFullscreenExit:A,onFullscreenChange:a,poster:i.image.src,videoSources:i,autoplay:!1,shouldRequestFullscreenOnPlay:s,feedColors:h.customizationSettings.style.colors})}),y&&(0,r.jsx)(C.Z,{className:"rounded-none",message:(0,c.t)("post_video_cant_play_error_message")})]})}var eA=i(98998);function eP(e){let{video:t,prioritize:i,initVideo:l=!0,withBlurredPosterBackground:s=!1,feed:n,post:o,enableAutoOpenDialogs:a}=e,h=(0,eS.useRouter)(),x=(0,m.K)(n.id),v=eN(t),[g,b]=(0,d.useState)(!1),[j,w]=(0,d.useState)(!1),[y,_]=(0,d.useState)(!1),{trackEvent:S}=(0,u.z)();function N(e){b(e),t.videoId&&(e?eC("showVideo",t.videoId):(0,ek.h)("showVideo",h))}return(0,d.useEffect)(()=>{!(window.innerWidth<eI.md)&&a&&v&&!g&&t.videoId&&(N(!0),_(!0))},[v]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"h-full",onClick:()=>{l&&N(!0),_(!1),S(f.U.LINK_CLICK,{feed:n,post:o,contactId:x,data:{event_name:"link_click",link_type:"post_video",link:window.location.href}})},children:(0,r.jsx)(e_,{posterUrl:t.image.src,prioritize:i,withBlurredBackground:s})}),l&&(0,r.jsx)($.V,{show:g,closeDialog:()=>{N(!1),setTimeout(()=>w(!1),300)},title:(0,c.t)("post_video_dialog_title"),description:(0,c.t)("post_video_dialog_description"),options:{classes:{panelWrapper:"items-center justify-center"},srOnlyTitle:!0,srOnlyDescription:!0,initialFocusOnTitle:!0},children:(0,r.jsx)(J,{aspectRatio:t.aspectRatio,children:(0,r.jsxs)("div",{className:"relative rounded-[var(--rounded-lg-relative)] overflow-hidden shadow-xl h-full z-0",children:[(0,r.jsxs)("div",{className:p()("absolute inset-0 z-10",{hidden:j}),children:[(0,r.jsx)("div",{className:"h-full",onClick:y?()=>{_(!1)}:void 0,children:(0,r.jsx)(e_,{posterUrl:t.image.src,prioritize:!1,hidePlayButton:!y})}),!y&&(0,r.jsxs)("div",{className:"absolute inset-0 bg-[#00000080] flex justify-center items-center",style:{"--onSurface":"#FFFFFF"},children:[(0,r.jsx)("div",{className:"sr-only",children:(0,c.t)("post_video_loading_screen_reader_text")}),(0,r.jsx)(eA.L,{})]})]}),!y&&(0,r.jsx)("div",{className:"scale-[1.002] h-full",children:(0,r.jsx)(ey,{poster:t.image.src,videoSources:t,autoplay:!0,onCanPlay:()=>w(!0),postId:o.id,feedColors:n.customizationSettings.style.colors})})]})})})]})}function eR(e){let{video:t,prioritize:i,withBlurredPosterBackground:l=!1,feed:s,post:n,enableAutoOpenVideo:o}=e,[a,c]=(0,d.useState)(!1),[u,m]=(0,d.useState)(!1),[f,h]=(0,d.useState)(null);(0,d.useEffect)(()=>{var e;let t;if(a&&u)return;let i=(e=()=>{h(window.innerWidth<eI.md)},t=!0,()=>{t&&(e(),t=!1,setTimeout(()=>t=!0,50))});return window.addEventListener("resize",i),i(),()=>window.removeEventListener("resize",i)},[a,u]),(0,d.useEffect)(()=>{null!==f&&(!a&&f&&c(f),u||f||m(!f))},[f]);let[x,v]=(0,d.useState)(!1);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:p()("h-full",{"md:hidden":!x}),children:(0,r.jsx)(eT,{video:t,prioritize:i,initVideo:a,requestFullscreenOnPlay:!0,withBlurredPosterBackground:l,onFullscreenChange:e=>v(e),feed:s,post:n,enableScrollToVideo:o})}),(0,r.jsx)("div",{className:"hidden md:block h-full",children:(0,r.jsx)(eP,{video:t,prioritize:i,initVideo:u,withBlurredPosterBackground:l,post:n,feed:s,enableAutoOpenDialogs:o})})]})}function eO(e){var t;let i=(t=e.item.imageRatio)<1?1.5:t,l={image:{src:e.item.imageUrl,alt:""},videoUrl:e.item.videoUrl,videoStorageUrl:e.item.videoStorageUrl,aspectRatio:e.item.imageRatio,videoId:e.item.videoId};return(0,r.jsx)("div",{className:p()({"my-5":!e.isFirst&&!e.isLast,"mb-5":e.isFirst&&!e.isLast,"mt-5":e.isLast&&!e.isFirst}),...(0,g.K)("post-blog-item-video"),children:(0,r.jsx)(q.U,{aspectRatio:i,children:(0,r.jsx)(eR,{video:l,prioritize:e.prioritize,withBlurredPosterBackground:e.item.imageRatio<1,post:e.post,feed:e.feed,enableAutoOpenVideo:e.enableAutoOpenDialogs})})})}var ez=i(69220),eE=i(45907),eM=i(5506);function eD(e){return(0,r.jsxs)(eE.Vq,{open:e.open,onClose:e.onClose,className:"relative z-50",children:[(0,r.jsx)("div",{className:"fixed inset-0 bg-black-100/30","aria-hidden":"true"}),(0,r.jsx)("div",{className:"fixed inset-0 overflow-y-scroll",children:(0,r.jsx)("div",{className:"flex min-h-full items-center justify-center p-5 xs:py-14",children:(0,r.jsxs)(eE.EM,{className:"mx-auto max-w-sm rounded-[var(--rounded-lg-relative)] bg-[color:var(--surface)] text-[color:var(--onSurface)] py-7 px-8 xs:max-w-lg md:max-w-2xl lg:max-w-3xl w-full overflow-hidden relative",children:[(0,r.jsxs)("button",{className:"absolute top-4 right-3 z-20 rounded-[var(--rounded-md-relative)] p-1 transition-transform hover:cursor-pointer hover:scale-110 focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-black-100 focus-visible:outline-none",onClick:e.onClose,children:[(0,r.jsx)("span",{className:"sr-only",children:(0,c.t)("dialog_close")}),(0,r.jsx)(eM.Z,{className:"h-6 w-6 text-[color:var(--onSurface)]","aria-hidden":"true"})]}),e.title&&(0,r.jsx)(eE.$N,{className:"font-[number:var(--font-medium-relative)] text-2xl [font-family:var(--header-font-family)]",children:e.title}),e.children]})})})]})}var eB=i(71439),eV=i(84453),eU=i(46655),eq=i(49540),eH=i(39709),eK=i(56510);function eZ(e){var t,i,o;let a=(0,eS.useRouter)(),c=(0,m.K)(e.feed.id),h=(0,eK.A)(e.feed.id).contact,x=function(e){let t=(0,eS.useRouter)(),[i,r]=(0,d.useState)(!1);return(0,d.useEffect)(()=>{(e.isPoll?t.query.showPoll:t.query.showForm)===e.id&&r(!0)},[]),i}(e.form),[v,g]=(0,d.useState)(!1),[b,j]=(0,d.useState)([]),[w,y]=(0,d.useState)(!1),[_,S]=(0,d.useState)(!1),{trackEvent:N}=(0,u.z)();function C(t){g(t);let i=e.form.isPoll?"showPoll":"showForm";t?eC(i,e.form.id):(0,ek.h)(i,a)}function k(){var t,i,r;j(new eV.s(eU.DU).findFormSubmissionsForFormIds(e.feed.id,null!==(i=e.formSubmissionsForContact)&&void 0!==i?i:[],null!=c?c:"anonymous",null!==(r=null===(t=e.post)||void 0===t?void 0:t.id)&&void 0!==r?r:null,e.formLocation,[e.form.id]))}(0,d.useEffect)(()=>{k()},[c]),(0,d.useEffect)(()=>{e.enableAutoOpenDialogs&&x&&!v&&(C(!0),N(e.trackingOptions.eventName,{feed:e.feed,post:e.post,contactId:c,isDialog:!0}))},[x]);let F=!!(!e.form.isPoll&&e.form.description),L=0!==b.length,I=e.form.isPoll,T=!e.form.isPoll&&(e.form.allowMultipleSubmissions&&!w||!e.form.allowMultipleSubmissions&&!L),A=null;if(e.form.isPoll){let t=L?b[0]:null;A={result:null!==(i=e.publicPollResult)&&void 0!==i?i:null,showAnswersAsSelected:null!==(o=null==t?void 0:t.selectedAnswerIds)&&void 0!==o?o:null,localSubmissionToAddToPollResults:_?t:null}}let P=!(!e.form.isPoll&&e.form.allowMultipleSubmissions)&&L&&!w;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.z,{kind:n.L.PrimaryLight,className:"text-sm",onClick:()=>{if(e.preventFormDialogFromOpening){(0,eH.F)();return}C(!0),N(e.trackingOptions.eventName,{feed:e.feed,post:e.post,contactId:c,isDialog:!0}),N(f.U.LINK_CLICK,{feed:e.feed,post:e.post,contactId:c,data:{event_name:"link_click",link_type:e.form.isPoll?"post_poll":"post_form",link:window.location.href}})},size:s.$.XlNarrow,icon:e.icon,overrideThemeValues:e.overrideThemeValues,children:e.form.title}),(0,r.jsx)(eD,{title:e.form.title,open:v,onClose:()=>{C(!1),w&&y(!1)},children:(0,r.jsxs)(r.Fragment,{children:[!e.form.isPoll&&(0,r.jsx)("div",{className:"text-sm pt-1",children:e.form.description}),(0,r.jsx)(eq.A,{options:{shouldShowAlreadySubmittedMessage:P,shouldShowSubmitSuccessMessage:!e.form.isPoll&&w,customSubmitSuccessMessage:e.form.isPoll?null:e.form.confirmationText},formIsPoll:e.form.isPoll}),(T||I)&&(0,r.jsx)("div",{className:p()({"pt-6":F,"pt-4":!F}),children:(0,r.jsx)(eB.l,{feed:e.feed,form:e.form,postId:null===(t=e.post)||void 0===t?void 0:t.id,formLocation:e.formLocation,contact:h,options:{showTitle:!1,showDescription:!1,submitButtonText:e.form.isPoll?null:e.form.submitButtonText,onSubmitSuccess:()=>{k(),y(!0),S(!0)},hasFormSubmission:L,feedFollowSource:e.feedFollowSource,poll:A,formFeedbackOptions:{shouldShowSubmitSuccessMessage:e.form.isPoll&&w}}})})]})})]})}function eW(){return(0,r.jsxs)("svg",{width:18,height:18,viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M12.882.647H2.119C1.31.647.647 1.311.647 2.12v10.763c0 .808.664 1.47 1.472 1.47h10.763c.808 0 1.47-.663 1.47-1.47V2.119c0-.808-.663-1.472-1.47-1.472ZM5.264 11.078c0 .13-.115.245-.245.245H3.72a.253.253 0 0 1-.245-.245V5.74c0-.13.116-.245.245-.245H5.02c.13 0 .245.116.245.245v5.338Zm3.13 0c0 .13-.115.245-.245.245H6.851a.253.253 0 0 1-.245-.245V3.922c0-.13.115-.245.245-.245h1.298c.13 0 .246.116.246.245v7.156Zm3.131 0c0 .13-.116.245-.245.245H9.98a.253.253 0 0 1-.245-.245V7.4c0-.13.116-.245.245-.245h1.299c.13 0 .245.116.245.245v3.68Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M12.882.647H2.119C1.31.647.647 1.311.647 2.12v10.763c0 .808.664 1.47 1.472 1.47h10.763c.808 0 1.47-.663 1.47-1.47V2.119c0-.808-.663-1.472-1.47-1.472ZM5.264 11.078c0 .13-.115.245-.245.245H3.72a.253.253 0 0 1-.245-.245V5.74c0-.13.116-.245.245-.245H5.02c.13 0 .245.116.245.245v5.338Zm3.13 0c0 .13-.115.245-.245.245H6.851a.253.253 0 0 1-.245-.245V3.922c0-.13.115-.245.245-.245h1.298c.13 0 .246.116.246.245v7.156Zm3.131 0c0 .13-.116.245-.245.245H9.98a.253.253 0 0 1-.245-.245V7.4c0-.13.116-.245.245-.245h1.299c.13 0 .245.116.245.245v3.68Z",fill:"currentColor"})]})}function eQ(e){var t,i,l,s,n,o;let a=null===(t=e.post.forms)||void 0===t?void 0:t.find(t=>t.id===e.item.formId);if(!a)return console.error("Poll with id ".concat(e.item.formId," missing from forms array of post with id ").concat(e.post.id,".")),null;let d=null===(i=e.post.publicPollResults)||void 0===i?void 0:i.find(e=>e.formId===a.id),c={"--btn-text-color":null!==(n=null===(l=e.item.blockColors)||void 0===l?void 0:l.onButton)&&void 0!==n?n:"var(--onPrimary)","--btn-bg-color":null!==(o=null===(s=e.item.blockColors)||void 0===s?void 0:s.button)&&void 0!==o?o:"var(--primary)"};return(0,r.jsx)("div",{className:p()({"my-8":!e.isFirst&&!e.isLast,"mb-8":e.isFirst&&!e.isLast,"mt-8 mb-1":e.isLast&&!e.isFirst},"flex justify-center px-4"),children:(0,r.jsx)(eZ,{form:a,feed:e.feed,post:e.post,feedFollowSource:"web-feeds:single-post-page-forms-form",formSubmissionsForContact:e.post.formSubmissionsForContact,formLocation:"post",publicPollResult:d,icon:(0,r.jsx)("div",{className:"-mt-px mr-1",children:(0,r.jsx)(eW,{})}),overrideThemeValues:(0,er.V)(e.feed.uri)?{...c,...(0,el.r)()}:c,preventFormDialogFromOpening:e.blockFormDialogs,trackingOptions:{eventName:f.U.POLL_DIALOG_OPENED},enableAutoOpenDialogs:e.enableAutoOpenDialogs})})}function eX(e){var t,i,l,s,n;let o=null===(t=e.post.forms)||void 0===t?void 0:t.find(t=>t.id===e.item.formId);if(!o)return console.error("Form with id ".concat(e.item.formId," missing from forms array of post with id ").concat(e.post.id,".")),null;let a={"--btn-text-color":null!==(s=null===(i=e.item.blockColors)||void 0===i?void 0:i.onButton)&&void 0!==s?s:"var(--onPrimary)","--btn-bg-color":null!==(n=null===(l=e.item.blockColors)||void 0===l?void 0:l.button)&&void 0!==n?n:"var(--primary)"};return(0,r.jsx)("div",{className:p()({"my-8":!e.isFirst&&!e.isLast,"mb-8":e.isFirst&&!e.isLast,"mt-8 mb-1":e.isLast&&!e.isFirst},"flex justify-center px-4"),children:(0,r.jsx)(eZ,{form:o,feed:e.feed,post:e.post,feedFollowSource:"web-feeds:single-post-page-forms-form",formSubmissionsForContact:e.post.formSubmissionsForContact,formLocation:"post",overrideThemeValues:(0,er.V)(e.feed.uri)?{...a,...(0,el.r)()}:a,preventFormDialogFromOpening:e.blockFormDialogs,trackingOptions:{eventName:f.U.FORM_DIALOG_OPENED},enableAutoOpenDialogs:e.enableAutoOpenDialogs})})}function e$(e){switch(e){case"center":return"px-4 xs:px-2";case"left":return"px-4 xs:pl-0 xs:pr-2";case"right":return"px-4 xs:pl-2 xs:pr-0";default:return""}}var eY=i(66776);function eG(e){let{link:t,target:i}=R(e.feedId,e.url,e.urlRedirect);return(0,r.jsx)(L.F,{href:t,target:i,hoverUnderline:e.hoverUnderline,children:e.children})}function eJ(e){let t=(0,I.C)(),i=p()(e$(e.alignment),"font-bold"),l="".concat(e.price).concat(e.currencySymbol?" ".concat(e.currencySymbol):"");return(0,r.jsxs)(F,{alignment:e.alignment,children:[t&&(0,r.jsx)("div",{className:i,children:e.price}),!t&&(0,r.jsx)("div",{className:i,children:(0,r.jsx)(eY.Q,{condition:!!e.url,wrap:t=>(0,r.jsxs)(eG,{feedId:e.feedId,url:e.url,urlRedirect:e.urlRedirect,hoverUnderline:!0,children:[(0,r.jsx)("span",{className:"sr-only",children:e.srLinkText}),t]}),children:(0,r.jsx)(r.Fragment,{children:l})})})]})}function e0(e){let{link:t,target:i}=R(e.feedId,e.url,e.urlRedirect);return(0,r.jsx)("div",{className:p()(e$(e.alignment),"mt-4"),children:(0,r.jsx)(F,{alignment:e.alignment,children:(0,r.jsx)(ei.Q,{className:"inline-flex",href:t,kind:n.L.PrimaryLight,size:s.$.Xl,target:i,shouldHandleAsPotentiallyExternalLink:!0,overrideThemeValues:(0,er.V)(e.feedUri)?(0,el.r)():{},...(0,g.K)("post-blog-item-link-button"),children:e.text})})})}function e1(e){return(0,r.jsx)("div",{className:"mb-2",children:(0,r.jsx)(eY.Q,{condition:!!e.url,wrap:t=>(0,r.jsx)(eG,{feedId:e.feedId,url:e.url,urlRedirect:e.urlRedirect,children:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"sr-only",children:e.srLinkText}),t]})}),children:(0,r.jsx)("img",{src:e.src,className:"mx-auto",alt:"",decoding:"async"})})})}function e5(e){return(0,r.jsx)("div",{className:"mt-2 mb-2.5",children:(0,r.jsx)(F,{alignment:e.alignment,children:(0,r.jsx)("h3",{className:p()(e$(e.alignment),"[font-family:var(--header-font-family)] whitespace-pre-wrap","font-bold text-base"),children:e.title})})})}function e2(e){return(0,r.jsx)("div",{className:"my-2.5",children:(0,r.jsx)(F,{alignment:e.alignment,children:(0,r.jsx)("div",{className:p()(e$(e.alignment),"space-y-2.5"),dangerouslySetInnerHTML:{__html:e.bodyHtml}})})})}function e4(e){let t=e.item.productVisibilitySettings;return(0,r.jsx)("div",{className:p()({"my-4 md:my-6":!e.isFirst&&!e.isLast,"mb-4 md:mb-6":e.isFirst&&!e.isLast,"mt-4 md:mt-6":e.isLast&&!e.isFirst},"flex flex-wrap justify-center px-0 xs:px-4"),children:e.item.products.map((i,l)=>(0,r.jsxs)("div",{className:p()({"xs:odd:last:px-1 xs:odd:last:max-w-[50%]":e.item.products.length>1&&e.item.products.length%2!=0,"xs:max-w-xs":1===e.item.products.length,"xs:max-w-[50%]":e.item.products.length>1},"flex-auto xs:basis-1/2 xs:odd:pr-2 xs:even:pl-2","[&:not(:nth-child(-n+2))]:pt-4 md:odd:pr-3.5 md:even:pl-3.5","md:[&:not(:nth-child(-n+2))]:pt-7 [&:nth-child(2)]:pt-4 xs:[&:nth-child(2)]:pt-0"),children:[t.isImageVisible&&i.imageUrl&&(0,r.jsx)(e1,{feedId:e.feedId,url:i.url,urlRedirect:i.urlRedirect,srLinkText:i.button,src:i.imageUrl}),t.isTitleVisible&&i.title&&(0,r.jsx)(e5,{alignment:e.item.alignment,title:i.title}),t.isDescriptionVisible&&i.bodyHtml&&(0,r.jsx)(e2,{alignment:e.item.alignment,bodyHtml:i.bodyHtml}),t.isPriceVisible&&i.price&&(0,r.jsx)(eJ,{feedId:e.feedId,url:i.url,urlRedirect:i.urlRedirect,srLinkText:i.button,language:e.language,price:i.price,currencySymbol:i.symbol,alignment:e.item.alignment}),t.isButtonVisible&&i.button&&i.url&&(0,r.jsx)(e0,{url:i.url,urlRedirect:i.urlRedirect,text:i.button,feedId:e.feedId,feedUri:e.feedUri,alignment:e.item.alignment})]},l))})}function e3(e){let t=e.index<=4&&e.prioritize;switch(e.item.type){case"list":return(0,r.jsx)(ec,{item:e.item,feedId:e.feed.id,isFirst:e.isFirst,isLast:e.isLast});case"divider":return(0,r.jsx)(D,{isFirst:e.isFirst,isLast:e.isLast});case"link":return(0,r.jsx)(es,{item:e.item,feed:e.feed,isFirst:e.isFirst,isLast:e.isLast});case"image":return(0,r.jsx)(et,{item:e.item,feedId:e.feed.id,isFirst:e.isFirst,isLast:e.isLast,prioritize:t});case"mediaCarousel":return(0,r.jsx)(eg,{item:e.item,prioritize:t,isFirst:e.isFirst,isLast:e.isLast});case"poll":return(0,r.jsx)(eQ,{item:e.item,feed:e.feed,post:e.post,blockFormDialogs:e.blockFormDialogs,isFirst:e.isFirst,isLast:e.isLast,enableAutoOpenDialogs:e.enableAutoOpenDialogs});case"form":return(0,r.jsx)(eX,{item:e.item,feed:e.feed,post:e.post,blockFormDialogs:e.blockFormDialogs,isFirst:e.isFirst,isLast:e.isLast,enableAutoOpenDialogs:e.enableAutoOpenDialogs});case"video":return(0,r.jsx)(eO,{item:e.item,prioritize:t,isFirst:e.isFirst,isLast:e.isLast,feed:e.feed,post:e.post,enableAutoOpenDialogs:e.enableAutoOpenDialogs});case"products":return(0,r.jsx)(e4,{item:e.item,feedId:e.feed.id,feedUri:e.feed.uri,language:e.feed.locale.language,isFirst:e.isFirst,isLast:e.isLast})}if(" "===e.item.text)return(0,r.jsx)(ea,{});switch(e.item.type){case"quote":return(0,r.jsx)(M,{item:e.item,feedId:e.feed.id,isFirst:e.isFirst,isLast:e.isLast});case"h1":return(0,r.jsx)(en,{item:e.item,feedId:e.feed.id,isFirst:e.isFirst,isLast:e.isLast});case"h2":return(0,r.jsx)(eo,{item:e.item,feedId:e.feed.id,isFirst:e.isFirst,isLast:e.isLast});case"regular":return(0,r.jsx)(ed,{item:e.item,feedId:e.feed.id,isFirst:e.isFirst,isLast:e.isLast,feed:e.feed,post:e.post});default:return(0,ez.Q)("warn","Unsupported blog item: ".concat(JSON.stringify(e.item),".")),null}}function e7(e){let t=[];if(!e.post.blog)return null;let i=e.post.blog.slice(e.skip||0);for(let l=0;l<i.length;l++){let s=i[l];if("list"!==s.type){t.push((0,r.jsx)(e3,{item:s,feed:e.feed,post:e.post,isFirst:0===l,isLast:i.length===l+1,index:l,blockFormDialogs:e.blockFormDialogs,prioritize:e.prioritize,enableAutoOpenDialogs:e.enableAutoOpenDialogs},l));continue}let n=l,o=[s];for(;l+1<i.length&&"list"===i[l+1].type;)o.push(i[l+++1]);t.push((0,r.jsx)("ul",{className:p()({"mt-3.5":0!==n,"mb-3.5":o.length+n!==i.length},"list-disc pl-[1.1875rem] ml-8"),children:o.map((t,s)=>{let n=l-(o.length-1)+s;return i?(0,r.jsx)(e3,{item:t,feed:e.feed,post:e.post,isFirst:0===n,isLast:i.length===n+1,index:n,blockFormDialogs:e.blockFormDialogs,prioritize:e.prioritize,enableAutoOpenDialogs:e.enableAutoOpenDialogs},s):null})},l))}return(0,r.jsx)(r.Fragment,{children:t})}var e9=i(15387);function e8(e){let{text:t}=e;return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"mt-8 text-sm",children:[t,(0,r.jsx)("span",{className:"relative text-xs pl-2 leading-3.5",children:(0,r.jsx)(e9.Z,{text:(0,c.t)("read_more_label"),alwaysUnderline:!0,onClick:()=>{}})})]})})}var e6=i(69159),te=i(99593),tt=i(85448);function ti(e){let{enforceMaxHeight:t,openReadMoreLinksInTopWindow:i,trackReadMoreClicksAsEmbedClickEvent:l,feed:n,post:o,isPrivatePost:a,blockFormDialogs:m,prioritize:h,enableAutoOpenDialogs:x}=e,{trackPostEvent:v}=(0,u.z)(),{enableRestrictedMode:j}=(0,b.b)(),w=S.eG.createAbsolute(n.uri,{postSlug:(0,_.o)(o.text,o.id)}),y=o.blog&&o.blog.length>0,N=o.text&&o.text.length>0,[C,k]=function(){let[e,t]=(0,d.useState)(null),i=(0,d.useCallback)(i=>{null===i||e||t(i.clientHeight)},[e]);return[e,i]}(),F=function(e){if(!(null==e?void 0:e.length))return!1;switch(e[0].type){case"image":case"video":case"mediaCarousel":case"products":return!0;default:return!1}}(o.blog),L=F?200:700,I=null===C,T=!!(t&&C&&C>L);if(T&&!n.slug)throw Error("Feed slug must be specified if the post does enforce max height.");let A=p()({"max-h-[--content-preview-max-height] overflow-hidden":T||I&&t},"relative z-0"),P=(0,e6.B)(s.$.Sm),R=null;return T&&(j&&a?R=e=>((0,tt.i)(e,j),Promise.resolve()):l&&(R=e=>(0,te.l)(e,()=>v(f.U.EMBED_POST_LINK_CLICK,n,o)))),(0,r.jsxs)("div",{className:"relative",children:[F&&o.blog&&(0,r.jsx)(e3,{post:o,feed:n,item:o.blog[0],isFirst:!0,isLast:1===o.blog.length,prioritize:h,blockFormDialogs:m,index:0,enableAutoOpenDialogs:x}),(0,r.jsx)("div",{className:A,style:{"--content-preview-max-height":"".concat(L,"px")},children:(0,r.jsxs)("div",{ref:k,className:"text-base-sm [overflow-wrap:anywhere]","aria-hidden":T,children:[y&&(0,r.jsx)(e7,{post:o,feed:n,blockFormDialogs:m,prioritize:h,skip:F?1:0,enableAutoOpenDialogs:x}),!y&&N&&(0,r.jsx)(e8,{text:o.text})]})}),(I&&t||T)&&(0,r.jsxs)(B.f,{href:w,className:"group",target:i?"_top":"_self",onClick:R,...(0,g.K)("post-read-more-link"),children:[(0,r.jsx)("div",{className:"absolute bottom-3 bg-gradient-to-t from-[color:var(--surface)] w-full h-10"}),(0,r.jsx)("div",{className:"absolute bottom-3 bg-gradient-to-t from-[color:var(--surface)] w-full h-6"}),T&&(0,r.jsx)("div",{className:"absolute bottom-3.75 border-solid border-[color:var(--separator)] group-hover:border-[color:var(--onSurface)] border-b-rem-px w-full h-px transition-all"}),(0,r.jsx)("div",{className:"absolute bottom-0 w-full h-3.75 bg-[color:var(--surface)]"}),T&&(0,r.jsx)("div",{className:"absolute bottom-0.5 left-1/2 -translate-x-1/2 rounded-full bg-[color:var(--surface)]",children:(0,r.jsx)("span",{className:"flex items-center justify-center border-rem-px font-semibold ".concat(P,"\n                                    text-[color:var(--onSurface)] border-[color:var(--separator)] border-rem-px rounded-full\n                                    group-hover:font-semibold group-hover:ring-2 group-hover:ring-[color:var(--onSurface)]\n                                    group-hover:border-transparent transition-all group-focus-visible:ring-2 group-focus-visible:ring-offset-2\n                                    group-focus-visible:ring-[color:var(--primary)] group-focus-visible:outline-none"),children:(0,c.t)("read_more_label")})})]})]})}var tr=i(20024);function tl(e){let{text:t,className:i,icon:l}=e,s="inline-flex items-center rounded-xl";return i&&(s+=" ".concat(i)),(0,r.jsxs)("span",{className:s,children:[l&&(0,r.jsx)("span",{className:"flex content-center mr-2 min-w-[0.9375rem]","aria-hidden":"true",children:(0,r.jsx)(U(),{src:l.icon,width:15,height:14,alt:l.alt})}),t]})}var ts=i(99774),tn=i(49759),to=i(95410),ta=i(71373),td=i(40677);function tc(e){let{screenReaderTextKey:t,icon:i,createMessage:s}=e,[o,a]=(0,d.useState)(!1);return o?(0,r.jsx)("div",{className:"p-[0.5625rem]",children:(0,r.jsx)(ta.X,{classNameForSize:"w-4.5 h-4.5 sm:w-4 sm:h-4"})}):(0,r.jsxs)(l.z,{kind:n.L.IconButton,className:"text-[var(--onSurface)]",onClick:()=>{a(!0),setTimeout(()=>a(!1),2e3),(0,td.n)(s(),{shouldOnlySendMessageToFlutter:!0})},children:[(0,r.jsx)("div",{className:"sr-only",children:(0,c.t)(t)}),(0,r.jsx)("span",{className:"flex items-center w-4.5 h-4.5 sm:w-4 sm:h-4",children:i})]})}function tu(){return(0,r.jsxs)("svg",{width:"17",height:"17",viewBox:"0 0 17 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M13.3508 1.0625C12.6884 1.0625 12.0265 1.31495 11.5216 1.81932C8.62872 4.71223 5.7358 7.60515 2.84275 10.4982L6.50332 14.1588C9.39624 11.2659 12.2892 8.37295 15.1822 5.47989C16.1915 4.47063 16.1888 2.82809 15.18 1.81932C14.6757 1.31496 14.0133 1.0625 13.3509 1.0625H13.3508ZM2.39395 11.2701L2.12908 14.4063C2.10697 14.6728 2.32921 14.895 2.59515 14.8724L5.72973 14.6064L2.39395 11.2701Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M13.3508 1.0625C12.6884 1.0625 12.0265 1.31495 11.5216 1.81932C8.62872 4.71223 5.7358 7.60515 2.84275 10.4982L6.50332 14.1588C9.39624 11.2659 12.2892 8.37295 15.1822 5.47989C16.1915 4.47063 16.1888 2.82809 15.18 1.81932C14.6757 1.31496 14.0133 1.0625 13.3509 1.0625H13.3508ZM2.39395 11.2701L2.12908 14.4063C2.10697 14.6728 2.32921 14.895 2.59515 14.8724L5.72973 14.6064L2.39395 11.2701Z",fill:"currentColor"})]})}function tm(e){let{width:t=20,height:i=20}=e;return(0,r.jsxs)("svg",{width:t,height:i,viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("rect",{y:"8",width:"4",height:"6",rx:"1",fill:"currentColor"}),(0,r.jsx)("rect",{x:"5.42871",width:"4",height:"14",rx:"1",fill:"currentColor"}),(0,r.jsx)("rect",{x:"10.8569",y:"5",width:"4",height:"9",rx:"1",fill:"currentColor"})]})}var tf=i(25755);function th(){return(0,r.jsx)("svg",{role:"img","aria-label":"An icon of a phone.",width:18,viewBox:"0 0 1408 1792",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M1408 1240q0 27-10 70.5t-21 68.5q-21 50-122 106-94 51-186 51-27 0-53-3.5t-57.5-12.5-47-14.5-55.5-20.5-49-18q-98-35-175-83-127-79-264-216t-216-264q-48-77-83-175-3-9-18-49t-20.5-55.5-14.5-47-12.5-57.5-3.5-53q0-92 51-186 56-101 106-122 25-11 68.5-21t70.5-10q14 0 21 3 18 6 53 76 11 19 30 54t35 63.5 31 53.5q3 4 17.5 25t21.5 35.5 7 28.5q0 20-28.5 50t-62 55-62 53-28.5 46q0 9 5 22.5t8.5 20.5 14 24 11.5 19q76 137 174 235t235 174q2 1 19 11.5t24 14 20.5 8.5 22.5 5q18 0 46-28.5t53-62 55-62 50-28.5q14 0 28.5 7t35.5 21.5 25 17.5q25 15 53.5 31t63.5 35 54 30q70 35 76 53 3 7 3 21z",fill:"currentColor",stroke:"currentColor"})})}function tp(){return(0,r.jsx)("svg",{role:"img","aria-label":"An icon of an envelope.",width:"18",viewBox:"0 0 1792 1792",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)("path",{d:"M1792 710v794q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-794q44 49 101 87 362 246 497 345 57 42 92.5 65.5t94.5 48 110 24.5h1 1q51 0 110-24.5t94.5-48 92.5-65.5q170-123 498-345 57-39 100-87zM1792 416q0 79-49 151t-122 123q-376 261-468 325-10 7-42.5 30.5t-54 38-52 32.5-57.5 27-50 9h-1-1q-23 0-50-9t-57.5-27-52-32.5-54-38-42.5-30.5q-91-64-262-182.5t-205-142.5q-62-42-117-115.5t-55-136.5q0-78 41.5-130t118.5-52h1472q65 0 112.5 47t47.5 113z",fill:"currentColor",stroke:"currentColor"})})}var tx=i(5421),tv=i(80114);function tg(e){var t,i,l;let{feed:s,post:n,prioritize:o}=e,[a,h]=(0,d.useState)(!1),p=(0,u.z)(),x=(0,m.K)(s.id),v=n.author;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex",children:(0,r.jsx)("button",{onClick:()=>{((null==v?void 0:v.phone)||(null==v?void 0:v.email)||(null==v?void 0:v.bio))&&(h(!0),p.trackPostEvent(f.U.CONTRIBUTOR_CLICKED,s,n,x))},disabled:!v||!(null==v?void 0:v.phone)&&!(null==v?void 0:v.email)&&!(null==v?void 0:v.bio),className:H.nd,...(0,g.K)("post-author-dialog-button"),children:(0,r.jsx)(tv.M,{feedName:s.name,feedIcon:s.iconUrl,author:v,prioritize:o})})}),v&&(0,r.jsx)(tf.N,{icon:(0,r.jsx)("span",{className:"h-10 w-10 text-xs",children:(0,r.jsx)(tx.O,{name:null!==(t=v.name)&&void 0!==t?t:null,image:null!==(i=v.image)&&void 0!==i?i:null,prioritize:!1})}),title:v.name||s.name,description:null!==(l=v.bio)&&void 0!==l?l:"",show:a,closeDialog:()=>h(!1),options:{classes:{title:"!text-lg",description:"!mt-3"}},children:(v.phone||v.email)&&(0,r.jsxs)("div",{className:"text-xs mt-8 space-y-3 text-[color:var(--onSurface)]",children:[v.phone&&(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"pr-3",children:(0,r.jsx)(th,{})}),v.phone]}),(0,r.jsxs)("div",{className:"space-x-4 flex items-center",children:[(0,r.jsx)(L.F,{href:"tel:".concat(v.phone),alwaysUnderline:!0,children:(0,c.t)("contributor_ring")}),(0,r.jsx)(L.F,{href:"sms:".concat(v.phone),alwaysUnderline:!0,children:(0,c.t)("contributor_send_sms")})]})]}),v.email&&(0,r.jsxs)("div",{className:"flex justify-between",children:[(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:"pr-3",children:(0,r.jsx)(tp,{})}),v.email]}),(0,r.jsx)("div",{className:"flex items-center",children:(0,r.jsx)(L.F,{href:"mailto:".concat(v.email),alwaysUnderline:!0,children:(0,c.t)("contributor_send_email")})})]})]})})]})}var tb=i(33651);function tj(e){let{post:t,prioritize:i,feed:l,overrideTrackingThreshold:s,displayFeedLogoOnPost:n=!1,enforceMaxHeight:o=!0,hideShareButton:a=!1,hideButtonChildrenOnBelowSm:d=!0,isDraft:h=!1,shouldDisplayAuthor:x=!0,openReadMoreLinksInTopWindow:v,trackReadMoreClicksAsEmbedClickEvent:g,blockFormDialogs:b,enableAutoOpenDialogs:j=!1}=e,w=(0,u.z)(),y=(0,m.K)(l.id),_=(0,tn.o)(()=>w.trackPostEvent(h?f.U.FEED_POST_DRAFT_SEEN:f.U.FEED_POST_SEEN,l,t,y),s),{showPostEditButtons:N,showPostStatisticsButtons:C,showPostPublishedDate:F}=(0,to.w)(),L="automatedFlow"===t.channel,I=n&&t.feedLogo,T=t.channel!==ts.Q.PUBLIC,A=(0,er.V)(l.uri)&&!t.author,P=(x||I||T)&&!A,R=(0,tb.H)(t.blog);return(0,r.jsxs)("div",{className:p()({"-mt-5":!P&&!R,"-mt-10":!P},"w-full text-[color:var(--onSurface)]"),ref:_,children:[P&&(0,r.jsxs)("div",{className:p()("px-4 flex justify-between items-center"),children:[x&&(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsx)(tg,{feed:l,post:t,prioritize:i})}),I&&(0,r.jsx)("div",{className:"max-w-full ml-4",children:(0,r.jsxs)(B.f,{href:S.w$.createAbsolute(l.uri),className:"block",children:[(0,r.jsx)("span",{className:"sr-only",children:(0,c.t)("post_logo_link_to_feed_link_text",{feedName:l.name})}),(0,r.jsx)("img",{alt:"The logo of the feed named ".concat(l.name,"."),className:"max-h-8",src:t.feedLogo})]})}),T&&(0,r.jsx)(tl,{className:"px-4 py-1 text-2sm text-[color:var(--surface)] bg-[color:var(--primary)]",text:(0,c.t)("post_private_post_label")}),!T&&(C||N)&&(0,r.jsxs)("div",{className:"items-center -mx-2 flex sm:opacity-0 sm:duration-100 sm:group-hover/feed-item-post:opacity-100 sm:transition-opacity",children:[C&&(0,r.jsx)(tc,{screenReaderTextKey:"post_statistics_screen_reader_text",icon:(0,r.jsx)(tm,{}),createMessage:()=>({flutterChannelName:"flutterOpenPostStatistics",postId:t.id})}),N&&(0,r.jsx)(tc,{screenReaderTextKey:"edit_post_screen_reader_text",icon:(0,r.jsx)(tu,{}),createMessage:()=>({flutterChannelName:"flutterOpenPostEditor",postId:t.id})})]})]}),(0,r.jsxs)("div",{className:"mt-5",children:[(0,r.jsx)(ti,{enforceMaxHeight:o,openReadMoreLinksInTopWindow:v,trackReadMoreClicksAsEmbedClickEvent:g,feed:l,post:t,isPrivatePost:T,blockFormDialogs:null!=b&&b,prioritize:i,enableAutoOpenDialogs:j}),F&&(0,r.jsxs)("div",{className:"px-[1.0625rem] pt-5",children:[!L&&(!a||l.features.claps)&&(0,r.jsx)("div",{className:"pt-1.5 pb-5",children:(0,r.jsx)(k,{feed:l,post:t,hideButtonChildrenOnBelowSm:d,clapCount:t.clapCount,isDraft:h,hideShareButton:a})}),(0,r.jsx)(tr.y,{publishDate:t.publishDate})]})]})]})}},99774:function(e,t,i){var r,l;i.d(t,{Q:function(){return r}}),(l=r||(r={})).PUBLIC="public",l.TAG="tag",l.AUTOMATED_FLOW="automatedFlow"},20024:function(e,t,i){i.d(t,{y:function(){return u}});var r=i(85893),l=i(27484),s=i.n(l),n=i(67294),o=i(13493),a=i.n(o),d=i(94184),c=i.n(d);function u(e){let{publishDate:t,size:i="md"}=e,[l,d]=(0,n.useState)(""),[u,m]=(0,n.useState)(Date.now());return(0,n.useEffect)(()=>{d(function(e){let t;let i=s()(),r=i.diff(e,"days");if(r>7)return t=new Date(e).toLocaleDateString(a().getLocale(),{weekday:"long",month:"long",day:"numeric"}),"".concat(t[0].toUpperCase()).concat(t.slice(1));if(r>=1&&r<=7)return 1===r?(0,o.t)("post_published_days_ago_singular",{numberOfDays:r.toString()}):(0,o.t)("post_published_days_ago_plural",{numberOfDays:r.toString()});let l=i.diff(e,"hour");if(l>=1)return 1===l?(0,o.t)("post_published_hours_ago_singular",{numberOfHours:l.toString()}):(0,o.t)("post_published_hours_ago_plural",{numberOfHours:l.toString()});let n=i.diff(e,"minute");return 1===n?(0,o.t)("post_published_minutes_ago_singular",{numberOfMinutes:n.toString()}):(0,o.t)("post_published_minutes_ago_plural",{numberOfMinutes:n.toString()})}(t))},[t]),(0,n.useEffect)(()=>{m(Date.now())},[]),(0,r.jsxs)("div",{className:c()({"text-xs h-4":"md"===i,"text-2xs":"sm"===i},"line-clamp-1"),children:[(0,r.jsx)("span",{className:"sr-only",children:(0,o.t)("post_published_screen_reader_prefix")}),l]},u)}},80114:function(e,t,i){i.d(t,{M:function(){return o}});var r=i(85893),l=i(94184),s=i.n(l),n=i(5421);function o(e){let t,{feedName:i,feedIcon:l,author:o,prioritize:a,useFinnStyle:d,size:c="lg"}=e,u=!(null==o?void 0:o.name),m=u?i:null==o?void 0:o.name,f=!1;return u&&l?(f=!0,t={src:null!=l?l:"",alt:"An image used as a profile image for a feed named ".concat(i,".")}):t=!u&&(null==o?void 0:o.image)?null==o?void 0:o.image:null,(0,r.jsxs)("div",{className:"flex items-center",children:[(0,r.jsx)("span",{className:s()({"h-8 w-8 min-w-[2rem]":"sm"===c||f,"h-[2.125rem] w-[2.125rem] min-w-[2.125rem]":"md"===c&&!f,"h-9 w-9 min-w-[2.25rem]":"lg"===c&&!f},"relative inline-block text-xs"),children:(0,r.jsx)(n.O,{image:t,name:null!=m?m:null,prioritize:a,rounded:!f,objectFit:f?"contain":"cover"})}),(0,r.jsx)("span",{className:s()({"font-light text-base":d,"font-semibold":!d,"text-2sm":!d&&"lg"===c,"text-xs":!d&&("sm"===c||"md"===c),"ml-3":"lg"===c,"ml-2.5":"md"===c,"ml-2":"sm"===c},"tracking-wide text-left line-clamp-1"),children:m})]})}},33651:function(e,t,i){i.d(t,{H:function(){return r}});function r(e){return!!((null==e?void 0:e.length)&&e.length>=1&&("mediaCarousel"===e[0].type||"image"===e[0].type||"video"===e[0].type))}},26749:function(e,t,i){i.d(t,{o:function(){return o}});var r=i(31304),l=i.n(r),s=i(97367);let n=RegExp("\\b(".concat("and|or|a|an|the|og|\xe5|men|for|eller|det|de|den|en|et",")\\b"),"g");function o(e,t){if((0,s.N)(t,"postId"),!(null==e?void 0:e.trim()))return t;let i=l()(e.substring(0,40),{remove:/[^a-zA-Z0-9-\s]+/g}).replace(n,"").replace(/--/g,"-").replace(/-$/,"");return"".concat(i.toLowerCase(),"-").concat(t)}},33074:function(e,t,i){i.d(t,{g:function(){return l}});var r=i(13493);function l(e){return 0===e?(0,r.t)("claps_zero"):1===e?(0,r.t)("claps_one",{count:e.toString()}):(0,r.t)("claps_other",{count:e.toString()})}},49759:function(e,t,i){i.d(t,{o:function(){return s}});var r=i(67294),l=i(97650);function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.1,[i,s]=(0,r.useState)(!1),{ref:n,inView:o}=(0,l.YD)({triggerOnce:!0,rootMargin:"0px 0px",threshold:t});return(0,r.useEffect)(()=>{o&&!i&&(e(),s(!0))},[o]),n}},2378:function(e,t,i){i.d(t,{U:function(){return l}});var r=i(85893);function l(e){let{aspectRatio:t,children:i}=e;return(0,r.jsx)("div",{className:"relative",style:{"--aspect-ratio":String(t)},children:(0,r.jsx)("div",{className:"w-full h-full absolute top-0 left-0",children:i})})}},54542:function(e,t,i){i.d(t,{O:function(){return n}});var r=i(85893),l=i(94184),s=i.n(l);function n(e){let{size:t="lg"}=e;return(0,r.jsxs)("svg",{role:"img","aria-label":"An icon of two hands clapping.",width:s()({9:"sm"===t,12:"md"===t,16:"lg"===t}),height:s()({10:"sm"===t,13:"md"===t,17:"lg"===t}),viewBox:"0 0 16 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",color:"currentColor",children:[(0,r.jsx)("path",{d:"M6.95703 5.64558C7.29101 5.3116 8.3046 4.29802 8.9901 4.98274C9.34303 5.33567 9.24387 5.7761 9.02 6.16622V6.16695C9.26865 5.92194 9.55305 5.71777 9.86368 5.56025C10.3325 5.34733 10.6439 5.46327 10.8379 5.62151H13.5316C14.4351 5.60692 15.1687 5.46254 15.1687 4.89377C15.1687 4.32427 14.4351 4.1675 13.5316 4.1675H8.55188C7.91164 4.1675 7.82778 3.65414 8.29447 3.28809C8.39145 3.22465 8.64521 3.01902 8.66782 2.9986H8.66709C8.79178 2.88047 8.90626 2.75213 9.01054 2.61576C9.48671 1.98501 9.66171 1.27186 9.50347 0.812449C9.50347 0.812449 9.46263 0.713278 9.44222 0.676089L9.41013 0.623586V0.624316C9.36419 0.571084 9.31315 0.522957 9.257 0.480664L9.23804 0.471184C8.84209 0.25242 8.17924 0.551396 7.70891 1.1734L7.69943 1.18798C7.67172 1.20475 6.20604 2.90378 4.96633 4.14491C4.15838 4.95286 3.45981 6.30623 3.61075 7.72384H3.61221C3.63919 8.07822 3.72086 8.42605 3.85504 8.75564L5.48626 7.11494L6.95703 5.64558Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M6.95703 5.64558C7.29101 5.3116 8.3046 4.29802 8.9901 4.98274C9.34303 5.33567 9.24387 5.7761 9.02 6.16622V6.16695C9.26865 5.92194 9.55305 5.71777 9.86368 5.56025C10.3325 5.34733 10.6439 5.46327 10.8379 5.62151H13.5316C14.4351 5.60692 15.1687 5.46254 15.1687 4.89377C15.1687 4.32427 14.4351 4.1675 13.5316 4.1675H8.55188C7.91164 4.1675 7.82778 3.65414 8.29447 3.28809C8.39145 3.22465 8.64521 3.01902 8.66782 2.9986H8.66709C8.79178 2.88047 8.90626 2.75213 9.01054 2.61576C9.48671 1.98501 9.66171 1.27186 9.50347 0.812449C9.50347 0.812449 9.46263 0.713278 9.44222 0.676089L9.41013 0.623586V0.624316C9.36419 0.571084 9.31315 0.522957 9.257 0.480664L9.23804 0.471184C8.84209 0.25242 8.17924 0.551396 7.70891 1.1734L7.69943 1.18798C7.67172 1.20475 6.20604 2.90378 4.96633 4.14491C4.15838 4.95286 3.45981 6.30623 3.61075 7.72384H3.61221C3.63919 8.07822 3.72086 8.42605 3.85504 8.75564L5.48626 7.11494L6.95703 5.64558Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M11.3572 9.24527H13.5973C14.5007 9.24527 15.2343 9.0863 15.2343 8.51754C15.2343 7.94803 14.5007 7.79126 13.5973 7.79126H11.837C12.074 8.27253 11.697 8.84933 11.3572 9.24529V9.24527Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M11.6538 10.1295C11.3738 9.8495 10.7992 10.3162 10.3661 10.742C10.3435 10.7661 10.2691 10.8332 10.1626 10.9287C9.69232 11.3451 8.58173 12.3062 8.43008 12.4352C8.34331 12.5118 8.21204 12.5067 8.13183 12.4243C8.0538 12.339 8.0538 12.2085 8.13183 12.1231L9.21979 10.9287C9.6719 10.4321 10.1532 9.89981 10.4521 9.58114C10.59 9.4302 10.6877 9.32519 10.7176 9.29749L10.7642 9.24717C11.414 8.58651 11.6232 8.12712 11.3804 7.88284L11.3797 7.88211C11.3286 7.83253 11.263 7.80117 11.193 7.79242H11.072C10.8029 7.82596 10.4354 8.07462 9.9665 8.53912C9.81701 8.6886 7.79715 10.4716 7.56605 10.6749C7.48219 10.7543 7.35094 10.7543 7.26707 10.6749C7.18831 10.5903 7.18831 10.459 7.26707 10.3744C7.36989 10.2621 9.74629 7.63199 9.92345 7.45465C10.6344 6.74368 10.8568 6.25075 10.6045 5.99116H10.6052C10.5856 5.97147 10.5644 5.95397 10.5418 5.93866C10.4266 5.87376 10.288 5.86865 10.1685 5.92407C10.1335 5.93428 10.0999 5.94741 10.0671 5.96272C9.72365 6.14648 9.41373 6.38711 9.15048 6.67442C8.96381 6.86109 6.05729 9.54883 5.93259 9.66121C5.84873 9.74215 5.71601 9.74215 5.63215 9.66121C5.53882 9.58538 5.52496 9.44829 5.60007 9.35495C5.6934 9.25433 7.85118 6.87573 8.02684 6.7094C8.71593 6.02031 8.9376 5.54487 8.6875 5.29476C8.37758 4.98484 7.75412 5.48144 7.27431 5.95761L5.80134 7.43058L4.0549 9.16826L3.63853 9.58464C3.62394 9.59922 3.6079 9.61162 3.58967 9.62183C3.30747 9.89602 2.96037 10.1687 2.67088 10.0273C2.38138 9.88507 2.38138 9.42421 2.43753 8.9517C2.45795 8.85253 2.4842 8.62138 2.49514 8.5222H2.49587C2.49514 8.51053 2.49514 8.49887 2.49587 8.4872C2.50024 8.32021 2.49003 8.15322 2.46597 7.98842C2.3668 7.2811 2.03137 6.6817 1.63176 6.4819C1.59894 6.46732 1.56613 6.45419 1.53259 6.44253L1.49686 6.43159C1.45092 6.42867 1.40498 6.42867 1.35904 6.43159C1.06226 6.51763 0.808497 7.07183 0.912774 7.81853C0.918607 7.85134 0.918607 7.88488 0.912774 7.9177C0.914961 7.90238 0.914961 7.88634 0.912774 7.87103C0.912774 7.90311 0.912774 8.0278 0.931732 8.22395C0.974755 8.94295 1.07538 10.6266 1.07538 12.0136C1.07538 13.0703 1.48082 14.5242 2.61545 15.4373V15.4365C3.23965 15.9812 4.04467 16.2736 4.87309 16.2569C5.70152 16.2401 6.4941 15.9149 7.09564 15.3454C7.11314 15.3293 7.13356 15.3162 7.15544 15.306L11.0399 11.4084C11.1953 11.256 11.3389 11.0927 11.4709 10.9191C11.7042 10.615 11.8333 10.3088 11.6539 10.1294L11.6538 10.1295Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M14.3197 5.93384H11.0769C11.2935 6.43771 10.8903 7.03346 10.53 7.42724H14.3197C15.2531 7.42724 15.9998 7.26316 15.9998 6.68054C15.9998 6.09791 15.2494 5.93384 14.3197 5.93384H14.3197Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M12.3728 9.57886H11.5925V9.61459C11.7347 9.64449 11.8645 9.71595 11.9659 9.8195C12.2984 10.152 12.2087 10.5662 12.0016 10.9264H12.375C13.2128 10.9264 13.891 10.7791 13.891 10.2526C13.8902 9.72616 13.2092 9.57886 12.3728 9.57886L12.3728 9.57886Z",fill:"currentColor"})]})}},99153:function(e,t,i){i.d(t,{F:function(){return l}});var r=i(85893);function l(){return(0,r.jsxs)("svg",{role:"img","aria-label":"An icon symbolizing sharing.",width:"12",height:"14",viewBox:"0 0 12 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M8.30649 4.46264L6.16765 2.44436L4.02882 4.46264L3.03833 3.41183L6.16765 0.459473L9.29698 3.41183L8.30649 4.46264Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M5.44531 1.45215H6.88898V9.97845H5.44531V1.45215Z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M12.0002 11.6246C12.0002 12.7291 11.1047 13.6245 10.0002 13.6245H2.33496C1.23039 13.6245 0.334961 12.7291 0.334961 11.6245V6.93872C0.334961 5.83415 1.23039 4.93872 2.33496 4.93872H3.46286V6.38239H2.77871C2.22643 6.38239 1.77871 6.83011 1.77871 7.38239V11.18C1.77871 11.7323 2.22643 12.18 2.77871 12.18H9.55654C10.1088 12.18 10.5565 11.7323 10.5565 11.18V7.38239C10.5565 6.83011 10.1088 6.38239 9.55654 6.38239H8.8724V4.93872H10.0003C11.1048 4.93872 12.0003 5.83417 12.0003 6.93876L12.0002 11.6246Z",fill:"currentColor"})]})}},20525:function(e,t,i){i.d(t,{f:function(){return l}});var r=i(85893);function l(){return(0,r.jsx)("svg",{role:"img","aria-label":"An icon of a person.",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"w-full h-full",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}},59652:function(e,t,i){i.d(t,{Q:function(){return u}});var r=i(85893),l=i(86775),s=i(94184),n=i.n(s),o=i(64305),a=i(69159),d=i(46871),c=i(95410);function u(e){let{children:t,href:i,icon:s,onClick:u,size:m,target:f,className:h,kind:p,leftSideComponent:x,overrideThemeValues:v,hideChildrenOnBelowSm:g=!1,roundness:b="circular",...j}=e,{borderStyle:w}=(0,c.w)(),y=!!(null==v?void 0:v["--btn-text-size"]),_=n()("cursor-pointer flex items-center justify-center font-semibold",(0,o.TR)(p,b),y?"px-6 py-3":(0,a.B)(m),{[String(h)]:!!h,"text-[length:var(--btn-text-size)]":y});return(0,r.jsxs)(l.f,{href:i,className:_,target:f,onClick:u,style:{...(0,d.z)(p,w),...v},...j,children:[s&&(0,r.jsx)("span",{className:n()({"sm:mr-1.25":g,"mr-1.25":!g},"flex h-3.75 items-center justify-center min-w-[0.9375rem]"),"aria-hidden":"true",children:s}),x&&(0,r.jsx)("span",{className:n()({"sm:mr-1":g,"mr-1":!g},"flex content-center"),children:x}),g?(0,r.jsx)("span",{className:"hidden sm:inline-flex overflow-hidden",children:t}):t]})}},92378:function(e,t,i){i.d(t,{F:function(){return a}});var r=i(85893),l=i(86775),s=i(94184),n=i.n(s),o=i(16039);function a(e){let{href:t,children:i,className:s,target:a,alwaysUnderline:d,hoverUnderline:c,...u}=e,m=n()({[String(o.F$)]:d,[String(o.vm)]:c,[String(s)]:!!s});return(0,r.jsx)(l.f,{href:t,className:m,target:a,...u,children:i})}},16039:function(e,t,i){i.d(t,{F$:function(){return r},NJ:function(){return s},vm:function(){return l}});let r="underline underline-offset-[0.1875rem] hover:underline-offset-[0.25rem] hover:decoration-[0.125rem] transition-[text-underline-offset,text-decoration-thickness,text-decoration-color,color] hover:decoration-[color:var(--link-text-hover-color)] hover:text-[color:var(--link-text-hover-color)]",l="hover:underline underline-offset-[0.125rem]",s="group-hover:underline underline-offset-[0.125rem]"},25655:function(e,t,i){i.d(t,{u:function(){return x}});var r=i(85893),l=i(25755),s=i(72854),n=i(35913),o=i(9061),a=i(21843),d=i(13493),c=i(11163),u=i(13974),m=i(94184),f=i.n(m),h=i(59431),p=i(15584);function x(e){let{url:t,show:i,onClose:m,feed:x}=e,v="true"===(0,c.useRouter)().query.isMobile,{enableRestrictedMode:g}=(0,u.b)();async function b(){t&&await navigator.clipboard.writeText(t)}let j=g&&v||!g,w=(0,h.V)(x.uri);return(0,r.jsxs)(l.N,{title:(0,d.t)("share_dialog_title"),description:(0,d.t)("share_dialog_description"),show:i,closeDialog:m,children:[(0,r.jsx)("div",{className:"mt-4 flex",children:t&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:f()({"max-w-[80%]":j,"!rounded-full":w},"overflow-hidden text-ellipsis whitespace-nowrap cursor-pointer border-[color:var(--onSurface)]","rounded-[var(--rounded-full-relative)] text-sm text-[color:var(--onSurface)]","bg-[color:var(--surface)] w-full pr-10 pl-4 pt-2 pb-2  border-solid border-rem-px"),onClick:e=>{let t=window.getSelection();null!==t&&t.selectAllChildren(e.currentTarget)},children:t}),j&&(0,r.jsx)(s.z,{kind:n.L.PrimaryLight,size:o.$.Lg,className:"-ml-8 hover:!bg-[color:var(--surface)] z-10 uppercase whitespace-nowrap",onClick:b,overrideThemeValues:w?{...(0,p.r)()}:void 0,children:(0,d.t)("share_dialog_button_text")})]})}),!t&&(0,r.jsx)(a.Z,{className:"mt-10",message:(0,d.t)("share_dialog_url_generation_error")})]})}},91820:function(e,t,i){i.d(t,{P:function(){return n}});var r=i(85893),l=i(94184),s=i.n(l);function n(e){let{children:t,className:i,overwriteStyles:l=!1,addAir:n=!0}=e,o="text-base font-normal tracking-wide leading-6";return i&&(o=l?i:"".concat(o," ").concat(i)),o=s()(o,{"first-of-type:mt-0 last-of-type:mb-0 my-4":n}),(0,r.jsx)("p",{className:o,children:t})}},66776:function(e,t,i){i.d(t,{Q:function(){return r}});function r(e){let{condition:t,wrap:i,children:r}=e;return t?i(r):r}}}]);