1'use strict'; 2 3 4angular.module('dpiApp') 5 .controller('RegisterController', function ($scope, $timeout, $http, configService, $rootScope, $location, $window, $route, $routeParams) { 6 $scope.front_spinner = 0; 7 $scope.userid = isNaN(current_theme) ? user_id : current_theme; //408; 8 $scope.regForm = {}; 9 $scope.routeName = $route.current.$$route.name; 10 $scope.userparam = $routeParams.useremail; 11 $scope.showErrMsg = 0; 12 $scope.client = {}; 13 $scope.show_message_old_password = ''; 14 $scope.show_color = ""; 15 $scope.showSuccMsg = 0; 16 $scope.old_password_class = ''; 17 $scope.clientSuccMsg = 0; 18 $scope.client_succ_msg = ''; 19 $scope.clientErrMsg = 0; 20 $scope.client_err_msg = ''; 21 $scope.clientErrMsg2 = 0; 22 23 $scope.favourite_properties = {}; 24 $scope.save_searches = {}; 25 $scope.deletemsg = ''; 26 $scope.deletemsg_show = 0; 27 $scope.deletemsg = ''; 28 $scope.delete_class = ''; 29 $scope.loginForm = {}; 30 $scope.agentform = {}; 31 32 $rootScope.getAgentDetails(); 33 var dpi_base_url="/"; 34 35 /* Valid Email Checking Start */ 36 $scope.checkEmail = function (email) { 37 38 var patt = /^$|^((([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-zA-Z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-zA-Z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-zA-Z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/; 39 var res = patt.test(email); 40 41 if (res) { 42 return 1; 43 } else { 44 if (typeof email == 'undefined') { 45 return 1; 46 } 47 return 0; 48 } 49 }; 50 51 52 53 //sessionStorage.setItem('client_type',$scope.client.client_type); 54 $scope.registerClient = function (client) { 55 56 $scope.front_spinner = 1; 57 $scope.succ_msg = ''; 58 var website = 0; 59 var amount = 0; 60 61 var data = { 62 client: client, 63 member_id: $scope.userid 64 }; 65 66 var config = { 67 headers: { 68 'Content-Type': 'application/json; charset=utf-8' 69 } 70 }; 71 72 $http.post(base_url + "/firstclient/register", data, config) 73 .success(function (data, status, headers, config) { 74 $scope.front_spinner = 0; 75 76 if (data.status == 2) { 77 $scope.change_color = "color:red"; 78 $scope.show_message_email = 'Email already exists.'; 79 } else { 80 $scope.show_registration = 1; 81 $scope.registration_class = "alert alert-success"; 82 //$scope.change_color = "color:green"; 83 $scope.show_message = 'Successfully Registered! Please <a href="user-login">Click Here</a> and login with your credentials.'; 84 $window.scrollTo(0, 0); 85 $scope.regForm.reset(); 86 87 } 88 89 }) 90 .error(function (data, status, header, config) { 91 92 }); 93 94 } 95 96 97 $scope.$watch('client.email', function (value, oldValue) { 98 if (oldValue != value) { 99 $scope.show_message_email = ''; 100 } 101 }); 102 103 if ($scope.routeName === 'userlogin') { 104 $scope.showSuccMsg = 0; 105 if (localStorage.getItem('activate_msg') === null) { } else { 106 $scope.showSuccMsg = 1; 107 $scope.registration_class = "alert alert-success"; 108 $scope.show_message = localStorage.getItem('activate_msg'); 109 setTimeout(function () { 110 $scope.showSuccMsg = 0; 111 localStorage.removeItem('activate_msg'); 112 $scope.show_message = ''; 113 $scope.registration_class = ''; 114 $scope.$apply(); 115 }, 3000); 116 } 117 118 } 119 $scope.userDetails = function () // Afetr login All user data store and formated for work 120 { 121 var user_info = atob(localStorage.getItem("usr_info")); 122 var user_array = new Array(); 123 var user_array = user_info.split('|@|'); 124 var user_id = user_array[0]; 125 var user_first_name = user_array[1]; 126 var user_email = user_array[2]; 127 128 return [user_id, user_first_name, user_email]; 129 } 130 131 132 // Function to redirect user to Laravel for Google login 133 $scope.loginWithGoogle = function () { 134 $window.location.href = base_url + "/shared/google-login/redirect"; 135 }; 136 137 // Extract token from the url 138 // const token = $location.search().token; 139 // if (token) { 140 // const userInfo = $location.search().usr_info; 141 // const redirectUrl = $location.search().redirect_url; 142 // $scope.showErrMsg = 0; 143 // $rootScope.is_front_logged = 1; 144 // localStorage.setItem("usr_info", userInfo); 145 // localStorage.setItem("access_token", token); 146 // var client_details = []; 147 // client_details = $scope.userDetails(); 148 // $rootScope.logged_user_id = client_details[0]; 149 // $rootScope.logged_user_name = client_details[1]; 150 // $location.search("token", null); 151 // $location.search("usr_info", null); 152 // if (redirectUrl) { 153 // window.location.href = redirectUrl; 154 // } else { 155 // if (localStorage.getItem("prevroute") !== null) { 156 // $location.path(localStorage.getItem('prevroute')); 157 // } else { 158 // $location.path('/my-profile'); 159 // } 160 // } 161 // } 162 163 $scope.loginWithGoogleOld = function (googleUserId, clientData) { 164 $scope.showLoader = 1; 165 const data = { 166 formname: "loginForm", 167 google_user_id: googleUserId, 168 contact: clientData, 169 member_id: $scope.userid 170 }; 171 const config = { 172 headers: { 173 'Content-Type': 'application/json; charset=utf-8' 174 } 175 }; 176 $http.post(base_url + "/firsthometheme/google-login", data, config) 177 .success(function (data, status, headers, config) { 178 $scope.showLoader = 0; 179 if (data.status == 0) { 180 $scope.show_message = 'Wrong email id or password.'; 181 $scope.showErrMsg = 1; 182 } else if (data.status == 2) { 183 $scope.showErrMsg = 1; 184 $scope.show_message = 'Your Status is inactive'; 185 } else { 186 $scope.showErrMsg = 0; 187 $rootScope.is_front_logged = 1; 188 localStorage.setItem("usr_info", data.usr_info); 189 localStorage.setItem("access_token", data.token); 190 var client_details = []; 191 client_details = $scope.userDetails(); 192 $rootScope.logged_user_id = client_details[0]; 193 $rootScope.logged_user_name = client_details[1]; 194 195 if (localStorage.getItem("prevroute") !== null) { 196 $location.path(localStorage.getItem('prevroute')); 197 } else { 198 $location.path('/my-profile'); 199 } 200 } 201 }) 202 .error(function (data, status, header, config) { 203 $scope.show_message = 'Something is Wrong'; 204 }); 205 } 206 207 /* Login functioanlity */ 208 $scope.authenticateLogin = function (client) { 209 $scope.showLoader = 1; 210 211 var data = { 212 client: client, 213 member_id: $scope.userid 214 }; 215 216 var config = { 217 218 headers: { 219 'Content-Type': 'application/json; charset=utf-8' 220 } 221 222 }; 223 224 $http.post(base_url + "/firstclient/authenticate-user", data, config) 225 .success(function (data, status, headers, config) { 226 $scope.showLoader = 0; 227 if (data.status == 0) { 228 $scope.show_message = 'Wrong email id or password.'; 229 $scope.showErrMsg = 1; 230 } else if (data.status == 2) { 231 $scope.showErrMsg = 1; 232 $scope.show_message = 'Your Status is inactive'; 233 } else { 234 $scope.showErrMsg = 0; 235 $rootScope.is_front_logged = 1; 236 localStorage.setItem("usr_info", data.usr_info); 237 localStorage.setItem("access_token", data.token); 238 var client_details = []; 239 client_details = $scope.userDetails(); 240 $rootScope.logged_user_id = client_details[0]; 241 $rootScope.logged_user_name = client_details[1]; 242 243 if (localStorage.getItem("prevroute") !== null) { 244 $location.path(localStorage.getItem('prevroute')); 245 } else { 246 $location.path('/my-profile'); 247 } 248 } 249 }) 250 .error(function (data, status, header, config) { 251 $scope.show_message = 'Something is Wrong'; 252 }); 253 254 } 255 256 257 $scope.connectWithFb = function (client) { 258 /* 259 * let perm = { scope: 'user_posts,user_friends,publish_pages,email,manage_pages,pages_show_list,instagram_basic,instagram_manage_insights,read_insights, instagram_manage_comments, user_age_range, user_birthday, user_gender, user_hometown, user_location' }; 260 */ 261 $scope.showLoader = 1; 262 let perm = { scope: 'email, user_birthday, user_hometown, user_location' }; 263 FB.login(function (response) { 264 // handle the response 265 266 console.log(response); 267 if (response.status == 'connected') { 268 FB.api('me?fields=email,id,name,birthday,address,location,significant_other,middle_name,last_name,first_name,gender,hometown,link', function (response) { 269 console.log(response); 270 let data = { 271 first_name: response.first_name, 272 middle_name: response.middle_name, 273 last_name: response.last_name, 274 email: response.email, 275 social_fb_uid: response.id, 276 //gender: response.gender, 277 birthday: response.birthday, 278 hometown: (response.hometown) ? response.hometown.name : '', 279 location: (response.location) ? response.location.name : '', 280 link: response.link, 281 } 282 283 $http.post(base_url + "/admin/adminuser/social-login", data) 284 .success(function (data, status, headers) { 285 $scope.showLoader = 0; 286 console.log(data); 287 if (data.status == 0) { 288 $scope.show_message = 'Wrong email id or password.'; 289 $scope.showErrMsg = 1; 290 } else if (data.status == 2) { 291 $scope.showErrMsg = 1; 292 $scope.show_message = 'Your Status is inactive'; 293 } 294 else if (data.status == 4) { 295 $scope.showErrMsg = 1; 296 $scope.show_message = 'No mail id is there in facebook'; 297 } 298 else { 299 $scope.showErrMsg = 0; 300 $rootScope.is_front_logged = 1; 301 localStorage.setItem("usr_info", data.data.usr_info); 302 localStorage.setItem("access_token", data.data.token); 303 var client_details = []; 304 client_details = $scope.userDetails(); 305 console.log(client_details); 306 $rootScope.logged_user_id = client_details[0]; 307 $rootScope.logged_user_name = client_details[1]; 308 309 if (localStorage.getItem("prevroute") !== null) { 310 $location.path(localStorage.getItem('prevroute')); 311 } else { 312 console.log('Success'); 313 $location.path('/my-profile'); 314 } 315 } 316 }) 317 .error(function (data, status, header, config) { 318 $scope.show_message = 'Something is Wrong'; 319 }); 320 }); 321 } else { 322 //swal(); 323 swal("Oops!", "Unable to login with facebook!", "error"); 324 325 } 326 }, perm); 327 } 328 329 330 /* For My Profile*/ 331 $scope.myProfile = async function () { 332 var client_details = []; 333 client_details = $scope.userDetails(); 334 var data = { 335 user_id: client_details[0], //Logged client_id 336 member_id: $scope.userid 337 }; 338 339 await $http.post(base_url + "/firstclient/client-details", data) 340 .success(function (data, status, headers, config) { 341 $scope.showLoader = 0; 342 console.log(data); 343 344 if (data) { 345 $scope.client = data.client_details; 346 if ($scope.client.primary_phone == "") { 347 $("#registerModal").modal("show"); 348 } else { 349 $("#registerModal").modal("hide"); 350 } 351 $scope.clientSavedData($scope.userid, client_details[0]); // Call this for client savedsearch and fav list 352 } 353 }); 354 } 355 356 if ($scope.routeName === 'myprofile') //if route my profile then call 357 { 358 $scope.myProfile(); 359 } 360 361 $scope.updateProfile = function () { 362 var client_details = []; 363 client_details = $scope.userDetails(); 364 var data = { 365 client_id: client_details[0], 366 member_id: $scope.userid, 367 phone_number: $scope.agentform.primary_phone, 368 zip_code: $scope.agentform.zip_code, 369 }; 370 $http.post(base_url + "/shared/client/update-profile", data) 371 .suc
371cess(function (data, status, headers, config) { 372 if (data.success == 1) { 373 $("#registerModal").modal("hide"); 374 window.location.reload(); 375 } 376 }); 377 } 378 379 $scope.updateClient = function () { 380 var client_details = []; 381 client_details = $scope.userDetails(); 382 383 var data = { 384 client: $scope.client, 385 member_id: $scope.userid, 386 user_id: client_details[0] 387 }; 388 389 $http.post(base_url + "/firstclient/update-client", data) 390 .success(function (data, status, headers, config) { 391 $scope.showLoader = 0; 392 393 if (data.status = 1) { 394 $scope.clientSuccMsg = 1; 395 $scope.change_class = "alert alert-success"; 396 $scope.client_succ_msg = data.msg; 397 398 $window.scrollTo(0, 0); // Scroll top 399 400 setTimeout(function () { 401 $scope.$apply(function () { 402 $scope.clientSuccMsg = 0; 403 }); 404 }, 2000); 405 } else if (data.status = 2) { 406 $scope.clientErrMsg = 1; 407 $scope.change_class = "alert alert-danger"; 408 $scope.client_err_msg = data.msg; 409 410 $window.scrollTo(0, 0); // Scroll top 411 412 setTimeout(function () { 413 $scope.$apply(function () { 414 $scope.clientErrMsg = 0; 415 }); 416 417 }, 2000); 418 } 419 }) 420 .error(function (data, status, header, config) { 421 $scope.clientErrMsg = 1; 422 $scope.change_class = "alert alert-danger"; 423 $scope.client_err_msg = 'Something is Wrong'; 424 425 $window.scrollTo(0, 0); // Scroll top 426 427 setTimeout(function () { 428 $scope.$apply(function () { 429 $scope.clientErrMsg = 0; 430 }); 431 432 }, 2000); 433 }); 434 } 435 /*******************************************************/ 436 437 $scope.submitChangePassword = function () { 438 var client_details = []; 439 client_details = $scope.userDetails(); 440 441 var data = { 442 client: $scope.client, 443 user_id: client_details[0], //Logged client_id 444 }; 445 446 $http.post(base_url + "/firstclient/change-client-password", data) 447 .success(function (data, status, headers, config) { 448 $scope.showLoader = 0; 449 450 if (data.status == 0) { 451 $scope.show_color = "color:red"; 452 $scope.show_message_old_password = 'Invalid old password..'; 453 $scope.old_password_class = 'has-error'; 454 455 } else { 456 $scope.change_class = "alert alert-success"; 457 $scope.show_message = 'Password has been updated successfully.'; 458 $scope.showSuccMsg = 1; 459 setTimeout(function () { 460 $scope.$apply(function () { 461 $scope.showSuccMsg = 0; 462 }); 463 }, 2000); 464 465 $scope.myForm.reset(); 466 } 467 }) 468 .error(function (data, status, header, config) { 469 $scope.clientErrMsg2 = 1; 470 $scope.change_class = "alert alert-danger"; 471 $scope.show_message = 'Something is Wrong'; 472 setTimeout(function () { 473 $scope.$apply(function () { 474 $scope.clientErrMsg2 = 0; 475 }); 476 }, 2000); 477 }); 478 479 } 480 481 $scope.$watch('client.old_password', function (value, oldValue) { 482 if (oldValue != value) { 483 $scope.show_message_old_password = ''; 484 $scope.old_password_class = ''; 485 } 486 }); 487 488 489 /***************************************************/ 490 491 492 493 /* Reset Password */ 494 $scope.ResetPassword = function (client) { 495 496 var data = { 497 password: client.password, 498 email: client.email 499 }; 500 501 var config = { 502 503 headers: { 504 'Content-Type': 'application/json; charset=utf-8' 505 } 506 507 }; 508 509 $http.post(configService.getEnvConfig().apiURL + "service/change-forgot-password", data, config) 510 .success(function (data, status, headers, config) { 511 512 $scope.show_message = 'Your Password has been changed. Please logged in with new password.'; 513 $scope.showErrMsg = 1; 514 515 $location.path('login'); 516 517 518 }) 519 .error(function (data, status, header, config) { 520 521 $scope.show_message = 'Something is Wrong'; 522 }); 523 524 }; 525 526 527 $scope.redirectPage = function () { 528 $location.path('/user-registration'); 529 } 530 $scope.redirectPageLogin = function () { 531 $location.path('/user-login'); 532 } 533 $scope.redirectForgotPassword = function () { 534 $location.path('/user-forgotpassword'); 535 } 536 537 //============================================================// 538 539 $scope.clientSavedData = function (agent_id, client_id) // All client saved search and favourite list are coming with this ajax 540 { 541 var data = { 542 client_id: client_id, 543 agent_id: agent_id 544 }; 545 546 $http.post(base_url + "/firstclient/client-saved-data", data) 547 .success(function (data, status, headers, config) { 548 if (data.success == 1) { 549 $scope.favourite_properties = data.client_det.fav_property;
550 $scope.save_searches = data.client_det.save_search; 551 } 552 553 }) 554 .error(function (data, status, header, config) { 555 556 }); 557 } 558 559 //===========================================================// 560 561 //======== Saved Search From Agent's Management Panel Start =======// 562 563 $scope.saveForClientOld = function (page_type, params, location_id, criteria_id) { 564 var new_param = JSON.stringify(params); 565 if (typeof localStorage.getItem('ngStorage-search_params') !== 'undefined') { 566 if (page_type == 'idx') { 567 localStorage.setItem('ngStorage-idx_search', new_param); 568 } else if (page_type == 'search') { 569 localStorage.setItem('ngStorage-search_params', new_param); 570 localStorage.setItem('hit_saved_search', 1); 571 } 572 } 573 } 574 575 $scope.saveForClient = function (page_type, saveSearch, location_id, criteria_id, client_id) { 576 // How it's redirecting to 11/search-property/11?? 577 // Redirecting from the a tag. use javascript.void 578 console.log("saveSearch: "); 579 console.log(saveSearch); 580 $rootScope.polygon_lat_long = saveSearch.search_params_arr.polygon_lat_long; 581 // $rootScope.polygon_lat_long_for_saved_search = saveSearch.search_params_arr.polygon_lat_long; 582 console.log($rootScope.polygon_lat_long); 583 584 var params = saveSearch.search_params; 585 var new_param = JSON.stringify(params); 586 if (page_type == 'search') { 587 // rootScope for save search changes 588 localStorage.setItem('save_search_editing', 1); 589 localStorage.setItem('save_search_id', saveSearch.id); 590 localStorage.setItem('polygon_lat_long_for_saved_search', $rootScope.polygon_lat_long); 591 } 592 if (typeof localStorage.getItem('ngStorage-search_params') !== 'undefined') { 593 if (page_type == 'idx') { 594 localStorage.setItem('ngStorage-idx_search', new_param); 595 } else if (page_type == 'search') { 596 localStorage.setItem('ngStorage-search_params', new_param); 597 localStorage.setItem('hit_saved_search', 1); 598 } 599 } 600 601 if(page_type !== "idx") { 602 $scope.saveSearchFavPropAgent(client_id); 603 } 604 } 605 606 $scope.saveSearchFavPropAgent = function (client_id, user_type=null) { 607 608 $scope.show_loader = 1; // loader loading start 609 var httpRequest = $http({ 610 method: 'POST', 611 data: { 612 id: client_id, 613 user_type: user_type 614 }, 615 url: dpi_base_url + 'client/client-login-by-agent' 616 617 }).success(function (data, status) { 618 619 $scope.show_loader = 0; // loader loading start 620 if (data.status == 1) { 621 $rootScope.is_front_logged = 1; 622 localStorage.setItem("usr_info", data.data.usr_info); 623 localStorage.setItem("access_token", data.data.token); 624 $rootScope.logged_user_id = data.client_id; 625 $rootScope.logged_user_name = data.client_fname; 626 627 window.open(dpi_base_url + '11/search-property/11', '_blank') 628 } 629 }); 630 631 632 } 633 634 //======== Saved Search From Agent's Management Panel End ========// 635 636 // ==================== REMOVE SEARCH START ===================// 637 638 $scope.removeFavourite = function (id, i) { 639 var httpRequest = $http({ 640 method: 'POST', 641 data: { 642 id: id 643 }, 644 url: base_url + '/admin/member/delete-fav-search' 645 646 }).success(function (data, status) { 647 648 if (data.status == 1) { 649 $scope.favourite_properties[i].delete_div = 1; //hide deleted favourite properties 650 $scope.deletemsg = data.delete_msg; 651 $scope.favourite_properties[i].deletemsg_show = 1; //favourite_properties is the array of the list 652 $timeout(function () { 653 $scope.favourite_properties[i].deletemsg_show = 0; 654 }, 2000); 655 656 } 657 }); 658 } 659 660 $scope.removeSearch = function (id, i) { 661 var httpRequest = $http({ 662 method: 'POST', 663 data: { 664 id: id 665 }, 666 url: base_url + '/admin/member/delete-saved-search' 667 668 }).success(function (data, status) { 669 670 if (data.status == 1) { 671 //$scope.save_searches.splice(-1);
672 $scope.save_searches[i].delete_div = 1; //hide deleted save search 673 $scope.deletemsg = data.delete_msg; 674 $scope.save_searches[i].deletemsg_show = 1; //save_searches is the array of the list 675 $timeout(function () { 676 $scope.save_searches[i].deletemsg_show = 0; 677 }, 2000); 678 679 } 680 }); 681 } 682 683 // ==================== REMOVE SEARCH END ===================// 684 685 686 // Forgot Password and reset password start // 687 688 $scope.forgotPassword = function (client) { 689 $scope.showLoader = 1; 690 691 var data = { 692 client: client, 693 member_id: $scope.userid 694 }; 695 696 var config = { 697 698 headers: { 699 'Content-Type': 'application/json; charset=utf-8' 700 } 701 702 }; 703 704 $http.post(base_url + "/client/user-forgotpassword", data, config) 705 .success(function (data, status, headers, config) { 706 $scope.showLoader = 0; 707 if (data.status == 0) { 708 $scope.show_message = data.msg; 709 $scope.showErrMsg = 1; 710 } 711 else if (data.status == 2) { 712 $scope.showErrMsg = 1; 713 $scope.show_message = data.msg; 714 } 715 else { 716 $scope.change_class = "alert alert-success"; 717 $scope.showErrMsg = 0; 718 $scope.showSuccMsg = 1; 719 $scope.show_message = data.msg; 720 $timeout(function () { 721 $scope.showSuccMsg = 0; 722 }, 10000); 723 $scope.loginForm.reset(); 724 } 725 }) 726 .error(function (data, status, header, config) { 727 $scope.show_message = 'Something is Wrong'; 728 }); 729 }; 730 731 // Forgot Password and reset password end // 732 733 });
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.