"use strict";(this.__LOADABLE_LOADED_CHUNKS__=this.__LOADABLE_LOADED_CHUNKS__||[]).push([[5300],{25862:(e,t,r)=>{r.d(t,{Ds:()=>c,Mg:()=>l,P$:()=>d,Tg:()=>u,X$:()=>s,d3:()=>h,uS:()=>p});var o=r(26375),n=r(16765),i=r(72798);function a(e){if(e.status>=200&&e.status<300)return e;const t=new Error(e.statusText);throw t.response=e,t}function l(e,t,r,n,l,s,c="http://ampinternal.ihrprod.net"){const p={expirationDate:Number(l),isTrial:s,profileId:Number(e),source:n,subscriptionType:r,upsellFrom:0};return(0,i.Z)((0,o.ZP)(o.pf`${{ampInternal:c}}/internal/api/v3/subscription/internalSubscription`,(0,o.UD)("post"),(0,o.$V)(e,t),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"),(0,o.d1)(p))()).then(a)}function s(e,t,r="http://ampinternal.ihrprod.net"){return(0,i.Z)((0,o.ZP)(o.pf`${{ampInternal:r}}/internal/api/v3/subscription/subscriptions/${{profileId:e}}`,(0,o.UD)("delete"),(0,o.$V)(e,t),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"))()).then(a)}function c(e,t){return(0,i.Z)((0,o.ZP)(o.pf`${{ampUrl:(0,n.Z)()}}subscription/familyPlan/members`,(0,o.UD)("get"),(0,o.$V)(e,t),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"))()).then(a)}function p(e,t,r){return(0,i.Z)((0,o.ZP)(o.pf`${{ampUrl:(0,n.Z)()}}subscription/familyPlan/members`,(0,o.UD)("post"),(0,o.$V)(e,t),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"),(0,o.IO)({email:r}))())}function d(e,t,r){return(0,i.Z)((0,o.ZP)(o.pf`${{ampUrl:(0,n.Z)()}}subscription/familyPlan/members`,(0,o.UD)("delete"),(0,o.$V)(e,t),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"),(0,o.IO)({email:r}))()).then(a)}function u({ampUrl:e,profileId:t,sessionId:r,token:n,zipcode:l}){return(0,i.Z)((0,o.ZP)(o.pf`${{ampUrl:e}}/api/v3/subscription/familyPlan/acceptInvitation`,(0,o.UD)("post"),(0,o.$V)(t,r),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"),(0,o.IO)({token:n,zipCode:l}))()).then(a)}function h({ampUrl:e,profileId:t,sessionId:r}){return(0,i.Z)((0,o.ZP)(o.pf`${{ampUrl:e}}/api/v3/subscription/familyPlan/parent`,(0,o.UD)("get"),(0,o.$V)(t,r),(0,o.Fs)("Accept","application/json"),(0,o.Fs)("Content-Type","application/json"))()).then(a)}},87805:(e,t,r)=>{r.d(t,{Z:()=>s});var o=r(5915),n=r(51588),i=r(15001),a=r(34737),l=r(28744);const s=(0,o.Z)(l.Z,{target:"e688iol0"})((({center:e=!1,customStyles:t={},floatRight:r=!1,marginLeft:o="0",marginRight:l="0",marginTop:s="0",isBlock:c=!1,styleType:p="dark",theme:d})=>{const u={dark:{backgroundColorDisabled:d.colors.gray[200],borderColor:d.colors.gray[500],hoverColor:d.colors.black.dark,hoverOpacity:.15,textColor:d.colors.gray[500],textColorDisabled:d.colors.gray[500]},light:{backgroundColorDisabled:d.colors.gray[300],borderColor:d.colors.white.primary,hoverColor:d.colors.white.primary,hoverOpacity:.3,textColor:d.colors.white.primary,textColorDisabled:d.colors.gray[500]}},h=(0,n.Z)({},u[p],t),Z=(0,a.Z)(h.hoverColor,h.hoverOpacity);return{backgroundColor:d.colors.transparent.primary,border:`1px solid ${h.borderColor}`,float:r?"right":"none",margin:e?"auto":0,marginLeft:o,marginRight:l,marginTop:s,color:h.textColor,width:c?"100%":"auto","i, svg":{marginRight:"0.5rem"},"&:not(:disabled):hover":{[i.Z.toString()]:{backgroundImage:`radial-gradient(circle, ${d.colors.transparent.primary} 1%, ${Z} 1%)`,backgroundColor:Z,backgroundPosition:"center",backgroundSize:"15000%"}},"&:not(:disabled):active":{[i.Z.toString()]:{backgroundColor:"transparent",backgroundSize:"100%",transition:"background 0s"}},"&:disabled":{backgroundColor:h.backgroundColorDisabled,border:"none",color:h.textColorDisabled}}}),"")},4534:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(5915).Z)("input",{target:"e1gztu4b0"})((({theme:e,width:t="100%"})=>({backgroundColor:e.colors.white.primary,border:`1px solid ${e.colors.gray.light}`,borderRadius:".5rem",fontSize:"1.6rem",height:"3.7rem",lineHeight:"normal",outline:"none",padding:"0 1rem",width:t})),"")},22075:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(5915).Z)("label",{target:"ey452ae0"})((({textColor:e,theme:t})=>({color:t.colors.black.secondary,display:"inline-block",fontSize:"1.3rem",letterSpacing:"0.2rem",lineHeight:"1.38",margin:"2rem 0 1rem",textColor:e&&e(t.colors),textTransform:"uppercase"})),"")},19981:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(5915).Z)("br",{target:"ektrrag0"})((({dimension:e,theme:t})=>({margin:e&&`${e(t.dimensions)} auto`})),"")},4145:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(5915).Z)("h3",{target:"e1v1osqu0"})((({styleType:e="dark",textAlign:t="left",theme:r,weight:o="regular"})=>({color:{dark:{color:r.colors.gray[600]},light:{color:r.colors.white.primary}}[e].color,fontSize:r.fonts.size[24],fontWeight:r.fonts.weight[o],letterSpacing:0,lineHeight:r.fonts.lineHeight[30],margin:"0.6rem 0",textAlign:t,transition:"all 300ms ease-in-out"})),"")},31858:(e,t,r)=>{r.d(t,{Z:()=>o});const o=(0,r(5915).Z)("h6",{target:"eiuej810"})((({theme:e})=>({color:e.colors.gray[600],fontSize:e.fonts.size[14],fontWeight:e.fonts.weight.medium,letterSpacing:"0.15rem",lineHeight:e.fonts.lineHeight[18],margin:"0.1rem 0",textTransform:"uppercase",transition:"all 300ms ease-in-out"})),"")},26280:(e,t,r)=>{r.r(t),r.d(t,{default:()=>y});var o=r(19981),n=r(61711),i=r(16765),a=r(4145),l=r(31858),s=r(4534),c=r(22075),p=r(87805),d=r(59019);const u=(0,r(5915).Z)("div",{target:"ej0p2c20"})((({deleteZone:e=!1,theme:t})=>({border:`0.1rem solid ${e?t.colors.red.primary:t.colors.gray.secondary}`,marginBottom:"1rem",padding:"2rem"})),"");var h=r(25862),Z=r(96832),g=r(34853);const m="https://ampinternal.ihrprod.net",b="https://us-qa.api.iheart.com",f="https://us-stg.api.iheart.com",y=function({isTrial:e,profileId:t,sessionId:r,subscriptionSource:y,subscriptionType:C}){const[v,S]=(0,Z.useState)((0,i.Z)().indexOf("-qa")>0?b:f),[k,D]=(0,Z.useState)((new Date).getTime()+2592e5),[U,P]=(0,Z.useState)(e),[$,w]=(0,Z.useState)(t),[T,x]=(0,Z.useState)(y||"RECURLY"),[O,A]=(0,Z.useState)(C);return(0,g.BX)(d.Z,{marginValue:"9rem",children:[(0,g.BX)(l.Z,{children:["Current User is:"," ",(0,g.tZ)("span",{style:{textDecoration:"underline"},children:C}),", type:"," ",(0,g.tZ)("span",{style:{textDecoration:"underline"},children:y}),", base URL:"," ",(0,g.tZ)("span",{style:{textDecoration:"underline"},children:(0,i.Z)().indexOf("-qa")>0?b:m})]}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(a.Z,{children:"Subscription Settings: "}),(0,g.BX)("ul",{children:[(0,g.tZ)("li",{style:{color:"red"},children:"Must be connected to Cisco iHeart VPN for this form to work."}),(0,g.tZ)("li",{children:"Make sure the endpointBase corresponds with your test environment (prod / qa)."}),(0,g.tZ)("li",{children:"Page will reload if subscription is successfully updated or deleted."})]}),(0,g.tZ)(c.Z,{children:"Endpoint Base"}),(0,g.tZ)(o.Z,{}),(0,g.BX)("select",{onChange:e=>S(e.target.value),value:v,children:[(0,g.tZ)("option",{value:m,children:`PROD - ${m}`}),(0,g.tZ)("option",{value:b,children:`QA - ${b}`}),(0,g.tZ)("option",{value:f,children:`STG - ${f}`})]}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(c.Z,{children:"Profile Id"}),(0,g.tZ)(s.Z,{onChange:e=>w(e.target.value),type:"number",value:$}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(c.Z,{children:"Expiration Date default 72 hours from now"}),(0,g.tZ)(s.Z,{onChange:e=>D(new Date(String(e.target.value)).getTime()),type:"date"}),(0,g.tZ)(o.Z,{}),(0,g.BX)(c.Z,{children:["is Trial (",String(U),")"]}),(0,g.tZ)("input",{checked:U,onChange:()=>P(!U),type:"checkbox"}),(0,g.tZ)(c.Z,{children:"User SubSource"}),(0,g.tZ)(o.Z,{}),(0,g.BX)("select",{onChange:e=>x(e.target.value),value:T,children:[(0,g.tZ)("option",{value:"RECURLY",children:"RECURLY"}),(0,g.tZ)("option",{value:"APPLE",children:"APPLE"}),(0,g.tZ)("option",{value:"GOOGLE",children:"GOOGLE"}),(0,g.tZ)("option",{value:"AMAZON",children:"AMAZON"}),(0,g.tZ)("option",{value:"ROKU",children:"ROKU"})]}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(c.Z,{children:"user SubType"}),(0,g.tZ)(o.Z,{}),(0,g.BX)("select",{onChange:e=>A(e.target.value),value:O,children:[(0,g.tZ)("option",{value:"NONE",children:"NONE"}),(0,g.tZ)("option",{value:"FREE",children:"FREE"}),(0,g.tZ)("option",{value:"PLUS",children:"PLUS"}),(0,g.tZ)("option",{value:"PREMIUM",children:"PREMIUM"})]}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(n.Z,{onClick:()=>{(0,h.Mg)($,r,O,T,k,U,v).catch((e=>(alert("There was an issue: \n\n Make sure you are using the correct endpoint base \n Make sure you are connected to secure VPN"),e))).then((()=>window.location.reload()))},children:"Submit"}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(o.Z,{}),(0,g.BX)(u,{deleteZone:!0,children:[(0,g.tZ)(c.Z,{children:"Delete user's subscription data from database. Use this if you want to make the user eligible for a trial."}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(o.Z,{}),(0,g.tZ)(p.Z,{onClick:()=>{(0,h.X$)($,r,v).then((()=>window.location.reload()))},children:"Delete Subscription Data"})]})]})}}}]); //# sourceMappingURL=TesterOptions.www.js.map