PageSourceSearch

https://supercell.com/_next/static/chunks/pages/en/careers/[slug]/[id]-48386b4bd23189c4.js

js supercell.com collected 2026-09-24 08:26:16 UTC 74,699 bytes, 1 lines download raw bytes

1try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bf266160-2195-4899-b383-3284e6c07acd",e._sentryDebugIdIdentifier="sentry-dbid-bf266160-2195-4899-b383-3284e6c07acd")}catch(e){}{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[new e.Error().stack]=Object.assign({},e._sentryModuleMetadata[new e.Error().stack],{"_sentryBundlerPluginAppKey:supercellcom":!0})}(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9223],{5956:e=>{e.exports={offerContent:"offer_offerContent__f0eSB",deadline:"offer_deadline__3_rMo",blueLinks:"offer_blueLinks__cMG_b",shareButton:"offer_shareButton__toUNk",content:"offer_content___XraA"}},14146:e=>{e.exports={background:"externalApplicationLink_background__aK0XF",container:"externalApplicationLink_container__ysvJy",imageContainer:"externalApplicationLink_imageContainer__qWkMv",characterImage:"externalApplicationLink_characterImage__e3aFD",contentContainer:"externalApplicationLink_contentContainer__lFacX",heading:"externalApplicationLink_heading__JzcFN",mobileBreak:"externalApplicationLink_mobileBreak__9LAfL",description:"externalApplicationLink_description__rFl_o",applyButton:"externalApplicationLink_applyButton__f46ei",externalIcon:"externalApplicationLink_externalIcon___j_c5"}},18318:e=>{e.exports={formSection:"jobApplyForm_formSection__83rQ2",sectionTitle:"jobApplyForm_sectionTitle__fdjKr",sectionDescription:"jobApplyForm_sectionDescription__ncjt_",formInput:"jobApplyForm_formInput__ceURw",bottomBorder:"jobApplyForm_bottomBorder__bI1UG",explanationText:"jobApplyForm_explanationText__5EsaE",thankyouBackground:"jobApplyForm_thankyouBackground__JhMgn",container:"jobApplyForm_container__EOQVs",fadeIn:"jobApplyForm_fadeIn__WnkBS",thankyouButtons:"jobApplyForm_thankyouButtons__s4HPJ",thankyouButton:"jobApplyForm_thankyouButton__daeDS",joining:"jobApplyForm_joining__PBZy2",text:"jobApplyForm_text__SXvxN",background:"jobApplyForm_background__es_pI",elementContainer:"jobApplyForm_elementContainer___w8mn",sendButton:"jobApplyForm_sendButton__6P_mP",spin:"jobApplyForm_spin__lQKfa",busy_pulse:"jobApplyForm_busy_pulse__2Jyhu",desktopImageContainer:"jobApplyForm_desktopImageContainer__BN9P1",mobileImageContainer:"jobApplyForm_mobileImageContainer__KCUdp",jobFormImage:"jobApplyForm_jobFormImage___Sgk0",leftSide:"jobApplyForm_leftSide__RbmQm",formContainer:"jobApplyForm_formContainer__tYxAN",intro:"jobApplyForm_intro__vYdKq",mobile:"jobApplyForm_mobile__Y_B2h"}},19358:e=>{e.exports={errorWrapper:"ashbySelectInput_errorWrapper__yrXTa",showErrorMessage:"ashbySelectInput_showErrorMessage__FY8Yq",inputErrorMessage:"ashbySelectInput_inputErrorMessage__swbGD",fieldDescription:"ashbySelectInput_fieldDescription__MUtPA",selectedValue:"ashbySelectInput_selectedValue__hgJHq",focused:"ashbySelectInput_focused__DCJIV",placeholder:"ashbySelectInput_placeholder__NwAy6",invalid:"ashbySelectInput_invalid__jSDTX",arrow:"ashbySelectInput_arrow__NQILc",arrowOpen:"ashbySelectInput_arrowOpen__wqwb_",menu:"ashbySelectInput_menu__2raP6","drawer-animation":"ashbySelectInput_drawer-animation__prX8w","hide-scroll-while-opening":"ashbySelectInput_hide-scroll-while-opening__g5xVW",option:"ashbySelectInput_option__KqJVN",optionFocused:"ashbySelectInput_optionFocused__OWXED",optionSelected:"ashbySelectInput_optionSelected__nWTUm",checkboxContainer:"ashbySelectInput_checkboxContainer__WYa1m",checkbox:"ashbySelectInput_checkbox__jIsoU",checkboxInvalid:"ashbySelectInput_checkboxInvalid__KV_R9",checkboxLabel:"ashbySelectInput_checkboxLabel__KwaAQ",booleanButtonGroup:"ashbySelectInput_booleanButtonGroup__fHb_W",booleanButton:"ashbySelectInput_booleanButton__YHKLf",booleanButtonSelected:"ashbySelectInput_booleanButtonSelected__wHL04",booleanButtonInvalid:"ashbySelectInput_booleanButtonInvalid__Whpjq"}},35290:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSG:()=>e6,default:()=>e8});var a=n(37876),r=n(37420),i=n.n(r),s=n(89099),o=n(14232),l=n(70488),d=n(76810),c=n(29044),u=n(10365),p=n(18334),m=n(48332),h=n(48230),y=n.n(h),f=n(33453),_=n(77365),x=n(46450),g=n.n(x);function b({message:e,isHtml:t=!1}){return(0,a.jsxs)("div",{className:g().errorBox,"data-sentry-component":"ErrorBox","data-sentry-source-file":"ErrorBox.tsx",children:[(0,a.jsx)("img",{src:f.FormErrorIcon.src,alt:"Error sign"}),t?(0,a.jsx)("div",{className:g().htmlContent,dangerouslySetInnerHTML:{__html:e}}):(0,a.jsx)("p",{children:e})]})}var v=n(36511),j=n.n(v);function I({errorMessage:e,showErrors:t}){return(0,a.jsx)("div",{className:i()(j().errorWrapper,{[j().showErrorMessage]:t}),"data-sentry-component":"ErrorMessage","data-sentry-source-file":"ErrorMessage.tsx",children:(0,a.jsx)("span",{className:i()(j().inputErrorMessage,{}),children:e})})}var w=n(42229),S=n.n(w),k=n(80429),N=n.n(k);
1function C({fieldName:e,inputType:t,required:n}){let r=e.toLowerCase().match(/^cv$/);return(0,a.jsxs)("label",{className:i()(N()[`${t}Label`],r&&N().uppercase),htmlFor:e,"data-sentry-component":"Label","data-sentry-source-file":"Label.tsx",children:[function(e){let t=e.charAt(0).toUpperCase(),n=e.slice(1);return`${t}${n}`}(e),n&&(0,a.jsx)("sup",{children:" *"})]})}function A({body:e,value:t,onChange:n,showHelpText:r,invalid:s,disabled:l}){let d=(0,o.useRef)(null),c=t?t.name:"Add file";return(0,a.jsxs)(a.Fragment,{children:[r&&(0,a.jsx)("div",{className:S().allowedFiles,children:"File must be in PDF format."}),(0,a.jsx)("input",{disabled:l,style:{display:"none"},ref:d,name:e,id:e,accept:".pdf",type:"file",onChange:n}),(0,a.jsx)("div",{className:S().buttonContainer,children:(0,a.jsx)("button",{className:i()(S().fileInput,{[S().invalid]:s}),type:"button",onClick:()=>d.current&&d.current.click(),children:(0,a.jsxs)("div",{className:S().fileInputButtonText,children:[(0,a.jsx)("span",{children:c}),(0,a.jsx)("span",{className:i()(S().plusSign,{[S().invalid]:s})})]})})})]})}function F(e){let{body:t,required:n}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{required:n,fieldName:t,inputType:"file","data-sentry-element":"Label","data-sentry-source-file":"FileInput.tsx"}),(0,a.jsx)(A,{...e,showHelpText:!("id"in e),"data-sentry-element":"Input","data-sentry-source-file":"FileInput.tsx"}),(0,a.jsx)(I,{errorMessage:e.errorMessage,showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"FileInput.tsx"})]})}var M=n(18318),E=n.n(M),B=n(3904),T=n(24918),D=n(18550),L=n(64987),$=n(80824),q=n.n($);let V=(0,B.A)({key:"select-cache",prepend:!0});function P({body:e,invalid:t,options:n,onChange:r,value:s}){let l=n.map(e=>({value:e.body,label:e.body})),d=e.toLowerCase().includes("where did you hear about this position")?l.map(e=>({value:e,sort:Math.random()})).sort((e,t)=>e.sort-t.sort).map(({value:e})=>e):l,c=l.find(e=>e.value===s)??null;return(0,a.jsx)(T.C,{value:V,"data-sentry-element":"CacheProvider","data-sentry-component":"Input","data-sentry-source-file":"SinglechoiceInput.tsx",children:(0,a.jsx)(D.Ay,{menuShouldScrollIntoView:!1,instanceId:(0,o.useId)(),value:c,unstyled:!0,inputId:e,maxMenuHeight:260,isClearable:!0,escapeClearsValue:!0,backspaceRemovesValue:!0,options:d,onChange:(t,n)=>{t?.value===s?r({name:e,value:void 0}):r({name:e,value:t?.value??void 0})},styles:{clearIndicator:(e,t)=>({...e,svg:{transition:"fill 0.2s"},":hover":{svg:{fill:"#4AD5B8"}}})},components:{DropdownIndicator:e=>
1(0,a.jsx)(W,{...e,invalid:t}),Menu:e=>(0,a.jsx)(J,{...e}),IndicatorSeparator:O,Placeholder:e=>{let t=n.length>5;return(0,a.jsx)(L.c.Placeholder,{...e,className:q().placeholder,children:(0,a.jsxs)("span",{children:["Choose an option",t&&(0,a.jsxs)(a.Fragment,{children:[".",(0,a.jsx)("b",{children:" Scroll for more"})]})]})})}},classNames:{control:e=>i()(q().selectedValue,t&&q().invalid,e.isFocused&&q().focused),option:e=>i()(q().option,e.isSelected&&q().optionSelected,e.isFocused&&q().optionFocused),noOptionsMessage:()=>q().option},"data-sentry-element":"Select","data-sentry-source-file":"SinglechoiceInput.tsx"})})}let J=({children:e,...t})=>(0,a.jsx)(L.c.Menu,{className:q().menu,...t,"data-sentry-element":"components.Menu","data-sentry-component":"Menu","data-sentry-source-file":"SinglechoiceInput.tsx",children:e});function R(e){let{body:t,required:n}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{required:n,fieldName:t,inputType:"file","data-sentry-element":"Label","data-sentry-source-file":"SinglechoiceInput.tsx"}),(0,a.jsx)(P,{...e,"data-sentry-element":"Input","data-sentry-source-file":"SinglechoiceInput.tsx"}),(0,a.jsx)(I,{errorMessage:"Select an option",showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"SinglechoiceInput.tsx"})]})}let W=e=>{let{menuIsOpen:t}=e.selectProps,n=!0===e.invalid?f.SelectArrowRed:t?f.SelectArrowGreen:f.SelectArrowGray;return(0,a.jsx)("img",{className:`${q().arrow} ${t?q().arrowOpen:""}`,src:n.src,alt:"","data-sentry-component":"DropdownIndicator","data-sentry-source-file":"SinglechoiceInput.tsx"})};function O(){return null}var H=n(52352),U=n.n(H);function Y({body:e,value:t,onChange:n,invalid:r,offer:s,disabled:l,error:d,errorMessage:c,multiline:u,required:p}){let[h,y]=(0,o.useState)(!1),_=d&&r,x=(0,m.jt)(),g={placeholder:"Type here",id:e,disabled:l,className:i()(U().textInput,{[U().invalid]:_,[U().multiline]:u,[U().required]:p}),name:e,value:t,onChange:n,onFocus:()=>y(!0),onBlur:()=>{let n={jobFunction:s.department,jobTitle:s.title,jobLocation:s.location,jobType:s.employment_type_code};t&&("email"===e&&x("emailCompleted",{...n}),"name"===e&&x("nameCompleted",{...n}),"phone"===e&&x("phoneCompleted",{...n})),y(!1)}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:i()(U().inputContainer,{[U().focused]:h}),children:[u?(0,a.jsx)("textarea",{...g}):(0,a.jsx)("input",{...g,type:"email"===e?"email":"phone"===e?"tel":"text"}),(0,a.jsx)("div",{className:i()(U().validIcon,U().icon,{[U().valid]:!0!==r&&void 0!==r,[U().dontShowError]:!_}),children:(0,a.jsx)("img",{src:f.FormConfirmedIcon.src,alt:`Valid field ${e} icon`})}),(0,a.jsx)("div",{className:i()(U().icon,U().invalidIcon,{[U().showErrors]:_}),children:(0,a.jsx)("img",{src:f.FormErrorIcon.src,alt:`invalid field ${e} icon`})})]}),(0,a.jsx)(I,{errorMessage:c,showErrors:_,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"TextInput.tsx"})]})}function G(e){let{body:t,required:n}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{fieldName:t,inputType:"text",required:n,"data-sentry-element":"Label","data-sentry-source-file":"TextInput.tsx"}),(0,a.jsx)(Y,{...e,"data-sentry-element":"Input","data-sentry-source-file":"TextInput.tsx"})]})}let z=(0,c.xV)({full:{columns:16},large:{columns:8},medium:{columns:8},small:{columns:8},mobile:{columns:6}});function K(){return(0,a.jsx)(c.fI,{className:E().thankyouBackground,"data-sentry-element":"Row","data-sentry-component":"ThankYouMessage","data-sentry-source-file":"RecruiteeJobApplyForm.tsx",children:(0,a.jsxs)("div",{className:i()(z,E().container),children:[(0,a.jsx)("h2",{children:"thank you!"}),(0,a.jsxs)("p",{className:E().text,children:["Your application has been received. We will be in touch soon!",(0,a.jsx)("br",{}),"Please check your junk folder if you didn’t receive a confirmation email."]}),(0,a.jsxs)("div",{className:E().thankyouButtons,children:[(0,a.jsx)(y(),{href:"/en/careers/joining-supercell/",className:i()(E().thankyouButton,E().joining),"data-sentry-element":"Link","data-sentry-source-file":"RecruiteeJobApplyForm.tsx",children:"joining supercell"}),(0,a.jsx)(y(),{href:"/en/about-us",className:i()(E().thankyouButton),"data-sentry-element":"Link","data-sentry-source-file":"RecruiteeJobApplyForm.tsx",children:"about us"})]})]})})}function X(e){let{explanationText:t,children:n}=e;return(0,a.jsxs)("div",{className:i()(E().formInput,t&&E().bottomBorder),"data-sentry-component":"InputWrapper","data-sentry-source-file":"RecruiteeJobApplyForm.tsx",children:[n,t&&(0,a.jsx)("p",{className:i()(E().explanationText),children:t})]})}let Z=e=>{if("email"===e.body&&"string"===e.kind){let t=/^(.+)@(.+)\.([a-z]{2,}
1)$/.test(e.value)?{...e,invalid:!1}:{...e,invalid:!0,errorMessage:"Invalid email"};return{validatedInput:t,foundError:t.invalid}}if(e.required){let t=e.value?{...e,invalid:!1}:{...e,invalid:!0,errorMessage:`${e.body} required`};return{validatedInput:t,foundError:t.invalid}}return{validatedInput:e}},Q=e=>"campaign fields"===e.toLowerCase(),ee=(e,t)=>{e.append(`candidate[open_question_answers_attributes][${t.position}][open_question_id]`,t.id.toString()),e.append(`candidate[open_question_answers_attributes][${t.position}][content]`,t.value)},et=e=>t=>{let{name:n,value:a}=t.target;e(e=>e.map(e=>{if(e.body===n&&("string"===e.kind||"text"===e.kind)){let{validatedInput:t}=Z({...e,value:a});return t}return e}))};function en({field:e,disabled:t,onChange:n,onRemove:r}){let s=(0,o.useRef)(null),l=e.value?e.value.name:"Add file";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{required:e.required,fieldName:e.title,inputType:"file","data-sentry-element":"Label","data-sentry-source-file":"AshbyFileInput.tsx"}),e.description&&(0,a.jsx)("div",{className:S().allowedFiles,children:e.description}),(0,a.jsx)("input",{disabled:t,style:{display:"none"},ref:s,name:e.path,id:e.fieldId,"data-field-id":e.fieldId,accept:".pdf",type:"file",onChange:n}),(0,a.jsxs)("div",{className:S().buttonContainer,children:[(0,a.jsx)("button",{className:i()(S().fileInput,{[S().invalid]:e.invalid}),type:"button",onClick:()=>{s.current&&s.current.click()},children:(0,a.jsxs)("div",{className:S().fileInputButtonText,children:[(0,a.jsx)("span",{children:l}),(0,a.jsx)("span",{className:i()(S().plusSign,{[S().invalid]:e.invalid})})]})}),e.value&&(0,a.jsx)("button",{type:"button",className:S().removeButton,onClick:()=>{s.current&&(s.current.value=""),r()},disabled:t,"aria-label":`Remove ${e.value.name}`,children:"Remove"})]}),(0,a.jsx)(I,{errorMessage:e.errorMessage,showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyFileInput.tsx"})]})}var ea=n(65411),er=n(19358),ei=n.n(er);function es({field:e,disabled:t,onChange:n}){let r=t=>{e.value===t?n(void 0):n(t)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{required:e.required,fieldName:e.title,inputType:"file","data-sentry-element":"Label","data-sentry-source-file":"AshbyBooleanInput.tsx"}),e.description&&(0,a.jsx)("p",{className:ei().fieldDescription,children:e.description}),(0,a.jsxs)("div",{className:ei().booleanButtonGroup,"data-field-id":e.fieldId,children:[(0,a.jsx)("button",{type:"button",disabled:t,className:i()(ei().booleanButton,!0===e.value&&ei().booleanButtonSelected,e.invali
1d&&ei().booleanButtonInvalid),onClick:()=>r(!0),children:"Yes"}),(0,a.jsx)("button",{type:"button",disabled:t,className:i()(ei().booleanButton,!1===e.value&&ei().booleanButtonSelected,e.invalid&&ei().booleanButtonInvalid),onClick:()=>r(!1),children:"No"})]}),(0,a.jsx)(I,{errorMessage:"Select an option",showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyBooleanInput.tsx"})]})}let eo=[{value:"01",label:"January"},{value:"02",label:"February"},{value:"03",label:"March"},{value:"04",label:"April"},{value:"05",label:"May"},{value:"06",label:"June"},{value:"07",label:"July"},{value:"08",label:"August"},{value:"09",label:"September"},{value:"10",label:"October"},{value:"11",label:"November"},{value:"12",label:"December"}];function el(e){if(!e)return{month:"",year:""};let[t,n]=e.split("-");return{month:n||"",year:t||""}}function ed(e,t){return e||t?`${t||""}-${e||""}-01`:""}function ec({field:e,disabled:t,error:n,onChange:r,onBlur:s}){let[l,d]=(0,o.useState)(null),c=n&&e.invalid,u=(t,n,a)=>{let i=e.value.map((e,r)=>{if(r!==t)return e;let i={...e,[n]:a};return"isCurrent"===n&&!0===a&&(i.endDate=""),i});r(e.fieldId,i)},p=(t,n,a,r)=>{let i=el(e.value[t][n]);u(t,n,"month"===a?ed(r,i.year):ed(i.month,r))};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{fieldName:e.title,inputType:"text",required:e.required,"data-sentry-element":"Label","data-sentry-source-file":"AshbyEducationHistoryInput.tsx"}),e.description&&(0,a.jsx)("p",{className:U().fieldDescription,children:e.description}),e.value.map((n,o)=>{let m=""!==n.schoolName.trim(),h=m&&!e.invalid,y=c&&!m;return(0,a.jsxs)("div",{className:U().educationEntry,"data-field-id":e.fieldId,children:[e.value.length>1&&(0,a.jsxs)("div",{className:U().educationEntryHeader,children:[(0,a.jsxs)("span",{className:U().educationEntryTitle,children:["Entry ",o+1]}),(0,a.jsx)("button",{type:"button",disabled:t,className:U().educationRemoveButton,onClick:()=>{!(e.value.length<=1)&&r(e.fieldId,e.value.filter((e,t)=>t!==o))},"aria-label":`Remove entry ${o+1}`,children:"Remove"})]}),(0,a.jsxs)("div",{className:U().educationGrid,children:[(0,a.jsxs)("div",{className:i()(U().inputContainer,U().educationFullWidth,{[U().focused]:l===`${o}-schoolName`}),children:[(0,a.jsx)("input",{placeholder:"School",id:`${e.fieldId}-${o}-schoolName`,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput,{[U().invalid]:c&&""===n.schoolName.trim(),[U().required]:e.required}),name:`${e.path}-${o}-schoolName`,value:n.schoolName,onChange:e=>u(o,"schoolName",e.target.value),onFocus:()=>d(`${o}-schoolName`),onBlur:()=>{d(null),s()}}),(0,a.jsx)("div",{className:i()(U().validIcon,U().icon,{[U().valid]:h,[U().dontShowError]:!c}),children:(0,a.jsx)("img",{src:f.FormConfirmedIcon.src,alt:`Valid field ${e.title} icon`})}),(0,a.jsx)("div",{className:i()(U().icon,U().invalidIcon,{[U().showErrors]:y}),children:(0,a.jsx)("img",{src:f.FormErrorIcon.src,alt:`Invalid field ${e.title} icon`})})]}),(0,a.jsx)("div",{className:i()(U().inputContainer,{[U().focused]:l===`${o}-degree`}),children:(0,a.jsx)("input",{placeholder:"Degree",id:`${e.fieldId}-${o}-degree`,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput),name:`${e.path}-${o}-degree`,value:n.degree||"",onChange:e=>u(o,"degree",e.target.value),onFocus:()=>d(`${o}-degree`),onBlur:()=>{d(null),s()}})}),(0,a.jsx)("div",{className:i()(U().inputContainer,{[U().focused]:l===`${o}-major`}),children:(0,a.jsx)("input",{placeholder:"Field of Study",id:`${e.fieldId}-${o}-major`,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput),name:`${e.path}-${o}-major`,value:n.major||"",onChange:e=>u(o,"major",e.target.value),onFocus:()=>d(`${o}-major`),onBlur:()=>{d(null),s()}})}),(0,a.jsxs)("div",{className:U().educationDatesRow,children:[(0,a.jsxs)("div",{className:U().educationDateGroup,children:[(0,a.jsx)("label",{htmlFor:`${e.fieldId}-${o}-startMonth`,className:U().educationDateLabel,children:"Start Date"}),(0,a.jsxs)("div",{className:U().educationDateSelects,children:[(0,a.jsxs)("select",{id:`${e.fieldId}-${o}-startMonth`,"data-field-id":e.fieldId,disabled:t,className:U().educationDateSelect,value:el(n.startDate).month,onChange:e=>p(o,"startDate","month",e.target.value),children:[(0,a.jsx)("option",{value:"",children:"Month"}),eo.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,a.jsx)("input",{placeholder:"Year","aria-label":"Start year",id:`${e.fieldId}-${o}-startYear`,"data-field-id":e.fieldId,disabled:t,className:U().educationYearInput,inputMode:"numeric",maxLength:4,value:el(n.startDate).year,onChange:e=>{p(o,"startDate","year",e.target.value.replace(/\D/g,"").slice(0,4))}})]})]}),(0,a.jsxs)("div",{className:U().educationDateGroup,children:[(0,a.jsx)("label",{htmlFor:`${e.fieldId}-${o}-endMonth`,className:U().educationDateLabel,children:"End Date"}),(0,a.jsxs)("div",{className:U().educationDateSelects,children:[(0,a.jsxs)("select",{id:`${e.fieldId}-${o}-endMonth`,"data-field-id":e.fieldId,disabled:t||!!n.isCurrent,className:i()(U().educationDateSelect,{[U().educationDisabled]:n.isCurrent}),value:el(n.endDate).month,onChange:e=>p(o,"endDate","month",e.target.value),children:[(0,a.jsx)("option",{value:"",children:"Month"}),eo.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,a.jsx)("input",{placeholder:"Year","aria-label":"End year",id:`${e.fieldId}-${o}-endYear`,"data-field-id":e.fieldId,disabled:t||!!n.isCurrent,className:i()(U().educationYearInput,{[U().educationDisabled]:n.isCurrent}),inputMode:"numeric",maxLength:4,value:el(n.endDate).year,onChange:e=>{p(o,"endDate","year",e.target.value.replace(/\D/g,"").slice(0,4))}})]})]})]}),(0,a.jsxs)("label",{className:i()(U().educationFullWidth,U().educationCheckboxLabel),children:[(0,a.jsx)("input",{type:"checkbox",disabled:t,checked:!!n.isCurrent,onChange:e=>u(o,"isCurrent",e.target.checked)}),(0,a.jsx)("span",{children:"Still studying here"})]})]})]},n._clientId??o)}),(0,a.jsx)("button",{type:"button",disabled:t,className:U().educationAddButton,onClick:()=>{r(e.fieldId,[...e.value,{schoolName:"",_clientId:crypto.randomUUID()}])},children:"+ Add another school"}),(0,a.jsx)(I,{errorMessage:e.errorMessage,showErrors:c,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyEducationHistoryInput.tsx"})]})}function eu({field:e,disabled:t,error:n,onChange:r,onBlur:s}
1){let[l,d]=(0,o.useState)(null),c=n&&e.invalid,u=(t,n)=>{r(e.fieldId,{...e.value,[n]:t.target.value})},p=(e.value.country||e.value.city||e.value.region)&&!e.invalid;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{fieldName:e.title,inputType:"text",required:e.required,"data-sentry-element":"Label","data-sentry-source-file":"AshbyLocationInput.tsx"}),e.description&&(0,a.jsx)("p",{className:U().fieldDescription,children:e.description}),(0,a.jsxs)("div",{className:U().locationContainer,children:[(0,a.jsx)("div",{className:i()(U().inputContainer,{[U().focused]:"city"===l}),children:(0,a.jsx)("input",{placeholder:"City",id:`${e.fieldId}-city`,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput,{[U().invalid]:c,[U().required]:e.required}),name:`${e.path}-city`,value:e.value.city||"",onChange:e=>{u(e,"city")},onFocus:()=>{d("city")},onBlur:()=>{d(null),s()}})}),(0,a.jsx)("div",{className:i()(U().inputContainer,{[U().focused]:"region"===l}),children:(0,a.jsx)("input",{placeholder:"State/Region",id:`${e.fieldId}-region`,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput,{[U().invalid]:c,[U().required]:e.required}),name:`${e.path}-region`,value:e.value.region||"",onChange:e=>{u(e,"region")},onFocus:()=>{d("region")},onBlur:()=>{d(null),s()}})}),(0,a.jsxs)("div",{className:i()(U().inputContainer,{[U().focused]:"country"===l}),children:[(0,a.jsx)("input",{placeholder:"Country",id:`${e.fieldId}-country`,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput,{[U().invalid]:c,[U().required]:e.required}),name:`${e.path}-country`,value:e.value.country||"",onChange:e=>{u(e,"country")},onFocus:()=>{d("country")},onBlur:()=>{d(null),s()}}),(0,a.jsx)("div",{className:i()(U().validIcon,U().icon,{[U().valid]:p,[U().dontShowError]:!c}),children:(0,a.jsx)("img",{src:f.FormConfirmedIcon.src,alt:`Valid field ${e.title} icon`})}),(0,a.jsx)("div",{className:i()(U().icon,U().invalidIcon,{[U().showErrors]:c}),children:(0,a.jsx)("img",{src:f.FormErrorIcon.src,alt:`invalid field ${e.title} icon`})})]})]}),(0,a.jsx)(I,{errorMessage:e.errorMessage,showErrors:c,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyLocationInput.tsx"})]})}let ep=(0,B.A)({key:"select-cache",prepend:!0}),em=({field:e,disabled:t,onChange:n})=>{let r=e.options[0],s=e.value.includes(r.value);return(0,a.jsxs)(a.Fragment,{children:[e.title&&(0,a.jsx)(C,{required:e.required,fieldName:e.title,inputType:"text"}),e.description&&(0,a.jsx)("div",{className:ei().fieldDescription,dangerouslySetInnerHTML:{__html:e.description}}),(0,a.jsxs)("label",{className:ei().checkboxContainer,children:[(0,a.jsx)("input",{type:"checkbox",checked:s,disabled:t,onChange:e=>{n(e.target.checked?[r.value]:[])},className:i()(ei().checkbox,e.invalid&&ei().checkboxInvalid)}),(0,a.jsx)("span",{className:ei().checkboxLabel,children:r.label})]}),(0,a.jsx)(I,{errorMessage:e.errorMessage||"This field is required",showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx"})]})},eh=({field:e,disabled:t,onChange:n})=>{let r=e.options.map(e=>({value:e.value,label:e.label})),s=r.filter(t=>e.value.includes(t.value));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{required:e.required,fieldName:e.title,inputType:"file","data-sentry-element":"Label","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx"}),e.description&&(0,a.jsx)("p",{className:ei().fieldDescription,children:e.description}),(0,a.jsx)(T.C,{value:ep,"data-sentry-element":"CacheProvider","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx",children:(0,a.jsx)(D.Ay,{isMulti:!0,isDisabled:t,menuShouldScrollIntoView:!1,instanceId:(0,o.useId)(),value:s,unstyled:!0,inputId:e.fieldId,maxMenuHeight:260,isClearable:!0,escapeClearsValue:!0,backspaceRemovesValue:!0,options:r,onChange:(e,t)=>
1{n(e.map(e=>e.value))},styles:{clearIndicator:(e,t)=>({...e,svg:{transition:"fill 0.2s"},":hover":{svg:{fill:"#4AD5B8"}}})},components:{DropdownIndicator:t=>(0,a.jsx)(ef,{...t,invalid:e.invalid}),Menu:e=>(0,a.jsx)(ey,{...e}),IndicatorSeparator:e_,Placeholder:t=>{let n=e.options.length>5;return(0,a.jsx)(L.c.Placeholder,{...t,className:ei().placeholder,children:(0,a.jsxs)("span",{children:["Choose options",n&&(0,a.jsxs)(a.Fragment,{children:[".",(0,a.jsx)("b",{children:" Scroll for more"})]})]})})}},classNames:{control:t=>i()(ei().selectedValue,e.invalid&&ei().invalid,t.isFocused&&ei().focused),option:e=>i()(ei().option,e.isSelected&&ei().optionSelected,e.isFocused&&ei().optionFocused),noOptionsMessage:()=>ei().option},"data-sentry-element":"Select","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx"})}),(0,a.jsx)(I,{errorMessage:"Select at least one option",showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx"})]})},ey=({children:e,...t})=>(0,a.jsx)(L.c.Menu,{className:ei().menu,...t,"data-sentry-element":"components.Menu","data-sentry-component":"Menu","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx",children:e}),ef=e=>{let{menuIsOpen:t}=e.selectProps,n=!0===e.invalid?f.SelectArrowRed:t?f.SelectArrowGreen:f.SelectArrowGray;return(0,a.jsx)("img",{className:`${ei().arrow} ${t?ei().arrowOpen:""}`,src:n.src,alt:"","data-sentry-component":"DropdownIndicator","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx"})},e_=()=>null,ex=({field:e,disabled:t,onChange:n})=>1===e.options.length?(0,a.jsx)(em,{field:e,disabled:t,onChange:n}):(0,a.jsx)(eh,{field:e,disabled:t,onChange:n,"data-sentry-element":"MultiSelectDropdown","data-sentry-component":"AshbyMultiValueSelectInput","data-sentry-source-file":"AshbyMultiValueSelectInput.tsx"}),eg=(0,B.A)({key:"select-cache",prepend:!0});function eb({field:e,disabled:t,onChange:n}){let r=e.options.map(e=>({value:e.value,label:e.label})),s=e.title.toLowerCase().includes("where did you hear about this position")?r.map(e=>({value:e,sort:Math.random()})).sort((e,t)=>e.sort-t.sort).map(({value:e})=>e):r,l=r.find(t=>t.value===e.value)??null;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{required:e.required,fieldName:e.title,inputType:"file","data-sentry-element":"Label","data-sentry-source-file":"AshbySingleChoiceInput.tsx"}),e.description&&(0,a.jsx)("p",{className:ei().fieldDescription,children:e.description}),(0,a.jsx)(T.C,{value:eg,"data-sentry-element":"CacheProvider","data-sentry-source-file":"AshbySingleChoiceInput.tsx",children:(0,a.jsx)(D.Ay,{isDisabled:t,menuShouldScrollIntoView:!1,instanceId:(0,o.useId)(),value:l,unstyled:!0,inputId:e.fieldId,maxMenuHeight:260,isClearable:!0,escapeClearsValue:!0,backspaceRemovesValue:!0,options:s,onChange:(t,a)=>{t?.value===e.value?n(void 0):n(t?.value??void 0)},styles:{clearIndicator:(e,t)=>({...e,svg:{transition:"fill 0.2s"},":hover":{svg:{fill:"#4AD5B8"}}})},components:{DropdownIndicator:t=>(0,a.jsx)(ej,{...t,invalid:e.invalid}),Menu:e=>(0,a.jsx)(ev,{...e}),IndicatorSeparator:eI,Placeholder:t=>{let n=e.options.length>5;return(0,a.jsx)(L.c.Placeholder,{...t,className:ei().placeholder,children:(0,a.jsxs)("span",{children:["Choose an option",n&&(0,a.jsxs)(a.Fragment,{children:[".",(0,a.jsx)("b",{children:" Scroll for more"})]})]})})}},classNames:{control:t=>i()(ei().selectedValue,e.invalid&&ei().invalid,t.isFocused&&ei().focused),option:e=>i()(ei().option,e.isSelected&&ei().optionSelected,e.isFocused&&ei().optionFocused),noOptionsMessage:()=>ei().option},"data-sentry-element":"Select","data-sentry-source-file":"AshbySingleChoiceInput.tsx"})}),(0,a.jsx)(I,{errorMessage:"Select an option",showErrors:e.invalid,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbySingleChoiceInput.tsx"})]})}let ev=({children:e,...t})=>(0,a.jsx)(L.c.Menu,{className:ei().menu,...t,"data-sentry-element":"components.Menu","data-sentry-component":"Menu","data-sentry-source-file":"AshbySingleChoiceInput.tsx",children:e}),ej=e=>{let{menuIsOpen:t}=e.selectProps,n=!0===e.invalid?f.SelectArrowRed:t?f.SelectArrowGreen:f.SelectArrowGray;return(0,a.jsx)("img",{className:`${ei().arrow} ${t?ei().arrowOpen:""}`,src:n.src,alt:"","data-sentry-component":"DropdownIndicator","data-sentry-source-file":"AshbySingleChoiceInput.tsx"})};function eI(){return null}function ew({field:e,disabled:t,error:n,multiline:r,onChange:s,onBlur:l}){var d;
1let[c,u]=(0,o.useState)(!1),p=n&&e.invalid,m={placeholder:"Type here",id:e.fieldId,"data-field-id":e.fieldId,disabled:t,className:i()(U().textInput,{[U().invalid]:p,[U().multiline]:r,[U().required]:e.required}),name:e.path,value:e.value,onChange:s,onFocus:()=>u(!0),onBlur:()=>{u(!1),l()}};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C,{fieldName:e.title,inputType:"text",required:e.required,"data-sentry-element":"Label","data-sentry-source-file":"AshbyTextInput.tsx"}),e.description&&(0,a.jsx)("p",{className:U().fieldDescription,children:e.description}),(0,a.jsxs)("div",{className:i()(U().inputContainer,{[U().focused]:c}),children:[r?(0,a.jsx)("textarea",{...m}):(0,a.jsx)("input",{...m,type:"Email"===(d=e.type)?"email":"Phone"===d?"tel":"text"}),(0,a.jsx)("div",{className:i()(U().validIcon,U().icon,{[U().valid]:!0!==e.invalid&&void 0!==e.invalid,[U().dontShowError]:!p}),children:(0,a.jsx)("img",{src:f.FormConfirmedIcon.src,alt:`Valid field ${e.title} icon`})}),(0,a.jsx)("div",{className:i()(U().icon,U().invalidIcon,{[U().showErrors]:p}),children:(0,a.jsx)("img",{src:f.FormErrorIcon.src,alt:`invalid field ${e.title} icon`})})]}),(0,a.jsx)(I,{errorMessage:e.errorMessage,showErrors:p,"data-sentry-element":"ErrorMessage","data-sentry-source-file":"AshbyTextInput.tsx"})]})}let eS=e=>{let t=[];for(let n of e.sections){let e=[];for(let t of n.fields){let n=t.field,a="_systemfield_data_consent_ack"===n.path,r={fieldId:n.id,path:n.path,title:n.title,required:t.isRequired,description:a&&t.descriptionHtml||t.descriptionPlain};switch(n.type){case"String":case"Email":case"Phone":{let t={...r,type:n.type,value:""};e.push(t);break}case"LongText":{let t={...r,type:"LongText",value:""};e.push(t);break}case"File":{let t={...r,type:"File",value:null};e.push(t);break}case"ValueSelect":{let t={...r,type:"ValueSelect",value:void 0,options:n.selectableValues||[]};e.push(t);break}case"MultiValueSelect":{let t={...r,type:"MultiValueSelect",value:[],options:n.selectableValues||[]};e.push(t);break}case"Location":{let t={...r,type:"Location",value:{country:"",city:"",region:""}};e.push(t);break}case"Boolean":{let t={...r,type:"Boolean",value:void 0};e.push(t);break}
1case"EducationHistory":{let t={...r,type:"EducationHistory",value:[{schoolName:"",_clientId:crypto.randomUUID()}]};e.push(t);break}default:console.warn(`Unsupported field type: ${n.type}`)}}t.push({title:n.title,description:n.descriptionHtml||n.descriptionPlain,fields:e})}return t},ek=e=>{let t=e.toLowerCase(),n=e.toLowerCase();return{isCV:t.includes("resume")||t.includes("cv"),isEmail:t.includes("email"),isName:t.includes("name"),isPhone:t.includes("phone"),isWhereDidYouHear:n.includes("where did you hear")}};var eN=n(42417),eC=n.n(eN);let eA=e=>{let{kind:t,message:n,extra:a,cause:r,fingerprintExtras:i=[],submissionId:s,applicantSessionId:o}=e,l=Error(n,{cause:r});l.name=`AshbySubmission/${t}`;let d="number"==typeof a.status?String(a.status):"no-status",c={};s&&(c.submissionId=s),o&&(c.applicantSessionId=o),(0,p.Cp)(l,{tags:{submissionKind:t,submissionStatus:d,...c},fingerprint:["ashby-submission",t,d,...i.map(e=>void 0===e?"none":String(e))],extra:{...a,...c}})},eF=()=>crypto.randomUUID(),eM="ashby.applicantSessionId";function eE(e){if(!e)return"empty";let t=e.trimStart().slice(0,16).toLowerCase();return t.startsWith("<!doctype")||t.startsWith("<html")?"html":t.startsWith("{")||t.startsWith("[")?"json":t.startsWith("<?xml")?"xml":"other"}let eB=e=>e?e.toLowerCase().replace(/\s+/g," ").replace(/[?.!:;,]+$/,"").trim():"",eT=(e,t={})=>{let n=e.match(/^Missing entry for required field:\s*(.+)$/i);if(n)return t.keepFieldName?`${n[1].trim()} is required.`:"This field is required.";let a=e.match(/^Invalid value for form field:\s*(.+)$/i);return a?t.keepFieldName?`Please check the ${a[1].trim()} field.`:"Please check this entry.":e};function eD({jobPostingId:e,jobTitle:t,departmentName:n,locationName:r,employmentType:s,formDefinition:l,surveyDefinitions:d=[],source:u=null}){let h=eS(l),y=[],_=h.length,x=[];for(let e of d){let t=eS(e.formDefinition);y.push({surveyId:e.surveyId,sectionStartIndex:_,sectionCount:t.length}),x.push(...t),_+=t.length}let g=[...h,...x],[v,j]=(0,o.useState)(g),[I,w]=(0,o.useState)(""),[S,k]=(0,o.useState)(!1),[N,C]=(0,o.useState)(!1),[A,F]=(0,o.useState)(!1),M=(0,o.useRef)(null),E=(0,m.jt)(),B=(0,o.useRef)(void 0);void 0===B.current&&(B.current=(()=>{try{let e=window.sessionStorage.getItem(eM);if(e)return e;let t=eF();return window.sessionStorage.setItem(eM,t),t}catch{return}})()),(0,o.useEffect)(()=>{let e=B.current;e&&(0,p.gV)({id:e})},[]);let T=h.length,D=()=>v.flatMap(e=>e.fields),L={jobFunction:n,jobTitle:t,jobLocation:r,jobType:s},$=(e,t)=>{j(n=>n.map(n=>({...n,fields:n.fields.map(n=>n.fieldId===e?{...n,value:t,invalid:!1,errorMessage:void 0}:n)})))},q=e=>{let t=e.target.dataset.fieldId;t&&$(t,e.target.value)},V=e=>{let t=e.target.dataset.fieldId;if(!t)return;let n=e.target.files?.[0]||null,a=D();if(n&&!n.name.toLowerCase().endsWith(".pdf")){j(e=>e.map(e=>({...e,fields:e.fields.map(e=>e.fieldId!==t?e:{...e,invalid:!0,errorMessage:"Only PDF files are accepted."})}))),e.target.value="";return}if(n){let r=a.reduce((e,n)=>"File"===n.type&&n.fieldId!==t&&n.value?e+n.value.size:e,0);if(r+n.size>4194304){let a=(n.size/1024/1024).toFixed(1),i=0===r?`That file (${a}MB) is too large! The limit is 4MB.`:"This would push your attachments past the 4MB limit. Try a smaller file or remove another.";j(e=>e.map(e=>({...e,fields:e.fields.map(e=>e.fieldId!==t?e:{...e,invalid:!0,errorMessage:i})}))),e.target.value="";return}}let r=a.find(e=>e.fieldId===t);r&&ek(r.path).isCV&&n&&E("cvCompleted",{...L}),$(t,n)},P=e=>{let t=D().find(t=>t.fieldId===e);if(!t)return;let n=ek(t.path);("File"===t.type?!!t.value:"string"==typeof t.value&&""!==t.value.trim())&&(n.isEmail?E("emailCompleted",{...L}):n.isName?E("nameCompleted",{...L}):n.isPhone&&E("phoneCompleted",{...L}))},J=async n=>{let a;n.preventDefault(),F(!0);let r=eF(),i=B.current,s=D(),{validatedFields:o,hasErrors:l}=(a=!1,{validatedFields:s.map(e=>{let{isValid:t,errorMessage:n}=(e=>{if(e.required){if("File"===e.type){if(!e.value)return{isValid:!1,errorMessage:`${e.title} is required`}}else if("String"===e.type||"Email"===e.type||"Phone"===e.type||"LongText"===e.type){if(!e.value||""===e.value.trim())return{isValid:!1,errorMessage:`${e.title} is required`}}
1else if("ValueSelect"===e.type){if(!e.value)return{isValid:!1,errorMessage:"Please select an option"}}else if("MultiValueSelect"===e.type){if(!e.value||0===e.value.length)return{isValid:!1,errorMessage:"Please select at least one option"}}else if("Location"===e.type){if(!(e.value.country||e.value.city||e.value.region))return{isValid:!1,errorMessage:`${e.title} is required`}}else if("Boolean"===e.type){if(void 0===e.value)return{isValid:!1,errorMessage:"Please select an option"}}else if("EducationHistory"===e.type&&!e.value.every(e=>""!==e.schoolName.trim()))return{isValid:!1,errorMessage:"Each school must have a name"}}return"EducationHistory"===e.type&&e.value.find(e=>{let t;return e.isCurrent&&null!=(t=e.endDate)&&/^\d{4}-\d{2}-\d{2}$/.test(t)})?{isValid:!1,errorMessage:"Current school cannot have an end date"}:"Email"===e.type&&e.value&&!/^(.+)@(.+)\.([a-z]{2,})$/i.test(e.value)?{isValid:!1,errorMessage:"Invalid email address"}:"_systemfield_data_consent_ack"!==e.path||"MultiValueSelect"!==e.type||e.value&&0!==e.value.length?{isValid:!0}:{isValid:!1,errorMessage:"You must agree to the data retention policy to submit your application"}})(e);
1return t?{...e,invalid:!1,errorMessage:void 0}:(a=!0,{...e,invalid:!0,errorMessage:n})}),hasErrors:a}),d=0;if(j(v.map(e=>{let t=e.fields.map(e=>{let t=o[d++];return t||console.error("Missing validated field at index",d-1,"for original field:",e),t});return{...e,fields:t}})),l){w("Please check the required fields above"),k(!1);let e=o.find(e=>e.invalid);if(e){let t=document.querySelector(`[data-field-id='${e.fieldId}']`);t&&t.scrollIntoView({behavior:"smooth",block:"center"})}E("jobApplicationSendingError",{...L,errors:function(e){let t={};for(let n of e){if(!n.invalid)continue;let e=ek(n.path);e.isCV?t.cvError="true":e.isEmail?t.emailError="true":e.isName?t.nameError="true":e.isPhone?t.phoneError="true":e.isWhereDidYouHear&&(t.wdyhatError="true")}return t}(o)}),F(!1);return}let c=o.filter(e=>"File"===e.type&&e.value),m=c.reduce((e,t)=>e+(t.value?.size||0),0);if(m>4194304){let n=(m/1024/1024).toFixed(1),a=c.map(({value:e})=>{let t=e?.name||"";return{ext:t.includes(".")?t.slice(t.lastIndexOf(".")):"",sizeMB:((e?.size||0)/1024/1024).toFixed(2)}});(0,p.wd)("Ashby: Job application file size limit exceeded",{level:"info",tags:{submissionId:r,...i?{applicantSessionId:i}:{}},extra:{submissionId:r,applicantSessionId:i,jobPostingId:e,jobTitle:t,totalSizeMB:n,limitMB:4,fileCount:c.length,files:a}}),w(`Attachments total ${n}MB, over the 4MB limit. Try smaller files or remove an attachment.`),k(!1),E("jobApplicationSendingError",{...L,errors:{fileSizeError:"true",totalSizeMB:n}}),F(!1);return}let h=!1;try{var f,_,x;(0,ea.Z)({category:"ashby-submit",type:"info",level:"info",message:"Building form data",data:{submissionId:r,applicantSessionId:i,jobPostingId:e}});let t=v.slice(0,T).reduce((e,t)=>e+t.fields.length,0),n=o.slice(0,t),a=o.slice(t),s=[],l=0;for(let e of y){let t=v.slice(e.sectionStartIndex,e.sectionStartIndex+e.sectionCount).reduce((e,t)=>e+t.fields.length,0),n=a.slice(l,l+t);s.push({surveyId:e.surveyId,fields:n}),l+=t}let{applicationFormData:d,surveys:c}=(f=e,_=n,x=s,{applicationFormData:((e,t)=>{let n=new FormData;n.append("jobPostingId",e);let a=[];for(let e of t)if(e.required||e.value){if("File"===e.type){e.value&&n.append(e.path,e.value);continue}if("String"===e.type||"Email"===e.type||"Phone"===e.type||"LongText"===e.type){e.value&&a.push({path:e.path,value:e.value});continue}if("ValueSelect"===e.type&&e.value){a.push({path:e.path,value:e.value});continue}if("MultiValueSelect"===e.type){e.value&&e.value.length>0?a.push({path:e.path,value:e.value}):e.required&&a.push({path:e.path,value:[]});continue}if("Location"===e.type){if(e.value.country||e.value.city||e.value.region){let t={};e.value.country&&(t.country=e.value.country),e.value.city&&(t.city=e.value.city),e.value.region&&(t.region=e.value.region),a.push({path:e.path,value:JSON.stringify(t)})}else e.required&&a.push({path:e.path,value:JSON.stringify({})});continue}if("Boolean"===e.type){void 0!==e.value&&a.push({path:e.path,value:e.value});continue}if("EducationHistory"===e.type){let t=e.value.filter(e=>""!==e.schoolName.trim()).map(e=>{let t={schoolName:e.schoolName};e.degree&&(t.degree=e.degree),e.major&&(t.major=e.major);let n=e=>null!=e&&/^\d{4}-\d{2}-\d{2}$/.test(e);return n(e.startDate)&&(t.startDate=e.startDate),e.isCurrent?t.isCurrent=!0:n(e.endDate)&&(t.endDate=e.endDate),t});t.length>0&&a.push({path:e.path,value:t})}}let r=JSON.stringify({fieldSubmissions:a});return n.append("applicationForm",r),n})(f,_),surveys:x.map(e=>({surveyId:e.surveyId,fields:e.fields.map(e=>({fieldId:e.fieldId,path:e.path,type:e.type,value:e.value}))}))});c.length>0&&d.append("surveys",JSON.stringify(c)),u&&d.append("source",u);let p="/api/job-application";(0,ea.Z)({category:"ashby-submit",type:"http",level:"info",message:"POST application",data:{submissionId:r,applicantSessionId:i,jobPostingId:e,url:p,fieldCount:o.length,surveyCount:s.length}});let m=async e=>{let t,n,a,s="undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.timeout?AbortSignal.timeout(9e4):void 0,o=await fetch(p,{method:"POST",body:d,headers:{"X-Submission-Id":r,"X-Submission-Attempt":String(e),...i?{"X-Applicant-Session-Id":i}:{}},...s?{signal:s}:{}});try{t=await o.text(),n=JSON.parse(t)}catch(e){a=e}return{response:o,responseText:t,responseData:n,parseError:a}},g=await m(1),b=g.responseData?.error==="upstream_blocked"||void 0!==g.parseError&&403===g.response.status&&"html"===eE(g.responseText),I=g.response.status>=500&&g.responseData?.retryable===!0,S=g.responseData?.error==="attachment_upload_failed",N=void 0!==g.parseError&&g.response.status>=500&&g.responseText?.trimStart().startsWith("Relay error:")===!0;if(b||I||N){let e=g.response.headers.get("x-upstream-cf-ray")||g.responseData?.cfRay||g.responseData?.ray_id||void 0;(0,ea.Z)({category:"ashby-submit",type:"http",level:"warning",message:"Submission failed transiently, retrying once",data:{submissionId:r,applicantSessionId:i,cfRay:e,reason:b?"upstream_blocked":S?"attachment_upload_failed":I?"cloudflare_retryable":"aws_edge_relay_error",upstreamStatus:g.responseData?.upstreamStatus??g.response.status}}),(I||N)&&await new Promise(e=>setTimeout(e,1e3)),h=!0,g=await m(2)}let{response:A,responseText:B}=g,{responseData:D}=g;if(void 0!==g.parseError){let{parseError:t}=g;if(B?.includes("Request must be smaller than"))eA({kind:"payload_too_large",message:"Application submission: Payload too large",extra:{jobPostingId:e,status:A.status,retried:h},cause:t,submissionId:r,applicantSessionId:i}),w("Your attachments are too large for the 4MB limit. Try smaller files.");else{let n=eE(B);eA({kind:"parse_error",message:`Application submission: JSON parse error (status=${A.status}, body=${n})`,extra:{jobPostingId:e,status:A.status,responseContentType:n,responseText:B?.slice(0,500),retried:h},cause:t,fingerprintExtras:[n],submissionId:r,applicantSessionId:i}),w("Uh-oh. Something went wrong while submitting your application. Please check your information and try again!")}k(!1),F(!1);return}if(D?.error==="upstream_blocked"){let t=A.headers.get("x-upstream-cf-ray")||D.cfRay||void 0,n=A.headers.get("x-upstream-cf-mitigated")||D.cfMitigated||void 0;eA({kind:"upstream_blocked",message:`Application submission: upstream blocked (status=${D.upstreamStatus??A.status}, mitigated=${n??"unknown"})`,extra:{jobPostingId:e,status:A.status,upstreamStatus:D.upstreamStatus,cfRay:t,cfMitigated:n,retried:h},fingerprintExtras:[String(D.upstreamStatus??"unknown"),n??"no-mitigation"],submissionId:r,applicantSessionId:i}),w("We couldn’t reach the application service just now. Please try again in a moment."),k(!1),F(!1);return}if(h&&A.status>=500&&D?.retryable===!0){let t=A.headers.get("x-upstream-cf-ray")||D?.cfRay||D?.ray_id||void 0,n=D?.error==="attachment_upload_failed";eA({kind:n?"attachment_upload_failed":"cloudflare_retryable_persistent",message:n?`Application submission: attachment upload failed after retry (${A.status})`:`Application submission: Cloudflare ${A.status} persisted after retry (error_name=${D?.error_name??"unknown"})`,extra:{jobPostingId:e,status:A.status,cfRay:t,upstreamErrorName:D?.error_name,retried:h},fingerprintExtras:[String(D?.error_name??"unknown")],submissionId:r,applicantSessionId:i}),w("We couldn’t reach the application service just now. Please try again in a moment."),k(!1),F(!1);return}if(D.blocked){D.blockMessage?(w(D.blockMessage),k(!0)):(eA({kind:"blocked_no_message",message:"Application blocked but blockMessage missing",extra:{jobPostingId:e,responseKeys:Object.keys(D)},submissionId:r,applicantSessionId:i}),w("Your application cannot be submitted at this time."),k(!1)),F(!1);return}if(!A.ok){console.error("Lambda returned error status:",A.status);let t="Unknown error",n=[];t=D.error||D.message||JSON.stringify(D),console.error("Error response:",D),D.details?.errors&&(n=D.details.errors,console.error("Field errors:",n));let a=new Set(v.flatMap(e=>e.fields.map(e=>eB(e.title)))),s=n.map(e=>e.fieldTitle).filter(e=>!!e&&!a.has(eB(e)));if(n.length>0){let e=v.map(e=>({...e,fields:e.fields.map(e=>{let t=eB(e.title);if(""===t)return e;let a=n.find(e=>{let n=eB(e.fieldTitle);return""!==n&&n===t});
1return a?{...e,invalid:!0,errorMessage:eT(a.message)}:e})}));j(e);let t=e.flatMap(e=>e.fields).find(e=>e.invalid);if(t)setTimeout(()=>{let e=document.querySelector(`[data-field-id='${t.fieldId}']`);e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100),w("Please check the highlighted fields and try again"),k(!1);else{let e=(e=>{let t=e.map(e=>eT(e.message,{keepFieldName:!0}));if(1===t.length)return{message:t[0],isHtml:!1};let n=t.map(e=>`<li>${e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}</li>`).join("");return{message:`<p>Please check the following:</p><ul>${n}</ul>`,isHtml:!0}})(n);w(e.message),k(e.isHtml)}}else D.message?w(D.message):w("Uh-oh. Something went wrong while submitting your application. Please check your information and try again!"),k(!1);let o=A.headers.get("x-upstream-cf-ray")||D?.cfRay||D?.ray_id||void 0,l=A.status>=500?"server":"client";eA({kind:"http_error",message:`Application submission failed: ${t}`,extra:{jobPostingId:e,status:A.status,errorCode:D.errorInfo?.code,ashbyMessage:"string"==typeof D.message?D.message.slice(0,500):void 0,ashbyErrors:n.slice(0,10),unmatchedFieldTitles:s,cfRay:o,retried:h},fingerprintExtras:[D.errorInfo?.code,l],submissionId:r,applicantSessionId:i}),F(!1);return}(0,ea.Z)({category:"ashby-submit",type:"info",level:"info",message:"Submission successful",data:{submissionId:r,applicantSessionId:i,jobPostingId:e}}),C(!0),w(""),k(!1),E("jobApplicationSent",{...L}),M.current&&M.current.scrollIntoView({behavior:"smooth"})}catch(s){console.error("Unexpected error during submission:",s);let t=s instanceof Error?s.message:String(s),n=t.includes("Request must be smaller than"),a=(e=>{if("undefined"==typeof DOMException)return!1;let t=e;for(let e=0;e<10;e++){if(t instanceof DOMException&&("TimeoutError"===t.name||"AbortError"===t.name))return!0;if(t instanceof Error&&void 0!==t.cause){t=t.cause;continue}break}return!1})(s);if(eA({kind:n?"payload_too_large":"network_or_unexpected",message:t,extra:{jobPostingId:e,retried:h,timedOut:a,timeoutMs:a?9e4:void 0},cause:s,fingerprintExtras:a?["timeout"]:void 0,submissionId:r,applicantSessionId:i}),a){w("Your submission is taking longer than expected. It may have gone through — please check your inbox for a confirmation email before resubmitting."),k(!1);return}n?w("Your attachments are too large for the 4MB limit. Try smaller files."):w("Uh-oh. Something went wrong while submitting your application. Please check your internet connection and try again!"),k(!1)}finally{F(!1)}},R=e=>{let t=A||N;return e?"String"===e.type||"Email"===e.type||"Phone"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(ew,{disabled:t,field:e,error:!!I,onChange:q,onBlur:()=>P(e.fieldId)})},e.fieldId):"LongText"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(ew,{disabled:t,field:e,error:!!I,multiline:!0,onChange:q,onBlur:()=>P(e.fieldId)})},e.fieldId):"File"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(en,{disabled:t,field:e,onChange:V,onRemove:()=>$(e.fieldId,null)})},e.fieldId):"ValueSelect"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(eb,{disabled:t,field:e,onChange:t=>((e,t)=>{$(e,t);let n=D().find(t=>t.fieldId===e);n&&ek(n.path).isWhereDidYouHear&&t&&E("whereDidYouHearCompleted",{...L,selection:t})})(e.fieldId,t)})},e.fieldId):"MultiValueSelect"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(ex,{disabled:t,field:e,onChange:t=>{$(e.fieldId,t)}})},e.fieldId):"Location"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(eu,{disabled:t,field:e,error:!!I,onChange:$,onBlur:()=>P(e.fieldId)})},e.fieldId):"Boolean"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(es,{disabled:t,field:e,onChange:t=>$(e.fieldId,t)})},e.fieldId):"EducationHistory"===e.type?(0,a.jsx)("div",{className:eC().formInput,children:(0,a.jsx)(ec,{disabled:t,field:e,error:!!I,onChange:$,onBlur:()=>P(e.fieldId)})},e.fieldId):null:(console.error("Attempted to render undefined field"),null)};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{ref:M}),N?(0,a.jsx)(e$,{}):(0,a.jsx)(c.fI,{id:"form",className:eC().background,children:(0,a.jsxs)("div",{className:eC().elementContainer,children:[(0,a.jsxs)("div",{className:eC().leftSide,children:[(0,a.jsxs)("div",{className:eC().intro,children:[(0,a.jsxs)("h2",{children:["Interested?",(0,a.jsx)("br",{}),"Then just apply here"]}),(0,a.jsx)("p",{className:eC().text,children:"We're looking forward to hearing from you. It's always exciting to re
1ceive thoughtful applications with more than just a blurry image of a cat. Although we do love cats."})]}),(0,a.jsx)("div",{className:eC().desktopImageContainer,children:(0,a.jsx)(f.careers.JobFormDesktopImage,{className:eC().jobFormImage})})]}),(0,a.jsxs)("div",{className:eC().formContainer,children:[(0,a.jsxs)("form",{noValidate:!0,onSubmit:e=>void J(e),children:[v.map((e,t)=>(0,a.jsxs)("div",{className:eC().formSection,children:[e.title&&(0,a.jsx)("h3",{className:eC().sectionTitle,children:e.title}),e.description&&(0,a.jsx)("div",{className:eC().sectionDescription,dangerouslySetInnerHTML:{__html:e.description}}),e.fields.filter(Boolean).map(R)]},t)),(0,a.jsx)("button",{disabled:A||N,className:i()(eC().sendButton,A&&eC().sendButtonSubmitting),"data-allow-motion":A?"":void 0,type:"submit",children:A?"sending application":"send application"}),I&&(0,a.jsx)(b,{message:I,isHtml:S})]}),(0,a.jsx)("div",{className:i()(eC().mobileImageContainer,eC().mobile),children:(0,a.jsx)(f.careers.JobFormMobileImage,{className:eC().jobFormImage})})]})]})})]})}let eL=(0,c.xV)({full:{columns:16},large:{columns:8},medium:{columns:8},small:{columns:8},mobile:{columns:6}});function e$(){return(0,a.jsx)(c.fI,{className:eC().thankyouBackground,"data-sentry-element":"Row","data-sentry-component":"ThankYouMessage","data-sentry-source-file":"AshbyJobApplyForm.tsx",children:(0,a.jsxs)("div",{className:i()(eL,eC().container),children:[(0,a.jsx)("h2",{children:"thank you!"}),(0,a.jsxs)("p",{className:eC().text,children:["Your application has been received. We will be in touch soon!",(0,a.jsx)("br",{}),"Please check your junk folder if you didn't receive a confirmation email."]}),(0,a.jsxs)("div",{className:eC().thankyouButtons,children:[(0,a.jsx)(y(),{href:"/en/careers/joining-supercell/",className:i()(eC().thankyouButton,eC().joining),"data-sentry-element":"Link","data-sentry-source-file":"AshbyJobApplyForm.tsx",children:"joining supercell"}),(0,a.jsx)(y(),{href:"/en/about-us",className:i()(eC().thankyouButton),"data-sentry-element":"Link","data-sentry-source-file":"AshbyJobApplyForm.tsx",children:"about us"})]})]})})}let eq=({offer:e,initialInputs:t,applyUrl:n})=>{let[r,l]=(0,o.useState)(t),[d,u]=(0,o.useState)(""),[h,y]=(0,o.useState)(!1),[x,g]=(0,o.useState)(!1),v=(0,o.useRef)(null),j=(0,m.jt)(),I=(0,s.useRouter)();async function w(t,a){t.preventDefault(),g(!0);let{inputs:i,containsInvalid:s}=r.reduce((e,t)=>{let{validatedInput:n,foundError:a}=Z(t);return e.inputs.push(n),a&&(e.containsInvalid=!0),e},{inputs:[],containsInvalid:!1});if(s){let e=i.reduce((e,t)=>("cv"===t.body&&t.required&&(e.cvError=t.invalid?"true":"false"),"phone"===t.body&&t.required&&(e.phoneError=t.invalid?"true":"false"),"email"===t.body&&t.required&&(e.emailError=t.invalid?"true":"false"),"name"===t.body&&t.required&&(e.nameError=t.invalid?"true":"false"),"Where did you hear about this position?"===t.body&&t.required&&(e.wdyhatError=t.invalid?"true":"false"),e),{});j("jobApplicationSendingError",{...a,errors:e}),l(i),u("This field needs your attention");let t=i.find(e=>e.invalid)?.body;document.querySelector(`label[for='${t}']`).scrollIntoView({behavior:"smooth",block:"center"}),g(!1);return}let o=`${n}${e.slug}/candidates?async=true`,d=((e,t)=>{let{utm_source:n}=t,a=new FormData;return e.forEach(e=>{if(Q(e.body)&&(e=>"id"in e&&"string"===e.kind)(e))return void((e,t,n)=>{e.append(`candidate[open_question_answers_attributes][${t.position}][open_question_id]`,t.id.toString()),e.append(`candidate[open_question_answers_attributes][${t.position}][content]`,Object.values(n).filter(Boolean).join("+"))})(a,e,t);if(e.value&&("id"in e?("file"===e.kind&&(a.append(`candidate[open_question_answers_attributes][${e.position}][open_question_id]`,e.id.toString()),a.append(`candidate[open_question_answers_attributes][${e.position}][file]`,e.value)),"string"===e.kind&&ee(a,e),"single_choice"===e.kind&&ee(a,{...e,value:e.value}),"text"===e.kind&&ee(a,e)):a.append(`candidate[${e.body}]`,e.value),"Where did you hear about this position?"===e.body)){let t=n?`Paid, ${n}`:e.value;a.append("candidate[referrer]",t)}}),a})(i,(e=>{let{utm_source:t,utm_campaign:n,utm_content:a,utm_medium:r,utm_term:i}=e;return{utm_source:t?.toString(),utm_campaign:n?.toString(),utm_content:a?.toString(),utm_medium:r?.toString(),utm_term:i?.toString()}})(I.query));try{(await (0,_.J5)(o,{method:"POST",body:d})).ok?(y(!0),u(""),j("jobApplicationSent",{...a}
1),v.current&&v.current.scrollIntoView({behavior:"smooth"})):u("Uh-oh. Something went wrong while submitting your application. Please do try again!")}catch(e){(0,p.Cp)(e),u("Uh-oh. Something went wrong while submitting your application. Please do try again!")}g(!1)}let S={jobFunction:e.department,jobTitle:e.title,jobLocation:e.location,jobType:e.employment_type_code};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{ref:v}),h?(0,a.jsx)(K,{}):(0,a.jsx)(c.fI,{id:"form",className:E().background,children:(0,a.jsxs)("div",{className:E().elementContainer,children:[(0,a.jsxs)("div",{className:E().leftSide,children:[(0,a.jsxs)("div",{className:E().intro,children:[(0,a.jsxs)("h2",{children:["Interested?",(0,a.jsx)("br",{}),"Then just apply here"]}),(0,a.jsxs)("p",{className:E().text,children:["We’re looking forward to hearing from you. It’s always exciting to receive thoughtful applications with more than just a blurry image of a cat. Although we do love cats."," "]})]}),(0,a.jsx)("div",{className:E().desktopImageContainer,children:(0,a.jsx)(f.careers.JobFormDesktopImage,{className:E().jobFormImage})})]}),(0,a.jsxs)("div",{className:E().formContainer,children:[(0,a.jsxs)("form",{noValidate:!0,onSubmit:e=>void w(e,S),children:[r.map(function(t){let n,r,i,s;if(Q(t.body))return null;let o="Gender Identity"===t.body?"This information is optional. We are gathering gender information for statistical data to improve our diversity outreach initiatives. Giving this optional information does not affect your recruitment process in any way.":void 0;return"string"===t.kind?(0,a.jsx)(X,{explanationText:o,children:(0,a.jsx)(G,{disabled:x||h,...t,offer:e,error:!!d,onChange:et(l)})},t.body):"file"===t.kind?(0,a.jsx)(X,{explanationText:o,children:(0,a.jsx)(F,{disabled:x||h,...t,onChange:(n=l,r=()=>void j("cvCompleted",{...S}),e=>{e.preventDefault();let{name:t,files:a}=e.target,i=a?.[0];i&&("cv"===t&&r(),n(e=>e.map(e=>e.body===t&&"file"===e.kind?{...e,value:i,invalid:!1}:e)))})})},t.body):"single_choice"===t.kind?(0,a.jsx)(X,{explanationText:o,children:(0,a.jsx)(R,{...t,onChange:(i=l,s=e=>void j("whereDidYouHearCompleted",{...S,selection:e}),({name:e,value:t})=>{"Where did you hear about this position?"===e&&void 0!==t&&s(t),i(n=>n.map(n=>n.body===e&&"single_choice"===n.kind?{...n,value:t,invalid:!1}:n))})})},t.body):"text"===t.kind?(0,a.jsx)(X,{explanationText:o,children:(0,a.jsx)(G,{multiline:!0,disabled:x||h,...t,offer:e,error:!!d,onChange:et(l)})},t.body):void 0}),(0,a.jsx)("p",{className:E().text,children:"We at Supercell collect your application data to manage and plan our recruitment activities globally. In the unhappy event that you don’t get selected, we will store your details for future opportunities. If you do not wish to be contacted in the future, please let us know."}),(0,a.jsx)("button",{disabled:x||h,className:E().sendButton,"data-allow-motion":x?"":void 0,type:"submit",children:x?"sending application":"send application"}),d&&(0,a.jsx)(b,{message:d})]}),(0,a.jsx)("div",{className:i()(E().mobileImageContainer,E().mobile),children:(0,a.jsx)(f.careers.JobFormMobileImage,{className:E().jobFormImage})})]})]})})]})};var eV=n(25675),eP=n(14146),eJ=n.n(eP);function eR({url:e,jobTitle:t}){let n=e.startsWith("mailto:");return(0,a.jsx)(c.fI,{id:"form",className:eJ().background,"data-sentry-element":"Row","data-sentry-component":"ExternalApplicationLink","data-sentry-source-file":"ExternalApplicationLink.tsx",children:(0,a.jsxs)("div",{className:eJ().container,children:[(0,a.jsx)("div",{className:eJ().imageContainer,children:(0,a.jsx)(f.careers.JobFormMobileImage,{className:eJ().characterImage,"data-sentry-element":"images.JobFormMobileImage","data-sentry-source-file":"ExternalApplicationLink.tsx"})}),(0,a.jsxs)("div",{className:eJ().contentContainer,children:[(0,a.jsxs)("h2",{className:eJ().heading,children:["Interested? ",(0,a.jsx)("br",{className:eJ().mobileBreak}),"Then just apply here"]}),(0,a.jsx)("p",{className:eJ().description,children:n?"This role is managed by our partner. Send your application by email.":"This role is managed by our partner. Click below to apply on their site."}),(0,a.jsxs)(eV.A,{title:`Apply for ${t}`,url:e,className:eJ().applyButton,"data-sentry-element":"OutboundLink","data-sentry-source-file":"ExternalApplicationLink.tsx",children:[(0,a.jsx)("span",{children:n?"Apply by email":"Apply now"}),n?(0,a.jsx)(eO,{}):(0,a.jsx)(eW,{})]})]})]})})}let eW=()=>(0,a.jsxs)("svg",{"aria-hidden":"true",className:eJ().externalIcon,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-sentry-element":"svg","data-sentry-component":"ExternalLinkIcon","data-sentry-source-file":"ExternalApplicationLink.tsx",children:[(0,a.jsx)("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6","data-sentry-element":"path","data-sentry-source-file":"ExternalApplicationLink.tsx"}),(0,a.jsx)("polyline",{points:"15 3 21 3 21 9","data-sentry-element":"polyline","data-sentry-source-file":"ExternalApplicationLink.tsx"}),(0,a.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3","data-sentry-element":"line","data-sentry-source-file":"ExternalApplicationLink.tsx"})]}),eO=()=>(0,a.jsxs)("svg",{"aria-hidden":"true",className:eJ().externalIcon,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","data-sentry-element":"svg","data-sentry-component":"EnvelopeIcon","data-sentry-source-file":"ExternalApplicationLink.tsx",children:[(0,a.jsx)("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2","data-sentry-element":"rect","data-sentry-source-file":"ExternalApplicationLink.tsx"}),(0,a.jsx)("polyline",{points:"3 7 12 13 21 7","data-sentry-element":"polyline","data-sentry-source-file":"ExternalApplicationLink.tsx"})]});var eH=n(67495),eU=n(69381),eY=n(96354),eG=n.n(eY),ez=n(71564),eK=n(5053);let eX=e=>e?e.replace(/<div[^>]*data-user-input-url="https:\/\/www\.youtube\.com\/watch\?v=([^"]+)"[^>]*>[\s\S]*?<iframe[^>]*src="https:\/\/embedded-media\.ashbyhq\.com\/[^"]*"[^>]*>[\s\S]*?<\/iframe>
1[\s\S]*?<\/div>/gi,(e,t)=>`<figure><iframe height="281" width="500" src="//www.youtube.com/embed/${t}?enablejsapi=1" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen referrerpolicy="strict-origin-when-cross-origin"></iframe></figure>`):e;var eZ=n(5956),eQ=n.n(eZ);let e0=(0,c.xV)({full:{columns:8},large:{columns:4},medium:{columns:4},small:{columns:6,offset:1},mobile:{columns:6}}),e1=(0,c.xV)({full:{columns:8,offset:4},large:{columns:4,offset:2},medium:{columns:4,offset:2},small:{columns:6,offset:1},mobile:{columns:6}});function e2({offer:e,initialInputs:t,ogImage:n,ogDescription:r,ogTitle:s,external:p,applyUrl:m,showInternalShareButton:h}){let[y,_]=(0,o.useState)("Copy internal link"),[x]=(0,d.F)(),g=x(),b=[e.on_site&&"onsite",e.hybrid&&"hybrid",e.remote&&"remote"].filter(e=>"string"==typeof e).join("/");return(0,a.jsxs)(eU.A,{title:e.title,"data-sentry-element":"Page","data-sentry-component":"RecruiteeJobPage","data-sentry-source-file":"index.prod.tsx",children:[(0,a.jsx)(u.A,{heroImage:f.DefaultHero,"data-sentry-element":"HeroImage","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)(eH.A,{ogProperties:{title:s,type:"article"},image:{externalUrl:n},description:r,"data-sentry-element":"OpenGraph","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)("div",{className:eQ().offerContent,children:(0,a.jsxs)(c.fI,{className:eQ().row,"data-sentry-element":"Row","data-sentry-source-file":"index.prod.tsx",children:[(0,a.jsx)(ez.o,{text:"all positions",url:`/en/careers/${g?`?${g}`:""}#join`,"data-sentry-element":"BackButton","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsxs)("div",{className:i()(e0),children:[(0,a.jsx)(ez.D,{texts:[e.location,b,e.employment_type_code].filter(Boolean),"data-sentry-element":"Tagline","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)(l.A,{title:e.title,"data-sentry-element":"ArticleTitle","data-sentry-source-file":"index.prod.tsx"}),h&&(0,a.jsx)("button",{type:"button",className:eQ().shareButton,onClick:()=>void(async()=>{try{await navigator.clipboard.writeText(`${location.origin}/api/preview?path=${location.pathname}`),_("Internal link copied!")}catch(e){_("Copy failed!")}})(),children:(0,a.jsx)("span",{children:y})})]}),(0,a.jsxs)("div",{className:i()(e1,eG().content,eQ().blueLinks,eQ().content),children:[(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e.description}}),(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:e.requirements}})]})]})}),!p&&(0,a.jsx)(eq,{initialInputs:t,offer:e,applyUrl:m})]})}function e4({posting:e,locationNames:t,ogImage:n,ogDescription:r,ogTitle:p,showInternalShareButton:m,surveyDefinitions:h,externalApplicationLink:y}){let _=(0,s.useRouter)(),x="string"==typeof _.query.source?_.query.source:null,[g,b]=(0,o.useState)("Copy internal link"),[v,j]=(0,o.useState)(!1),[I]=(0,d.F)(),w=I();(0,o.useEffect)(()=>{j(!0)},[]);let S=e.workplaceType||"OnSite",k=e.employmentType,N=v&&e.applicationDeadline?`Apply before ${(0,eK.ED)(e.applicationDeadline)}`:"",C=t.join("/");return(0,a.jsxs)(eU.A,{title:e.title,"data-sentry-element":"Page","data-sentry-component":"AshbyJobPage","data-sentry-source-file":"index.prod.tsx",children:[(0,a.jsx)(u.A,{heroImage:f.DefaultHero,"data-sentry-element":"HeroImage","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)(eH.A,{ogProperties:{title:p,type:"article"},image:{externalUrl:n},description:r,"data-sentry-element":"OpenGraph","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)("div",{className:eQ().offerContent,children:(0,a.jsxs)(c.fI,{className:eQ().row,"data-sentry-element":"Row","data-sentry-source-file":"index.prod.tsx",children:[(0,a.jsx)(ez.o,{text:"all positions",url:`/en/careers/${w?`?${w}`:""}#join`,"data-sentry-element":"BackButton","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsxs)("div",{className:i()(e0),children:[(0,a.jsx)(ez.D,{texts:[C,S.toLowerCase(),k].filter(Boolean),"data-sentry-element":"Tagline","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)(l.A,{title:e.title,"data-sentry-element":"ArticleTitle","data-sentry-source-file":"index.prod.tsx"}),(0,a.jsx)("div",{className:eQ().deadline,children:N}),m&&(0,a.jsx)("button",{type:"button",className:eQ().shareButton,onClick:()=>void(async()=>{try{await navigator.clipboard.writeText(`${location.origin}/api/preview?path=${location.pathname}`),b("Internal link copied!")}catch(e){b("Copy failed!")}})(),children:(0,a.jsx)("span",{children:g})})]}),(0,a.jsxs)("div",{className:i()(e1,eG().content,eQ().blueLinks,eQ().content),children:[e.descriptionParts.descriptionOpening&&(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:eX(e.descriptionParts.descriptionOpening.html)}}),(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:eX(e.descriptionHtml)}}),e.descriptionParts.descriptionClosing&&(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:eX(e.descriptionParts.descriptionClosing.html)}})]})]})}),y?(0,a.jsx)(eR,{url:y,jobTitle:e.title}):(0,a.jsx)(eD,{jobPostingId:e.id,jobTitle:e.title,departmentName:e.departmentName,locationName:C,employmentType:k,formDefinition:e.applicationFormDefinition,surveyDefinitions:h,source:x})]})}var e6=!0;function e8(e){return"recruitee"===e.source?(0,a.jsx)(e2,{...e}):(0,a.jsx)(e4,{...e})}},36511:e=>{e.exports={errorWrapper:"common_errorWrapper__NZHlL",showErrorMessage:"common_showErrorMessage__hELuH",inputErrorMessage:"common_inputErrorMessage__OY_6R"}},42229:e=>{e.exports={errorWrapper:"fileinput_errorWrapper__aShFS",showErrorMessage:"fileinput_showErrorMessage__kPgJ0",inputErrorMessage:"fileinput_inputErrorMessage__AiqhS",allowedFiles:"fileinput_allowedFiles__Ed8L5",buttonContainer:"fileinput_buttonContainer__6yjUp",fileInput:"fileinput_fileInput__1foEj",invali
1d:"fileinput_invalid__8thf4",removeButton:"fileinput_removeButton__mdtzp",fileInputButtonText:"fileinput_fileInputButtonText__vptNU",plusSign:"fileinput_plusSign__gjPNg"}},42417:e=>{e.exports={formSection:"ashbyJobApplyForm_formSection__QfIfy",sectionTitle:"ashbyJobApplyForm_sectionTitle__n4lWf",sectionDescription:"ashbyJobApplyForm_sectionDescription__jTcWz",formInput:"ashbyJobApplyForm_formInput__I3g6V",bottomBorder:"ashbyJobApplyForm_bottomBorder__PO0Om",explanationText:"ashbyJobApplyForm_explanationText__akXwV",thankyouBackground:"ashbyJobApplyForm_thankyouBackground__78iyj",container:"ashbyJobApplyForm_container__8zjaD",fadeIn:"ashbyJobApplyForm_fadeIn__3cQgQ",thankyouButtons:"ashbyJobApplyForm_thankyouButtons__Nu9i4",thankyouButton:"ashbyJobApplyForm_thankyouButton__CNUn4",joining:"ashbyJobApplyForm_joining__3OVUk",text:"ashbyJobApplyForm_text__SNY9R",background:"ashbyJobApplyForm_background__Iruor",elementContainer:"ashbyJobApplyForm_elementContainer__b0C2h",sendButton:"ashbyJobApplyForm_sendButton__2ZPdB",sendButtonSubmitting:"ashbyJobApplyForm_sendButtonSubmitting__YL_1n",spin:"ashbyJobApplyForm_spin__7TXq9",busy_pulse:"ashbyJobApplyForm_busy_pulse__sDBz9",desktopImageContainer:"ashbyJobApplyForm_desktopImageContainer__wEeKW",mobileImageContainer:"ashbyJobApplyForm_mobileImageContainer__6UBhV",jobFormImage:"ashbyJobApplyForm_jobFormImage__cF5By",leftSide:"ashbyJobApplyForm_leftSide__sdB1X",formContainer:"ashbyJobApplyForm_formContainer__EM6ZK",intro:"ashbyJobApplyForm_intro__ErAma",mobile:"ashbyJobApplyForm_mobile__b3cwt"}},46450:e=>{e.exports={errorBox:"errorBox_errorBox__Z2nGD",htmlContent:"errorBox_htmlContent__woeCM"}},52352:e=>{e.exports={errorWrapper:"textInput_errorWrapper__ZMu9T",showErrorMessage:"textInput_showErrorMessage__OQ_MV",inputErrorMessage:"textInput_inputErrorMessage__oTwWR",fieldDescription:"textInput_fieldDescription__rZYvJ",inputContainer:"textInput_inputContainer__Vdacx",textInput:"textInput_textInput__tez1o",required:"textInput_required__59WE_",invalid:"textInput_invalid__sOL5O",multiline:"textInput_multiline__fkV0r",focused:"textInput_focused__PoI4c",icon:"textInput_icon__084J4",validIcon:"textInput_validIcon__gWrXl",dontShowError:"textInput_dontShowError__9iRuC",valid:"textInput_valid__kTwGX",invalidIcon:"textInput_invalidIcon___EMRz",showErrors:"textInput_showErrors__OanGR",locationContainer:"textInput_locationContainer__iBx0N",educationEntry:"textInput_educationEntry__xv4Yg",educationEntryHeader:"textInput_educationEntryHeader__4KH5u",educationEntryTitle:"textInput_educationEntryTitle__AAOPf",educationRemoveButton:"textInput_educationRemoveButton__hw6kR",educationGrid:"textInput_educationGrid__Ch8jH",educationFullWidth:"textInput_educationFullWidth__r__CI",educationCheckboxLabel:"textInput_educationCheckboxLabel__RMIAY",educationDatesRow:"textInput_educationDatesRow__wL7t6",educationDateGroup:"textInput_educationDateGroup__Nwi_h",educationDateLabel:"textInput_educationDateLabel__itmiI",educationDateSelects:"textInput_educationDateSelects__q7MfP",educationDateSelect:"textInput_educationDateSelect__OyPIr",educationYearInput:"textInput_educationYearInput__WMtJ6",educationDisabled:"textInput_educationDisabled__TL_NB",educationAddButton:"textInput_educationAddButton__fK_ig"}},60676:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/en/careers/[slug]/[id]",function(){return n(35290)}])},67495:(e,t,n)=>{"use strict";n.d(t,{A:()=>d});var a=n(37876),r=n(77328),i=n.n(r),s=n(89099);let o=([e,t])=>(0,a.jsx)("meta",{property:`og:${e}`,content:t,"data-sentry-element":"meta","data-sentry-component":"generateMetaTags","data-sentry-source-file":"opengraph.tsx"},e),l="supercell.com",d=function({ogProperties:e,description:t,image:n,path:r}){let d=(0,s.useRouter)();return(0,a.jsxs)(i(),{"data-sentry-element":"Head","data-sentry-component":"OpenGraph","data-sentry-source-file":"opengraph.tsx",children:[(0,a.jsx)("meta",{name:"description",content:t,"data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"}),Object.entries(e).map(o),(0,a.jsx)("meta",{property:"og:image",content:function(e){if("externalUrl"in e)return e.externalUrl;if("url"in e)return`https://${l}${e.url}`;if("src"in e)return`https://${l}${e.src}`;throw Error(`Unknown type of image: ${e}`)}(n),"data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"}),(0,a.jsx)("meta",{property:"og:description",content:t,"data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"}),(0,a.jsx)("meta",{property:"og:site_name",content:"Supercell","data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"}),(0,a.jsx)("meta",{property:"og:url",content:`https://supercell.com${r||d.asPath}`,"data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"}),(0,a.jsx)("meta",{name:"twitter:card",content:"summary_large_image","data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"}),(0,a.jsx)("meta",{name:"twitter:creator",content:"@supercell","data-sentry-element":"meta","data-sentry-source-file":"opengraph.tsx"})]})}}
1,70488:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var a=n(37876),r=n(95412),i=n.n(r);function s({title:e}){return(0,a.jsx)("h1",{className:i().articleTitle,"data-sentry-component":"ArticleTitle","data-sentry-source-file":"index.tsx",children:e})}},71564:(e,t,n)=>{"use strict";n.d(t,{D:()=>m,o:()=>h});var a=n(37876),r=n(37420),i=n.n(r),s=n(48230),o=n.n(s),l=n(29044),d=n(55711),c=n(75646),u=n.n(c);let p=(0,l.xV)({full:{columns:4},large:{columns:2},medium:{columns:2},small:{offset:1,columns:6},mobile:{columns:6}});function m({texts:e,link:t,variant:n="plain",className:r,...s}){let o=e?e.join(" – "):"";return o||t?(0,a.jsx)("div",{...s,"data-test-id":"tagline",className:i()(u().tagline,{[u().pill]:"pill"===n},r),"data-sentry-component":"Tagline","data-sentry-source-file":"index.tsx",children:t?(0,a.jsx)(d.A,{linkText:o,linkUri:t}):o}):null}function h({url:e,text:t}){return(0,a.jsx)("div",{className:i()(p,u().moreNewsContainer),"data-sentry-component":"BackButton","data-sentry-source-file":"index.tsx",children:(0,a.jsxs)(o(),{href:e,"data-test-id":"back-button","data-sentry-element":"Link","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)("span",{className:u().arrowBack}),(0,a.jsx)("span",{className:u().moreNews,children:t})]})})}},75646:e=>{e.exports={arrowBack:"tagline_arrowBack__X0n3b",moreNews:"tagline_moreNews__lQZb_",tagline:"tagline_tagline__GODdq",pill:"tagline_pill__tXlSG",moreNewsContainer:"tagline_moreNewsContainer__bmcTc"}},76810:(e,t,n)=>{"use strict";n.d(t,{F:()=>i});var a=n(14232);let r="jobPostingsFilters",i=()=>{let[e,t]=(0,a.useState)("");return(0,a.useEffect)(()=>{let e=sessionStorage.getItem(r);e&&t(e)},[]),[()=>e,e=>{sessionStorage.setItem(r,e),t(e)}]}},80429:e=>{e.exports={textLabel:"label_textLabel__IRLaK",fileLabel:"label_fileLabel__Ownvj",uppercase:"label_uppercase__T_d82"}},80824:e=>{e.exports={errorWrapper:"singlechoiceInput_errorWrapper__vfNWz",showErrorMessage:"singlechoiceInput_showErrorMessage__Yf_wP",inputErrorMessage:"singlechoiceInput_inputErrorMessage__SFmM_",fieldDescription:"singlechoiceInput_fieldDescription__71ty5",selectedValue:"singlechoiceInput_selectedValue__X5K92",focused:"singlechoiceInput_focused___LJgc",placeholder:"singlechoiceInput_placeholder__A0wHa",invalid:"singlechoiceInput_invalid__gZSVl",arrow:"singlechoiceInput_arrow__ITMup",arrowOpen:"singlechoiceInput_arrowOpen__0kRlw",menu:"singlechoiceInput_menu__QKRPv","drawer-animation":"singlechoiceInput_drawer-animation__Eu_28","hide-scroll-while-opening":"singlechoiceInput_hide-scroll-while-opening__kpw84",option:"singlechoiceInput_option__1w00D",optionFocused:"singlechoiceInput_optionFocused__cpJ_u",optionSelected:"singlechoiceInput_optionSelected__eOetU",checkboxContainer:"singlechoiceInput_checkboxContainer__Fkjz8",checkbox:"singlechoiceInput_checkbox__w_MKg",checkboxInvalid:"singlechoiceInput_checkboxInvalid__MVuHR",checkboxLabel:"singlechoiceInput_checkboxLabel__zaUlZ"}},95412:e=>{e.exports={articleTitle:"articleTitle_articleTitle___gnaE"}},96354:e=>{e.exports={blueLinks:"richText_blueLinks__WUwQ_",playButton:"richText_playButton__9S0c2",playButtonText:"richText_playButtonText__ZBPe0",videoEmbed:"richText_videoEmbed__OCvOr",policyImage:"richText_policyImage__Kwirr",articleImage:"richText_articleImage__CThoU",content:"richText_content__kO8yb",tableContainer:"richText_tableContainer__UdCiL",topBorder:"richText_topBorder__v8HMz"}}},e=>{e.O(0,[2664,1469,636,2226,6593,8792],()=>e(e.s=60676)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.