PageSourceSearch

https://app.surveyjunkie.com/assets/index-CwUG-bJv.js

js surveyjunkie.com collected 2026-09-24 08:59:11 UTC 13,797 bytes, 5 lines download raw bytes

1import{q as r,r as a,p as oe,L as ze,j as Se,R as e,cI as Ae,bb as Qe,O as Je,az as ge,be as et,aL as $,aK as s,T as tt,P as _e,D as V,y as ce,aG as G,aQ as nt,aR as at,aS as st,aT as ot,m as te,bf as ne,H as ct,dc as it,cy as rt,ch as lt,aM as be,ao as ue,ar as Ee,aq as de,ap as me,as as Ue,k as ye,at as Re,M as pt,dd as ut,de as he}from"./index-D7zhMPes.js";import{T as Et,a as b}from"./TextArea-C-x_yYIQ.js";const H=300,ae=6,xe={TICKET_STATUS_NEW:"New",TICKET_ORIGIN:"Web SPA"},Ie={SMARTPHONE:"Smart Phone",DESKTOP:"Desktop"},N={SURVEY_ISSUE:"surveyIssue",PULSE:"pulse",EDIT_NAME:"editName",MAX_REDEMPTION_POINTS:"maxRedemptionPoints",EDIT_ZIP_CODE:"editZipCode"},se={TYPE:"type",SURVEY_ID:"surveyId",SURVEY_STATUS:"surveyStatus",ZIP_CODE:"zipCode"},Le=r.div.withConfig({componentId:"sc-13931s1-0"})(["max-width:385px;width :90%;"]),L=r.div.withConfig({componentId:"sc-13931s1-1"})(["margin-top:28px;"]),dt=(t,i)=>{const[m,u]=a.useState(!1),[U,c]=a.useState(!1);return a.useEffect(()=>{t&&u(!1)},[t]),a.useEffect(()=>{t&&!m?(i(!0),c(!0)):(i(!1),c(!1))},[m,i,t]),{acceptedWarning:m,setAcceptedWarning:u,disableInput:U}},mt=r.div.withConfig({componentId:"sc-1il8end-0"})(["margin-top :16px;display :flex;flex-direction :column;align-items :flex-start;justify-content:center;width :100%;"]),Ct=r.p.withConfig({componentId:"sc-1il8end-1"})([""," background-color:#FFF8E1;border :1px solid #FFE081;padding :10px;border-radius :8px;"],oe.DEFAULT),gt=r.div.withConfig({componentId:"sc-1il8end-2"})(["display :flex;align-items:center;margin-top :16px;cursor :pointer;"]),St=r.div.withConfig({componentId:"sc-1il8end-3"})(["width :20px;height :20px;border :2px solid #ccc;border-radius:4px;margin-right :8px;background :",";position :relative;&:after{content :'';display :",";width :6px;height :12px;border :solid #fff;border-width:0 2px 2px 0;position :absolute;top :1px;left :5px;transform :rotate(45deg);}"],t=>t.checked?"#0066FF":"#fff",t=>t.checked?"block":"none"),Tt=r.span.withConfig({componentId:"sc-1il8end-4"})([""," font-size:14px;"],ze.DEFAULT);function ft({acceptedWarningCallback:t}){const{t:i}=Se("accountHelp"),[m,u]=a.useState(!1),U=()=>{const c=!m;u(c),t(c)};return e.createElement(mt,null,e.createElement(Ct,null,i("ContactUs--warningPrompt-text")),e.createElement(gt,{onClick:U},e.createElement(St,{checked:m}),e.createElement(Tt,null,i("ContactUs--warningPrompt-checkbox-label"))))}const bt="description-test",Ut="/v1/ticket",yt="/v1/categories",Rt=t=>Ae({method:"PUT",url:"https://mct.us.sjapis.com"+Ut,data:JSON.stringify(t),headers:{"Content-Type":"application/json"}}),ht=()=>Ae({method:"GET",url:"https://mct.us.sjapis.com"+yt,headers:{"Content-Type":"application/json"}});function xt({nameCallback:t,emailCallback:i,subjectCallback:m,categoryCallback:u,descriptionCallback:U,emailFieldType:c,subjectFieldType:P,descriptionFieldType:C,nameFieldType:v,firstLastName:S,userEmail:y,isUserLoggedIn:x,selectFieldType:ie,defaultValues:o,disableSubmitCallback:k}){const{t:n}
1=Se("accountHelp"),[I,K]=a.useState([]),[R,Z]=a.useState(!1),[O,X]=a.useState(!1),[f,q]=a.useState([]),[A,F]=a.useState(""),{data:E}=Qe(!0),z=a.useMemo(()=>(E==null?void 0:E.verificationStatus)===Je.inProgress&&x&&A==="Account Verification",[E==null?void 0:E.verificationStatus,x,A]),w=[{label:`${n("ContactUs--categoryOptions-pleaseSelect")}`,value:`${n("ContactUs--categoryOptions-pleaseSelect")}`},{label:`${n("ContactUs--categoryOptions-Pulse")}`,value:`${n("ContactUs--categoryOptions-Pulse")}`},{label:`${n("ContactUs--categoryOptions-payPal")}`,value:`${n("ContactUs--categoryOptions-payPal")}`},{label:`${n("ContactUs--categoryOptions-points")}`,value:`${n("ContactUs--categoryOptions-points")}`},{label:`${n("ContactUs--categoryOptions-SurveysExperience")}`,value:`${n("ContactUs--categoryOptions-SurveysExperience")}`},{label:`${n("ContactUs--categoryOptions-other")}`,value:`${n("ContactUs--categoryOptions-other")}`}],M=a.useCallback(()=>{const g=[{label:`${n("ContactUs--categoryOptions-pleaseSelect")}`,value:`${n("ContactUs--categoryOptions-pleaseSelect")}`}];I.forEach(function(h){const J={label:h,value:h};g.push(J)}),q(g)},[I,n]);a.useEffect(()=>{R||ht().then(g=>{var h;Z(!0),K((h=g.data)==null?void 0:h.categories)}).catch(g=>{Z(!0),ge("getCategories",g)})},[R,M]),a.useEffect(()=>{R&&!O&&(M(),X(!0))},[R,O,M]);const D=()=>x?e.createElement(e.Fragment,null,e.createElement(L,null,e.createElement($,{fieldType:s.DISABLED_NO_BOX,changeCallback:t,label:n("ContactUs--inputLabel-name"),initialText:S})),e.createElement(L,null,e.createElement($,{fieldType:s.DISABLED_NO_BOX,changeCallback:i,label:n("ContactUs--inputLabel-email"),initialText:y}))):e.createElement(e.Fragment,null,e.createElement(L,null,e.createElement($,{fieldType:v,changeCallback:t,label:n("ContactUs--inputLabel-name")})),e.createElement(L,null,e.createElement($,{fieldType:c,changeCallback:i,label:n("ContactUs--inputLabel-email")}))),re=a.useCallback(g=>{u(g),F(g)},[u]),{setAcceptedWarning:_,disableInput:Q}=dt(z,k);return e.createElement(Le,null,D(),e.createElement(L,null,e.createElement(et,{label:n("ContactUs--inputLabel-category"),options:f.length>1?f:w,disabled:!1,changeCallback:re,fieldType:ie,initialValue:o==null?void 0:o.category})),z&&e.createElement(ft,{acceptedWarningCallback:_}),e.createElement(L,null,e.createElement($,{fieldType:Q?s.DISABLED_WITH_BOX:P,changeCallback:m,label:n("ContactUs--inputLabel-subject"),initialText:o==null?void 0:o.subject})),e.createElement(L,null,e.createElement(Et,{fieldType:Q?b.DISABLED_WITH_BOX:C,changeCallback:U,label:n("ContactUs--inputLabel-description"),maxLength:H,initialText:o==null?void 0:o.description,testId:bt})))}const It=r.div.withConfig({componentId:"sc-xk3i6p-0"})(["width :100%;display :flex;align-items :center;flex-direction :column;padding :0 12px 24px;overflow :auto;"]),Oe=r.div.withConfig({componentId:"sc-xk3i6p-1"})(["max-width:596px;width :100%;margin :0 auto;display :",";"],t=>t.isVisible?"flex":"none"),Ce=r.div.withConfig({componentId:"sc-xk3i6p-2"})(["margin-top:40px;width :385px;max-width :100%;@media ","{width :312px;display :flex;justify-content:center;align-items :center;}"],ce.maxMobile),Ot=r.div.withConfig({componentId:"sc-xk3i6p-3"})([""," color :",";width :383px;text-align:left;margin-top:4px;@media ","{width :312px;}"],oe.DEFAULT,t=>t.isError?V.color.text.critical.value:V.color.text.secondary.value,ce.maxMobile),At=r.div.withConfig({componentId:"sc-xk3i6p-4"})(["display :flex;flex-direction:column;max-width :440px;padding-left :24px;padding-right :24px;h1{"," margin-top:60px;text-align:left;}p{"," color :",";text-align:left;margin-top:24px;}"],tt.FT_04,_e.DEFAULT,V.color.text.secondary.value),_t=r.p.withConfig({componentId:"sc-xk3i6p-5"})(["width :383px;margin-top:36px;color :",";"," @media ","{width:324px;}"],V.color.text.secondary.value,oe.DEFAULT,ce.maxMobile),Y=r.div.withConfig({componentId:"sc-xk3i6p-6"})([""," width :385px;height :auto;word-wrap :",";padding-top:14px;@media ","{width :312px;}"],_e.DEFAULT,t=>t.shouldWrap?"break-word":"",ce.maxMobile),W=r.div.withConfig({componentId:"sc-xk3i6p-7"})(["margin-top:28px;span{"," color :",";text-align:left;}"],oe.DEFAULT,V.color.text.secondary.value),Lt=t=>{const i={event:at.end,attributes:{[G.type]:nt.contact_support,...t}};st(ot.other,[i])};var T=function(t){return t[t.SUBMIT=0]="SUBMIT",t[t.SUCCESS=1]="SUCCESS",t[t.ERROR=2]="ERROR",t}(T||{});function Nt(){const{t}=Se("accountHelp"),i=te(se.SURVEY_ID),m=te(se.SURVEY_STATUS),u=te(se.TYPE),U=te(se.ZIP_CODE),[c,P]=a.useState(""),[C,v]=a.useState(""),[S,y]=a.useState(""),[x,ie]=a.useState(""),[o,k]=a.useState(t("ContactUs--categoryOptions-pleaseSelect")),[n,I]=a.use
1State(""),[K,R]=a.useState(!1),[Z,O]=a.useState(s.DEFAULT),[X,f]=a.useState(s.DEFAULT),[q,A]=a.useState(s.DEFAULT),[F,E]=a.useState(b.DEFAULT),[z,w]=a.useState(ne.DEFAULT),[M,D]=a.useState(!1),[re,_]=a.useState(T.SUBMIT),[Q,g]=a.useState(!0),[h,J]=a.useState(!1),[Fe,De]=a.useState(""),[Te,le]=a.useState(!1),[pe,Ne]=a.useState(!1),[j,B]=a.useState(!1),Pe=ct(),ve={[N.SURVEY_ISSUE]:{category:t("ContactUs--categoryOptions-SurveysExperience"),getSubject:l=>t("ContactUs--categoryOptions-surveyIssueSubject",{surveyId:l}),getDescription:()=>""},[N.PULSE]:{category:t("ContactUs--categoryOptions-Pulse"),getSubject:()=>"",getDescription:()=>""},[N.EDIT_NAME]:{category:t("ContactUs--categoryOptions-profileInformation"),getSubject:()=>t("ContactUs--categoryOptions-editNameSubject"),getDescription:()=>""},[N.MAX_REDEMPTION_POINTS]:{category:t("ContactUs--categoryOptions-Redemption"),getSubject:()=>t("ContactUs--categoryOptions-maxRedemptionSubject"),getDescription:()=>t("ContactUs--categoryOptions-maxRedemptionDesc")},[N.EDIT_ZIP_CODE]:{category:t("ContactUs--categoryOptions-profileInformation"),getSubject:()=>t("ContactUs--categoryOptions-editZipCodeSubject"),getDescription:l=>t("ContactUs--categoryOptions-editZipCodeDesc",{zipCode:l||""})}},ke=()=>{pe||(P(""),v("")),k(t("ContactUs--categoryOptions-payPal")),I(""),y("")},we=(l,d,ee)=>{if(!l)return;const p=ve[l];p&&(k(p.category),d&&(ie(p.getSubject(d)),y(p.getSubject(d))),p.category===t("ContactUs--categoryOptions-profileInformation")&&(l===N.EDIT_ZIP_CODE&&ee?(y(p.getSubject()),I(p.getDescription(ee))):y(p.getSubject())),p.category===t("ContactUs--categoryOptions-Redemption")&&(y(p.getSubject()),I(p.getDescription())))};a.useEffect(()=>{u&&we(u,i,U)},[i,u,U]),a.useEffect(()=>{it()?(Ne(!0),rt().then(d=>{P(d.data.firstName+" "+d.data.lastName),v(d.data.email),De(d.data.country),J(!0)}).catch(d=>{_(T.ERROR),ge("getUserInfo",d)})):J(!0)},[h]);const Me=()=>{f(s.DEFAULT),A(s.DEFAULT),O(s.DEFAULT),E(b.DEFAULT);const l=be(C);return c===""&&O(s.ERROR),C===""&&f(s.ERROR),C.length!==0&&f(l?s.DEFAULT:s.ERROR),o===t("ContactUs--categoryOptions-pleaseSelect")&&w(ne.ERROR),S===""&&A(s.ERROR),(n.length>H||n==="")&&E(b.ERROR),n.length<ae&&(E(b.ERROR),R(!0)),X!==s.ERROR&&n!==""&&o!==t("ContactUs--categoryOptions-pleaseSelect")&&F!==b.ERROR&&q!==s.ERROR&&c!==""&&!K?(B(!1),!0):(B(!1),!1)},je=()=>{const l=Fe,d=x&&x!==S?`Subject: ${x}
2Name: ${c}
3${n}`:`Name: ${c}
4${n}`,ee={status:xe.TICKET_STATUS_NEW,origin:xe.TICKET_ORIGIN,subject:S,description:d,country:l,devicePlatform:ut()?Ie.SMARTPHONE:Ie.DESKTOP,email:C,category:o,suppliedName:c.split(" ")[0],surveyStatus:m||""},p={[G.sub_type]:o,[G.referrer]:u?he.activity_history:he.none,[G.survey_id]:i||"",[G.survey_status]:m||""};le(!0),D(!0),Rt(ee).then(()=>{B(!1),D(!1),le(!1),_(T.SUCCESS),Lt(p)}).catch(qe=>{B(!1),D(!1),le(!1),_(T.ERROR),ge("getUserInfo",qe)})};lt(()=>{fe()});const fe=()=>{B(!0),Me()&&je()},Be=()=>{_(T.SUBMIT)},$e=()=>{_(T.SUBMIT),Pe(pt.ACCOUNT_SUPPORT),ke(),g(!0)};a.useEffect(()=>{const l=be(C);c===""&&j?O(s.ERROR):c!==""&&O(s.DEFAULT),S===""&&j?A(s.ERROR):S!==""&&A(s.DEFAULT),o===t("ContactUs--categoryOptions-pleaseSelect")&&j?w(ne.ERROR):o!==t("ContactUs--categoryOptions-pleaseSelect")&&w(ne.DEFAULT),n.length>H||n===""&&j||n!==""&&n.length<ae?(E(b.ERROR),R(!0)):n!==""&&n.length<=H&&n.length>=ae&&(E(b.DEFAULT),R(!1)),C.length!==0&&f(l?s.DEFAULT:s.ERROR)},[o,j,n,F,C,c,S,t]);const Ye=()=>`${H-n.length} characters remaining`,We=()=>`Must be a minimum of ${ae} characters`,Ge=()=>e.createElement(Oe,{isVisible:!0},e.createElement(Ue,{fillParent:!0,context:Re.LIGHT_WARNING,icon:ye.VERIFIED_FILL_1,text:e.createElement("p",null,t("ContactUs--banner-text"),e.createElement("a",{href:"https://privacyportal-cdn.onetrust.com/dsarwebform/8b68dfee-6954-490c-a365-b74dfb0bf235/caa7addb-eb56-4b4d-a57f-8038ce071190.html",target:"_blank",rel:"noreferrer"},t("ContactUs--banner-text-link")))})),He=()=>e.createElement(e.Fragment,null,e.createElement(xt,{nameCallback:P,emailCallback:v,subjectCallback:y,categoryCallback:k,descriptionCallback:I,emailFieldType:X,descriptionFieldType:F,firstLastName:c,userEmail:C,isUserLoggedIn:pe,subjectFieldType:q,nameFieldType:Z,selectFieldType:z,disableSubmitCallback:D,defaultValues:{subject:S,category:o,description:n}}),e.createElement(Ot,{isError:F===b.ERROR},K?We():Ye()),e.createElement(Ce,null,e.createElement(ue,{size:me.LARGE,width:de.FULL,context:Ee.PRIMARY,disabled:M,onClick:fe,isLoading:Te},t("ContactUs--submit-buttonLabel")))),Ve=()=>e.createElement(e.Fragment,null,Ge(),He()),Ke=()=>e.createElement(e.Fragment,null,e.createElement(Oe,{isVisible:Q},e.createElement(Ue,{fillParent:!0,context:Re.INFO,icon:ye.CHECK_FILL,close:!0,text:e.createElement("p",null,t("ContactUs--successBanner-text"))})),e.createElement(Le,null,e.createElement(W,null,e.createElement("span",null,t("ContactUs--inputLabel-name")),e.createElement(Y,{shouldWrap:!1},c)),e.createElement(W,null,e.createElement("span",null,t("ContactUs--inputLabel-email")),e.createElement(Y,{shouldWrap:!1},C)),e.createElement(W,null,e.createElement("span",null,t("ContactUs--inputLabel-category")),e.createElement(Y,{shouldWrap:!1},o)),e.createElement(W,null,e.createElement("span",null,t("ContactUs--inputLabel-subject")),e.createElement(Y,{shouldWrap:!1},S)),e.createElement(W,null,e.createElement("span",null,t("ContactUs--inputLabel-description")),e.createElement(Y,{shouldWrap:!0},n)),e.createElement(_t,null,t("ContactUs--success-note")),e.createElement(Ce,null,e.createElement(ue,{size:me.LARGE,width:de.FULL,context:Ee.SECONDARY,onClick:$e},t("ContactUs--success-buttonLabel"))))),Ze=()=>e.createElement(At,null,e.createElement("h1",null,t("ContactUs--error-title")),e.createElement("p",null,t("ContactUs--error-paragraph")),e.createElement(Ce,null,e.createElement(ue,{size:me.LARGE,width:de.FULL,context:Ee.PRIMARY,onClick:Be,isLoading:Te},t("ContactUs--error-buttonLabel")))),Xe=()=>{if(!(pe&&!h))switch(re){case T.SUBMIT:return Ve();case T.SUCCESS:return Ke();case T.ERROR:return Ze()}};return e.createElement(It,null,Xe())}export{Nt as default};
5//# sourceMappingURL=index-CwUG-bJv.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.