PageSourceSearch

https://saudihealthcareconsulting.com/assets/js/frontend/main-VJQ4Ri3.js

js saudihealthcareconsulting.com collected 2026-10-08 07:25:27 UTC 12,023 bytes, 1 lines download raw bytes

1import Alpine from"alpinejs";import focus from"@alpinejs/focus";import JustValidate from"just-validate";import collapse from"@alpinejs/collapse";import{showValidationErrors}from"./validation_error.js";import{createIcons,Menu,ArrowRight,ChevronDown,Cpu,Sprout,HeartPulse,Building2,Quote,ArrowUpRight,Briefcase,Lightbulb,ChartNoAxesCombined,ListTodo,UserCog,TriangleAlert,Puzzle,Home,ChevronLeft,ChevronRight,SquareArrowOutUpRight,Sparkles,UsersRound,SquareCheckBig,ChartCandlestick,AlignVerticalDistributeEnd,Handshake,TrendingUp,Merge,Mail,Link,Waypoints,Grid2x2Check,Download,LoaderCircle,HardHat,Boxes,Pin,Leaf,Truck,Gauge,}from"lucide";window.COUNTRIES=["Afghanistan","Åland Islands","Albania","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua & Barbuda","Argentina","Armenia","Aruba","Ascension Island","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Indian Ocean Territory","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Canary Islands","Cape Verde","Caribbean Netherlands","Cayman Islands","Central African Republic","Ceuta & Melilla","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo - Brazzaville","Congo - Kinshasa","Cook Islands","Costa Rica","Côte d’Ivoire","Croatia","Cuba","Curaçao","Cyprus","Czechia","Denmark","Diego Garcia","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Eurozone","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","North Korea","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn Islands","Poland","Portugal","Puerto Rico","Qatar","Réunion","Romania","Russia","Rwanda","Samoa","San Marino","São Tomé & Príncipe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Sint Maarten","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia & South Sandwich Islands","South Korea","South Sudan","Spain","Sri Lanka","St. Barthélemy","St. Helena","St. Kitts & Nevis","St. Lucia","St. Martin","St. Pierre & Miquelon","St. Vincent & Grenadines","Sudan","Suriname","Svalbard & Jan Mayen","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor-Leste","Togo","Tokelau","Tonga","Trinidad & Tobago","Tristan da Cunha","Tunisia","Turkey","Turkmenistan","Turks & Caicos Islands","Tuvalu","U.S. Outlying Islands","U.S. Virgin Islands","Uganda","Ukraine","United Arab Emirates","United Kingdom","United Nations","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Wallis & Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"],createIcons({icons:{Home,Menu,ArrowRight,ArrowUpRight,ChevronDown,Download,ChevronLeft,ChevronRight,Cpu,Sprout,HeartPulse,Building2,Quote,Briefcase,Lightbulb,ChartNoAxesCombined,ListTodo,UserCog,TriangleAlert,Puzzle,SquareArrowOutUpRight,Sparkles,UsersRound,SquareCheckBig,ChartCandlestick,AlignVerticalDistributeEnd,Handshake,TrendingUp,Merge,Waypoints,Grid2x2Check,Mail,Link,LoaderCircle,HardHat,Boxes,Pin,Leaf,Truck,Gauge}}),Alpine.plugin(collapse),Alpine.plugin(focus),Alpine.data("toggleSidebar",()=>({showSidebar:!1,toggleSidebar(){this.showSidebar=!this.showSidebar,this.isScrolled||(this.isScrolled=!this.isScrolled)}})),Alpine.data("countrySelect",(e,t="country")=>({open:!1,search:e[t]||"",countries:window.COUNTRIES,filtered:[],init(){this.filtered=this.countries,this.$watch("search",n=>{e[t]=n})},filterCountries(){const e=this.search.toLowerCase();this.filtered=this.countries.filter(t=>t.toLowerCase().includes(e))},selectCountry(e){this.search=e,this.open=!1}})),Alpine.data("formHandler",(e="")=>({formData:{firstName:"",lastName:"",companyName:"",jobTitle:"",country:"",phoneNumber:"",emailAddress:"",message:"",recaptcha:"",rfpFileIds:[],fromPage:e},responseMessage:"",uploadedFiles:[],isUploading:!1,validation:null,isLoading:!1,isSuccess:!1,init(){this.validation=new JustValidate(this.$refs.form,{errorFieldCssClass:"is-invalid",successFieldCssClass:"is-valid",errorLabelCssClass:"text-red-500 text-sm mt-1",errorLabelStyle:{color:"#ff0000",fontSize:"12px"}}),this.validation.addField('input[name="firstName"]',[{rule:"required",errorMessage:"First name is required"}]).addField('input[name="lastName"]',[{rule:"required",errorMessage:"Last name is required"}]).addField('input[name="companyName"]',[{rule:"required",errorMessage:"Company name is required"}]).addField('input[name="jobTitle"]',[{rule:"required",errorMessage:"Job title is required"}]).addField('input[name="country"]',[{rule:"required",errorMessage:"Country is required"}]).addField('input[name="phoneNumber"]',[{rule:"required",errorMessage:"Phone number is required"},{rule:"minLength",value:10,errorMessage:"Phone number should be at least 10 digits long"}]).addField('input[name="emailAddress"]',[{rule:"required",errorMessage:"Email address is required"},{rule:"email",errorMessage:"Please enter a valid email address"},{rule:"customRegexp",value:/^[^\s@]+@(?!.*\b(gmail|yahoo|hotmail|outlook|icloud|aol|protonmail|zoho|rocketmail)\.[a-z]+\b)(?!.*\.(ru|by|ua)$).*$/i,errorMessage:"Please use a corporate email"}]).addField('textarea[name="message"]',[{rule:"required",errorMessage:"Message is required"}])},async handleFile(e){const t=e.target.files;if(!t.length)return;this.isUploading=!0;for(const e of t){const n=new FormData;n.append("file",e);try{const s=await fetch("/upload-files",{method:"POST",body:n});if(!s.ok)throw new Error("Upload failed");const t=await s.json();this.uploadedFiles.push({id:t.id,name:e.name,url:t.url??null}),this.formData.rfpFileIds.push(t.id)}catch(e){console.error(e)}}this.isUploading=!1,this.$refs.fileInput.value=""},async removeFile(e,t){try{const n=await fetch(`/upload-files/${t.id}/delete`,{method:"DELETE"});if(!n.ok)throw new Error("Failed to remove file");this.uploadedFiles.splice(e,1),this.formData.rfpFileIds=this.uploadedFiles.map(e=>e.id)}catch(e){console.error(e)}},async validateForm(){const e=this,t=await this.validation.isValid;if(t){e.isLoading=!0;const t=document.documentElement.dataset.sitekey;
1grecaptcha.ready(function(){grecaptcha.execute(t,{action:"inquiry"}).then(function(t){e.formData.recaptcha=t;let n=e.$refs.form.action;fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(e.formData)}).then(async t=>{const n=await t.json();t.ok?(e.$dispatch("notify",{variant:"success",title:"Inquiry has been sent!",message:"Thank you for sending us an inquiry. Your message is successfully submitted. We will reach you as soon as possible."}),e.resetForm(e.formData.fromPage),e.$refs.form.dataset.redirecturl&&(window.location.href=e.$refs.form.dataset.redirecturl)):n.errors&&showValidationErrors(e.validation,n.errors),e.isLoading=!1,e.isSuccess=t.ok}).catch(t=>{e.isLoading=!1,e.isSuccess=!1,e.$dispatch("notify",{variant:"danger",title:"Inquiry is failed to send",message:"Inquiry is not available right now. Please reach us through our email "})})})})}},resetForm(e){this.formData={firstName:"",lastName:"",companyName:"",jobTitle:"",country:"",phoneNumber:"",emailAddress:"",message:"",recaptcha:"",rfpFileIds:[],fromPage:e||""},this.uploadedFiles=[],this.validation.destroy()}})),Alpine.data("notification",()=>({notifications:[],displayDuration:8e3,soundEffect:!0,addNotification({variant:e="info",sender:t=null,title:n=null,message:s=null}){const o=Date.now(),i={id:o,variant:e,sender:t,title:n,message:s};if(this.notifications.length>=20&&this.notifications.splice(0,this.notifications.length-19),this.notifications.push(i),this.soundEffect){const e=new Audio("https://res.cloudinary.com/ds8pgw1pf/video/upload/v1728571480/penguinui/component-assets/sounds/ding.mp3");e.play().catch(e=>{console.error("Error playing the sound:",e)})}},removeNotification(e){setTimeout(()=>{this.notifications=this.notifications.filter(t=>t.id!==e)},1e3)}})),Alpine.data("formHandlerWhitepaper",(e="")=>({formData:{firstName:"",lastName:"",companyName:"",emailAddress:"",recaptcha:"",whitepaperId:e},responseMessage:"",validation:null,isLoading:!1,isSuccess:!1,init(){this.validation=new JustValidate(this.$refs.form,{errorFieldCssClass:"is-invalid",successFieldCssClass:"is-valid",errorLabelCssClass:"text-red-500 text-sm mt-1",errorLabelStyle:{color:"#ff0000",fontSize:"12px"}}),this.validation.addField('input[name="firstName"]',[{rule:"required",errorMessage:"First name is required"}]).addField('input[name="lastName"]',[{rule:"required",errorMessage:"Last name is required"}]).addField('input[name="companyName"]',[{rule:"required",errorMessage:"Company name is required"}]).addField('input[name="emailAddress"]',[{rule:"required",errorMessage:"Email address is required"},{rule:"email",errorMessage:"Please enter a valid email address"},{rule:"customRegexp",value:/^[^\s@]+@(?!.*\b(gmail|yahoo|hotmail|outlook|icloud|aol|protonmail|zoho|rocketmail)\.[a-z]+\b)(?!.*\.(ru|by|ua)$).*$/i,errorMessage:"Please use a corporate email"}])},async validateForm(){const e=this,t=await this.validation.isValid;if(t){e.isLoading=!0;const t=document.documentElement.dataset.sitekey;grecaptcha.ready(function(){grecaptcha.execute(t,{action:"request_whitepaper"}).then(function(t){e.formData.recaptcha=t;let n=e.$refs.form.action;fetch(n,{method:"POST",headers:{"Content-Type":"application/json","X-Requested-With":"XMLHttpRequest"},body:JSON.stringify(e.formData)}).then(async t=>{const n=await t.json();t.ok?(e.$dispatch("notify",{variant:"success",title:"Your download request has been sent!",message:"Thank you for your interest in our whitepaper. Happy reading!."}),e.resetForm()):n.errors&&showValidationErrors(e.validation,n.errors),e.isLoading=!1,e.isSuccess=t.ok}).catch(t=>{e.isLoading=!1,e.isSuccess=!1,e.$dispatch("notify",{variant:"danger",title:"Downlaod request is failed to send",message:"Whitepapar is not available right now. Please reach us through our email "})})})})}},resetForm(){this.formData={firstName:"",lastName:"",companyName:"",emailAddress:"",recaptcha:"",whitepaperId:""}}})),Alpine.data("tocComponent",()=>({activeHeading:null,init(){const n=document.querySelectorAll("h2, h3, h4"),s=()=>Array.from(n).map(e=>({id:e.id,top:e.getBoundingClientRect().top+window.scrollY-100})),t=()=>{const e=window.scrollY,t=s(),n=t.find((n,s)=>{const o=t[s+1];return!o||e>=n.top&&e<o.top});n&&(this.activeHeading=n.id)};let e;window.addEventListener("scroll",()=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{t()})}),t()}})),Alpine.data("popupModal",()=>({open:!1,init(){const e=(new Date).toISOString().slice(0,10),t=localStorage.getItem("popup_seen");t!==e&&(this.open=!0)},close(){this.open=!1;const e=(new Date).toISOString().slice(0,10);localStorage.setItem("popup_seen",e)}})),window.Alpine=Alpine,Alpine.start()

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.