PageSourceSearch

https://myfai.fondoambiente.it/_next/static/chunks/pages/eventiLdc-1cd5a5007654e10d6e4f.js

js fondoambiente.it collected 2026-09-24 08:52:48 UTC 9,325 bytes, 1 lines download raw bytes

1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[53],{"6DnH":function(t,e,n){"use strict";n.r(e);var r=n("ERkP"),a=n.n(r),o=n("IuyV"),c=n("Lm5w"),i=a.a.createElement,u={paddingTop:"10rem"};e.default=Object(c.b)((function(){return i("div",{style:u},i(o.a,null))}))},"F2E/":function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/eventiLdc",function(){return n("6DnH")}])},IuyV:function(t,e,n){"use strict";n("sAyc");var r=n("fGyu"),a=n("QsI/"),o=n("9fIP"),c=n("MMYH"),i=n("K/z8"),u=n("sRHE"),s=n("8K1b"),l=n("cxan"),f=n("ERkP"),d=n.n(f),h=n("voCV"),v=n("j/s1"),p=n("tTwn"),g=n.n(p),b=n("QtE3"),y=n("NAJH"),w=n("MJc2"),m=n.n(w),O=n("ezIv"),j=n("mtjO"),E=d.a.createElement;function D(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function o(n,r,a,o){var u=r&&r.prototype instanceof i?r:i,s=Object.create(u.prototype);return _(s,"_invoke",function(n,r,a){var o,i,u,s=0,l=a||[],f=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,n){return o=e,i=0,u=t,d.n=n,c}};function h(n,r){for(i=n,u=r,e=0;!f&&s&&!a&&e<l.length;e++){var a,o=l[e],h=d.p,v=o[2];n>3?(a=v===r)&&(u=o[(i=o[4])?5:(i=3,3)],o[4]=o[5]=t):o[0]<=h&&((a=n<2&&h<o[1])?(i=0,d.v=r,d.n=o[1]):h<v&&(a=n<3||o[0]>r||r>v)&&(o[4]=n,o[5]=r,d.n=v,i=0))}if(a||n>1)return c;throw f=!0,r}return function(a,l,v){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&h(l,v),i=l,u=v;(e=i<2?t:u)||!f;){o||(i?i<3?(i>1&&(d.n=-1),h(i,u)):d.n=u:d.v=u);try{if(s=2,o){if(i||(a="next"),e=o[a]){if(!(e=e.call(o,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,i<2&&(i=0)}else 1===i&&(e=o.return)&&e.call(o),i<2&&(u=TypeError("The iterator does not provide a '"+a+"' method"),i=1);o=t}else if((e=(f=d.n<0)?u:n.call(r,d))!==c)break}catch(e){o=t,i=1,u=e}finally{s=1}}return{value:e,done:f}}}(n,a,o),!0),s}var c={};function i(){}function u(){}function s(){}e=Object.getPrototypeOf;var l=[][r]?e(e([][r]())):(_(e={},r,(function(){return this})),e),f=s.prototype=i.prototype=Object.create(l);function d(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,_(t,a,"GeneratorFunction")),t.prototype=Object.create(f),t}return u.prototype=s,_(f,"constructor",s),_(s,"constructor",u),u.displayName="GeneratorFunction",_(s,a,"GeneratorFunction"),_(f),_(f,a,"Generator"),_(f,r,(function(){return this})),_(f,"toString",(function(){return"[object Generator]"})),(D=function(){return{w:o,m:d}})()}function _(t,e,n,r){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}(_=function(t,e,n,r){function o(e,n){_(t,e,(function(t){return this._invoke(e,n,t)}))}e?a?a(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))})(t,e,n,r)}function P(t,e,n){return e=Object(u.a)(e),Object(i.a)(t,function(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return function(){return!!t}()}()?Reflect.construct(e,n||[],Object(u.a)(t).constructor):e.apply(t,n))}var k=function(t){return"".concat(t.getFullYear(),"-").concat(t.getMonth()+1,"-").concat(t.getDate())},L=function(t,e){var n=[];if("now"===e){var r=new Date(t);r.setDate(r.getDate()-1),n.push("calendar.dt_evento=".concat(k(r),"|GREATER"))}else n.push("calendar.dt_evento=".concat(t,",").concat(e,"|BETWEEN"));return n.length?n.join("&"):""},S=function(t){return E(b.EventCard,Object(l.a)({},t,{LinkComponent:m.a}))},C=function(t){function e(t){var n;return Object(o.a)(this,e),(n=P(this,e,[t])).state={meta:{loading:!0}},n.search=n.search.bind(n),n.handleLoadMore=n.handleLoadMore.bind(n),n.updateResults=n.updateResults.bind(n),n}return Object(s.a)(e,t),Object(c.a)(e,[{key:"componentDidMount",value:function(){var t=this;this.setState({meta:{loading:!1}});var e=new Date;Object(j.f)("&calendar.dt_evento=".concat(k(e),"&limit=8")).then((function(e){t.setState({events:e.data,total:e.total,showLoadMore:e.to<e.total,currentPage:1,searchKeyword:"",searchStartDate:null,searchEndDate:null})})).catch((function(t){console.error("[EventsGridLDC] caricamento eventi fallito:",t)}))}},{key:"handleLoadMore",value:function(){var t=Object(a.a)(D().m((function t(){var e,n,a,o,c,i,u,s,l,f,d,h,v;return D().w((function(t){for(;;)switch(t.n){case 0:return e=this.state,n=e.currentPage,a=e.searchKeyword,o=e.searchStartDate,c=e.searchEndDate,i="",(a||o||c)&&
1(i=[a&&"titolo=%25".concat(a,"%25|LIKE"),L(o,c)].filter((function(t){return t})),i="&".concat(i.join("&"))),u=this.state.events||this.props.events,s=n+1,t.n=1,Object(j.f)("&limit=8&page=".concat(s).concat(i));case 1:l=t.v,f=l.data,d=l.current_page,h=l.to,v=l.total,this.setState({events:[].concat(Object(r.a)(u),Object(r.a)(f)),currentPage:d,showLoadMore:h<v});case 2:return t.a(2)}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"search",value:function(t){var e=t.search,n=t.startDate,r=t.endDate;this.setState({searchKeyword:e,searchStartDate:n,searchEndDate:r,meta:{loading:!0}});var a=[e&&"&titolo=%25".concat(e,"%25|LIKE"),L(n,r),"limit=8"].join("&");this.updateResults(a,e,n,r)}},{key:"updateResults",value:function(){var t=Object(a.a)(D().m((function t(e,n,r,a){var o,c,i,u;return D().w((function(t){for(;;)switch(t.n){case 0:return"",t.n=1,Object(j.f)("".concat(e,"&").concat(""));case 1:o=t.v,c=o.data,i=o.total,u=o.to,this.setState({events:c,searchKeyword:n,showLoadMore:u<i,searchStartDate:r,searchEndDate:a,total:i,meta:{loading:!1}});case 2:return t.a(2)}}),t,this)})));return function(e,n,r,a){return t.apply(this,arguments)}}()},{key:"render",value:function(){var t=this.state,e=t.showLoadMore,n=t.searchKeyword,r=t.searchStartDate,a=t.searchEndDate,o=t.meta,c=t.total,i=this.state.events||this.props.events;return E(d.a.Fragment,null,o&&o.loading&&E(b.Loading,null),E(M,null,E(b.FiltersBar,{searchPlaceholder:"Cerca un evento",onChange:this.search,searchValue:n,datePicker:!0,startDate:r,endDate:a}),n&&function(t){t.events;var e=t.total,n=t.keyword,r=t.searchStartDate,a=n||r?'<p><a href="">Resetta la ricerca</a></p>':"",o=[n&&'<h1  style="text-align:center; margin-bottom: .5rem;">Hai cercato <strong>"'.concat(g()(n),'"</strong></h1>'),a&&a].filter((function(t){return t})).join(""),c=!!n&&e;return E(d.a.Fragment,null,E(b.FiltersResults,{total:c,message:o}))}({events:i,total:c,keyword:n,searchStartDate:r,searchEndDate:a}),i&&i.length>0?E(b.EventsGrid,{samesize:"true",cards:i.map(O.m),CardComponent:S,vertical:!0}):E("div",null,"Questa ricerca non ha ottenuto risultati, prova a inserire parole chiave differenti."),e&&E(b.Padder,{size:"medium"},E(b.Button,{centered:!0,onClick:this.handleLoadMore},"Carica Altri Eventi"))))}}])}(f.Component),M=v.d.div.withConfig({displayName:"EventsGridLDC__EventsGridLDCWrapper",componentId:"sc-1p7vlau-0"})(["background-color:#f2f2f2;.EventsGrid-row{padding:1em 1em 0;}"]),R=Object(h.a)(y.e);e.a=R(C)},MJc2:function(t,e,n){var r=n("KEM+");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=n("ERkP"),i=n("8cHP").Link;t.exports=function(t){return c.createElement(t.route?i:"a",o(o({},t),{},{href:t.route||t.to||""}),t.children)}},NAJH:function(t,e,n){"use strict";var r=n("Z2Hg");n.d(e,"a",(function(){return r.a}));var a=n("w2w1");n.d(e,"b",(function(){return a.a}));n("Gae8");var o=n("Zee3");n.d(e,"c",(function(){return o.a}));var c=n("KZWD");n.d(e,"d",(function(){return c.a}));n("pxt2");var i=n("KtlO");n.d(e,"e",(function(){return i.a}));n("u2PW"),n("xQZi")},mtjO:function(t,e,n){"use strict";n.d(e,"e",(function(){return i})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"f",(function(){return u})),n.d(e,"b",(function(){return f}));var r=n("r4FT"),a=n("0D0S"),o=n.n(a)()().publicRuntimeConfig.PLATFORM,c="eventi?with=content,alert,related,settore,news,tema,tipologia,categoria,media,luogo,luogo.regione,luogo.provincia&limit=150",i=function(t){return r.a.get("".concat(o,"/").concat(c).concat(t)).then((function(t){return t.data}))},u=function(t){return r.a.get("".concat(o,"/ldc/eventi/?with=calendar,luogo,luogo.ldc").concat(t||"")).then((function(t){return t.data}))},s=function(){return r.a.get("".concat(o,"/").concat("eventi/target")).then((function(t){return t.data.data}))},l=function(){return r.a.get("".concat(o,"/").concat("eventi/settori?fl_filtro=true")).then((function(t){return t.data.data}))},f=function(t,e){var n="";null!==t&&void 0!==t&&t.length&&(n="&search=".concat(t[0].toLowerCase()));var a="";return e&&(a="&ownersmodel=".concat(e.filter((function(t){return 0!==t})).join(","))),r.a.get("".concat(o,"/").concat(c,"&date_from=now&orderby=date_to_show+").concat(n).concat(a)).then((function(t){return t.data.data}))};e.a=function(t){return r.a.get("".concat(o,"/").concat(c).concat(t)).then((function(t){return t.data.data}))}}},[["F2E/",1,0,5,7,3,2,6,4,8,9,10,11,13,12,15,14,16,19]]]);

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.