PageSourceSearch

https://www.randstad.pt/search-app/static/js/Pages-LocationCentroidAndResults.917d3cfe.chunk.js

js randstad.pt collected 2026-10-02 04:27:01 UTC 10,423 bytes, 1 lines download raw bytes

1(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[572],{93197(e,t,a){"use strict";var o=a(84919),s=a(79222),r=(a(88094),a(15678));const n=["name"];const l=function(e){let t=e.name,a=(0,s.A)(e,n);return(0,r.jsx)("input",(0,o.A)({id:t,name:t,type:"checkbox"},a))};a.d(t,["A",0,l])},6083(e,t,a){"use strict";var o=a(84919),s=a(79222),r=(a(88094),a(15678));const n=["placeholder"];const l=function(e){let t=e.placeholder,a=(0,s.A)(e,n);const l={};return!Object.prototype.hasOwnProperty.call(a,"aria-label")&&t&&(l["aria-label"]=t),(0,r.jsx)("input",(0,o.A)((0,o.A)({type:"text",placeholder:t},a),l))};a.d(t,["A",0,l])},82408(e,t,a){"use strict";a.r(t);var o=a(84919),s=a(44303),r=a(88094),n=a(15535),l=a(6083),i=a(3339),c=a.n(i),d=a(51784),p=a(79838),u=a(93197),m=a(15678);const g=(0,d.Ay)(function(e){let t=e.intl;const a=(0,r.useState)({locationSearch:[]}),i=(0,s.A)(a,2),d=i[0],g=i[1],h=(0,r.useState)([]),f=(0,s.A)(h,2),v=f[0],y=f[1],j=(0,r.useState)("25"),b=(0,s.A)(j,2),x=b[0],A=b[1],_=(0,r.useState)(!1),w=(0,s.A)(_,2),k=w[0],S=w[1],N=(0,r.useState)(""),L=(0,s.A)(N,2),O=L[0],C=L[1];(0,r.useEffect)(()=>{if(window.loadMap=()=>{},d.locationSearch.length){const e=(0,p.A)(d.locationSearch,t.locale);c().get("/api/search/get-location-centroid-and-results",{params:(0,o.A)((0,o.A)({},e),{},{distance:x})}).then(e=>{window.loadMap=(e=>{{const t={zoom:9,center:{lat:e.centroid.lat,lng:e.centroid.lon},styles:[{featureType:"poi",stylers:[{visibility:"off"}]},{featureType:"poi.business",stylers:[{visibility:"off"}]},{featureType:"transit",elementType:"labels.icon",stylers:[{visibility:"off"}]}]},a=new window.google.maps.Map(document.getElementById("map"),t),o=[];e.jobs.forEach(e=>{o.push({position:{lat:e.location.lat,lng:e.location.lon},map:a,tooltip:e.jobId,url:e.url,jobId:e.jobId})}),o.push({position:{lat:e.centroid.lat,lng:e.centroid.lon},map:a,icon:{url:"http://maps.google.com/mapfiles/ms/icons/blue-dot.png"}});const s=[];o.forEach(e=>{var t;const o=new window.google.maps.Marker({position:e.position,map:a,icon:null!==(t=null===e||void 0===e?void 0:e.icon)&&void 0!==t?t:{url:"http://maps.google.com/mapfiles/ms/icons/red-dot.png"},url:e.url,jobId:e.jobId});o.addListener("click",()=>{window.open(e.url,"_blank")}),O&&o.jobId===O&&(o.setAnimation(1),o.setZIndex(100)),s.push(o)}),k&&new window.MarkerClusterer(a,s,{imagePath:"https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m"}),new window.google.maps.Circle({strokeColor:"#f38038",strokeOpacity:1,strokeWeight:2,fillOpacity:.5,fillColor:"#f38038",map:a,center:new window.google.maps.LatLng(e.centroid.lat,e.centroid.lon),radius:1e3*parseInt(x)})}})(e.data)})}},[d,x,k,O]);const E=e=>{e.persist(),g({[e.target.name]:e.target.value}),I(e)},I=e=>{const a={searchText:e.target.value,currentLanguage:t.locale};c().get("/api/search/get-callback?callback=".concat("@Callbacks/getLocationAutocomplete","&currentRoute=").concat(JSON.stringify(null),"&data=").concat(JSON.stringify(a))).then(t=>{if(y(Array.from(t.data)),"undefined"!==typeof document&&e.isTrusted){const t=new CustomEvent("input",{bubbles:!0});e.target.dispatchEvent(t),document.dispatchEvent(t)}})};return(0,m.jsxs)("div",{className:"header header--search-alternative mvp-header--search-alternative header--text bg-variant-brand-secondary",children:[(0,m.jsxs)(n.m,{children:[(0,m.jsx)("title",{children:"Location centroid and results"}),(0,m.jsx)("script",{type:"text/javascript",src:"https://maps.googleapis.com/maps/api/js?key=AIzaSyDkUVhDjwk2W28p2BnTHNZEG2sPZ6lZyW8&callback=loadMap",async:!0,defer:!0}),(0,m.jsx)("script",{type:"text/javascript",src:"https://unpkg.com/@googlemaps/markerclustererplus/dist/index.min.js",async:!0,defer:!0}),(0,m.jsx)("script",{type:"text/javascript",src:"/search-app/assets/js/auto-suggest.js",defer:!0})]}),(0,m.jsx)("div",{className:"header header--search-alternative mvp-header--search-alternative header--text bg-variant-brand-secondary",children:(0,m.jsx)("div",{className:"wrapper",children:(0,m.jsxs)("div",{className:"header__content header__content--full-width content-block",children:[(0,m.jsxs)("div",{className:"search-form form-groups  form-groups--row items-start",children:[(0,m.jsx)("div",{className:"form-group search-form__input hidden--until-l",children:(0,m.jsxs)("div",{className:"form-group__input form-group__location form-group__input--button clearable-input","data-rs-clearable":!0,"data-rs-auto-suggest":!0,children:[(0,m.jsx)(l.A,{id:"geoSearch",name:"locationSearch","data-rs-auto-suggest-input"
1:!0,"data-rs-auto-suggest-no-result-message":t.formatMessage({id:"Autosuggest.Noresults.Message"}),value:d.locationSearch,onChange:E,placeholder:t.formatMessage({id:"SearchFormMvp1.SearchLocationPlaceholder"}),autoComplete:"off","data-rs-input-highlight":!0}),(0,m.jsx)("ul",{className:"select-menu__list",id:"geo-search-as","data-rs-auto-suggest-list":"","data-rs-auto-suggest-values":v.length?v.slice(0,25).join(";"):"","data-rs-auto-suggest-separator":";","data-rs-use-exact-values":!0})]})}),(0,m.jsx)("div",{className:"form-group search-form__input hidden--until-l",children:(0,m.jsxs)("div",{className:"form-group__input",children:[(0,m.jsxs)("select",{name:"distance",id:"distance",onChange:e=>{e.preventDefault(),A(e.target.value)},defaultValue:"25",children:[(0,m.jsx)("option",{value:"10",children:"10 km"}),(0,m.jsx)("option",{value:"25",children:"25 km"}),(0,m.jsx)("option",{value:"50",children:"50 km"}),(0,m.jsx)("option",{value:"100",children:"100 km"})]}),(0,m.jsx)("span",{className:"select-arrow icon",children:(0,m.jsx)("svg",{children:(0,m.jsx)("use",{xlinkHref:"/themes/custom/bluex/dist/assets/image/icons.svg#chevron-down"})})})]})}),(0,m.jsx)("div",{className:"form-group search-form__input hidden--until-l",children:(0,m.jsx)("div",{className:"form-group__input",children:(0,m.jsx)(l.A,{placeholder:"Search by jobId",onChange:e=>{C(e.target.value)}})})})]}),(0,m.jsx)("div",{className:"form-group search-form__input hidden--until-l",children:(0,m.jsxs)("label",{className:"selection-control selection-control--checkbox",children:[(0,m.jsxs)("span",{className:"selection-control__input",children:[(0,m.jsx)(u.A,{name:"remote",id:"is-remote",onChange:()=>{S(e=>!e)}}),(0,m.jsx)("span",{className:"icon selection-control__control","aria-hidden":!0,children:(0,m.jsx)("svg",{viewBox:"0 0 16 16",children:(0,m.jsx)("polyline",{points:"2.1,8.5 6.2,12.4 13.9,5.1"})})})]}),(0,m.jsx)("span",{className:"selection-control__label",children:"Use clusters?"})]})})]})})}),(0,m.jsx)("div",{id:"map",style:{height:"600px",width:"100%"}})]})});a.d(t,["default",0,g])},76923(e,t,a){"use strict";a(88094);const o=function(e){return e.trim().replace(/[ -]+/g,"-")};a.d(t,["A",0,o])},79838(e,t,a){"use strict";var o=a(84919),s=a(76923),r=a(1765),n=a(87542);const l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pt",a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];const i=!1;let c={};if(e){if(new RegExp("^\\d{4}[- ]{0,1}\\d{3}$").test(e))c.postcode=(0,s.A)(e),c.region=null,c.city=null;else{c.postcode=null;const a=e.split(", ");a.length>1?(c.city=(0,r.A)(a[0],i).toLowerCase(),c.region=(0,r.A)(a[1],i).toLowerCase()):1===a.length&&(c=(0,o.A)((0,o.A)({},c),(0,n.A)((0,r.A)(a[0],i).toLowerCase(),t,l)))}}return a&&(c=(0,o.A)((0,o.A)({},c),{},{distance:a})),c};a.d(t,["A",0,l])},1765(e,t,a){"use strict";a(88094);const o=function(e){return Array.isArray(e)&&(e=e[e.length-1]),"string"!==typeof e?e:e.normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/[^a-zA-Z0-9 -]+/g,"-").replace(/[ -]+/g,"-")};a.d(t,["A",0,o])},8311(e){e.exports={pt:{remoteWork:"remote",sectorOfEmployment:["public","private"],jobType:["permanente","temporario","contrato","temporario-a-permanent","provisorio","voluntario","formacao","estagio","teletrabalho-temporario","teletrabalho-estudante","teletrabalho-temporario","teletrabalho-permanente","empregos-para-estudantes","suplemento-salarial","freelancer","contrato-de-curto-prazo"],regionList:["portalegre","porto","lisboa","aveiro","braga","faro","setubal","viana-do-castelo","leiria","castelo-branco","coimbra","viseu","madeira","acores","santarem","evora","guarda","beja","braganca","vila-real"],internationalRegion:"international"}}},87542(e,t,a){"use strict";a.d(t,{A:()=>r});a(88094);const o=function(e){return"string"!==typeof e?e:e.replace(/&/g,"&amp;").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/"/g,"&quot;").replace(/%3C/g,"").replace(/%2F/g,"")},s=a(8311);const r=function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pt";const t={},a=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/"),r={q:"query",qt:"queryTitle",s:"specialism",ss:"subSpecialism",r:"jobCategory",mi:"distance",km:"distance",sa:"yearSalary",sd:"daySalary",sm:"monthSalary",sh:"hourSalary",postcode:"postcode",b:"branch",dc:"divisionId",page:"page",l:"language",mpage:"monsterPage",client:"clientId"};"zh"===e&&(e="cn"),e||(e="pt");for(let p of a)if(p){var n,l,i,c;if(p.match(/([?&=])/)||p.match(/(?:\?|&|#)([^=]+)=([^&]+)/))continue;try{p=decodeURIComponent(decodeURIComponent(p))}catch(d){continue}const a=p.match(/^(q|qt|s|ss|r|mi|km|sa|sd|sm|sh|postcode|b|dc|page|l|mpage|client)-([^/]+)/);if(a){t[r[a[1]]||a[1]]=o(a[2])}else null!==s&&void 0!==s&&null!==(n=s[e])&&void 0!==n&&n.sectorOfEmployment&&s[e].sectorOfEmployment.includes(p)?t.sectorOfEmployment=o(p):new RegExp(s[e].jobType.join("|")).test(p)?t.j
1obType=o(p.split(",")):null!==s&&void 0!==s&&null!==(l=s[e])&&void 0!==l&&l.remoteWork&&s[e].remoteWork===p?t.remote=o(p):null!==s&&void 0!==s&&null!==(i=s[e])&&void 0!==i&&i.countriesList&&s[e].countriesList.includes(p)?t.country=o(p):null!==s&&void 0!==s&&null!==(c=s[e])&&void 0!==c&&c.companiesList&&s[e].companiesList.includes(p)?t.company=o(p):t.region||!s[e].regionList.includes(p)?(t.city&&(t.unknown=t.city),t.city=o(p)):(t.region&&(t.unknown=t.region),t.region=o(p))}return t}},79222(e,t,a){"use strict";function o(e,t){if(null==e)return{};var a,o,s=function(e,t){if(null==e)return{};var a={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(-1!==t.indexOf(o))continue;a[o]=e[o]}return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)a=r[o],-1===t.indexOf(a)&&{}.propertyIsEnumerable.call(e,a)&&(s[a]=e[a])}return s}a.d(t,{A:()=>o})}}]);

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.