1/*! For license information please see component---src-pages-interview-builder-index-tsx-53faaafb03883e2140b2.js.LICENSE.txt */ 2(self.webpackChunkhs_marketing=self.webpackChunkhs_marketing||[]).push([[813],{3330:function(e,t,n){"use strict";n.r(t),n.d(t,{Head:function(){return H},default:function(){return Z}});var r=n(6540),o=n(3790),i=n.n(o),a=n(4501),s=n(9416),c=n(1604),u=n(7834),l=n(1048),d=n(4506),f=n(4175),v=n(9407);const m=e=>({type:v.kl.LOAD_STATE,state:e}),g=(e,t)=>({type:v.kl.ADD_QUESTION_TO_INTERVIEW,questionId:e,index:t}),h=e=>({type:v.kl.REMOVE_QUESTION_FROM_INTERVIEW,questionId:e}),p=e=>({type:v.kl.TOGGLE_EDITING_QUESTION,questionId:e}),E=e=>({type:v.kl.REVERT_QUESTION_EDITED_TEXT,questionId:e}),b=e=>({type:v.kl.UPDATE_DROP_ZONE_INDEX,dropZoneIndex:e});var y=n(961),w=n(3663),I=n(575),_=n(4792);var S=e=>{let{className:t,iconType:n,id:o,isMobile:i,onClick:a,onMouseDown:s,tooltipText:c,tooltipOnRight:u}=e;return r.createElement("button",{className:"QuestionCardActionButton "+(t||""),onClick:a,onMouseDown:s,onTouchStart:s,"data-tooltip-id":"Tooltip--"+o},r.createElement(_.A,{size:"16px",type:n}),c&&r.createElement(w.m_,{delayShow:500,id:"Tooltip--"+o,style:{maxWidth:"300px"}},c))};var D=e=>{let{onChange:t,onFinishedEditing:n,textCurrent:o}=e;const i=(0,r.useRef)(null);(0,r.useEffect)(()=>{i.current&&i.current!==document.activeElement&&(i.current.setSelectionRange(i.current.value.length,i.current.value.length),i.current.focus())},[]),(0,r.useEffect)(()=>{const e=e=>{i.current&&i.current!==e.target&&!e.target.closest(".save-button")&&n(o)};return window.addEventListener("mousedown",e),window.addEventListener("touchstart",e),()=>{window.removeEventListener("mousedown",e),window.removeEventListener("touchstart",e)}},[o]),(0,r.useEffect)(()=>{i.current&&(i.current.style.height="auto",i.current.scrollHeight>=i.current.clientHeight&&(i.current.style.height=i.current.scrollHeight+"px"))},[o]);return r.createElement("textarea",{className:"QuestionCardInput",maxLength:240,onChange:e=>{t(e.target.value||"")},onKeyDown:e=>{["Enter","Escape"].includes(e.key)&&(e.preventDefault(),n(o))},ref:i,value:o})};const T="hs--interviewBuilder--hasShownAddedToInterviewHelper";var N=e=>{let{index:t,isCollapsed:n,isDragging:o,isEditing:i,isInInterview:s,isMobile:c,isPlaceholder:u,onClickAdd:l,onClickEdit:d,onClickPermanentlyDelete:f,onClickRemove:m,onClickReset:g,onFinishedEditing:h,onStartDragging:p,showEditPrompt:E,textDefault:b,textEdited:y,variant:_}=e;const N=(0,r.useRef)(null),C=_===v.$b.LIBRARY,{0:R,1:O}=(0,r.useState)(!1),{0:k,1:q}=(0,r.useState)(0),{0:A,1:x}=(0,r.useState)(y||b),{0:L,1:j}=(0,r.useState)(!1);(0,r.useEffect)(()=>{x(y||b),b||y||!d||d()},[b,y]);return r.createElement("div",{"data-index":t,"data-tooltip-id":"Tooltip--card-"+t,className:["QuestionCard",R?"is-removing":"",i?"is-editing":"",o?"is-dragging":"",u?"is-placeholder":"",c&&E?"show-edit-prompt":""].filter(e=>e).join(" "),ref:N},!n&&c&&E&&r.createElement(w.m_,{id:"Tooltip--card-"+t,isOpen:!0},r.createElement("p",null,(0,a.CN)()?"Press and hold to edit a question":"Double-click to edit a question")),!n&&c&&L&&r.createElement(w.m_,{id:"Tooltip--card-"+t,isOpen:!0},r.createElement("p",null,"Selected questions are added to Your Interview below")),r.createElement("div",{className:"QuestionCardActions actions-left"},!(c&&C)&&r.createElement(S,{className:"drag-handle",iconType:I.k.move,id:"drag-handle",isMobile:!!c,tooltipText:C?"Drag this Question to the Interview column":"Drag this Question to change its position in the list",tooltipOnRight:C,onMouseDown:c&&C||o?void 0:()=>{if(N.current&&p){const e=N.current.getBoundingClientRect();p(e)}}}),c&&C&&r.createElement(S,{className:"mobile-checkbox "+(s?"is-in-interview":""),iconType:I.k.checkmark,id:"mobile-checkbox",isMobile:!!c,onClick:s?m:()=>{localStorage.getItem(T)||(j(!0),setTimeout(()=>{j(!1),localStorage.setItem(T,"true")},4e3)),l&&l()},tooltipText:s?"Remove from Interview":"Add to Interview",tooltipOnRight:!0})),(!i||i&&C)&&r.createElement("span",{className:"QuestionCardContent",onDoubleClick:C||o?void 0:e=>{d&&d()},onContextMenu:C||o?void 0:e=>{k>0&&e.preventDefault()},onTouchStart:C||o?void 0:e=>{e.target.className.includes("QuestionCardContent")&&q(e.timeStamp)},onTouchEnd:C||o?void 0:e=>{d&&e.cancelable&&e.target.className.includes("QuestionCardContent")&&!o&&k&&e.timeStamp-k>=300&&e.timeStamp-k<=3e3&&(e.preventDefault(),d()),window.navigator.vibrate&&window.navigator.vibrate(20),q(0)}},y||b),!C&&i&&h&&r.createElement(D,{textCurrent:A,text:y||b,onChange:e=>x(e),onFinishedEditing:h}),r.createElement("div",{className:"QuestionCardActions actions-right"},!o&&!C&&r.createElement(r.Fragment,null,r.createElement(S,{iconType:I.k.close,id:"close",isMobile:c,onClick:()=>{O(!0),m&&setTimeout(m,300)},tooltipText:"Removed questions can be found again in the Question Library"}),!!b&&!!y&&r.createElement(S,{iconType:I.k.refresh,id:"refresh",isMobile:c,onClick:g,tooltipText:"Reset Question to Original"}),!i&&r.createElement(S,{iconType:I.k.pencil,id:"edit",isMobile:c,onClick:d,tooltipText:"Edit Question"}),i&&r.createElement(S,{className:"save-button",iconType:I.k.checkmark,id:"save",isMobile:c,onClick:()=>h&&h(A),tooltipText:"Save Updated Text"})),!o&&C&&r.createElement(r.Fragment,null,!b&&!!y&&r.createElement(S,{iconType:I.k.close,id:"mobile-close",isMobile:c,onClick:()=>{O(!0),f&&setTimeout(f,300)},tooltipText:"Custom questions will be deleted permanently"}),!!b&&!!y&&r.createElement(S,{iconType:I.k.refresh,id:"reset",isMobile:c,onClick:g,tooltipText:"Reset Question to Original"}))))};
2var C=e=>{let{draggingCardClientRect:t,dragXY:n,isMobile:o,isDraggingQuestionId:i,questions:a}=e;if(!t||!i)return null;const{0:s,1:c}=(0,r.useState)(null);return(0,r.useEffect)(()=>{const e=document.createElement("div");return c(e),document.body.append(e),document.body.style.overflow="hidden",()=>{document.body.removeChild(e),c(null),document.body.style.overflow="auto"}},[]),s?y.createPortal(r.createElement("div",{className:"DragContainer",style:{left:(null==t?void 0:t.x)+window.scrollX||0,top:(null==t?void 0:t.y)+window.scrollY||0,width:t.width,height:t.height,transform:"translate3d("+n[0]+"px, "+n[1]+"px, 0)"}},r.createElement(N,Object.assign({index:0,isDragging:!0,isMobile:o,variant:v.$b.INTERVIEW},a[i]))),s):null},R=n(2532),O=n(4794),k=n(630);var q=e=>{let{onSubmitted:t}=e;const{hubspotForm:n}=(0,O.useStaticQuery)("424326583");return r.createElement("div",{className:"InterviewBuilderForm"},r.createElement(k.A,Object.assign({},n,{onSubmit:t})))};const A="hs--interviewBuilder--hasCapturedEmail";var x=e=>{let{onClickExport:t,onClose:n,selectedQuestions:o}=e;const{0:i,1:c}=(0,r.useState)(!!window.localStorage.getItem(A)),{0:l,1:d}=(0,r.useState)(!1),{0:f,1:m}=(0,r.useState)(!1),{0:g,1:h}=(0,r.useState)(null),p=(0,r.useCallback)(()=>{f||(document.body.style.overflow="auto",m(!0),setTimeout(function(){n&&n()},350))},[f,n]);(0,r.useEffect)(()=>{if(!(0,a.Bk)())return;const e=e=>{27===e.which&&p()},t=document.createElement("div");return h(t),document.body.append(t),document.body.style.overflow="hidden",window.addEventListener("keyup",e),setTimeout(()=>{const e=t.getElementsByTagName("input");if(e.length)e[0].focus();else{const e=t.getElementsByClassName("Button");e&&e.length&&e[0].focus()}},500),()=>{document.body.removeChild(t),document.body.style.overflow="auto",window.removeEventListener("keyup",e),h(null)}},[p]);return(0,r.useEffect)(()=>{if(!l)return;const e=setTimeout(()=>{d(!1)},3e3);return()=>{e&&clearTimeout(e)}},[l]),g?y.createPortal(r.createElement("div",{className:"ExportModal "+(f?"is-closing":"")},r.createElement("button",{className:"ExportModalOverlay",onClick:p}),r.createElement("div",{className:"ExportModalContent"},r.createElement("button",{className:"close-button",onClick:p,title:"Close Modal"},r.createElement(_.A,{type:I.k.close})),r.createElement(R.G,{alt:"Icon: Interview questions on a page of paper",className:"icon",image:(0,a.MT)("/images/pages/interview-builder/InterviewBuilder--ExportModal--illo.png",100,1)}),i?r.createElement(r.Fragment,null,r.createElement("h4",null,"Access your interview questions"),r.createElement("div",{className:"actions"},r.createElement(u.Ay,{onClick:()=>{t(),(0,s.q)(v.Hq.SELECT_EXPORT_PDF,null)},size:u.GO.L},"Export PDF"),r.createElement(u.Ay,{onClick:()=>{l||(navigator.clipboard.writeText(o.map(e=>{let{textDefault:t,textEdited:n}=e;return n||t}).join("\n\n")),d(!0)),(0,s.q)(v.Hq.SELECT_COPY_TO_CLIPBOARD,null)},size:u.GO.L,variant:u.Ck.SECONDARY},l?"Copied!":"Copy to Clipboard"))):r.createElement(r.Fragment,null,r.createElement("h4",null,"Enter your email to access your interview questions"),r.createElement("div",{className:"form-wrapper"},r.createElement(q,{onSubmitted:()=>{window.localStorage.setItem(A,"true"),c(!0)}}))))),g):null};n(6910);var L=e=>{let{index:t}=e;return r.createElement("div",{className:"DropZone"})},j=function(e){return e.FOCUSED="FOCUSED",e.SUBMITTED="SUBMITTED",e.BLURRED="BLURRED",e}(j||{});const B={[j.FOCUSED]:{className:"is-focused",icon:"pencil"},[j.SUBMITTED]:{className:"is-submitted",icon:"checkmark"},[j.BLURRED]:{className:"is-blurred",icon:"pencil"}},M="Add a job title";var F=e=>{let{value:t,dispatch:n}=e;const{0:o,1:i}=(0,r.useState)(t||""),{0:a,1:s}=(0,r.useState)(t?j.BLURRED:j.FOCUSED),c=(0,r.useRef)(null),u=(0,r.useRef)(null);(0,r.useEffect)(()=>{i(t)},[t]),(0,r.useEffect)(()=>{a===j.BLURRED&&c.current&&c.current.blur(),a===j.FOCUSED&&c.current&&setTimeout(()=>{c.current&&c.current.setSelectionRange(9999,9999)},0)},[a]);const l=e=>{var t;(null==e?void 0:e.length)>0&&(s(j.SUBMITTED),n((t=e,{type:v.kl.UPDATE_JOB_TITLE_FIELD,jobTitle:t})),setTimeout(()=>s(j.BLURRED),250))};return r.createElement("div",{className:"JobTitleField "+B[a].className+" "+(o?"":"is-placeholder"),ref:u},B[a].icon&&r.createElement("button",{onClick:()=>{o&&a!==j.BLURRED?a===j.FOCUSED&&c.current&&c.current.blur():c.current&&c.current.focus()}},r.createElement(_.A,{size:"20px",type:I.k[B[a].icon||I.k.close]})),r.createElement("div",{className:"field-wrapper"},r.createElement("input",{className:"type--text-medium-M margin-bottom--0",maxLength:50,ref:c,type:"text",onFocus:()=>s(j.FOCUSED),onBlur:e=>l(e.target.value),onChange:e=>i(e.target.value),onKeyUp:e=>{"Enter"===e.key&&l(o)},value:o,placeholder:M}),r.createElement("span",{className:"type--text-medium-M margin-bottom--0"},o||M)))};var U=e=>{let{onAddNewQuestion:t,onClickExport:n,onResetState:o}=e;const{0:i,1:a}=(0,r.useState)(!1);return r.createElement(r.Fragment,null,r.createElement("div",{className:"QuestionListActionButtonsRow"},r.createElement(u.Ay,{onClick:()=>{a(!0),(0,s.q)(v.Hq.SELECT_RESET_INTERVIEW,null)},size:u.GO.S,variant:u.Ck.SECONDARY},"Reset"),r.createElement(u.Ay,{onClick:()=>{t(),(0,s.q)(v.Hq.ADD_QUESTION_TO_YOUR_INTERVIEW,null)},size:u.GO.S,variant:u.Ck.SECONDARY},"Add a Question"),r.createElement(u.Ay,{onClick:n,size:u.GO.S},"Export")),i&&r.createElement(c.A,{hideCloseButton:!0,onClose:()=>a(!1)},e=>r.createElement("div",{className:"QuestionListActionButtonsModal"},r.createElement("p",null,"Any changes you have made will be lost.",r.createElement("br",null),"Are you sure you want to reset this interview?"),r.createElement("div",null,r.createElement(u.Ay,{onClick:()=>{e(),a(!1)},variant:u.Ck.SECONDARY},"No, cancel"),r.createElement(u.Ay,{onClick:()=>{o(),e(),a(!1),(0,s.q)(v.Hq.CONFIRM_RESET_INTERVIEW,null)},variant:u.Ck.WARNING},"Yes, reset the interview")))))};const P="hs--interviewBuilder--hasShownEditPrompt";var Q=e=>{let{dispatch:t,isCollapsed:n,isMobile:o,onAddNewQuestion:i,onClickExport:c,onResetState:u,onToggleCollapsed:l,state:f,variant:m}=e;const b=m===v.$b.LIBRARY,{0:y,1:w}=(0,r.useState)(!1),{0:S,1:D}=(0,r.useState)(!1),{0:T,1:C}=(0,r.useState)(null),{0:O,1:k}=(0,r.useState)(!1),{0:q,1:A}=(0,r.useState)(null),{0:x,1:j}=(0,r.useState)(0),B=(0,r.useRef)(null),M=(0,r.useMemo)(()=>"number"==typeof f.isDraggingData.dropZoneIndex,[f.isDraggingData.dropZoneIndex]),Q=!!f.isDraggingData.questionId;let z;(0,r.useEffect)(()=>{const e=(0,a.nF)(()=>{A(window.innerHeight)},1e3);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,r.useEffect)(()=>
2{if(!b&&!o&&B.current){if(B.current.clientHeight<=B.current.scrollHeight){const e=(0,d.A)(B.current.querySelectorAll(".QuestionCard")).pop();if(!e)return;return void j(B.current.getBoundingClientRect().bottom-(null==e?void 0:e.getBoundingClientRect().bottom)-10)}j(0)}},[f.interview.questions.length,b,o]),(0,r.useEffect)(()=>{const e=!!window.localStorage.getItem(P);if(b||e||n)return;const t=o&&!n;t?setTimeout(()=>{k(!0)},400):k(!0),setTimeout(()=>{k(!1),window.localStorage.setItem(P,"true")},t?5400:5e3)},[n,o]);const Y=(0,r.useMemo)(()=>{const e=b?o?Object.keys(f.questions).filter(e=>!(T&&f.questions[e].category!==T)).map(e=>f.questions[e]):Object.keys(f.questions).filter(e=>!(T&&f.questions[e].category!==T||f.interview.questions.includes(e))).sort((e,t)=>{if(!T){var n,r;const o=(null===(n=f.questions[e])||void 0===n?void 0:n.category)||"ZZZZ",i=(null===(r=f.questions[t])||void 0===r?void 0:r.category)||"ZZZZ";if(o>i)return 1;if(o<i)return-1}return 0}).map(e=>f.questions[e]):f.interview.questions.map(e=>f.questions[e]);return T&&0===e.length&&C(null),e},[o,f.interview.questions,f.questions,T]),G=(0,r.useMemo)(()=>(0,d.A)(new Set(Object.keys(f.questions).filter(e=>o||!f.interview.questions.includes(e)).map(e=>f.questions[e].category))).sort(),[o,f.interview.questions,f.questions]),W=e=>{D(e.target.scrollTop>0)},H=(0,r.useMemo)(()=>(0,a.nF)(W,400),[]),Z=(e,n)=>{t(p(e.id)),n!==e.textDefault?t(((e,t)=>({type:v.kl.UPDATE_QUESTION_EDITED_TEXT,questionId:e,text:t}))(e.id,n)):t(E(e.id))},V=(0,r.useMemo)(()=>(0,a.nF)(Z,100),[]);return r.createElement("section",{className:["QuestionList","is-"+m,n?"is-collapsed":"",Q?"is-dragging-question":"",y?"is-filter-drawer-open":"",S?"is-scrolled":"",T?"is-filtered":""].filter(e=>e).join(" "),style:{"--window-height":q?q+"px":void 0}},r.createElement("header",{className:"QuestionListHeader"},r.createElement("h3",{className:"font-size--L"},b?"Question Library":"Your Interview"),r.createElement("div",{className:"QuestionListActions"},b&&r.createElement("button",{className:"filter-toggle-button",onClick:()=>{w(e=>(!e&&n&&l(),!e))}},r.createElement(_.A,{size:"24px",type:y?I.k.close:I.k.filter})),o&&r.createElement("button",{className:"collapse-button",onClick:()=>{n||w(!1),l()}},r.createElement(_.A,{type:I.k["chevron-left"],size:"16px"})),!o&&!b&&r.createElement(U,{onAddNewQuestion:i,onResetState:u,onClickExport:c})),b&&r.createElement("div",{className:"QuestionListFilterDrawer"},r.createElement("p",null,"Category"),r.createElement("div",null,G.filter(e=>(null==e?void 0:e.length)&&(null==e?void 0:e.length)>1).map(e=>r.createElement("button",{className:T===e?"is-current":"",key:e,onClick:()=>{C(t=>t===e?null:e),(0,s.q)(v.Hq.FILTER_QUESTION_LIBRARY,{category:e})}},e))))),!o&&b&&Q&&f.isDraggingData.questionOrigin!==v.$b.LIBRARY&&r.createElement("div",{className:"QuestionListLibraryDragHelper",id:"remove-drop-zone"},r.createElement("div",null,r.createElement("p",null,"Drop the question here to return it to the Library."))),!o&&!b&&0===f.interview.questions.length&&r.createElement("div",{className:"QuestionListLibraryDragHelper "+(Q&&f.isDraggingData.questionOrigin===v.$b.LIBRARY?"is-dragging":""),id:"add-drop-zone"},r.createElement("div",null,r.createElement(R.G,{alt:"Illustration of questions in a list",image:(0,a.MT)("/images/pages/interview-builder/InterviewBuilder--DragHelper--Interview-illo.png",120,1.16)}),r.createElement("p",null,"Drag questions from the left column and drop them here to build your interview.",r.createElement("br",null),r.createElement("br",null),"Sort, edit, remove or add questions at any time."))),r.createElement("div",{className:"QuestionListScrollWrapper "+(n?"is-collapsed":"")+" "+(b?"is-library":"is-interview")},r.createElement("div",{className:"QuestionListScroller",onScroll:o?void 0:H,ref:B},!b&&r.createElement(F,{dispatch:t,value:f.interview.jobTitle}),Y.map((e,i)=>{const a=!o&&b&&z!==e.category;a&&(z=e.category);const s=O&&(Y.length>=2&&1===i||1===Y.length&&0===i);return r.createElement(r.Fragment,{key:e.id},a&&r.createElement("p",{className:"category-heading"},r.createElement("span",null,e.category),r.createElement("span",{className:"category-line"})),!b&&M&&f.isDraggingData.dropZoneIndex===i&&r.createElement(L,{index:i}),r.createElement(N,Object.assign({index:i,isCollapsed:n,isInInterview:f.interview.questions.includes(e.id),isEditing:f.isEditingQuestionId===e.id,isMobile:o,isPlaceholder:f.isDraggingData.questionId===e.id,onClickAdd:()=>t(g(e.id,0)),onClickEdit:()=>t(p(e.id)),onClickPermanentlyDelete:()=>{return t((n=e.id,{type:v.kl.PERMANENTLY_DELETE_QUESTION,questionId:n}));var n},onClickRemove:()=>t(h(e.id)),onClickReset:()=>t(E(e.id)),onFinishedEditing:t=>V(e,t),onStartDragging:n=>{return t((r=e.id,o=i,a=m,s=n,{type:v.kl.START_DRAGGING_QUESTION,cardClientRect:s,questionId:r,questionIndex:o,questionOrigin:a}));var r,o,a,s},showEditPrompt:s,variant:m},e)),!b&&M&&i+1===Y.length&&f.isDraggingData.dropZoneIndex===i+1&&r.createElement(L,{index:i+1}))}),!b&&r.createElement("div",{className:"InvisibleDropZone","data-last-index":Y.length-1,style:{height:x}}))),o&&!b&&r.createElement(U,{onAddNewQuestion:()=>{B.current&&B.current.scrollTo({top:0,behavior:"smooth"}),i()},onResetState:u,onClickExport:c}))};var z=e=>{let{statePreset:t,state:n,dispatch:o}=e;const c=(0,r.useRef)(null),{0:u,1:l}=(0,r.useState)(!1),{0:m,1:p}=(0,r.useState)(n.interview.questions.length>0?v.$b.LIBRARY:v.$b.INTERVIEW),{0:E,1:y}=(0,r.useState)(null),{0:w,1:I}=(0,r.useState)([0,0]),{0:_,1:S}=(0,r.useState)(!1);(0,r.useEffect)(()=>
2{if((0,a.CN)())return;const e=(0,a.nF)(e=>{const t=document.querySelector(".Tabs");if(!t)return;const n=t.getBoundingClientRect();n.top<=0&&(window.scrollTo(0,window.scrollY+n.top),document.body.style.overflow="hidden")},100),t=(0,a.nF)(e=>{"hidden"===document.body.style.overflow&&e.deltaY<=-30&&(document.body.style.overflow="auto")},100),n=(0,a.nF)(e=>{"hidden"===document.body.style.overflow&&(document.body.style.overflow="auto")},100);return window.addEventListener("scroll",e),window.addEventListener("wheel",t),window.addEventListener("resize",n),()=>{window.removeEventListener("scroll",e),window.removeEventListener("wheel",t),window.removeEventListener("resize",n),document.body.style.overflow="auto"}},[]),(0,r.useEffect)(()=>{const e=JSON.stringify(Object.assign({},n,{isDraggingData:{cardClientRect:void 0,dropZoneIndex:void 0,questionId:void 0,questionIndex:void 0,questionOrigin:void 0},isEditingQuestionId:void 0}));e!==JSON.stringify(v.xj[t])&&(history.replaceState({},"","/interview-builder/"),i().setItem(v.pZ,e))},[n]);const D=()=>{o((e=>({type:v.kl.RESET_STATE,statePreset:e}))(t)),i().setItem(v.pZ,JSON.stringify(v.xj[t]))};return(0,r.useEffect)(()=>{const e=(0,a.sg)(()=>
2{l(window.innerWidth<f.LO.M)},250);return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,r.useEffect)(()=>{if(!c.current)return;const e=(0,a.nF)((e,t,n)=>{const r=n===v.$b.LIBRARY,i=(0,d.A)(document.elementsFromPoint(e[0],e[1])),a=i.find(e=>"string"==typeof e.className&&(0,d.A)(e.classList).includes("QuestionCard"));if(!a){if(i.find(e=>"string"==typeof e.className&&e.className.includes("is-LIBRARY")))return void o(b());const e=i.find(e=>"string"==typeof e.className&&(0,d.A)(e.classList).includes("InvisibleDropZone"));if(e){const t=Number(e.dataset.lastIndex);return void o(b(t+1))}return}const s=Number(a.dataset.index);if(!r&&s===t)return void o(b());const c=a.getBoundingClientRect();return c.y<=e[1]&&e[1]<=c.y+c.height/2?r||s-1!==t?void o(b(s)):void o(b()):e[1]>c.y+c.height/2&&e[1]<=c.y+c.height?r||s+1!==t?void o(b(s+1)):void o(b()):void 0},50,{trailing:!1}),t=t=>{let r=[0,0],o=[0,0];if(!(n.isDraggingData.questionId&&"number"==typeof n.isDraggingData.questionIndex&&n.isDraggingData.questionOrigin&&n.isDraggingData.cardClientRect&&e))return;t.preventDefault(),window.TouchEvent&&t instanceof window.TouchEvent&&(r=[t.touches[0].pageX,t.touches[0].pageY],o=[t.touches[0].clientX,t.touches[0].clientY]),window.MouseEvent&&t instanceof window.MouseEvent&&(r=[t.pageX,t.pageY],o=[t.clientX,t.clientY]);const i=(0,d.A)(r);E?(I([-(E[0]-i[0]),-(E[1]-i[1])]),e(o,n.isDraggingData.questionIndex,n.isDraggingData.questionOrigin)):y(i)},r=e=>{if(!n.isDraggingData.questionId||"number"!=typeof n.isDraggingData.questionIndex||!n.isDraggingData.questionOrigin||!n.isDraggingData.cardClientRect)return;let t=[0,0];window.TouchEvent&&e instanceof window.TouchEvent&&(t=[e.changedTouches[0].clientX,e.changedTouches[0].clientY]),window.MouseEvent&&e instanceof window.MouseEvent&&(t=[e.clientX,e.clientY]),y(null),I([0,0]);const r=(0,d.A)(document.elementsFromPoint(t[0],t[1]));r.filter(e=>"remove-drop-zone"===e.id).length>0&&o(h(n.isDraggingData.questionId));var i;r.filter(e=>"add-drop-zone"===e.id).length>0&&o(g(n.isDraggingData.questionId,0)),o((i=n.isDraggingData.questionId,{type:v.kl.STOP_DRAGGING_QUESTION,questionId:i})),n.isDraggingData.questionOrigin===v.$b.LIBRARY?(0,s.q)(v.Hq.DRAGGED_QUESTION_TO_YOUR_INTERVIEW,null):(0,s.q)(v.Hq.DRAGGED_QUESTION_TO_LIBRARY,null)};return c.current.addEventListener("mousemove",t),c.current.addEventListener("touchmove",t,{passive:!1}),c.current.addEventListener("mouseup",r),c.current.addEventListener("touchend",r),()=>{var e,n,o,i;null===(e=c.current)||void 0===e||e.removeEventListener("mousemove",t),null===(n=c.current)||void 0===n||n.removeEventListener("touchmove",t),null===(o=c.current)||void 0===o||o.removeEventListener("mouseup",r),null===(i=c.current)||void 0===i||i.removeEventListener("touchend",r)}},[c.current,E,n.isDraggingData]),r.createElement("div",{className:"InterviewBuilderAppGrid",ref:c},Object.values(v.$b).map(e=>r.createElement(Q,{key:e,dispatch:o,isCollapsed:m===e,isMobile:u,onAddNewQuestion:()=>o({type:v.kl.ADD_NEW_QUESTION}),onClickExport:()=>{S(!0),(0,s.q)(v.Hq.CLICK_EXPORT_INTERVIEW,null)},onResetState:D,onToggleCollapsed:()=>p(t=>t===e?e===v.$b.INTERVIEW?v.$b.LIBRARY:v.$b.INTERVIEW:e),state:n,variant:e})),n.isDraggingData.questionId&&n.isDraggingData.cardClientRect&&r.createElement(C,{draggingCardClientRect:n.isDraggingData.cardClientRect,dragXY:w,isMobile:u,isDraggingQuestionId:n.isDraggingData.questionId,questions:n.questions}),(0,a.Bk)()&&_&&r.createElement(x,{onClose:()=>S(!1),onClickExport:()=>o({type:v.kl.EXPORT_TO_PDF}),selectedQuestions:n.interview.questions.map(e=>n.questions[e])}))};function Y(e,t){let n,r;switch(t.type){case v.kl.LOAD_STATE:return t.state?t.state:e;case v.kl.RESET_STATE:return t.statePreset?v.xj[t.statePreset]:e;case v.kl.ADD_NEW_QUESTION:const o=""+Date.now();return Object.assign({},e,{questions:Object.assign({},e.questions,{[o]:{id:o,category:"Custom",textDefault:""}}),interview:Object.assign({},e.interview,{questions:[o].concat((0,d.A)(e.interview.questions))}),isEditingQuestionId:o});case v.kl.ADD_QUESTION_TO_INTERVIEW:return"number"==typeof t.index&&t.questionId?(n=(0,d.A)(e.interview.questions),n.splice(t.index,0,t.questionId),Object.assign({},e,{interview:Object.assign({},e.interview,{questions:n})})):e;case v.kl.MOVE_QUESTION_IN_INTERVIEW:return"number"==typeof t.index&&t.questionId?(n=(0,d.A)(e.interview.questions.filter(e=>e!==t.questionId)),n.splice(t.index,0,t.questionId),Object.assign({},e,{interview:Object.assign({},e.interview,{questions:n})})):e;case v.kl.PERMANENTLY_DELETE_QUESTION:return t.questionId?(n=Object.assign({},e.questions),delete n[t.questionId],Object.assign({},e,{questions:n,interview:Object.assign({},e.interview,{questions:e.interview.questions.filter(e=>e!==t.questionId)})})):e;case v.kl.REMOVE_QUESTION_FROM_INTERVIEW:return t.questionId?(n=Object.assign({},e.questions),e.questions[t.questionId].textDefault||e.questions[t.questionId].textEdited||delete n[t.questionId],Object.assign({},e,{questions:n,interview:Object.assign({},e.interview,{questions:e.interview.questions.filter(e=>e!==t.questionId)})})):e;case v.kl.TOGGLE_EDITING_QUESTION:return t.questionId?Object.assign({},e,{isEditingQuestionId:e.isEditingQuestionId===t.questionId?void 0:t.questionId}):e;case v.kl.UPDATE_QUESTION_EDITED_TEXT:return t.questionId?Object.assign({},e,{questions:Object.assign({},e.questions,{[t.questionId]:Object.assign({},e.questions[t.questionId],{textEdited:t.text})})}):e;case v.kl.REVERT_QUESTION_EDITED_TEXT:return t.questionId?Object.assign({},e,{questions:Object.assign({},e.questions,{[t.questionId]:Object.assign({},e.questions[t.questionId],{textEdited:void 0})})}):e;case v.kl.START_DRAGGING_QUESTION:return t.questionId?Object.assign({},e,{isDraggingData:{cardClientRect:t.cardClientRect,questionId:t.questionId,questionIndex:t.questionIndex,questionOrigin:t.questionOrigin}}):e;case v.kl.UPDATE_DROP_ZONE_INDEX:return Object.assign({},e,{isDraggingData:Object.assign({},e.isDraggingData,{dropZoneIndex:t.dropZoneIndex})});case v.kl.STOP_DRAGGING_QUESTION:return"number"==typeof e.isDraggingData.dropZoneIndex&&t.questionId&&(r=e.interview.questions.indexOf(t.questionId),n=(0,d.A)(e.interview.questions).filter(e=>e!==t.questionId),n.splice(r>=0&&r<e.isDraggingData.dropZoneIndex?e.isDraggingData.dropZoneIndex-1:e.isDraggingData.dropZoneIndex,0,t.questionId)),Object.assign({},e,{interview:Object.assign({},e.interview,{questions:n||e.interview.questions}),isDraggingData:{cardClientRect:void 0,dropZoneIndex:void 0,questionId:void 0,questionIndex:void 0,questionOrigin:void 0}});case v.kl.UPDATE_JOB_TITLE_FIELD:return t.jobTitle?Object.assign({},e,{interview:Object.assign({},e.interview,{jobTitle:t.jobTitle})}):e;case v.kl.EXPORT_TO_PDF:return(0,s.N)(e),e;default:return e}}var G=n(9360);var W=e=>{let{hasStartedInterview:t,onSelectStatePreset:n}=e;return r.createElement("div",{className:"InterviewBuilderStartPanels"},r.createElement("div",null,r.createElement(R.G,{alt:"Custom interview",image:(0,a.MT)("/images/pages/interview-builder/InterviewBuilder--AppStartPagePanels--icon-custom-interview.png",120,280/190)}),t?r.createElement(r.Fragment,null,r.createElement("h3",null,"Continue building",r.createElement("br",null),"your interview"),r.createElement("p",null,"Pick up where you left off with your interviewâadd and sort questions, or export it to a PDF."),r.createElement(u.Ay,{onClick:()=>n(v.fJ.DEFAULT)},"Continue building")):r.createElement(r.Fragment,null,r.createElement("h3",null,"Craft a custom",r.createElement("br",null),"interview from scratch"),r.createElement("p",null,"A blank interview that you can fill with questions that suit your specific role."),r.createElement(u.Ay,{onClick:()=>{n(v.fJ.DEFAULT),(0,s.q)(v.Hq.SELECT_CUSTOM_INTERVIEW,null)}},"Create a new interview"))),r.createElement("div",null,r.createElement(R.G,{alt:"Sample interview",image:(0,a.MT)("/images/pages/interview-builder/InterviewBuilder--AppStartPagePanels--icon-sample-interview.png",120,280/190)}),r.createElement("h3",null,"Get started with a",r.createElement("br",null),"sample interview"),r.createElement("p",null,"Pick a common role, start with our pre-selected questions, and edit from there."),r.createElement("select",{className:"size--M",onChange:e=>n(e.target.value),value:"placeholder"},r.createElement("option",{value:"placeholder",disabled:!0},"Choose a sample interview"),Object.keys(v.fJ).filter(e=>e!==v.fJ.DEFAULT).map(e=>r.createElement("option",{key:"start-panel-dropdown-question-"+e,value:e},v.R4[e])))))};const H=()=>r.createElement(l.A,{description:"View sample job descriptions, select from 60+ targeted questions, and quickly and easily build the most effective interview for your next customer-facing role.",image:"/images/pages/interview-builder/InterviewBuilder--meta.png",permalink:"/interview-builder/",title:"Free Customer Service Interview Builder by Help Scout"});var Z=()=>{const{0:e,1:t}=(0,r.useState)(null),{0:n,1:o}=(0,r.useReducer)(Y,v.xj.DEFAULT),{0:l,1:d}=(0,r.useState)(null),f=n.interview.questions.length>0;(0,r.useEffect)(()=>
2{if(!(0,a.Bk)())return;const e=window.location.search.match(/preset=(([A-Z]|_)+)&?/);if(e&&Object.keys(v.fJ).includes(e[1]))return t(v.fJ[e[1]]),void o(m(v.xj[e[1]]));(async()=>{const e=await i().getItem(v.pZ);if("string"==typeof e){const t=JSON.parse(e);o(m(t))}})()},[]);const g=e=>{t(e),f&&e===v.fJ.DEFAULT||o(m(v.xj[e])),(0,s.q)(v.Hq.SELECT_PRESET_INTERVIEW,{preset:e})};return r.createElement(r.Fragment,null,r.createElement(G.A,{activeTab:"/interview-builder/",backLink:e?()=>t(null):void 0}),r.createElement("div",{className:"InterviewBuilderPageContent background-color--cobalt-100"},r.createElement("div",{className:"container"},e?r.createElement(z,{dispatch:o,state:n,statePreset:e}):r.createElement(W,{hasStartedInterview:f,onSelectStatePreset:e=>{f&&e!==v.fJ.DEFAULT?d(e):g(e)}}))),l&&r.createElement(c.A,{onClose:()=>d(null)},e=>r.createElement("div",{className:"InterviewBuilderPageModal"},r.createElement("h4",null,"Are you sure?"),r.createElement("p",null,"If you choose to get started with a sample interview any previous progress you made will be lost."),r.createElement("div",null,r.createElement(u.Ay,{onClick:e,variant:u.Ck.SECONDARY},"Oops, nevermind"),r.createElement(u.Ay,{onClick:()=>{g(l),d(null),e()},variant:u.Ck.WARNING},"Continue")))))}},3790:function(e,t,n){e.exports=function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n||e)},u,u.exports,e,t,n,r)}return n[a].exports}for(var i=void 0,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,r){(function(e){"use strict";var n,r,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(l),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),n=function(){s.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)n="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){l(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(l,0)};else{var c=new e.MessageChannel;c.port1.onmessage=l,n=function(){c.port2.postMessage(0)}}var u=[];function l(){var e,t;r=!0;for(var n=u.length;n;){for(t=u,u=[],e=-1;++e<n;)t[e]();n=u.length}r=!1}function d(e){1!==u.push(e)||r||n()}t.exports=d}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){"use strict";var r=e(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],c=["PENDING"];function u(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==o&&v(this,e)}function l(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r(function(){var r;try{r=t(n)}catch(o){return i.reject(e,o)}r===e?i.reject(e,new TypeError("Cannot resolve promise with itself")):i.resolve(e,r)})}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function v(e,t){var n=!1;function r(t){n||(n=!0,i.reject(e,t))}function o(t){n||(n=!0,i.resolve(e,t))}function a(){t(o,r)}
2var s=m(a);"error"===s.status&&r(s.value)}function m(e,t){var n={};try{n.value=e(t),n.status="success"}catch(r){n.status="error",n.value=r}return n}function g(e){return e instanceof this?e:i.resolve(new this(o),e)}function h(e){var t=new this(o);return i.reject(t,e)}function p(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=new Array(n),s=0,c=-1,u=new this(o);++c<n;)l(e[c],c);return u;function l(e,o){function c(e){a[o]=e,++s!==n||r||(r=!0,i.resolve(u,a))}t.resolve(e).then(c,function(e){r||(r=!0,i.reject(u,e))})}}function E(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var a=-1,s=new this(o);++a<n;)c(e[a]);return s;function c(e){t.resolve(e).then(function(e){r||(r=!0,i.resolve(s,e))},function(e){r||(r=!0,i.reject(s,e))})}}t.exports=u,u.prototype.catch=function(e){return this.then(null,e)},u.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var n=new this.constructor(o);return this.state!==c?d(n,this.state===s?e:t,this.outcome):this.queue.push(new l(n,e,t)),n},l.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},l.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},l.prototype.callRejected=function(e){i.reject(this.promise,e)},l.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},i.resolve=function(e,t){var n=m(f,t);if("error"===n.status)return i.reject(e,n.value);var r=n.value;if(r)v(e,r);else{e.state=s,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},u.resolve=g,u.reject=h,u.all=p,u.race=E},{1:1}],3:[function(e,t,r){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==n.g?n.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}var a=i();function s(){try{if(!a||!a.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(n){return!1}}function c(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var u=Promise;function l(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function d(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function f(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function v(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var m="local-forage-detect-blob-support",g=void 0,h={},p=Object.prototype.toString,E="readonly",b="readwrite";function y(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),o=0;o<t;o++)r[o]=e.charCodeAt(o);return n}function w(e){return new u(function(t){var n=e.transaction(m,b),r=c([""]);n.objectStore(m).put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1})}function I(e){return"boolean"==typeof g?u.resolve(g):w(e).then(function(e){return g=e})}function _(e){var t=h[e.name],n={};n.promise=new u(function(e,t){n.resolve=e,n.reject=t}),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then(function(){return n.promise}):t.dbReady=n.promise}function S(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function D(e,t){var n=h[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function T(e,t){return new u(function(n,r){if(h[e.name]=h[e.name]||j(),e.db){if(!t)return n(e.db);_(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var i=a.open.apply(a,o);t&&(i.onupgradeneeded=function(t){var n=i.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(m)}catch(r){if("ConstraintError"!==r.name)throw r;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),i.onerror=function(e){e.preventDefault(),r(i.error)},i.onsuccess=function(){var t=i.result;t.onversionchange=function(e){e.target.close()},n(t),S(e)}})}function N(e){return T(e,!1)}function C(e){return T(e,!0)}function R(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,o=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||n){if
2(n){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function O(e){return new u(function(t,n){var r=new FileReader;r.onerror=n,r.onloadend=function(n){var r=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:r,type:e.type})},r.readAsBinaryString(e)})}function k(e){return c([y(atob(e.data))],{type:e.type})}function q(e){return e&&e.__local_forage_encoded_blob}function A(e){var t=this,n=t._initReady().then(function(){var e=h[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return d(n,e,e),n}function x(e){_(e);for(var t=h[e.name],n=t.forages,r=0;r<n.length;r++){var o=n[r];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}return e.db=null,N(e).then(function(t){return e.db=t,R(e)?C(e):t}).then(function(r){e.db=t.db=r;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=r}).catch(function(t){throw D(e,t),t})}function L(e,t,n,r){void 0===r&&(r=1);try{var o=e.db.transaction(e.storeName,t);n(null,o)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return u.resolve().then(function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),C(e)}).then(function(){return x(e).then(function(){L(e,t,n,r-1)})}).catch(n);n(i)}}function j(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function B(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var o=h[n.name];o||(o=j(),h[n.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=A);var i=[];function a(){return u.resolve()}for(var s=0;s<o.forages.length;s++){var c=o.forages[s];c!==t&&i.push(c._initReady().catch(a))}var l=o.forages.slice(0);return u.all(i).then(function(){return n.db=o.db,N(n)}).then(function(e){return n.db=e,R(n,t._defaultConfig.version)?C(n):e}).then(function(e){n.db=o.db=e,t._dbInfo=n;for(var r=0;r<l.length;r++){var i=l[r];i!==t&&(i._dbInfo.db=n.db,i._dbInfo.version=n.version)}})}function M(e,t){var n=this;e=f(e);var r=new u(function(t,r){n.ready().then(function(){L(n._dbInfo,E,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),q(e)&&(e=k(e)),t(e)},a.onerror=function(){r(a.error)}}catch(s){r(s)}})}).catch(r)});return l(r,t),r}function F(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){L(n._dbInfo,E,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var n=a.result;if(n){var r=n.value;q(r)&&(r=k(r));var o=e(r,n.key,s++);void 0!==o?t(o):n.continue()}else t()},a.onerror=function(){r(a.error)}}catch(c){r(c)}})}).catch(r)});return l(r,t),r}function U(e,t,n){var r=this;e=f(e);var o=new u(function(n,o){var i;r.ready().then(function(){return i=r._dbInfo,"[object Blob]"===p.call(t)?I(i.db).then(function(e){return e?t:O(t)}):t}).then(function(t){L(r._dbInfo,b,function(i,a){if(i)return o(i);try{var s=a.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var c=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),n(t)},a.onabort=a.onerror=function(){var e=c.error?c.error:c.transaction.error;o(e)}}catch(u){o(u)}})}).catch(o)});return l(o,n),o}function P(e,t){var n=this;e=f(e);var r=new u(function(t,r){n.ready().then(function(){L(n._dbInfo,b,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){r(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;r(e)}}catch(s){r(s)}})}).catch(r)});return l(r,t),r}function Q(e){var t=this,n=new u(function(e,n){t.ready().then(function(){L(t._dbInfo,b,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;n(e)}}catch(a){n(a)}})}).catch(n)});return l(n,e),n}function z(e){var t=this,n=new u(function(e,n){t.ready().then(function(){L(t._dbInfo,E,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){n(i.error)}}catch(a){n(a)}})}).catch(n)});return l(n,e),n}function Y(e,t){var n=this,r=new u(function(t,r){e<0?t(null):n.ready().then(function(){L(n._dbInfo,E,function(o,i){if(o)return r(o);try{var a=i.objectStore(n._dbInfo.storeName),s=!1,c=a.openKeyCursor();c.onsuccess=function(){var n=c.result;n?0===e||s?t(n.key):(s=!0,n.advance(e)):t(null)},c.onerror=function(){r(c.error)}}catch(u){r(u)}})}).catch(r)});return l(r,t),r}function G(e){var t=this,n=new u(function(e,n){t.ready().then(function(){L(t._dbInfo,E,function(r,o){if(r)return n(r);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push(t.key),t.continue()):e(a)},i.onerror=function(){n(i.error)}}catch(s){n(s)}})}).catch(n)});return l(n,e),n}function W(e,t){t=v.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;if(e.name){var i=e.name===n.name&&o._dbInfo.db?u.resolve(o._dbInfo.db):N(e).then(function(t){var n=h[e.name],r=n.forages;n.db=t;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=t;return t});r=e.storeName?i.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.ver
vendor: 8,759 bytes, line 2
2sion+1;_(e);var r=h[e.name],o=r.forages;t.close();for(var i=0;i<o.length;i++){var s=o[i];s._dbInfo.db=null,s._dbInfo.version=n}var c=new u(function(t,r){var o=a.open(e.name,n);o.onerror=function(e){o.result.close(),r(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}});return c.then(function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,S(n._dbInfo)}}).catch(function(t){throw(D(e,t)||u.resolve()).catch(function(){}),t})}}):i.then(function(t){_(e);var n=h[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;var i=new u(function(t,n){var r=a.deleteDatabase(e.name);r.onerror=function(){var e=r.result;e&&e.close(),n(r.error)},r.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}});return i.then(function(e){n.db=e;for(var t=0;t<r.length;t++)S(r[t]._dbInfo)}).catch(function(t){throw(D(e,t)||u.resolve()).catch(function(){}),t})})}else r=u.reject("Invalid arguments");return l(r,t),r}var H={_driver:"asyncStorage",_initStorage:B,_support:s(),iterate:F,getItem:M,setItem:U,removeItem:P,clear:Q,length:z,key:Y,keys:G,dropInstance:W};function Z(){return"function"==typeof openDatabase}var V="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",X="~~local_forage_type~",J=/^~~local_forage_type~([^~]+)~/,$="__lfsc__:",K=$.length,ee="arbf",te="blob",ne="si08",re="ui08",oe="uic8",ie="si16",ae="si32",se="ur16",ce="ui32",ue="fl32",le="fl64",de=K+ee.length,fe=Object.prototype.toString;function ve(e){var t,n,r,o,i,a=.75*e.length,s=e.length,c=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var u=new ArrayBuffer(a),l=new Uint8Array(u);for(t=0;t<s;t+=4)n=V.indexOf(e[t]),r=V.indexOf(e[t+1]),o=V.indexOf(e[t+2]),i=V.indexOf(e[t+3]),l[c++]=n<<2|r>>4,l[c++]=(15&r)<<4|o>>2,l[c++]=(3&o)<<6|63&i;return u}function me(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=V[n[t]>>2],r+=V[(3&n[t])<<4|n[t+1]>>4],r+=V[(15&n[t+1])<<2|n[t+2]>>6],r+=V[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}function ge(e,t){var n="";if(e&&(n=fe.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===fe.call(e.buffer))){var r,o=$;e instanceof ArrayBuffer?(r=e,o+=ee):(r=e.buffer,"[object Int8Array]"===n?o+=ne:"[object Uint8Array]"===n?o+=re:"[object Uint8ClampedArray]"===n?o+=oe:"[object Int16Array]"===n?o+=ie:"[object Uint16Array]"===n?o+=se:"[object Int32Array]"===n?o+=ae:"[object Uint32Array]"===n?o+=ce:"[object Float32Array]"===n?o+=ue:"[object Float64Array]"===n?o+=le:t(new Error("Failed to get type for BinaryArray"))),t(o+me(r))}else if("[object Blob]"===n){var i=new FileReader;i.onload=function(){var n=X+e.type+"~"+me(this.result);t($+te+n)},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(a){console.error("Couldn't convert value into a JSON string: ",e),t(null,a)}}function he(e){if(e.substring(0,K)!==$)return JSON.parse(e);var t,n=e.substring(de),r=e.substring(K,de);if(r===te&&J.test(n)){var o=n.match(J);t=o[1],n=n.substring(o[0].length)}var i=ve(n);switch(r){case ee:return i;case te:return c([i],{type:t});case ne:return new Int8Array(i);case re:return new Uint8Array(i);case oe:return new Uint8ClampedArray(i);case ie:return new Int16Array(i);case se:return new Uint16Array(i);case ae:return new Int32Array(i);case ce:return new Uint32Array(i);case ue:return new Float32Array(i);case le:return new Float64Array(i);default:throw new Error("Unkown type: "+r)}}var pe={serialize:ge,deserialize:he,stringToBuffer:ve,bufferToString:me};function Ee(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function be(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var o=new u(function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(o){return r(o)}n.db.transaction(function(o){Ee(o,n,function(){t._dbInfo=n,e()},function(e,t){r(t)})},r)});return n.serializer=pe,o}function ye(e,t,n,r,o,i){e.executeSql(n,r,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?i(e,a):Ee(e,t,function(){e.executeSql(n,r,o,i)},i)},i):i(e,a)},i)}function we(e,t){var n=this;e=f(e);var r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=o.serializer.deserialize(r)),t(r)},function(e,t){r(t)})})}).catch(r)});return l(r,t),r}function Ie(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT * FROM "+o.storeName,[],function(n,r){for(var i=r.rows,a=i.length,s=0;s<a;s++){var c=i.item(s),u=c.value;if(u&&(u=o.serializer.deserialize(u)),void 0!==(u=e(u,c.key,s+1)))return void t(u)}t()},function(e,t){r(t)})})}).catch(r)});return l(r,t),r}function _e(e,t,n,r){var o=this;e=f(e);var i=new u(function(i,a){o.ready().then(function(){void 0===t&&(t=null);var s=t,c=o._dbInfo;c.serializer.serialize(t,function(t,u){u?a(u):c.db.transaction(function(n){ye(n,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){i(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void i(_e.apply(o,[e,s,n,r-1]));a(t)}})})}).catch(a)});return l(i,n),i}function Se(e,t,n){return _e.apply(this,[e,t,n,1])}function De(e,t){var n=this;e=f(e);var r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){r(t)})})}).catch(r)});return l(r,t),r}function Te(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"DELETE FROM "+r.storeName,[],function(){e()},function(e,t){n(t)})})}).catch(n)});return l(n,e),n}function Ne(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],function(t,n){var r=n.rows.item(0).c;e(r)},function(e,t){n(t)})})}).catch(n)});return l(n,e),n}function Ce(e,t){var n=this,r=new u(function(t,r){n.ready().then(function(){var o=n._dbInfo;o.db.transaction(function(n){ye(n,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)},function(e,t){r(t)})})}).catch(r)});return l(r,t),r}function Re(e){var t=this,n=new u(function(e,n){t.ready().then(function(){var r=t._dbInfo;r.db.transaction(function(t){ye(t,r,"SELECT key FROM "+r.storeName,[],function(t,n){for(var r=[],o=0;o<n.rows.length;o++)r.push(n.rows.item(o).key);e(r)},function(e,t){n(t)})})}).catch(n)});return l(n,e),n}function Oe(e){return new u(function(t,n){e.transaction(function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(n,r){for(var o=[],i=0;i<r.rows.length;i++)o.push(r.rows.item(i).name);t({db:e,storeNames:o})},function(e,t){n(t)})},function(e){n(e)})})}function ke(e,t){t=v.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;return l(r=e.name?new u(function(t){var r;r=e.name===n.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(Oe(r))}).then(function(e){return new u(function(t,n){e.db.transaction(function(r){function o(e){return new u(function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){n(t)})})}for(var i=[],a=0,s=e.storeNames.length;a<s;a++)i.push(o(e.storeNames[a]));u.all(i).then(function(){t()}).catch(function(e){n(e)})},function(e){n(e)})})}):u.reject("Invalid arguments"),t),r}var qe={_driver:"webSQLStorage",_initStorage:be,_support:Z(),iterate:Ie,getItem:we,setItem:Se,removeItem:De,clear:Te,length:Ne,key:Ce,keys:Re,dropInstance:ke};function Ae(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}function xe(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function Le(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(t){return!0}}function je(){return!Le()||localStorage.length>0}function Be(e){var t=this,n={};if(e)for(var r in e)n[r]=e[r];return n.keyPrefix=xe(e,t._defaultConfig),je()?(t._dbInfo=n,n.serializer
vendor: 4,703 bytes, line 2
2=pe,u.resolve()):u.reject()}function Me(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}});return l(n,e),n}function Fe(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r});return l(r,t),r}function Ue(e,t){var n=this,r=n.ready().then(function(){for(var t=n._dbInfo,r=t.keyPrefix,o=r.length,i=localStorage.length,a=1,s=0;s<i;s++){var c=localStorage.key(s);if(0===c.indexOf(r)){var u=localStorage.getItem(c);if(u&&(u=t.serializer.deserialize(u)),void 0!==(u=e(u,c.substring(o),a++)))return u}}});return l(r,t),r}function Pe(e,t){var n=this,r=n.ready().then(function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(o){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t});return l(r,t),r}function Qe(e){var t=this,n=t.ready().then(function(){for(var e=t._dbInfo,n=localStorage.length,r=[],o=0;o<n;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&r.push(i.substring(e.keyPrefix.length))}return r});return l(n,e),n}function ze(e){var t=this.keys().then(function(e){return e.length});return l(t,e),t}function Ye(e,t){var n=this;e=f(e);var r=n.ready().then(function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return l(r,t),r}function Ge(e,t,n){var r=this;e=f(e);var o=r.ready().then(function(){void 0===t&&(t=null);var n=t;return new u(function(o,i){var a=r._dbInfo;a.serializer.serialize(t,function(t,r){if(r)i(r);else try{localStorage.setItem(a.keyPrefix+e,t),o(n)}catch(s){"QuotaExceededError"!==s.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==s.name||i(s),i(s)}})})});return l(o,n),o}function We(e,t){if(t=v.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,o=this;return r=e.name?new u(function(t){e.storeName?t(xe(e,o._defaultConfig)):t(e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}}):u.reject("Invalid arguments"),l(r,t),r}var He={_driver:"localStorageWrapper",_initStorage:Be,_support:Ae(),iterate:Ue,getItem:Fe,setItem:Ge,removeItem:Ye,clear:Me,length:ze,key:Pe,keys:Qe,dropInstance:We},Ze=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Ve=function(e,t){for(var n=e.length,r=0;r<n;){if(Ze(e[r],t))return!0;r++}return!1},Xe=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Je={},$e={},Ke={INDEXEDDB:H,WEBSQL:qe,LOCALSTORAGE:He},et=[Ke.INDEXEDDB._driver,Ke.WEBSQL._driver,Ke.LOCALSTORAGE._driver],tt=["dropInstance"],nt=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(tt),rt={description:"",driver:et.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ot(e,t){e[t]=function(){var n=arguments;return e.ready().then(function(){return e[t].apply(e,n)})}}function it(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&(Xe(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var at=function(){function e(t){for(var n in o(this,e),Ke)if(Ke.hasOwnProperty(n)){var r=Ke[n],i=r._driver;this[n]=i,Je[i]||this.defineDriver(r)}this._defaultConfig=it({},rt),this._config=it({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new u(function(t,n){try{var r=e._driver,o=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(o);for(var i=nt.concat("_initStorage"),a=0,s=i.length;a<s;a++){var c=i[a];if((!Ve(tt,c)||e[c])&&"function"!=typeof e[c])return void n(o)}var d=function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=u.reject(t);return l(n,arguments[arguments.length-1]),n}},n=0,r=tt.length;n<r;n++){var o=tt[n];e[o]||(e[o]=t(o))}};d();
2var f=function(n){Je[r]&&console.info("Redefining LocalForage driver: "+r),Je[r]=e,$e[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(f,n):f(!!e._support):f(!0)}catch(v){n(v)}});return d(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=Je[e]?u.resolve(Je[e]):u.reject(new Error("Driver not found."));return d(r,t,n),r},e.prototype.getSerializer=function(e){var t=u.resolve(pe);return d(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return d(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;Xe(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){r._config.driver=r.driver()}function a(e){return r._extend(e),i(),r._ready=r._initStorage(r._config),r._ready}function s(e){return function(){var t=0;function n(){for(;t<e.length;){var o=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(o).then(a).catch(n)}i();var s=new Error("No available storage method found.");return r._driverSet=u.reject(s),r._driverSet}return n()}}var c=null!==this._driverSet?this._driverSet.catch(function(){return u.resolve()}):u.resolve();return this._driverSet=c.then(function(){var e=o[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then(function(e){r._driver=e._driver,i(),r._wrapLibraryMethodsWithReady(),r._initDriver=s(o)})}).catch(function(){i();var e=new Error("No available storage method found.");return r._driverSet=u.reject(e),r._driverSet}),d(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!$e[e]},e.prototype._extend=function(e){it(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var o=e[n];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=nt.length;e<t;e++)ot(this,nt[e])},e.prototype.createInstance=function(t){return new e(t)},e}(),st=new at;t.exports=st},{3:3}]},{},[4])(4)},7834:function(e,t,n){"use strict";n.d(t,{Ay:function(){return c},Ck:function(){return o},GO:function(){return r}});var r,o,i=n(7866),a=n(4848),s=n(1256);!function(e){e.DEFAULT="M",e.S="S",e.M="M",e.L="L"}(r||(r={})),function(e){e.OUTLINE="OUTLINE",e.PRIMARY="PRIMARY",e.SECONDARY="SECONDARY",e.WARNING="WARNING"}(o||(o={}));var c=function(e){var t,n=e.LinkComponent,c=e.ariaLabel,u=e.children,l=e.className,d=e.ctaDestination,f=e.ctaEvent,v=e.ctaId,m=e.ctaLocation,g=e.ctaMetadata,h=e.ctaText,p=e.disabled,E=e.href,b=e.id,y=e.onClick,w=e.size,I=void 0===w?r.DEFAULT:w,_=e.target,S=e.variant,D=void 0===S?o.PRIMARY:S,T=(0,i.Tt)(e,["LinkComponent","ariaLabel","children","className","ctaDestination","ctaEvent","ctaId","ctaLocation","ctaMetadata","ctaText","disabled","href","id","onClick","size","target","variant"]),N=n||function(e){return(0,a.jsx)("a",(0,i.Cl)({},e))},C=(0,s.Vo)(((t={Button:!0,button:!0})["".concat(l||"")]=!!l,t.disabled=!!p,t["button--".concat(I)]=I!==r.M,t["button--".concat(D.toLowerCase())]=D!==o.PRIMARY,t)),R={ctaEvent:f,ctaId:v,ctaText:h,ctaLocation:m,ctaDestination:d,ctaMetadata:g},O=Boolean(v||m)?function(e){e.target instanceof HTMLButtonElement&&"submit"===e.target.type||e.preventDefault();var t=e.currentTarget.getAttribute("href")||E,n="string"==typeof u?u:u.toString();if((0,s.UA)(R,n,t),y&&y(e),t){if("#"===t[0])return void(window.location.hash=t);"_blank"===_?window.open(t,"_blank"):window.location.href=t}}:y;return!E&&y?(0,a.jsx)("button",(0,i.Cl)({"aria-label":c,className:C,disabled:!!p,id:b,onClick:O},T,{children:u})):E?(0,a.jsx)(N,(0,i.Cl)({"aria-label":c,className:C,href:E,id:b,onClick:O,target:_},T,{children:u})):(0,a.jsx)("span",(0,i.Cl)({className:C,id:b,onClick:O},T,{children:u}))}}}]); 3//# sourceMappingURL=component---src-pages-interview-builder-index-tsx-53faaafb03883e2140b2.js.map
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.