PageSourceSearch

https://myfai.fondoambiente.it/_next/static/chunks/pages/search-d21fea5f13e6c69118a7.js

js fondoambiente.it collected 2026-09-24 08:53:25 UTC 7,486 bytes, 1 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[90],{"7J62":function(t,n,e){(window.__NEXT_P=window.__NEXT_P||[]).push(["/search",function(){return e("eOhz")}])},eOhz:function(t,n,e){"use strict";e.r(n);var r=e("QsI/"),o=e("zjfJ"),i=e("9fIP"),c=e("MMYH"),a=e("K/z8"),u=e("sRHE"),l=e("8K1b"),s=e("ERkP"),f=e.n(s),p=e("0D0S"),h=e.n(p),g=e("j/s1"),d=e("r4FT"),m=f.a.createElement;function y(){var t,n,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",o=e.toStringTag||"@@toStringTag";function i(e,r,o,i){var u=r&&r.prototype instanceof a?r:a,l=Object.create(u.prototype);return v(l,"_invoke",function(e,r,o){var i,a,u,l=0,s=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(n,e){return i=n,a=0,u=t,p.n=e,c}};function h(e,r){for(a=e,u=r,n=0;!f&&l&&!o&&n<s.length;n++){var o,i=s[n],h=p.p,g=i[2];e>3?(o=g===r)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=e<2&&h<i[1])?(a=0,p.v=r,p.n=i[1]):h<g&&(o=e<3||i[0]>r||r>g)&&(i[4]=e,i[5]=r,p.n=g,a=0))}if(o||e>1)return c;throw f=!0,r}return function(o,s,g){if(l>1)throw TypeError("Generator is already running");for(f&&1===s&&h(s,g),a=s,u=g;(n=a<2?t:u)||!f;){i||(a?a<3?(a>1&&(p.n=-1),h(a,u)):p.n=u:p.v=u);try{if(l=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,u)))throw TypeError("iterator result is not an object");if(!n.done)return n;u=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(f=p.n<0)?u:e.call(r,p))!==c)break}catch(n){i=t,a=1,u=n}finally{l=1}}return{value:n,done:f}}}(e,o,i),!0),l}var c={};function a(){}function u(){}function l(){}n=Object.getPrototypeOf;var s=[][r]?n(n([][r]())):(v(n={},r,(function(){return this})),n),f=l.prototype=a.prototype=Object.create(s);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,v(t,o,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=l,v(f,"constructor",l),v(l,"constructor",u),u.displayName="GeneratorFunction",v(l,o,"GeneratorFunction"),v(f),v(f,o,"Generator"),v(f,r,(function(){return this})),v(f,"toString",(function(){return"[object Generator]"})),(y=function(){return{w:i,m:p}})()}function v(t,n,e,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}(v=function(t,n,e,r){function i(n,e){v(t,n,(function(t){return this._invoke(n,e,t)}))}n?o?o(t,n,{value:e,enumerable:!r,configurable:!r,writable:!r}):t[n]=e:(i("next",0),i("throw",1),i("return",2))})(t,n,e,r)}function b(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function O(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?b(Object(e),!0).forEach((function(n){Object(o.a)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):b(Object(e)).forEac
1h((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function A(t,n,e){return n=Object(u.a)(n),Object(a.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(n,e||[],Object(u.a)(t).constructor):n.apply(t,e))}var j=h()().publicRuntimeConfig.PLATFORM,w=function(t){if(!t)return t;var n=t.replace("\u2019","'");return n="MONZA E BRIANZA"===n||"MONZA-E-BRIANZA"===n?"MONZA E DELLA BRIANZA":"GALLURA-NORD-EST-SARDEGNA"===n||"GALLURA NORD-EST SARDEGNA"===n?"GALLURA NORD-EST SARDEGNA":"MASSA CARRARA"===n||"MASSA-CARRARA"===n?"MASSA-CARRARA":n.replaceAll("-"," ")},S=function(t){return d.a.get("".concat(j,"/province?nome=").concat(w(t),"*|LIKE")).then((function(t){return t.data.data}))},R=function(t){return d.a.get("".concat(j,"/comuni?nome=").concat(w(t),"*|LIKE")).then((function(t){return t.data.data}))},_=function(t){return d.a.get("".concat(j,"/regioni?nome=").concat(w(t),"*|LIKE")).then((function(t){return t.data.data}))},E=g.d.div.withConfig({displayName:"search__SuggestionsWrapper",componentId:"sc-1ko78q7-0"})([""]),N=g.d.ul.withConfig({displayName:"search__Luoghi",componentId:"sc-1ko78q7-1"})(["display:flex;flex-wrap:wrap;list-style:none;"]),k=g.d.li.withConfig({displayName:"search__Luogo",componentId:"sc-1ko78q7-2"})(['flex-basis:50%;a{text-transform:titlecase;color:#333;display:flex;text-decoration:none;}h3{font-family:"Sabon Next","Georgia",serif;}']),P=g.d.ul.withConfig({displayName:"search__MoreSuggestions",componentId:"sc-1ko78q7-3"})(["list-style:none;"]),C=function(t){return m(k,null,m("a",{href:t.slug},m("img",{className:"lazyload","data-src":"".concat(t.media[0].url,"?w=64&h=64&fit=crop"),title:t.media[0].title,alt:t.media[0].alt}),m("h3",null,t.nome),m("p",null,t.provincia.nome)))},I=function(t){function n(t){return Object(i.a)(this,n),A(this,n,[t])}return Object(l.a)(n,t),Object(c.a)(n,[{key:"render",value:function(){var t=this.props,n=t.luoghi,e=t.comuni,r=t.regioni,o=t.province;
1return m(E,null,n&&m(N,null,n.map((function(t){return m(C,t)})),n.map((function(t){return m(C,t)})),n.map((function(t){return m(C,t)})),n.map((function(t){return m(C,t)}))),(e||r||o)&&m(P,null,e.length>0&&e.map((function(t){return m("li",null,"Tutti i risultati nel comune di ",t.nome)})),o.length>0&&o.map((function(t){return m("li",null,"Tutti i risultati nella provincia di ",t.nome)})),r.length>0&&r.map((function(t){return m("li",null,"Tutti i risultati nella regione di ",t.nome)}))))}}])}(s.Component),T=function(t){function n(t){var e;return Object(i.a)(this,n),(e=A(this,n,[t])).state={luoghi:[],comuni:[],province:[],regioni:[],touched:!1,focus:!0,search:"",loading:!1},e.onChange=e.onChange.bind(e),e.open=e.open.bind(e),e.close=e.close.bind(e),e}return Object(l.a)(n,t),Object(c.a)(n,[{key:"componentDidMount",value:function(){this.el.focus()}},{key:"onChange",value:function(t){var n=this,e=t.target.value;this.setState({search:e,luoghi:[],comuni:[],regioni:[],province:[]}),e.length>=3&&(this.setState({loading:!0}),function(t){return Promise.all([(n=t,d.a.get("".concat(j,"/luoghi?nome=*").concat(n,"*|LIKE&has=gfp&slug=null|NOT&with=media,provincia&has=media")).then((function(t){return t.data.data}))),R(t),S(t),_(t)]).then((function(t){return{luoghi:t[0],comuni:t[1],province:t[2],regioni:t[3]}}));var n}(e).then((function(t){return n.setState(O(O({},t),{},{touched:!0,loading:!1}))}))),0===e.length&&this.setState({touched:!1})}},{key:"open",value:function(t){this.setState({focus:!0})}},{key:"close",value:function(t){this.setState({focus:!1})}},{key:"render",value:function(){var t=this,n=this.state,e=n.luoghi,r=n.comuni,o=n.province,i=n.regioni,c=n.touched,a=n.search,u=n.loading;return m(f.a.Fragment,null,m(L,{onChange:this.onChange,innerRef:function(n){return t.el=n},onClick:this.open,onFocus:this.open}),(e.length>0||r.length>0||o.length>0||i.length>0)&&m(I,this.state),u&&m("div",null,"Loading"),c&&a.length>=3&&!u&&0===e.length&&0===r.length&&0===o.length&&0===i.length&&m("div",null,"Nessun risultato"),c&&a.length<3&&m("div",null,"Inserisci almeno tre lettere"))}}],[{key:"getInitialProps",value:function(){var t=Object(r.a)(y().m((function t(){return y().w((function(t){for(;;)switch(t.n){case 0:return t.a(2,{})}}),t)})));return function(){return t.apply(this,arguments)}}()}])}(s.Component),L=g.d.input.withConfig({displayName:"search__Input",componentId:"sc-1ko78q7-4"})(["border:1px solid red;"]);n.default=T}},[["7J62",1,0,3,4]]]);

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.