"use strict";
(self.webpackChunkui = self.webpackChunkui || []).push([
    [12], {
        1012: (X, P, d) => {
            d.r(P), d.d(P, {
                ProfileModule: () => z
            });
            var x = d(1284),
                f = d(5892),
                L = d(4631),
                v = d(4892),
                g = d(8598),
                r = d(1655);

            function C() {
                return o => o.value && !/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/.test(o.value) ? {
                    [r.cp.invalidPostalCodeFormat]: !0
                } : null
            }
            var m = d(3673),
                T = d(6446),
                s = d(4006),
                u = d(2722),
                _ = d(4086),
                l = d(5319),
                A = d(3161),
                b = d(9751),
                e = d(4650),
                Z = d(9653),
                S = d(7664),
                c = d(3416),
                y = d(6895);

            function q(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "p", 40), e._uU(1), e.ALo(2, "translate"), e.TgZ(3, "span", 41), e._uU(4), e.ALo(5, "translate"), e.TgZ(6, "span", 42), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw(2);
                        return e.KtG(n.resendOTP())
                    }), e._uU(7), e.ALo(8, "translate"), e.qZA()()()
                }
                2 & o && (e.xp6(1), e.hij(" ", e.lcZ(2, 3, "create-user-profile.resend-info-text"), " "), e.xp6(3), e.hij(" ", e.lcZ(5, 5, "create-user-profile.resend-info-text-1"), ""), e.xp6(3), e.Oqu(e.lcZ(8, 7, "create-user-profile.resend-info-link")))
            }

            function D(o, a) {
                if (1 & o && (e.TgZ(0, "div", 43), e._UZ(1, "puro-field-dropdown", 44), e.ALo(2, "translate"), e.qZA()), 2 & o) {
                    const t = e.oxw(2);
                    e.xp6(1), e.Q6J("fieldTextControl", t.province)("label", e.lcZ(2, 5, t.getProvinceLabel()))("options", t.getCurrentProvinces())("isRequired", t.isProvinceRequired())("errorList", t.errorList.province)
                }
            }

            function M(o, a) {
                if (1 & o && (e.TgZ(0, "div", 43), e._UZ(1, "puro-field-text", 45), e.ALo(2, "translate"), e.qZA()), 2 & o) {
                    const t = e.oxw(2);
                    e.xp6(1), e.Q6J("fieldTextControl", t.province)("label", e.lcZ(2, 5, t.getProvinceLabel()))("isRequired", !1)("errorList", t.errorList.province)("maxlength", 40)
                }
            }

            function V(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "puro-field-text", 46), e.NdJ("handleKeyUp", function() {
                        e.CHM(t);
                        const n = e.oxw(2);
                        return e.KtG(n.phoneNumberChange())
                    }), e.ALo(1, "translate"), e.qZA()
                }
                if (2 & o) {
                    const t = e.oxw(2);
                    e.Q6J("fieldTextControl", t.phone)("countryCode", t.getPhoneCountryCode())("label", e.lcZ(1, 6, "create-user-profile.phone-number-label"))("isRequired", !0)("maxlength", 17)("errorList", t.errorList.phone)
                }
            }

            function I(o, a) {
                if (1 & o && (e._UZ(0, "puro-field-text", 47), e.ALo(1, "translate")), 2 & o) {
                    const t = e.oxw(2);
                    e.Q6J("fieldTextControl", t.phone)("label", e.lcZ(1, 5, "create-user-profile.phone-number-label"))("isRequired", !0)("maxlength", 17)("errorList", t.errorList.phone)
                }
            }

            function w(o, a) {
                if (1 & o && (e._UZ(0, "puro-field-text", 48), e.ALo(1, "translate")), 2 & o) {
                    const t = e.oxw(2);
                    e.Q6J("fieldTextControl", t.verificationCode)("isRequired", !0)("maxlength", 6)("label", e.lcZ(1, 5, "create-user-profile.verification-code-label"))("errorList", t.errorList.verificationCode)
                }
            }

            function R(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "div", 49)(1, "input", 50), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw(2);
                        return e.KtG(n.verifyCode())
                    }), e.ALo(2, "translate"), e.qZA()()
                }
                2 & o && (e.xp6(1), e.s9C("value", e.lcZ(2, 1, "profile-settings.phone-verification-popup.verify-button-text")))
            }

            function J(o, a) {
                if (1 & o && (e.TgZ(0, "div", 16)(1, "puro-field-checkbox", 51)(2, "label", 52), e._uU(3), e.ALo(4, "translate"), e.qZA(), e.TgZ(5, "a", 53), e._uU(6), e.ALo(7, "translate"), e.qZA()()()), 2 & o) {
                    const t = e.oxw(2);
                    e.xp6(1), e.Q6J("fieldControl", t.tncAccepted)("hasContent", !0)("errorList", t.errorList.tncAccepted), e.xp6(2), e.Oqu(e.lcZ(4, 6, "create-user-profile.tnc-text")), e.xp6(2), e.Q6J("href", t.termsAndConditionPdf, e.LSH), e.xp6(1), e.Oqu(e.lcZ(7, 8, "create-user-profile.tnc-link"))
                }
            }

            function N(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "div", 1)(1, "div")(2, "div", 2)(3, "div", 3)(4, "div", 4)(5, "span", 5), e._uU(6), e.ALo(7, "translate"), e.qZA()(), e._UZ(8, "hr"), e.TgZ(9, "div", 6)(10, "div", 7)(11, "main", 8)(12, "div", 9)(13, "div", 10)(14, "div", 11)(15, "div", 12)(16, "p"), e._uU(17), e.ALo(18, "translate"), e.qZA(), e.YNc(19, q, 9, 9, "p", 13), e.ALo(20, "async"), e.ALo(21, "async"), e.ALo(22, "async"), e.TgZ(23, "p", 14), e._uU(24), e.ALo(25, "translate"), e.qZA(), e.TgZ(26, "form", 15), e.NdJ("ngSubmit", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.onSubmit())
                    }), e.TgZ(27, "div", 16), e._UZ(28, "puro-field-text", 17), e.ALo(29, "translate"), e.qZA(), e.TgZ(30, "h6", 18), e._uU(31), e.ALo(32, "translate"), e.qZA(), e.TgZ(33, "div", 19)(34, "strong"), e._uU(35), e.ALo(36, "translate"), e.qZA(), e._uU(37), e.ALo(38, "translate"), e.qZA(), e.TgZ(39, "div", 20)(40, "puro-field-dropdown", 21), e.NdJ("onDropdownChange", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.onCountryChange())
                    }), e.ALo(41, "translate"), e.qZA()(), e.TgZ(42, "div", 22)(43, "purolator-field-address", 23), e.NdJ("selected", function(n) {
                        e.CHM(t);
                        const p = e.oxw();
                        return e.KtG(p.addressSelected(n))
                    }), e.ALo(44, "translate"), e.qZA()(), e.TgZ(45, "div", 24), e._UZ(46, "puro-field-text", 25), e.ALo(47, "translate"), e.qZA(), e.TgZ(48, "div", 22), e._UZ(49, "puro-field-text", 26), e.ALo(50, "translate"), e.qZA(), e.TgZ(51, "div", 24), e._UZ(52, "puro-field-text", 27), e.ALo(53, "translate"), e.qZA(), e.YNc(54, D, 3, 7, "div", 28), e.YNc(55, M, 3, 7, "div", 28), e.TgZ(56, "div", 29)(57, "puro-field-dropdown", 30), e.NdJ("onDropdownChange", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.phoneTypeChange())
                    }), e.ALo(58, "translate"), e.qZA()(), e.TgZ(59, "div", 29), e.YNc(60, V, 2, 8, "puro-field-text", 31), e.YNc(61, I, 2, 7, "puro-field-text", 32), e.qZA(), e.TgZ(62, "div", 33), e.YNc(63, w, 2, 7, "puro-field-text", 34), e.ALo(64, "async"), e.ALo(65, "async"), e.ALo(66, "async"), e.qZA(), e.YNc(67, R, 3, 3, "div", 35), e.ALo(68, "async"), e.ALo(69, "async"), e.ALo(70, "async"), e.TgZ(71, "div", 16), e._UZ(72, "puro-field-text", 36), e.ALo(73, "translate"), e.qZA(), e._UZ(74, "hr"), e.YNc(75, J, 8, 10, "div", 37), e.TgZ(76, "div", 38), e._UZ(77, "input", 39), e.ALo(78, "translate"), e.qZA()()()()()()()()()()()()()
                }
                if (2 & o) {
                    const t = e.oxw();
                    e.xp6(6), e.Oqu(e.lcZ(7, 55, "create-user-profile.title")), e.xp6(11), e.hij("", e.lcZ(18, 57, "create-user-profile.infoPara"), " "), e.xp6(2), e.Q6J("ngIf", e.lcZ(20, 59, t.isPhoneOTPVerificationRequired$) && 1 != e.lcZ(21, 61, t.isOTPVerifiedSuccess$) && e.lcZ(22, 63, t.isOTPSentSuccessfully$)), e.xp6(5), e.Oqu(e.lcZ(25, 65, "create-user-profile.mandatory-fields-text")), e.xp6(2), e.Q6J("formGroup", t.profileForm), e.xp6(2), e.Q6J("fieldTextControl", t.name)("maxlength", 30)("label", e.lcZ(29, 67, "create-user-profile.company-name-label"))("isRequired", !0)("errorList", t.errorList.name), e.xp6(3), e.Oqu(e.lcZ(32, 69, "create-user-profile.mailing-address-text")), e.xp6(4), e.Oqu(e.lcZ(36, 71, "create-user-profile.mailing-address-note-title")), e.xp6(2), e.hij(" ", e.lcZ(38, 73, "create-user-profile.mailing-address-note-text"), " "), e.xp6(3), e.Q6J("fieldTextControl", t.country)("label", e.lcZ(41, 75, "shipping.address.country"))("options", t.countries)("isRequired", !0)("errorList", t.errorList.country), e.xp6(3), e.Q6J("formControl", t.street)("isRequired", !0)("label", e.lcZ(44, 77, "shipping.address.street"))("country", t.country.value)("errorList", t.errorList.street)("maxlength", 40), e.xp6(3), e.Q6J("fieldTextControl", t.aptOrSuite)("label", e.lcZ(47, 79, "shipping.address.apt.suite"))("maxlength", 40)("errorList", t.errorList.aptOrSuite), e.xp6(3), e.Q6J("fieldTextControl", t.city)("label", e.lcZ(50, 81, "shipping.address.city"))("isRequired", t.isCityRequired())("errorList", t.errorList.city)("maxlength", 40), e.xp6(3), e.Q6J("fieldTextControl", t.postalCode)("isRequired", t.isPostalCodeRequired())("label", e.lcZ(53, 83, "shipping.address.postal.code"))("errorList", t.errorList.postalCode)("maxlength", 10), e.xp6(2), e.Q6J("ngIf", t.shouldShowProvinceDropdown()), e.xp6(1), e.Q6J("ngIf", t.shouldShowProvinceTextField()), e.xp6(2), e.Q6J("fieldTextControl", t.phoneType)("label", e.lcZ(58, 85, "select"))("options", t.phoneTypes)("errorList", t.errorList.phoneType)("isRequired", !0), e.xp6(3), e.Q6J("ngIf", t.shouldShowPhoneWithCountryCode()), e.xp6(1), e.Q6J("ngIf", !t.shouldShowPhoneWithCountryCode()), e.xp6(2), e.Q6J("ngIf", e.lcZ(64, 87, t.isPhoneOTPVerificationRequired$) && 1 != e.lcZ(65, 89, t.isOTPVerifiedSuccess$) && e.lcZ(66, 91, t.isOTPSentSuccessfully$)), e.xp6(4), e.Q6J("ngIf", e.lcZ(68, 93, t.isPhoneOTPVerificationRequired$) && 1 != e.lcZ(69, 95, t.isOTPVerifiedSuccess$) && e.lcZ(70, 97, t.isOTPSentSuccessfully$)), e.xp6(5), e.Q6J("fieldTextControl", t.job)("maxlength", 30)("label", e.lcZ(73, 99, "create-user-profile.job-title"))("errorList", t.errorList.job), e.xp6(3), e.Q6J("ngIf", (null == t.userProfileDetails ? null : t.userProfileDetails.userStatus) !== t.MIGRATED_USER_STATUS), e.xp6(2), e.s9C("value", e.lcZ(78, 101, "Continue"))
                }
            }
            let U = (() => {
                class o extends T.H {
                    constructor(t, i, n, p, h) {
                        super(i, p, h), this.formBuilder = t, this.store = i, this.registerService = n, this.translationService = p, this.activatedRoute = h, this.errorList = l.Yi, this.MIGRATED_USER_STATUS = v.J.Migrated, this.resendTimer = 180, this.isOTPVerifiedSuccess$ = new b.y, this.isOTPVerifiedSuccess = !1, this.isOTPSentSuccessfully$ = new b.y, this.isPhoneOTPVerificationRequired$ = new b.y, this.isPhoneOTPVerificationRequired = !1, this.profileForm = this.formBuilder.group({
                            job: [l.Pg.job, [(0, r.dH)(30)]],
                            tncAccepted: [l.Pg.tncAccepted, [s.kI.requiredTrue]],
                            name: [l.Pg.company.name, m.B$.get(m.FJ.name)],
                            street: [l.Pg.company.street, [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)]],
                            aptOrSuite: [l.Pg.company.aptOrSuite, [(0, r.dH)(40), (0, r.Jb)(r.IG)]],
                            city: [l.Pg.company.city, [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)]],
                            province: [l.Pg.company.province, [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)]],
                            country: ["CA", [s.kI.required]],
                            postalCode: [l.Pg.company.postalCode, [s.kI.required, C()]],
                            phone: ["", [s.kI.required, (0, r.dH)(17)]],
                            phoneType: [l.Pg.company.phoneType, [s.kI.required]],
                            verificationCode: [{
                                    value: l.Pg.company.verificationCode,
                                    disabled: !0
                                },
                                [s.kI.required, (0, r.dH)(6)]
                            ]
                        }), this.termsAndConditionPdf = "assets/terms-and-condition-files/en/purolatore-shipresourcecenter-agreement-v6.pdf", this.isDataSubmitted = !1, this.isOTPReceivedSucessfully = !1
                    }
                    ngOnInit() {
                        super.ngOnInit(), this.store.dispatch(A.mw({
                            display: !1
                        })), this.profileService.getUserProfileDetails(!1).pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                            t ? .userStatus == v.J.Migrated && (this.userProfileDetails = t, this.prefillMigratedProfile())
                        }), this.termsAndConditionPdf = this.language === g.iu.frCA ? "assets/terms-and-condition-files/fr/pcl-eship-rc-agmt-v5-fr.pdf" : "assets/terms-and-condition-files/en/purolatore-shipresourcecenter-agreement-v6.pdf", this.isLanguageChanged$.pipe((0, _.g)(500), (0, u.R)(this.unsubscribe$)).subscribe(t => {
                            this.translationService.setDefaultLang(t), this.translationService.use(t), this.termsAndConditionPdf = t === g.iu.frCA ? "assets/terms-and-condition-files/fr/pcl-eship-rc-agmt-v5-fr.pdf" : "assets/terms-and-condition-files/en/purolatore-shipresourcecenter-agreement-v6.pdf";
                            let i = this.province.value;
                            this.province.setValue(""), this.province.setValue(i), i = this.phoneType.value, this.phoneType.setValue(""), this.phoneType.setValue(i), this.errorList = this.translateErrors(l.Yi)
                        }), this.isOTPVerifiedSuccess$ = this.profileService.isPhoneOTPVerifiedSuccessfully(), this.isPhoneOTPVerificationRequired$ = this.profileService.isProfilePhoneVerificationRequired(), this.isOTPSentSuccessfully$ = this.profileService.isPhoneOTPSentSuccessfully(), this.isOTPVerifiedSuccess$.pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                            this.isOTPVerifiedSuccess = t || !1
                        }), this.isPhoneOTPVerificationRequired$.pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                            this.isPhoneOTPVerificationRequired = t || !1, this.isPhoneOTPVerificationRequired ? this.verificationCode.enable() : this.verificationCode.disable()
                        }), this.isOTPSentSuccessfully$.pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                            t ? this.verificationCode.enable() : this.verificationCode.disable()
                        }), this.errorList = this.translateErrors(l.Yi), "CA" === this.country.value && (!this.phone.value || "" === this.phone.value) && this.phone.setValue("+1"), this.onCountryChange()
                    }
                    addressSelected({
                        PostalCode: t,
                        ProvinceCode: i,
                        City: n
                    }) {
                        this.postalCode.setValue(t), this.city.setValue(n), this.province.setValue(i)
                    }
                    phoneNumberChange() {
                        if (!(this.phone.value.replace(/[^A-Z0-9]/gi, "").length < 11 || this.phone.value.replace(/[^A-Z0-9]/gi, "").length > 11) && this.phoneType.value == l.z_.Cell) {
                            const i = {
                                cellPhoneNumber: this.phone.value.replace(/[^A-Z0-9]/gi, "")
                            };
                            this.profileService.queryIsPhoneVerificationCodeRequired(i)
                        }
                    }
                    phoneTypeChange() {
                        const t = this.country.value;
                        this.phone.setValue("CA" === t || "US" === t ? "+1" : ""), this.phoneType.value === l.z_.Cell ? this.verificationCode.enable() : this.verificationCode.disable(), this.profileService.resetProfilePhoneVerificationRequired(), this.verificationCode.reset()
                    }
                    verifyCode() {
                        if (this.verificationCode.markAllAsTouched(), this.verificationCode.updateValueAndValidity({
                                onlySelf: !0
                            }), this.verificationCode.valid) {
                            const t = {
                                phoneNumber: this.phone.value.replace(/[^A-Z0-9]/gi, ""),
                                otpPassCode: this.verificationCode.value
                            };
                            this.profileService.verifyPhoneOTP(t)
                        }
                    }
                    resendOTP() {
                        if (this.phone.valid) {
                            const t = {
                                phoneNumber: this.phone.value.replace(/[^A-Z0-9]/gi, "")
                            };
                            this.profileService.resendPhoneOTP(t)
                        }
                    }
                    onSubmit() {
                        this.profileForm.markAllAsTouched(), this.profileForm.updateValueAndValidity(), this.profileForm.valid && (this.isPhoneOTPVerificationRequired && this.isOTPVerifiedSuccess || !this.isPhoneOTPVerificationRequired ? this.createUserProfileInApiPortal() : this.verificationCode.setErrors({ ...this.verificationCode.errors,
                            noMatch: !0
                        }))
                    }
                    createUserProfileInApiPortal() {
                        if (this.profileForm.invalid) {
                            for (const i of Object.keys(this.profileForm.controls)) this.profileForm.controls[i].markAsTouched();
                            return
                        }
                        this.isDataSubmitted = !0;
                        let t = {
                            company: this.name.value,
                            jobTitle: this.job ? .value,
                            tncAccepted: this.tncAccepted.value,
                            mailingAddress: {
                                phone: this.phone ? .value.replace(/[^A-Z0-9]/gi, ""),
                                phoneCountryCode: this.country.value,
                                phoneType: this.phoneType.value.toUpperCase(),
                                streetAddress: this.street.value,
                                suitNum: this.aptOrSuite.value,
                                city: this.city.value,
                                province: this.province.value,
                                postalCode: this.postalCode.value,
                                country: this.country.value
                            }
                        };
                        this.registerService.createUserProfileInApiPortal(t)
                    }
                    prefillMigratedProfile() {
                        this.name.setValue(this.userProfileDetails.company), this.job.setValue(this.userProfileDetails.job), this.tncAccepted.setValue(this.userProfileDetails.tncAccepted), this.phone.setValue(this.userProfileDetails.address.phone), this.country.setValue(this.userProfileDetails.address.country ? this.userProfileDetails.address.country : "CA"), this.street.setValue(this.userProfileDetails.address.streetName), this.aptOrSuite.setValue(this.userProfileDetails.address.suiteNumber), this.city.setValue(this.userProfileDetails.address.city), this.postalCode.setValue(this.userProfileDetails.address.postalCode), this.province.setValue(this.userProfileDetails.address.province), this.userProfileDetails ? .userStatus === v.J.Migrated && this.phoneType.setValue("")
                    }
                    get job() {
                        return this.profileForm.get("job")
                    }
                    get tncAccepted() {
                        return this.profileForm.get("tncAccepted")
                    }
                    get phone() {
                        return this.profileForm.get("phone")
                    }
                    get phoneType() {
                        return this.profileForm.get("phoneType")
                    }
                    get verificationCode() {
                        return this.profileForm.get("verificationCode")
                    }
                    get postalCode() {
                        return this.profileForm.get("postalCode")
                    }
                    get country() {
                        return this.profileForm.get("country")
                    }
                    get province() {
                        return this.profileForm.get("province")
                    }
                    get city() {
                        return this.profileForm.get("city")
                    }
                    get aptOrSuite() {
                        return this.profileForm.get("aptOrSuite")
                    }
                    get street() {
                        return this.profileForm.get("street")
                    }
                    get name() {
                        return this.profileForm.get("name")
                    }
                    hasUnsavedChanges() {
                        return !this.isDataSubmitted
                    }
                    unloadHandler(t) {
                        this.hasUnsavedChanges() && window.opener.location.reload()
                    }
                    ngOnDestroy() {
                        super.ngOnDestroy(), clearInterval(this.resendTimer)
                    }
                    onCountryChange() {
                        this.province.setValue("");
                        const t = this.country.value;
                        "CA" !== t && "US" !== t && (this.phone.setValue(""), this.phone.markAsTouched(), this.phone.updateValueAndValidity()), this.updateProvinceValidation(), this.updateCityValidation(), this.updatePostalCodeValidation(), this.updatePhoneValidation()
                    }
                    getCurrentProvinces() {
                        return this.getProvincesForCountry(this.country.value)
                    }
                    shouldShowProvinceDropdown() {
                        const t = this.country.value;
                        return "CA" === t || "US" === t
                    }
                    shouldShowProvinceTextField() {
                        const t = this.country.value;
                        return "CA" !== t && "US" !== t
                    }
                    isCityRequired() {
                        const t = this.country.value;
                        return "CA" === t || "US" === t
                    }
                    isPostalCodeRequired() {
                        const t = this.country.value;
                        return "CA" === t || "US" === t
                    }
                    isProvinceRequired() {
                        const t = this.country.value;
                        return "CA" === t || "US" === t
                    }
                    getProvinceLabel() {
                        switch (this.country.value) {
                            case "CA":
                                return "shipping.address.province";
                            case "US":
                                return "shipping.address.state";
                            default:
                                return "create-user-profile.province-state-label"
                        }
                    }
                    shouldShowPhoneWithCountryCode() {
                        const t = this.country.value;
                        return "CA" === t || "US" === t
                    }
                    getPhoneCountryCode() {
                        return this.country.value
                    }
                    updateProvinceValidation() {
                        const t = this.country.value;
                        let i = [];
                        i = "CA" === t || "US" === t ? [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)] : [(0, r.dH)(40), (0, r.Jb)(r.IG)], this.province.setValidators(i), this.province.updateValueAndValidity()
                    }
                    updateCityValidation() {
                        const t = this.country.value;
                        let i = [];
                        i = "CA" === t || "US" === t ? [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)] : [(0, r.dH)(40), (0, r.Jb)(r.IG)], this.city.setValidators(i), this.city.updateValueAndValidity()
                    }
                    updatePostalCodeValidation() {
                        const t = this.country.value;
                        let i = [(0, r.dH)(10), (0, r.Jb)(r.IG)];
                        "CA" === t ? i = [s.kI.required, ...i, C()] : "US" === t && (i = [s.kI.required, ...i, o => {
                            if (!o.value || "" === o.value.trim()) return null;
                            const a = o.value.trim();
                            return /^(\d{5})(-\d{4})?$/.test(a) ? null : {
                                invalidUSZipFormat: !0
                            }
                        }]), this.postalCode.setValidators(i), this.postalCode.updateValueAndValidity()
                    }
                    updatePhoneValidation() {
                        const t = this.country.value,
                            i = this.phone.value || "";
                        "CA" === t || "US" === t ? (!i || "" === i) && (this.phone.setValue("+1"), this.phone.markAsTouched()) : ("+1" === i || "1" === i || "+1 " === i || i.startsWith("+1") || i.startsWith("1 ") || i.includes("+1") || /^\+?1[\s\-\(]/.test(i) || "1" === i.trim()) && (this.phone.setValue(""), this.phone.markAsTouched(), this.phone.markAsDirty()), this.phone.updateValueAndValidity({
                            emitEvent: !0
                        })
                    }
                }
                return o.\u0275fac = function(t) {
                    return new(t || o)(e.Y36(s.qu), e.Y36(Z.yh), e.Y36(S.v), e.Y36(c.sK), e.Y36(f.gz))
                }, o.\u0275cmp = e.Xpm({
                    type: o,
                    selectors: [
                        ["purolator-integration-profile"]
                    ],
                    hostAttrs: [1, "pu-main"],
                    hostBindings: function(t, i) {
                        1 & t && e.NdJ("beforeunload", function(p) {
                            return i.unloadHandler(p)
                        }, !1, e.Jf7)
                    },
                    features: [e.qOj],
                    decls: 1,
                    vars: 1,
                    consts: [
                        ["class", "ng-star-inserted", "purolator-login", "", 4, "ngIf"],
                        ["purolator-login", "", 1, "ng-star-inserted"],
                        [1, "d-flex", "justify-content-center", "col-md-10", "mx-auto", "col-xs-11", "col-sm-11", "col-lg-6"],
                        ["_ngcontent-cba-c14", "", 1, "card", "mt-2"],
                        [1, "_Puro-Desk-H", "mx-auto", "ng-star-inserted", "p-3"],
                        [1, "profile-setup-heading"],
                        [1, "card-body"],
                        ["id", "puro-login-widget", 1, "ng-star-inserted", "pu-vertical-layout", "primary-auth"],
                        ["tabindex", "-1", 1, "auth-container", "main-container", "no-beacon"],
                        [1, "auth-content", "p-2"],
                        [1, "auth-content-inner"],
                        [1, "siw-main-view", "identify", "primary-auth"],
                        [1, "siw-main-body"],
                        ["class", "register-info", 4, "ngIf"],
                        [1, "mb-4", "mt-4", "madatory-info"],
                        ["autocomplete", "off", 1, "row", "g-3", 3, "formGroup", "ngSubmit"],
                        [1, "col-12"],
                        ["type", "text", 3, "fieldTextControl", "maxlength", "label", "isRequired", "errorList"],
                        [1, "form-sub-header"],
                        ["role", "alert", 1, "alert", "alert-info", "mb-3"],
                        [1, "col-lg-12", "col-md-12"],
                        [3, "fieldTextControl", "label", "options", "isRequired", "errorList", "onDropdownChange"],
                        [1, "col-lg-6", "col-md-6"],
                        [1, "ap-street-address", 3, "formControl", "isRequired", "label", "country", "errorList", "maxlength", "selected"],
                        [1, "col-lg", "col-md-6"],
                        ["type", "text", 3, "fieldTextControl", "label", "maxlength", "errorList"],
                        ["type", "text", 1, "city", 3, "fieldTextControl", "label", "isRequired", "errorList", "maxlength"],
                        ["type", "text", 1, "zipCode", 3, "fieldTextControl", "isRequired", "label", "errorList", "maxlength"],
                        ["class", "col-lg-12", 4, "ngIf"],
                        [1, "col-md-6"],
                        [3, "fieldTextControl", "label", "options", "errorList", "isRequired", "onDropdownChange"],
                        ["appPhoneNumberFormater", "", "class", "phoneNumber", "type", "phonenumber", 3, "fieldTextControl", "countryCode", "label", "isRequired", "maxlength", "errorList", "handleKeyUp", 4, "ngIf"],
                        ["class", "phoneNumber", "type", "text", 3, "fieldTextControl", "label", "isRequired", "maxlength", "errorList", 4, "ngIf"],
                        [1, "col-md-8"],
                        ["type", "text", 3, "fieldTextControl", "isRequired", "maxlength", "label", "errorList", 4, "ngIf"],
                        ["class", "col-md-4", 4, "ngIf"],
                        ["type", "text", 3, "fieldTextControl", "maxlength", "label", "errorList"],
                        ["class", "col-12", 4, "ngIf"],
                        [1, "o-form-button-bar"],
                        ["type", "submit", "data-type", "save", 1, "button", "button-primary", "continue-btn", 3, "value"],
                        [1, "register-info"],
                        [1, "resend-link"],
                        [1, "ms-1", "tc-link", 3, "click"],
                        [1, "col-lg-12"],
                        [3, "fieldTextControl", "label", "options", "isRequired", "errorList"],
                        ["type", "text", 1, "province", 3, "fieldTextControl", "label", "isRequired", "errorList", "maxlength"],
                        ["appPhoneNumberFormater", "", "type", "phonenumber", 1, "phoneNumber", 3, "fieldTextControl", "countryCode", "label", "isRequired", "maxlength", "errorList", "handleKeyUp"],
                        ["type", "text", 1, "phoneNumber", 3, "fieldTextControl", "label", "isRequired", "maxlength", "errorList"],
                        ["type", "text", 3, "fieldTextControl", "isRequired", "maxlength", "label", "errorList"],
                        [1, "col-md-4"],
                        ["type", "button", "data-type", "Verify", 1, "button", "button-primary", "verify-btn", 3, "value", "click"],
                        [3, "fieldControl", "hasContent", "errorList"],
                        [1, "puro-form-control-checkbox-label"],
                        ["target", "blank", 1, "ms-1", "tc-link", 3, "href"]
                    ],
                    template: function(t, i) {
                        1 & t && e.YNc(0, N, 79, 103, "div", 0), 2 & t && e.Q6J("ngIf", !(null != i.userProfileDetails && i.userProfileDetails.tncAccepted) || (null == i.userProfileDetails ? null : i.userProfileDetails.userStatus) === i.MIGRATED_USER_STATUS)
                    },
                    dependencies: [y.O5, s._Y, s.JJ, s.JL, s.nD, s.oH, s.sg, r.yB, r.GM, r.at, r.mj, y.Ov, c.X$],
                    styles: ['.register-info[_ngcontent-%COMP%]{background:rgba(0,169,206,.2);padding:20px;border-radius:4px;color:#001996;font-size:1rem;font-weight:400}._Puro-Desk-H[_ngcontent-%COMP%]{line-height:inherit!important;width:60%;text-align:center;font-weight:500}#main[_ngcontent-%COMP%]{margin-top:1.75rem!important}.card[_ngcontent-%COMP%]{box-shadow:0 4px 12px #00000029!important}.card[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-right:0;margin-left:0;border:1.5px solid}.custom-checkbox[_ngcontent-%COMP%]{padding-left:0!important}.form-sub-header[_ngcontent-%COMP%]{color:#001996;font-family:Open Sans;font-style:normal;font-weight:400;font-size:25px;line-height:34px}.lbl-width[_ngcontent-%COMP%]{width:100%}.page-heading[_ngcontent-%COMP%]{margin-top:-4.75rem;margin-bottom:2rem}.tab-content[_ngcontent-%COMP%]{background:#fff;border:1px solid #c0c0c0;padding:2rem;border-radius:0 4px 4px}.nav-tabs[_ngcontent-%COMP%]   .nav-link.active[_ngcontent-%COMP%], .nav-tabs[_ngcontent-%COMP%]   .nav-item.show[_ngcontent-%COMP%]   .nav-link[_ngcontent-%COMP%]{background:#ffffff;border:1px solid #c0c0c0;border-bottom:1px solid #fff;border-radius:4px 4px 0 0}.nav-tabs[_ngcontent-%COMP%]   .nav-link[_ngcontent-%COMP%]{font-family:Open Sans;font-style:normal;font-weight:400;font-size:1rem;line-height:24px;text-align:center;color:#001996}.nav-tabs[_ngcontent-%COMP%]   .nav-link.active[_ngcontent-%COMP%], .nav-tabs[_ngcontent-%COMP%]   .nav-item.show[_ngcontent-%COMP%]   .nav-link[_ngcontent-%COMP%]{font-family:Open Sans;font-style:normal;font-weight:400;font-size:1rem;line-height:24px;text-align:center;color:#111}.form-select.is-invalid[_ngcontent-%COMP%]{border-color:#dc3545!important}.verify-btn[_ngcontent-%COMP%]{float:right;height:3.5rem;width:6rem}.card[_ngcontent-%COMP%]{margin-top:-5rem}.madatory-info[_ngcontent-%COMP%]{text-decoration:underline;font-size:14px}.profile-setup-heading[_ngcontent-%COMP%]{font-family:Open Sans;font-style:normal;font-weight:400;font-size:2.2rem;line-height:54px;text-align:center}.continue-btn[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:9px 24px!important;gap:10px!important;width:116px!important;height:55px!important}.alert[_ngcontent-%COMP%]{width:98%!important;margin-left:8px!important}.alert-danger[_ngcontent-%COMP%]{border:1px solid #c0c0c0!important}.alert-success[_ngcontent-%COMP%]{border:1px solid #c0c0c0!important;background:rgba(97,163,10,.1);color:#111;font-weight:400;border:1px solid #c0c0c0;border-radius:4p}.success-msg-icon[_ngcontent-%COMP%]{margin-right:1rem}.resend-link[_ngcontent-%COMP%]{display:block;margin-top:10px}.tc-link[_ngcontent-%COMP%]{color:#001996;font-weight:700;text-decoration:none;cursor:pointer}@media (max-width: 768px){.profile-setup-heading[_ngcontent-%COMP%]{font-size:1.9rem;line-height:40px}}@media (max-width: 480px){.tc-link[_ngcontent-%COMP%]{display:block}}  .form-floating .form-control:focus~label:after,   .form-floating .form-control:not(:placeholder-shown)~label:after,   .form-floating .form-control-plaintext~label:after,   .form-floating .form-select~label:after{background-color:inherit!important}  .pu-isRequired label:after{content:"*"!important;display:contents!important}.puro-form-filled-valid[_ngcontent-%COMP%]{display:initial;margin-top:-2.2rem;padding-right:10px!important;float:right}  .form-select.is-invalid{border:2px solid #ff1212!important}  .ap-street-address .ng-dropdown-panel.ng-select-bottom{margin-top:2px!important}']
                }), o
            })();
            var k = d(457),
                F = d(9300),
                H = d(5761);

            function j(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "a", 35), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.editSection("companyInfo"))
                    }), e.ALo(1, "translate"), e._UZ(2, "img", 36), e.qZA()
                }
                2 & o && e.uIk("aria-label", e.lcZ(1, 1, "create-user-profile.edit.company.name"))
            }

            function Q(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "a", 37), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.editSection("mailingAddress"))
                    }), e.ALo(1, "translate"), e._UZ(2, "img", 36), e.qZA()
                }
                2 & o && e.uIk("aria-label", e.lcZ(1, 1, "create-user-profile.edit.mailing.address"))
            }

            function E(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "a", 37), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.editSection("phoneNumber"))
                    }), e.ALo(1, "translate"), e._UZ(2, "img", 36), e.qZA()
                }
                2 & o && e.uIk("aria-label", e.lcZ(1, 1, "create-user-profile.edit.phone.number"))
            }

            function $(o, a) {
                1 & o && (e.TgZ(0, "p"), e._uU(1), e.ALo(2, "translate"), e.qZA()), 2 & o && (e.xp6(1), e.hij(" ", e.lcZ(2, 1, "profile-setting.phone-number-verification-text"), ""))
            }

            function G(o, a) {
                if (1 & o) {
                    const t = e.EpF();
                    e.TgZ(0, "div", 38)(1, "input", 39), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.updateProfileSettings())
                    }), e.ALo(2, "translate"), e.qZA(), e.TgZ(3, "input", 40), e.NdJ("click", function() {
                        e.CHM(t);
                        const n = e.oxw();
                        return e.KtG(n.cancelEdit())
                    }), e.ALo(4, "translate"), e.qZA()()
                }
                2 & o && (e.xp6(1), e.s9C("value", e.lcZ(2, 2, "create-user-profile.save-btn-text")), e.xp6(2), e.s9C("value", e.lcZ(4, 4, "generate-new-password.Cancel")))
            }
            const Y = [{
                path: "",
                component: U
            }, {
                path: "profile-settings",
                component: (() => {
                    class o extends T.H {
                        constructor(t, i, n, p, h, K) {
                            super(i, p, h), this.formBuilder = t, this.store = i, this.translationService = n, this.translate = p, this.activatedRoute = h, this.registerUserService = K, this.profileSettingsForm = this.formBuilder.group({
                                job: [l.Pg.job, [(0, r.dH)(30)]],
                                name: [l.Pg.company.name, m.B$.get(m.FJ.name)],
                                street: [l.Pg.company.street, [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)]],
                                aptOrSuite: [l.Pg.company.aptOrSuite, [(0, r.dH)(40), (0, r.Jb)(r.IG)]],
                                city: [l.Pg.company.city, [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)]],
                                province: [l.Pg.company.province, [s.kI.required, (0, r.dH)(40), (0, r.Jb)(r.IG)]],
                                country: ["CA", [s.kI.required]],
                                postalCode: [l.Pg.company.postalCode, [s.kI.required, C()]],
                                phone: ["+1", [s.kI.required, (0, r.dH)(17), s.kI.pattern(r.U8)]],
                                phoneType: [l.Pg.company.phoneType, [s.kI.required]],
                                verificationCode: [{
                                        value: l.Pg.company.verificationCode,
                                        disabled: !0
                                    },
                                    [s.kI.required, (0, r.dH)(6)]
                                ]
                            }), this.isPhoneOTPVerificationRequired = !1, this.isPhoneOTPVerifiedSuccessFully = !1, this.isCompanyInfoDisabled = !0, this.isMailingAddressDisabled = !0, this.isPhoneNumberDisabled = !0, this.showSaveChangesModal = !1, this.showVerifyOTPModal = !1, this.verifyOTPPopupMessage = "", this.currentEditClicked = "", this.termsAndConditionPdf = "assets/terms-and-condition-files/en/purolatore-shipresourcecenter-agreement-v6.pdf", this.phoneVerificationErrorMessage = "", this.showUnSavedChangesModal = !1, this.PhoneTypes = l.z_, this.leaveConfirmed = new e.vpe, this.errorList = l.Yi
                        }
                        unloadHandler(t) {
                            this.hasUnsavedChanges() && window.opener.location.reload()
                        }
                        ngOnInit() {
                            super.ngOnInit(), this.store.dispatch(A.mw({
                                display: !0
                            })), this.profileService.isPhoneOTPSentSuccessfully().pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                                t ? this.openVerifyOTPPopup() : this.closeVerifyOTPPopup(), t ? this.verificationCode.enable() : this.verificationCode.disable()
                            }), this.profileService.isPhoneOTPVerifiedSuccessfully().pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                                this.isPhoneOTPVerifiedSuccessFully = t || !1, t && (this.closeVerifyOTPPopup(), this.updateProfileSettings())
                            }), this.profileSettingsDataSubscriptions(), this.termsAndConditionPdf = this.language === g.iu.frCA ? "assets/terms-and-condition-files/fr/pcl-eship-rc-agmt-v5-fr.pdf" : "assets/terms-and-condition-files/en/purolatore-shipresourcecenter-agreement-v6.pdf", this.isLanguageChanged$.pipe((0, _.g)(500), (0, u.R)(this.unsubscribe$)).subscribe(t => {
                                this.termsAndConditionPdf = t === g.iu.frCA ? "assets/terms-and-condition-files/fr/pcl-eship-rc-agmt-v5-fr.pdf" : "assets/terms-and-condition-files/en/purolatore-shipresourcecenter-agreement-v6.pdf", this.translationService.setDefaultLang(t), this.translationService.use(t);
                                let i = this.province.value;
                                this.province.setValue(""), this.province.setValue(i), i = this.phoneType.value, this.phoneType.setValue(""), this.phoneType.setValue(i), this.errorList = this.translateErrors(l.Yi)
                            }), this.errorList = this.translateErrors(l.Yi), this.profileService.isProfilePhoneVerificationRequired().pipe((0, u.R)(this.unsubscribe$)).subscribe(t => {
                                this.isPhoneOTPVerificationRequired = t || !1, this.isPhoneOTPVerificationRequired ? this.verificationCode.enable() : this.verificationCode.disable()
                            })
                        }
                        addressSelected({
                            PostalCode: t,
                            ProvinceCode: i,
                            City: n
                        }) {
                            this.postalCode.setValue(t), this.city.setValue(n), this.province.setValue(i)
                        }
                        phoneTypeChange() {
                            this.phone.reset(""), this.phoneType.value === l.z_.Cell ? this.verificationCode.enable() : this.verificationCode.disable(), this.profileService.resetProfilePhoneVerificationRequired(), this.verificationCode.reset()
                        }
                        phoneNumberChange() {
                            if (!(this.phone.value.replace(/[^A-Z0-9]/gi, "").length < 11 || this.phone.value.replace(/[^A-Z0-9]/gi, "").length > 11) && this.phoneType.value == l.z_.Cell) {
                                const i = {
                                    cellPhoneNumber: this.phone.value.replace(/[^A-Z0-9]/gi, "")
                                };
                                this.profileService.queryIsPhoneVerificationCodeRequired(i)
                            }
                        }
                        resendOTP() {
                            if (this.phone.valid) {
                                const t = {
                                    phoneNumber: this.phone.value.replace(/[^A-Z0-9]/gi, "")
                                };
                                this.profileService.resendPhoneOTP(t)
                            }
                        }
                        verifyCode() {
                            if (this.verificationCode.markAllAsTouched(), this.verificationCode.updateValueAndValidity({
                                    onlySelf: !0
                                }), this.verificationCode.valid) {
                                const t = {
                                    phoneNumber: this.phone.value.replace(/[^A-Z0-9]/gi, ""),
                                    otpPassCode: this.verificationCode.value
                                };
                                this.profileService.verifyPhoneOTP(t)
                            }
                        }
                        editSection(t) {
                            this.isCancelClicked = !1, this.currentEditClicked = t, this.isCompanyInfoDisabled && this.isMailingAddressDisabled && this.isPhoneNumberDisabled ? (t == l.TV.COMPANY_INFO && (this.isCompanyInfoDisabled = !1), t == l.TV.MAILING_ADDRESS && (this.isMailingAddressDisabled = !1), t == l.TV.PHONE_NUMBER && (this.isPhoneNumberDisabled = !1)) : this.openPopup()
                        }
                        cancelEdit() {
                            this.isCancelClicked = !0, this.leaveChanges(void 0)
                        }
                        updateProfileSettings() {
                            this.profileSettingsForm.markAllAsTouched(), this.profileSettingsForm.updateValueAndValidity(), this.profileSettingsForm.valid && (this.saveCompany(), this.savePhoneNumber(), this.saveMailingAddress())
                        }
                        saveCompany() {
                            this.isCompanyInfoDisabled || (this.profileService.updateCompanyInfo({
                                company: this.name.value,
                                jobTitle: this.job.value
                            }), this.isCompanyInfoDisabled = !0)
                        }
                        savePhoneNumber() {
                            !this.isPhoneNumberDisabled && (!this.isPhoneOTPVerificationRequired || this.isPhoneOTPVerificationRequired && this.isPhoneOTPVerifiedSuccessFully) && (this.profileService.updatePhoneNumber({
                                phone: this.phone.value.replace(/[^A-Z0-9]/gi, ""),
                                phoneCountryCode: this.country.value,
                                phoneType: this.phoneType.value.toUpperCase()
                            }), this.isPhoneNumberDisabled = !0)
                        }
                        saveMailingAddress() {
                            this.isMailingAddressDisabled || (this.profileService.updateMailingAddress({
                                streetAddress: this.street.value,
                                addressLine3: "string",
                                suitNum: this.aptOrSuite.value,
                                city: this.city.value,
                                province: this.province.value,
                                postalCode: this.postalCode.value,
                                country: this.country.value,
                                buzzCode: "string"
                            }), this.isMailingAddressDisabled = !0)
                        }
                        openPopup() {
                            this.showSaveChangesModal = !0
                        }
                        closePopup(t) {
                            this.showSaveChangesModal = !1
                        }
                        openVerifyOTPPopup() {
                            const t = this.translate.instant("profile-settings.phone-verification-popup.OTP-SEND-TEXT-1.0"),
                                i = this.translate.instant("profile-settings.phone-verification-popup.OTP-SEND-TEXT-1.1");
                            this.verifyOTPPopupMessage = t + this.phone ? .value + i, this.showVerifyOTPModal = !0
                        }
                        closeVerifyOTPPopup() {
                            this.verificationCode.reset(), this.verificationCode.disable(), this.showVerifyOTPModal = !1
                        }
                        leaveChanges(t) {
                            this.isPhoneNumberDisabled || (this.resetPhoneNumberFields(), this.isPhoneNumberDisabled = !0, this.verificationCode.disable()), this.isMailingAddressDisabled || (this.resetMailingAddressFields(), this.isMailingAddressDisabled = !0), this.isCompanyInfoDisabled || (this.resetCompanyInfoFields(), this.isCompanyInfoDisabled = !0), "companyInfo" == this.currentEditClicked && (this.isCompanyInfoDisabled = !1), "mailingAddress" == this.currentEditClicked && (this.isMailingAddressDisabled = !1), "phoneNumber" == this.currentEditClicked && (this.isPhoneNumberDisabled = !1), this.isCancelClicked && (this.isPhoneNumberDisabled = !0, this.isMailingAddressDisabled = !0, this.isCompanyInfoDisabled = !0), this.closePopup(t)
                        }
                        setProfileDetails(t) {
                            this.name.setValue(t.company), this.job.setValue(t.jobTitle), this.phoneType.setValue(t.address.phoneType), this.phone.setValue(t.address.phone), this.country.setValue(t.address.country ? t.address.country : "CA"), this.street.setValue(t.address.streetName), this.aptOrSuite.setValue(t.address.suiteNumber), this.city.setValue(t.address.city), this.postalCode.setValue(t.address.postalCode), this.province.setValue(t.address.province)
                        }
                        resetCompanyInfoFields() {
                            this.name.reset(this.userProfileDetails.company), this.job.reset(this.userProfileDetails.jobTitle)
                        }
                        resetMailingAddressFields() {
                            this.street.reset(this.userProfileDetails.address.streetName), this.aptOrSuite.reset(this.userProfileDetails.address.suiteNumber), this.city.reset(this.userProfileDetails.address.city), this.postalCode.reset(this.userProfileDetails.address.postalCode), this.province.reset(this.userProfileDetails.address.province)
                        }
                        resetPhoneNumberFields() {
                            this.phone.reset(this.userProfileDetails.address.phone), this.phoneType.reset(this.userProfileDetails.address.phoneType), this.profileService.resetProfilePhoneVerificationRequired(), this.verificationCode.reset()
                        }
                        showModal() {
                            const t = new Promise(i => {
                                this.showUnSavedChangesModal = !0, this.leaveConfirmed.subscribe(n => {
                                    this.showUnSavedChangesModal = !1, i(n)
                                })
                            });
                            return (0, k.D)(t)
                        }
                        confirmLeave() {
                            this.leaveConfirmed.emit("true")
                        }
                        hasUnsavedChanges() {
                            return !(this.isCompanyInfoDisabled && this.isMailingAddressDisabled && this.isPhoneNumberDisabled) && (this.profileSettingsForm.touched || this.profileSettingsForm.dirty)
                        }
                        closeUnShavedPopup(t) {
                            this.showUnSavedChangesModal = !1
                        }
                        profileSettingsDataSubscriptions() {
                            this.profileService.getUserProfileDetails(!0).pipe((0, F.h)(t => !!t && Object.keys(t).length > 0), (0, u.R)(this.unsubscribe$)).subscribe(t => {
                                this.userProfileDetails = t, this.setProfileDetails(this.userProfileDetails)
                            })
                        }
                        get job() {
                            return this.profileSettingsForm.get("job")
                        }
                        get phone() {
                            return this.profileSettingsForm.get("phone")
                        }
                        get phoneType() {
                            return this.profileSettingsForm.get("phoneType")
                        }
                        get verificationCode() {
                            return this.profileSettingsForm.get("verificationCode")
                        }
                        get postalCode() {
                            return this.profileSettingsForm.get("postalCode")
                        }
                        get country() {
                            return this.profileSettingsForm.get("country")
                        }
                        get province() {
                            return this.profileSettingsForm.get("province")
                        }
                        get city() {
                            return this.profileSettingsForm.get("city")
                        }
                        get aptOrSuite() {
                            return this.profileSettingsForm.get("aptOrSuite")
                        }
                        get street() {
                            return this.profileSettingsForm.get("street")
                        }
                        get name() {
                            return this.profileSettingsForm.get("name")
                        }
                    }
                    return o.\u0275fac = function(t) {
                        return new(t || o)(e.Y36(s.qu), e.Y36(Z.yh), e.Y36(c.sK), e.Y36(c.sK), e.Y36(f.gz), e.Y36(S.v))
                    }, o.\u0275cmp = e.Xpm({
                        type: o,
                        selectors: [
                            ["pu-profile-settings"]
                        ],
                        hostBindings: function(t, i) {
                            1 & t && e.NdJ("beforeunload", function(p) {
                                return i.unloadHandler(p)
                            }, !1, e.Jf7)
                        },
                        outputs: {
                            leaveConfirmed: "leaveConfirmed"
                        },
                        features: [e.qOj],
                        decls: 81,
                        vars: 162,
                        consts: [
                            [1, "_Puro-Desk-H1", "page-heading", "pb-2"],
                            ["aria-labelledby", "APIDashboard-tab", 1, "card"],
                            [1, "card-body"],
                            [1, "d-flex", "justify-content-center", "col-md-8", "mx-auto", "col-xs-11", "col-sm-11", "col-lg-6"],
                            [3, "formGroup"],
                            [1, "row", "g-3", "pb-5", "pt-4"],
                            [1, "_Puro-Desk-H2", "pb-0", "d-flex", "justify-content-between"],
                            ["href", "javascript:void(0)", "class", "edit-icon", "data-toggle", "modal", "data-target", "#exampleModal1", 3, "click", 4, "ngIf"],
                            [1, "col-12"],
                            ["type", "text", 3, "fieldTextControl", "maxlength", "disabled", "label", "isRequired", "errorList"],
                            ["type", "text", 3, "fieldTextControl", "maxlength", "disabled", "label", "errorList"],
                            [1, "row", "g-3", "pb-5"],
                            ["href", "javascript:void(0)", "class", "edit-icon", 3, "click", 4, "ngIf"],
                            [3, "fieldTextControl", "label", "options", "errorList", "disabled", "isRequired"],
                            [1, "col-xl-7", "col-lg-12", "col-md-12", "col-sm-12", "col-xs-12"],
                            [3, "formControl", "isRequired", "disabled", "label", "country", "errorList", "maxlength", "selected"],
                            [1, "col-xl-5", "col-lg-12", "col-md-12", "col-sm-12", "col-xs-12"],
                            ["type", "text", 3, "fieldTextControl", "disabled", "label", "maxlength", "errorList"],
                            ["type", "text", 1, "city", 3, "fieldTextControl", "disabled", "label", "isRequired", "errorList", "maxlength"],
                            ["type", "text", 1, "zipCode", 3, "fieldTextControl", "disabled", "isRequired", "label", "errorList", "maxlength"],
                            [3, "fieldTextControl", "disabled", "label", "options", "isRequired", "errorList"],
                            [1, "row", "g-3", "pb-4"],
                            [3, "fieldTextControl", "label", "options", "isRequired", "errorList", "disabled"],
                            [3, "fieldTextControl", "disabled", "label", "options", "errorList", "isRequired", "onDropdownChange"],
                            ["appPhoneNumberFormater", "", "type", "phonenumber", 1, "phoneNumber", 3, "disabled", "fieldTextControl", "countryCode", "label", "isRequired", "maxlength", "errorList", "handleKeyUp"],
                            [4, "ngIf"],
                            ["class", "o-form-button-bar d-flex justify-content-end mb-4", 4, "ngIf"],
                            [1, "row", "g-3", "pb-4", "pt-2"],
                            ["target", "_blank", "rel", "noopener noreferrer", 1, "tncLink", 3, "href"],
                            [3, "innerHtml"],
                            [3, "title", "body", "showModal", "cancelButtonText", "saveButtonText", "popupId", "closeDailog", "saveDialog"],
                            [3, "title", "body", "showModal", "cancelButtonText", "saveButtonText", "popupId", "openDailog", "closeDailog", "saveDialog"],
                            ["type", "text", "digitOnly", "", 3, "fieldTextControl", "isRequired", "maxlength", "label", "errorList"],
                            [1, "footer-after-buttons"],
                            ["rel", "noopener noreferrer", 1, "resend-otp", 3, "click"],
                            ["href", "javascript:void(0)", "data-toggle", "modal", "data-target", "#exampleModal1", 1, "edit-icon", 3, "click"],
                            ["src", "assets/images/pencil-fill.svg", "alt", ""],
                            ["href", "javascript:void(0)", 1, "edit-icon", 3, "click"],
                            [1, "o-form-button-bar", "d-flex", "justify-content-end", "mb-4"],
                            ["type", "submit", "data-type", "save", 1, "button", "button-primary", "save-btn", "cursor-pointer", 3, "value", "click"],
                            ["type", "submit", "data-type", "save", 1, "button", "button-secondary", "cancel-btn", "ms-3", 3, "value", "click"]
                        ],
                        template: function(t, i) {
                            1 & t && (e.TgZ(0, "h1", 0), e._uU(1), e.ALo(2, "translate"), e.qZA(), e.TgZ(3, "div", 1)(4, "div", 2)(5, "div", 3)(6, "form", 4)(7, "div", 5)(8, "h5", 6), e._uU(9), e.ALo(10, "translate"), e.YNc(11, j, 3, 3, "a", 7), e.qZA(), e.TgZ(12, "div", 8), e._UZ(13, "puro-field-text", 9), e.ALo(14, "translate"), e.qZA(), e.TgZ(15, "div", 8), e._UZ(16, "puro-field-text", 10), e.ALo(17, "translate"), e.qZA()(), e.TgZ(18, "div", 11)(19, "h5", 6), e._uU(20), e.ALo(21, "translate"), e.YNc(22, Q, 3, 3, "a", 12), e.qZA(), e.TgZ(23, "div", 8), e._UZ(24, "puro-field-dropdown", 13), e.ALo(25, "translate"), e.qZA(), e.TgZ(26, "div", 14)(27, "purolator-field-address", 15), e.NdJ("selected", function(p) {
                                return i.addressSelected(p)
                            }), e.ALo(28, "translate"), e.qZA()(), e.TgZ(29, "div", 16), e._UZ(30, "puro-field-text", 17), e.ALo(31, "translate"), e.qZA(), e.TgZ(32, "div", 14), e._UZ(33, "puro-field-text", 18), e.ALo(34, "translate"), e.qZA(), e.TgZ(35, "div", 16), e._UZ(36, "puro-field-text", 19), e.ALo(37, "translate"), e.qZA(), e.TgZ(38, "div", 8), e._UZ(39, "puro-field-dropdown", 20), e.ALo(40, "translate"), e.qZA()(), e.TgZ(41, "div", 21)(42, "h5", 6), e._uU(43), e.ALo(44, "translate"), e.YNc(45, E, 3, 3, "a", 12), e.qZA(), e.TgZ(46, "div", 8), e._UZ(47, "puro-field-dropdown", 22), e.ALo(48, "translate"), e.qZA(), e.TgZ(49, "div", 14)(50, "puro-field-dropdown", 23), e.NdJ("onDropdownChange", function() {
                                return i.phoneTypeChange()
                            }), e.ALo(51, "translate"), e.qZA()(), e.TgZ(52, "div", 16)(53, "puro-field-text", 24), e.NdJ("handleKeyUp", function() {
                                return i.phoneNumberChange()
                            }), e.ALo(54, "translate"), e.qZA()()(), e.YNc(55, $, 3, 3, "p", 25), e.YNc(56, G, 5, 6, "div", 26), e.TgZ(57, "div", 27)(58, "a", 28), e._UZ(59, "span", 29), e.ALo(60, "translate"), e.qZA()()()()()(), e.TgZ(61, "puro-modal", 30), e.NdJ("closeDailog", function(p) {
                                return i.closePopup(p)
                            })("saveDialog", function(p) {
                                return i.leaveChanges(p)
                            }), e.ALo(62, "translate"), e.ALo(63, "translate"), e.ALo(64, "translate"), e.ALo(65, "translate"), e.qZA(), e.TgZ(66, "puro-modal", 31), e.NdJ("openDailog", function() {
                                return i.openVerifyOTPPopup()
                            })("closeDailog", function() {
                                return i.closeVerifyOTPPopup()
                            })("saveDialog", function() {
                                return i.verifyCode()
                            }), e.ALo(67, "translate"), e.ALo(68, "translate"), e.ALo(69, "translate"), e._UZ(70, "puro-field-text", 32), e.ALo(71, "translate"), e.TgZ(72, "div", 33)(73, "span", 34), e.NdJ("click", function() {
                                return i.resendOTP()
                            }), e._uU(74), e.ALo(75, "translate"), e.qZA()()(), e.TgZ(76, "puro-modal", 30), e.NdJ("closeDailog", function(p) {
                                return i.closeUnShavedPopup(p)
                            })("saveDialog", function() {
                                return i.confirmLeave()
                            }), e.ALo(77, "translate"), e.ALo(78, "translate"), e.ALo(79, "translate"), e.ALo(80, "translate"), e.qZA()), 2 & t && (e.xp6(1), e.Oqu(e.lcZ(2, 104, "profile-setting.business-profile-text")), e.xp6(5), e.Q6J("formGroup", i.profileSettingsForm), e.xp6(3), e.hij(" ", e.lcZ(10, 106, "profile-setting.company-information-text"), " "), e.xp6(2), e.Q6J("ngIf", i.isCompanyInfoDisabled), e.xp6(2), e.Q6J("fieldTextControl", i.name)("maxlength", 30)("disabled", i.isCompanyInfoDisabled)("label", e.lcZ(14, 108, "create-user-profile.company-name-label"))("isRequired", !0)("errorList", i.errorList.name), e.xp6(3), e.Q6J("fieldTextControl", i.job)("maxlength", 30)("disabled", i.isCompanyInfoDisabled)("label", e.lcZ(17, 110, "create-user-profile.job-title"))("errorList", i.errorList.job), e.xp6(4), e.hij(" ", e.lcZ(21, 112, "profile-setting.mailing-address-text"), " "), e.xp6(2), e.Q6J("ngIf", i.isMailingAddressDisabled), e.xp6(2), e.Q6J("fieldTextControl", i.country)("label", e.lcZ(25, 114, "select"))("options", i.countries)("errorList", i.errorList.country)("disabled", !0)("isRequired", !0), e.xp6(3), e.Q6J("formControl", i.street)("isRequired", !0)("isRequired", !0)("disabled", i.isMailingAddressDisabled)("label", e.lcZ(28, 116, "create-user-profile.street-address-label"))("country", i.country.value)("errorList", i.errorList.street)("maxlength", 40), e.xp6(3), e.Q6J("fieldTextControl", i.aptOrSuite)("disabled", i.isMailingAddressDisabled)("label", e.lcZ(31, 118, "create-user-profile.apt-suite-label"))("maxlength", 40)("errorList", i.errorList.aptOrSuite), e.xp6(3), e.Q6J("fieldTextControl", i.city)("disabled", i.isMailingAddressDisabled)("label", e.lcZ(34, 120, "create-user-profile.city-label"))("isRequired", !0)("errorList", i.errorList.city)("maxlength", 40), e.xp6(3), e.Q6J("fieldTextControl", i.postalCode)("disabled", i.isMailingAddressDisabled)("isRequired", !0)("label", e.lcZ(37, 122, "Postal Code"))("errorList", i.errorList.postalCode)("maxlength", 10), e.xp6(3), e.Q6J("fieldTextControl", i.province)("disabled", i.isMailingAddressDisabled)("label", e.lcZ(40, 124, "select"))("options", i.provinces)("isRequired", !0)("errorList", i.errorList.province)("isRequired", !0), e.xp6(4), e.hij(" ", e.lcZ(44, 126, "profile-setting.phone-number-text"), " "), e.xp6(2), e.Q6J("ngIf", i.isPhoneNumberDisabled), e.xp6(2), e.Q6J("fieldTextControl", i.country)("label", e.lcZ(48, 128, "select"))("options", i.countries)("isRequired", !0)("errorList", i.errorList.country)("disabled", !0), e.xp6(3), e.Q6J("fieldTextControl", i.phoneType)("disabled", i.isPhoneNumberDisabled)("label", e.lcZ(51, 130, "select"))("options", i.phoneTypes)("errorList", i.errorList.phoneType)("isRequired", !0), e.xp6(3), e.Q6J("disabled", i.isPhoneNumberDisabled)("fieldTextControl", i.phone)("countryCode", i.country.value)("label", e.lcZ(54, 132, "create-user-profile.phone-number-label"))("isRequired", !0)("maxlength", 17)("errorList", i.errorList.phone), e.xp6(2), e.Q6J("ngIf", i.phoneType.value == i.PhoneTypes.Cell), e.xp6(1), e.Q6J("ngIf", !i.isCompanyInfoDisabled || !i.isMailingAddressDisabled || !i.isPhoneNumberDisabled), e.xp6(2), e.Q6J("href", i.termsAndConditionPdf, e.LSH), e.xp6(1), e.s9C("innerHtml", e.lcZ(60, 134, "profile-setting.tnc-text"), e.oJD), e.xp6(2), e.Q6J("title", e.lcZ(62, 136, "profile-settings.cancel-edit-popup.heading"))("body", e.lcZ(63, 138, "profile-settings.cancel-edit-popup.body"))("showModal", i.showSaveChangesModal)("cancelButtonText", e.lcZ(64, 140, "generate-new-password.Cancel"))("saveButtonText", e.lcZ(65, 142, "profile-settings.cancel-edit-popup.leave-button"))("popupId", "exampleModal1"), e.xp6(5), e.Q6J("title", e.lcZ(67, 144, "profile-settings.phone-verification-popup.heading"))("body", i.verifyOTPPopupMessage)("showModal", i.showVerifyOTPModal && "CELL" === i.phoneType.value)("cancelButtonText", e.lcZ(68, 146, "generate-new-password.Cancel"))("saveButtonText", e.lcZ(69, 148, "profile-settings.phone-verification-popup.verify-button-text"))("popupId", "exampleModal2"), e.xp6(4), e.Q6J("fieldTextControl", i.verificationCode)("isRequired", !0)("maxlength", 6)("label", e.lcZ(71, 150, "create-user-profile.verification-code-label"))("errorList", i.errorList.verificationCode), e.xp6(4), e.Oqu(e.lcZ(75, 152, "create-user-profile.resend-info-link")), e.xp6(2), e.Q6J("title", e.lcZ(77, 154, "profile-settings.cancel-edit-popup.heading"))("body", e.lcZ(78, 156, "profile-settings.cancel-edit-popup.body"))("showModal", i.showUnSavedChangesModal)("cancelButtonText", e.lcZ(79, 158, "generate-new-password.Cancel"))("saveButtonText", e.lcZ(80, 160, "profile-settings.cancel-edit-popup.leave-button"))("popupId", "exampleModal3"))
                        },
                        dependencies: [y.O5, s._Y, s.JJ, s.JL, s.nD, s.oH, s.sg, r.e8, r.yB, r.GM, r.at, H.L, c.X$],
                        styles: ['.tncLink[_ngcontent-%COMP%]{color:#001996;text-decoration:none;font-size:1rem}.edit-icon[_ngcontent-%COMP%]{display:inline-block;height:30px;width:30px}.button[_ngcontent-%COMP%]{display:flex;flex-direction:row;justify-content:center;align-items:center;padding:9px 24px!important;gap:10px!important;width:116px!important;height:55px!important;border-radius:4px}.cancel-btn[_ngcontent-%COMP%]{background:none!important;color:#001996;border:1px solid #001996}.save-btn[_ngcontent-%COMP%]{background-color:#001996;color:#fff;border:none}.edit-icon[_ngcontent-%COMP%]{cursor:pointer}.verify-btn[_ngcontent-%COMP%]{float:right;background-color:#001996;color:#fff;border:none}.resend-otp[_ngcontent-%COMP%]{color:#001996;text-decoration:none;font-size:1rem;cursor:pointer}  .form-floating .form-control:focus~label:after,   .form-floating .form-control:not(:placeholder-shown)~label:after,   .form-floating .form-control-plaintext~label:after,   .form-floating .form-select~label:after{background-color:inherit!important}  .pu-isRequired label:after{content:"*"!important;display:contents!important}  .form-label{min-width:265px!important}.text-danger[_ngcontent-%COMP%]{float:left!important}']
                    }), o
                })(),
                canDeactivate: [L.O]
            }];
            let B = (() => {
                    class o {}
                    return o.\u0275fac = function(t) {
                        return new(t || o)
                    }, o.\u0275mod = e.oAB({
                        type: o
                    }), o.\u0275inj = e.cJS({
                        imports: [f.Bz.forChild(Y), f.Bz, x.m]
                    }), o
                })(),
                z = (() => {
                    class o {}
                    return o.\u0275fac = function(t) {
                        return new(t || o)
                    }, o.\u0275mod = e.oAB({
                        type: o
                    }), o.\u0275inj = e.cJS({
                        imports: [B, x.m]
                    }), o
                })()
        }
    }
]);