1import{L as h,j as t,g as w}from"./logger-KgGCinx1.js";import{m}from"./mycnc__loadShare__react__loadShare__-PAyoiw_s.js";import{a0 as y,G as a,P as f,bI as _,q as x,u as S}from"./useRouting-Dqp11Q-s.js";import{u as L}from"./index-BEIdKsB3.js";import{O as j}from"./okta-sign-in.min-Ds9Lpk5_.js";import{m as k}from"./mycnc__loadShare__react_mf_2_router__loadShare__-BQVaZBX4.js";import"./_commonjsHelpers-DaWZu8wl.js";import"./mycnc__mf_v__runtimeInit__mf_v__-CPFIg_re.js";import"./mycnc__loadShare__react_mf_2_dom__loadShare__-Byf9slX8.js";import"./preload-helper-CkTZxt06.js";const v=(l,s,c)=>{const i=h("useOktaWidget"),r=new j(c?{...s,username:c}:s),d=()=>{r.showSignInAndRedirect({el:`#${l}`}).catch(e=>{console.error(e)}),r.on("ready",function(){const e=function(o,p){const g=o();g?p(g):setTimeout(()=>{e(o,p)},100)};c&&e(()=>document.getElementById("idp-discovery-submit"),o=>o.click());const n=()=>e(()=>{const o=document.querySelector('.mfa-verify form[data-se="factor-sms"] .sms-request-button');return o&&o.innerText==="Send code"?o:null},o=>{i.debug("Sending Authenticate SMS automatically"),o.click(),setTimeout(()=>{i.debug("Registering sms automatic trigger"),n()},1e3)});n()})};m.useEffect(()=>{try{d()}catch(e){i.warn("Okta Widget Loading",e),r&&r.remove(),d()}return()=>{try{r&&r.remove()}catch(e){i.error(e)}}},[])},b="https://my.castandcrew.com/assets/candclogo-DOaic2au.png",P="WelcomeLogin-module__hideEmail___2UoOB",E="WelcomeLogin-module__root___6EWhV",I="WelcomeLogin-module__paper___mkUsb",q="WelcomeLogin-module__widgetV2___K79gm",u={hideEmail:P,root:E,paper:I,widgetV2:q},W=l=>{const{oktaConfig:s,smsRecovery:c,login:i}=l;v("sign-in-widget",{...s,i18n:{...s.i18n,en:{...s.i18n.en,"primaryauth.title":"1099 Project Center","primaryauth.username.placeholder":"PSL+ ID / username","primaryauth.username.tooltip":"PSL+ ID / username","primaryauth.password.placeholder":"PSL+ password","primaryauth.password.tooltip":"PSL+ password","errors.E0000004":'Incorrect credentials, please use the password you have set up for PSL+. To reset your password, your will need to open the PSL+ application. For instruction on how to reset your password use "Forgot Password" link below.'}},helpLinks:{forgotPassword:"#",custom:[{text:"Forgot password?",href:"https://support.castandcrew.com/kb/psl-resetting-your-psl-okta-password",target:"_blank"},{text:"403 Error?",href:"https://support.castandcrew.com/kb/psl-403-error-when-trying-to-log-into-1099-project-center",target:"_blank"}]},features:{...s.features,rememberMe:!1}},i);const r=()=>{const e=window.document.querySelector("#idp-discovery-username"),n=window.document.querySelector("#okta-signin-password");e&&(e.placeholder="Enter your ID used to log into PSL+"),n&&(n.placeholder="Enter your PSL+ password"),window.requestAnimationFrame(r)},d=()=>{const e=window.document.querySelector(".embeddedServiceHelpButton");e?e.remove():window.requestAnimationFrame(d)};return m.useEffect(()=>{r(),d()},[]),t.jsx("div",{className:y(c&&u.hideEmail),children:t.jsx(a,{container:!0,spacing:0,className:u.root,"data-test-id":"WelcomeLogin",children:t.jsx(a,{item:!0,xs:12,children:t.jsx(f,{className:u.paper,children:t.jsxs(a,{container:!0,spacing:0,children:[t.jsx(a,{item:!0,xs:12,children:t.jsxs(a,{container:!0,spacing:1,children:[t.jsx(a,{item:!0,xs:12,children:t.jsx("img",{src:b,alt:"Cast&Crew",style:{width:180,margin:"auto",display:"block",marginTop:24}})}),t.jsx(a,{item:!0,xs:12,children:t.jsx("div",{className:u.widgetV2,
1id:"sign-in-widget"})})]})}),t.jsx(a,{item:!0,xs:12,children:t.jsxs("p",{style:{padding:"0 6px",fontSize:14,textAlign:"center"},children:["If you do not already have access to PSL+, please have your approver email"," ",t.jsx(_,{href:"mailto:[email protected]",children:"[email protected]"})," ","to request 1099 printing access for you to all the needed shows."]})})]})})})})})},U=()=>{const{search:l=""}=k.useLocation(),{login:s,hide:c}=x.parse(l.slice(1)),i=L({query:"(max-width: 960px)"}),{isAuthenticated:r}=S(),d=localStorage,e=h("login1099"),n="https://castandcrew.my.site.com/1099Services/login?so=00Di0000000aHzN";if(m.useEffect(()=>{window.onbeforeunload=null,document.title="1099 Project Center",!r&&(d.setItem("redirect1099",n),e.debug("Set redirect to 1099",{redirectUrl:n,login:s}))},[]),r)return e.debug("Redirecting isAuthenticated user to 1099",{redirectUrl:n}),window.location.replace(n),null;let o;try{o=s&&decodeURIComponent(s)}catch{o=void 0}return t.jsx(W,{login:o,oktaConfig:w(),hideRegister:c==="register",smsRecovery:!0,isMobile:i})};export{U as default};
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.