1_N_E=(window.webpackJsonp_N_E=window.webpackJsonp_N_E||[]).push([[85],{"+H2D":function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var o="LOCATION_REQUEST",r="LOCATION_COMMIT",i="LOCATION_FAILURE"},6780:function(t,e,n){"use strict";var o=n("QsI/"),r=n("9fIP"),i=n("MMYH"),a=n("K/z8"),c=n("sRHE"),u=n("8K1b"),s=n("ERkP"),l=n.n(s),d=n("i8i4"),f=n.n(d),p=n("QtE3"),g=l.a.createElement;function m(){var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof c?o:c,s=Object.create(u.prototype);return h(s,"_invoke",function(n,o,r){var i,c,u,s=0,l=r||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,c=0,u=t,f.n=n,a}};function p(n,o){for(c=n,u=o,e=0;!d&&s&&!r&&e<l.length;e++){var r,i=l[e],p=f.p,g=i[2];n>3?(r=g===o)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=p&&((r=n<2&&p<i[1])?(c=0,f.v=o,f.n=i[1]):p<g&&(r=n<3||i[0]>o||o>g)&&(i[4]=n,i[5]=o,f.n=g,c=0))}if(r||n>1)return a;throw d=!0,o}return function(r,l,g){if(s>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,g),c=l,u=g;(e=c<2?t:u)||!d;){i||(c?c<3?(c>1&&(f.n=-1),p(c,u)):f.n=u:f.v=u);try{if(s=2,i){if(c||(r="next"),e=i[r]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,c<2&&(c=0)}else 1===c&&(e=i.return)&&e.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),c=1);i=t}else if((e=(d=f.n<0)?u:n.call(o,f))!==a)break}catch(e){i=t,c=1,u=e}finally{s=1}}return{value:e,done:d}}}(n,r,i),!0),s}var a={};function c(){}function u(){}function s(){}e=Object.getPrototypeOf;var l=[][o]?e(e([][o]())):(h(e={},o,(function(){return this})),e),d=s.prototype=c.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,h(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=s,h(d,"constructor",s),h(s,"constructor",u),u.displayName="GeneratorFunction",h(s,r,"GeneratorFunction"),h(d),h(d,r,"Generator"),h(d,o,(function(){return this})),h(d,"toString",(function(){return"[object Generator]"})),(m=function(){return{w:i,m:f}})()}function h(t,e,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}(h=function(t,e,n,o){function i(e,n){h(t,e,(function(t){return this._invoke(e,n,t)}))}e?r?r(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(i("next",0),i("throw",1),i("return",2))})(t,e,n,o)}function b(t,e,n){return e=Object(c.a)(e),Object(a.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(c.a)(t).constructor):e.apply(t,n))}var y=function(t){function e(){var t;return Object(r.a)(this,e),(t=b(this,e)).state={activeSlug:null,activeId:null,loading:!1,initialProps:null,didPushState:!1},t.openOverlay=t.openOverlay.bind(t),t.handleOverlayClose=t.handleOverlayClose.bind(t),t._handlePopState=t._handlePopState.bind(t),t}return Object(u.a)(e,t),Object(i.a)(e,[{key:"componentDidMount",value:function(){window.addEventListener("popstate",this._handlePopState)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("popstate",this._handlePopState)}},{key:"_handlePopState",value:function(){(this.state.activeSlug||this.state.activeId)&&this.setState({activeSlug:!1,activeId:!1,didPushState:!1})}},{key:"openOverlay",value:function(){var t=Object(o.a)(m().m((function t(e){var n,r,i,a,c,u,s,l,d=this;return m().w((function(t){for(;;)switch(t.n){case 0:return n=e.slug,r=e.id,i=e.fxm,a=e.url,c=this.props.getPage,t.n=1,c.then((function(t){return t.default}));case 1:if(u=t.v,s=window.location.href,l=!1,a)try{window.history.pushState({luogoOverlay:!0},"",a),l=!0}catch(f){}this.setState({activeSlug:n,activeId:r,originUrl:s,didPushState:l,loading:!0,Page:u},Object(o.a)(m().m((function t(){var e;return m().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,u.getInitialProps({query:{slug:n,id:r,fxm:i,isOverlay:!0}});case 1:e=t.v,d.setState({initialProps:e,loading:!1},(function(){}));case 2:return t.a(2)}}),t)}))));case 2:return t.a(2)}}),t,this)})));return function(e){return t.apply(this,arguments)}}()},{key:"handleOverlayClose",value:function(){this.state.didPushState&&(this.state.activeSlug||this.state.activeId)?window.history.back():this.setState({activeSlug:!1,activeId:!1})}},{key:"render",value:function(){var t=this.state,e=t.activeSlug,n=t.activeId,o=t.Page,r=t.initialProps,i=t.loading;return g(l.a.Fragment,null,e||n?f.a.createPortal(i?g(p.Loading,null):g(p.ModalOverlay,{showModal:!0,big:!0,onClose:this.handleOverlayClose},g(o,r)),document.querySelector("#overlay-container")):null,this.props.children({handleCardClick:this.openOverlay}))}}])}(l.a.Component);e.a=y},"7U+e":function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var o=n("zjfJ"),r=n("fGyu"),i=n("QsI/"),a=n("9fIP"),c=n("MMYH"),u=n("K/z8"),s=n("sRHE"),l=n("8K1b"),d=n("ERkP"),f=n.n(d),p=n("j/s1"),g=n("voCV"),m=n("9SJ6"),h=n("q0ET"),b=f.a.createElement;function y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?y(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function O(){var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",r=n.toStringTag||"@@toStringTag";function i(n,o,r,i){var u=o&&o.prototype instanceof c?o:c,s=Object.create(u.prototype);return w(s,"_invoke",function(n,o,r){var i,c,u,s=0,l=r||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return i=e,c=0,u=t,f.n=n,a}};function p(n,o){for(c=n,u=o,e=0;!d&&s&&!r&&e<l.length;e++){var r,i=l[e],p=f.p,g=i[2];n>3?(r=g===o)&&(u=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=p&&((r=n<2&&p<i[1])?(c=0,f.v=o,f.n=i[1]):p<g&&(r=n<3||i[0]>o||o>g)&&(i[4]=n,i[5]=o,f.n=g,c=0))}if(r||n>1)return a;throw d=!0,o}return function(r,l,g){if(s>1)throw TypeError("Generator is already running");for(d&&1===l&&p(l,g),c=l,u=g;(e=c<2?t:u)||!d;){i||(c?c<3?(c>1&&(f.n=-1),p(c,u)):f.n=u:f.v=u);try{if(s=2,i){if(c||(r="next"),e=i[r]){if(!(e=e.call(i,u)))throw TypeError("iterator result is not an object");if(!e.done)return e;u=e.value,c<2&&(c=0)}else 1===c&&(e=i.return)&&e.call(i),c<2&&(u=TypeError("The iterator does not provide a '"+r+"' method"),c=1);i=t}else if((e=(d=f.n<0)?u:n.call(o,f))!==a)break}catch(e){i=t,c=1,u=e}finally{s=1}}return{value:e,done:d}}}(n,r,i),!0),s}var a={};function c(){}function u(){}function s(){}e=Object.getPrototypeOf;var l=[][o]?e(e([][o]())):(w(e={},o,(function(){return this})),e),d=s.prototype=c.prototype=Object.create(l);function f(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,w(t,r,"GeneratorFunction")),t.prototype=Object.create(d),t}return u.prototype=s,w(d,"constructor",s),w(s,"constructor",u),u.displayName="GeneratorFunction",w(s,r,"GeneratorFunction"),w(d),w(d,r,"Generator"),w(d,o,(function(){return this})),w(d,"toString",(function(){return"[object Generator]"})),(O=function(){return{w:i,m:f}})()}function w(t,e,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(t){r=0}(w=function(t,e,n,o){function i(e,n){w(t,e,(function(t){return this._invoke(e,n,t)}))}e?r?r(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n:(i("next",0),i("throw",1),i("return",2))})(t,e,n,o)}function x(t,e,n){return e=Object(s.a)(e),Object(u.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(s.a)(t).constructor):e.apply(t,n))}
1var j={btnUrl:"",btnLabel:"Mostra tutti",infoLabel:"Non ci sono elementi vicino a me"},C=function(t){function e(){var t;return Object(a.a)(this,e),(t=x(this,e)).state={currentPage:1,luoghi:[],canLoadMore:!0,loading:!1},t.loadMore=t.loadMore.bind(t),t}return Object(l.a)(e,t),Object(c.a)(e,[{key:"componentDidMount",value:function(){var t=this.props,e=t.coords,n=t.requestLocation;e&&this.updateNearby({coords:e}),e||n()}},{key:"componentDidUpdate",value:function(t){var e=this.props.coords;Object(g.e)(t.coords,e)||this.updateNearby({coords:e})}},{key:"updateNearby",value:function(){var t=Object(i.a)(O().m((function t(){var e,n,o,i,a;return O().w((function(t){for(;;)switch(t.n){case 0:return e=this.props,n=e.getLuoghi,o=e.coords,i=this.state.currentPage,this.setState({loading:!0}),t.n=1,n({coords:o,page:i});case 1:a=t.v,this.setState({loading:!1,luoghi:[].concat(Object(r.a)(this.state.luoghi),Object(r.a)(a)),canLoadMore:a.length>0});case 2:return t.a(2)}}),t,this)})));return function(){return t.apply(this,arguments)}}()},{key:"loadMore",value:function(){var t=this,e=this.state,n=e.loading,o=e.canLoadMore;!n&&o&&this.setState({currentPage:this.state.currentPage+1},(function(){return t.updateNearby()}))}},{key:"render",value:function(){var t=this.state,e=t.luoghi,n=t.loading,o=t.canLoadMore,r=this.props,i=r.requestLocation,a=r.status,c=r.CardComponent,u=r.makeCard,s=r.coords,l=r.ContainerComponent,d=void 0===l?m.a:l,p=r.fallback;if(s&&0===e.length&&!n){var g=this.props.EmptyComponent;if(g)return b(g,null);var y=v(v({},j),p);return b(S,null,b("p",null,y.infoLabel),y.btnUrl&&b(f.a.Fragment,null,b(P,null),b(h.a,{className:"js-requestLocation",link:y.btnUrl},y.btnLabel)))}return e.length?b(f.a.Fragment,null,b(d,{CardComponent:c,cards:e.map(u)}),o&&b(_,null,b(h.a,{centered:!0,onClick:this.loadMore},n?"CARICO...":"MOSTRA ALTRI"))):b(S,{style:{padding:"100px"}},b("p",null,"\xc8 necessario attivare la Geolocalizzazione per vedere i luoghi vicini."),b(P,null),b(h.a,{className:"js-requestLocation",onClick:i},"LOADING"===a||n?"Carico....":"Attiva Geolocalizzazione"))}}])}(f.a.Component),_=p.d.div.withConfig({displayName:"FetchNearbyLuoghi__ButtonPadder",componentId:"sc-1yaxw6s-0"})(["padding:2rem 0;"]),S=p.d.div.withConfig({displayName:"FetchNearbyLuoghi__AuthNeeded",componentId:"sc-1yaxw6s-1"})(["text-align:center;"]),P=p.d.div.withConfig({displayName:"FetchNearbyLuoghi__Spacer",componentId:"sc-1yaxw6s-2"})(["margin-bottom:2rem;"])},MJc2:function(t,e,n){var o=n("KEM+");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var a=n("ERkP"),c=n("8cHP").Link;t.exports=function(t){return a.createElement(t.route?c:"a",i(i({},t),{},{href:t.route||t.to||""}),t.children)}},OUrE:function(t,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/myfai/vicinoAMe",function(){return n("txj/")}])},YY8h:function(t,e,n){"use strict";var o=n("cxan"),r=n("9fIP"),i=n("MMYH"),a=n("K/z8"),c=n("sRHE"),u=n("8K1b"),s=n("ERkP"),l=n.n(s),d=n("QtE3"),f=n("Ehz4"),p=n("bAhH"),g=l.a.createElement;function m(t,e,n){return e=Object(c.a)(e),Object(a.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(c.a)(t).constructor):e.apply(t,n))}var h=function(t){function e(){return Object(r.a)(this,e),m(this,e,arguments)}return Object(u.a)(e,t),Object(i.a)(e,[{key:"render",value:function(){var t=this,e=this.props,n=e.id,r=e.title,i=e.id_comitato,a=e.slug,c=e.handleCardClick,u=e.fixedStatus,s=e.anchor,l=e.luogoSalvato,m=e.votesDisabled;return g(f.a,{id:n,title:r,id_comitato:i,slug:a},(function(e){var r=e.status,i=e.tokenId,f=u||r,h=m?null:function(){return g(p.a,Object(o.a)({},t.props,e))},b=l?"/luoghi/".concat(a,"?luogoSalvato").concat(s||""):"/luoghi/".concat(a,"?ldc").concat(s||"");return g(d.VoteCard,Object(o.a)({},t.props,{link:b,onClick:"function"===typeof c?function(){return c({slug:a,id:n,url:b})}:null,status:f,tokenId:i,renderButton:h,luogoSalvato:l}))}))}}])}(l.a.Component);e.a=h},c63D:function(t,e,n){"use strict";var o=n("ERkP"),r=n.n(o),i=n("6780"),a=r.a.createElement;e.a=function(t){return a(i.a,{getPage:Promise.all([n.e(15),n.e(14),n.e(16),n.e(29),n.e(98)]).then(n.bind(null,"Wj6v"))},t.children)}},cXXW:function(t,e,n){"use strict";var o=n("uDfI"),r=n("j46Z"),i=n("o2OV");e.a=Object(o.b)((function(t){return{coords:Object(i.c)(t),status:Object(i.d)(t),code:Object(i.b)(t)}}),r)((function(t){var e=t.coords,n=t.status,o=t.requestLocation,r=t.code;return(0,t.children)({coords:e,status:n,requestLocation:o,code:r})}))},iR2b:function(t,e,n){"use strict";var o=n("gc+n");e.a=function(t){if("undefined"===typeof t)return{};var e=t.date_to_show,n=t.dt_inizio,r=t.dt_fine,i=t.titolo,a=t.luogo,c=t.url_landing_page,u=e,s=function(t){var e=t.background_type;return"I"===e?"fullImg":"B"===e?"white":"V"===e?"green":void 0}(t),l=new Date(u).toString()===new Date((new Date).setHours(0,0,0,0)).toString();return{category:t.tema?t.tema.tema:"",title:i,dateFrom:Object(o.c)(n),dateTo:Object(o.c)(r),isToday:l,exactDate:u,exactDay:Object(o.d)(u),exactMonth:Object(o.e)(u),info:[t.owner&&t.owner.toUpperCase(),a?a.localita_web:""].join("<br />"),link:"/eventi/".concat(t.slug),hasLanding:c,thumbnail:{image:{url:t.media[0]&&t.media[0].url}},backgroundType:s}}},j46Z:function(t,e,n){"use strict";n.r(e),n.d(e,"requestLocation",(function(){return r})),n.d(e,"commitLocation",(function(){return i})),n.d(e,"failLocation",(function(){return a}));var o=n("+H2D"),r=function(){return{type:o.c}},i=function(t){var e=t.lat,n=t.lng;return{type:o.a,payload:{coords:{lat:e,lng:n}}}},a=function(t){var e=t.code;return{type:o.b,meta:{code:e}}}},mtjO:function(t,e,n){"use strict";n.d(e,"e",(function(){return c})),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 d}));var o=n("r4FT"),r=n("0D0S"),i=n.n(r)()().publicRuntimeConfig.PLATFORM,a="eventi?with=content,alert,related,settore,news,tema,tipologia,categoria,media,luogo,luogo.regione,luogo.provincia&limit=150",c=function(t){return o.a.get("".concat(i,"/").concat(a).concat(t)).then((function(t){return t.data}))},u=function(t){return o.a.get("".concat(i,"/ldc/eventi/?with=calendar,luogo,luogo.ldc").concat(t||"")).then((function(t){return t.data}))},s=function(){return o.a.get("".concat(i,"/").concat("eventi/target")).then((function(t){return t.data.data}))},l=function(){return o.a.get("".concat(i,"/").concat("eventi/settori?fl_filtro=true")).then((function(t){return t.data.data}))},d=function(t,e){var n="";null!==t&&void 0!==t&&t.length&&(n="&search=".concat(t[0].toLowerCase()));var r="";return e&&(r="&ownersmodel=".concat(e.filter((function(t){return 0!==t})).join(","))),o.a.get("".concat(i,"/").concat(a,"&date_from=now&orderby=date_to_show+").concat(n).concat(r)).then((function(t){return t.data.data}))};e.a=function(t){return o.a.get("".concat(i,"/").concat(a).concat(t)).then((function(t){return t.data.data}))}},niJQ:function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"c",(function(){return d})),n.d(e,"b",(function(){return f})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return g})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return h}));var o=n("fGyu"),r=n("zygG"),i=n("r4FT"),a=n("0D0S"),c=n.n(a),u=n("mtjO"),s=c()().publicRuntimeConfig.PLATFORM,l=function(t){var e=t.coords,n=e.lat,o=e.lng,r=t.page,a=void 0===r?1:r;return i.a.get("".concat(s,"/luoghi/?with=bene,provincia,comune,bene.tipologia,bene.media,bene.luogo&has=bene&bene.id_tipologia_bene=1&bene.fl_online=1&radius[coords]=").concat(parseFloat(n).toFixed(2),",").concat(parseFloat(o).toFixed(2),"&radius[distance]=100&limit=4&page=").concat(a)).then((function(t){return t.data.data})).then((function(t){return t.map((function(t){return t.bene}))})).catch((function(){return[]}))},d=function(t){var e=t.coords,n=e.lat,o=e.lng,r=t.page,a=void 0===r?1:r;return i.a.get("".concat(s,"/rete?with=luogo,father&radius[coords]=").concat(parseFloat(n).toFixed(2),",").concat(parseFloat(o).toFixed(2),"&radius[distance]=100&limit=4&page=").concat(a)).then((function(t){return t.data.data}
1)).catch((function(){return[]}))},f=function(t){var e=t.coords,n=e.lat,o=e.lng,r=t.page,a=void 0===r?1:r;return i.a.get("".concat(s,"/luoghi/faixme/?with=luogo,media,categorie,sottocategorie&has=sottocategorie&slug=null|NOT&radius[coords]=").concat(parseFloat(n).toFixed(2),",").concat(parseFloat(o).toFixed(2),"&radius[distance]=100&limit=4&page=").concat(a)).then((function(t){return t.data.data})).catch((function(){return[]}))},p=function(t){var e=t.coords,n=e.lat,o=e.lng,r=t.page,i=void 0===r?1:r;return Object(u.a)("&date_from=now&radius[coords]=".concat(parseFloat(n).toFixed(2),",").concat(parseFloat(o).toFixed(2),"&radius[distance]=100&limit=4&page=").concat(i)).catch((function(){return[]}))},g=function(t){var e=t.coords,n=e.lat,a=e.lng,c=t.page,u=void 0===c?1:c,l=t.limit,d=void 0===l?4:l,f="radius[coords]=".concat(parseFloat(n).toFixed(2),",").concat(parseFloat(a).toFixed(2),"&radius[distance]=100"),p="".concat(s,"/luoghi/?with=gfp,gfp.media&has=gfp&").concat(f,"&limit=").concat(d,"&page=").concat(u),g="".concat(s,"/luoghi/?with=gfa,gfa.media&has=gfa&").concat(f,"&limit=").concat(d,"&page=").concat(u);return Promise.all([i.a.get(p).then((function(t){return t.data.data})).catch((function(){return[]})),i.a.get(g).then((function(t){return t.data.data})).catch((function(){return[]}))]).then((function(t){var e=Object(r.a)(t,2),n=e[0],i=e[1];return[].concat(Object(o.a)(n),Object(o.a)(i)).slice(0,d)})).catch((function(){return[]}))},m=function(t){var e=t.coords,n=e.lat,o=e.lng,r=t.page,a=void 0===r?1:r,c=t.limit,u=void 0===c?4:c,l="radius[coords]=".concat(parseFloat(n).toFixed(2),",").concat(parseFloat(o).toFixed(2),"&radius[distance]=100"),d="".concat(s,"/luoghi/?with=ldc,ldc.media,tipologia,comune,provincia,regione&has=ldc_tipologia,ldc&").concat(l,"&orderby=rank&limit=").concat(u,"&page=").concat(a);return i.a.get(d).then((function(t){return t.data.data})).catch((function(){return[]}))},h=function(t){var e=t.data,n=t.tokenId;return Object(i.a)({method:"patch",url:"".concat(s,"/users/me"),data:e,headers:{Authorization:"Bearer ".concat(n)}}).then((function(t){return t.data.data})).catch((function(t){return{errorMessage:t.response.data.message,errors:t.response.data.errors}}))}},o2OV:function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return s})),n.d(e,"b",(function(){return l}));var o=n("zjfJ"),r=n("+H2D");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){Object(o.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c=function(t){return t.location?t.location:null},u=function(t){var e=c(t);return e&&e.coords},s=function(t){var e=c(t);return e&&e.status},l=function(t){var e=c(t);return e&&e.meta&&e.meta.code};e.a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;switch(e.type){case r.c:return a(a({},t),{},{status:"LOADING"});case r.a:return a(a({},t),{},{status:"SUCCESSFUL",coords:e.payload.coords});case r.b:return a(a({},t),{},{status:"FAILURE",meta:e.meta});default:return t}}},qXKH:function(t,e,n){"use strict";e.a=function(t){if("undefined"===typeof t)return{};var e=t.luogo.slug;return{id:t.id,title:t.titolo,supertitle:"",thumbnail:{url:t.media[0]&&t.media[0].url||"https://fai-website.imgix.net/static/placeholder_2.png"},link:"/luoghi/".concat(e),subtitle:t.luogo.localita_web,content:t.payoff}}},"txj/":function(t,e,n){"use strict";n.r(e);var o=n("7i8V"),r=n("zjfJ"),i=n("cxan"),a=n("ERkP"),c=n.n(a),u=n("uDfI"),s=n("C3cE"),l=n("D2cw"),d=n("eGVi"),f=n("swfI"),p=n("9SJ6"),g=n("cXXW"),m=n("j/s1"),h=n("M/dF"),b=n("7U+e"),y=n("heMR"),v=c.a.createElement,O={giornate:{icon:"Calendar",title:"Nessuna Giornata FAI disponibile",message:"Non ci sono Giornate FAI programmate al momento entro 100 km da te"},eventi:{icon:"Calendar",title:"Nessun evento disponibile",message:"Non ci sono eventi programmati al momento entro 100 km da te"},beni:{icon:"Bank",title:"Nessun bene FAI",message:"Non ci sono beni FAI entro 100 km da te"},presidi:{icon:"Group",title:"Nessun presidio FAI disponibile",message:"Non ci sono Presidi FAI disponibili entro 100 km da te"},convenzioni:{icon:"PercentageRound",title:"Nessuna convenzione FAI disponibile",message:"Non ci sono Opportunit\xe0 FAI disponibili entro 100 km da te"},ldc:{icon:"Heart",title:"Nessun Luogo del Cuore disponibile",message:"Non ci sono Luoghi del Cuore entro 100 km da te"}},w=m.d.div.withConfig({displayName:"SectionEmptyState__EmptyStateContainer",componentId:"sc-1ggcqav-0"})(["background:#e6e6e6;border-radius:",";padding:",";display:flex;flex-direction:column;align-items:center;text-align:center;gap:",";"],h.e.radii.sm,h.e.spacing.xl,h.e.spacing.base),x=m.d.h3.withConfig({displayName:"SectionEmptyState__EmptyStateTitle",componentId:"sc-1ggcqav-1"})(["font-family:",";font-weight:",";font-size:",";color:",";margin:0;"],h.e.fonts.body,h.e.fontWeights.bold,h.e.fontSizes.xl,h.e.colors.textPrimary),j=m.d.p.withConfig({displayName:"SectionEmptyState__EmptyStateMessage",componentId:"sc-1ggcqav-2"})(["font-family:",";font-weight:",";font-size:",";line-height:24px;color:",";margin:0;"],h.e.fonts.ui,h.e.fontWeights.regular,h.e.fontSizes.base,h.e.colors.textPrimary),C=function(t){var e=t.icon,n=t.title,o=t.message;return v(w,{role:"status"},v(y.a,{name:e}),v(x,null,n),v(j,null,o))},_=c.a.createElement,S=m.d.section.withConfig({displayName:"NearbySection__SectionWrapper",componentId:"sc-1x1ignx-0"})(["padding-top:48px;"]),P=m.d.h3.withConfig({displayName:"NearbySection__SectionTitle",componentId:"sc-1x1ignx-1"})(["font-family:",";font-weight:",";font-size:",";color:#181d27;line-height:normal;margin:0 0 "," 0;"],h.e.fonts.heading,h.e.fontWeights.bold,h.e.fontSizes.xxxl,h.e.spacing.xl),k=function(t){var e=t.title,n=t.getLuoghi,o=t.makeCard,r=t.CardComponent,i=t.ContainerComponent,a=t.emptyStateType,u=t.coords,s=t.status,l=t.requestLocation,d=c.a.useMemo((function(){return function(){return _(C,O[a])}}
1),[a]);return _(S,null,_(P,null,e),_(b.a,{coords:u,status:s,requestLocation:l,getLuoghi:n,makeCard:o,CardComponent:r,ContainerComponent:i,EmptyComponent:d}))},E=n("niJQ"),L=n("qXKH"),N=n("iR2b"),F=n("xSgY"),I=n("Ci+5").e,A="https://fai-website.imgix.net/static/placeholder_2.png",z=function(t){if(!t||!Array.isArray(t.media)||0===t.media.length)return A;var e=t.media.find((function(t){return t.pivot&&"TOP"===t.pivot.position}));return e&&e.url||t.media[0].url||A},T=function(t){if(!t)return{};var e=t.gfp||t.gfa,n=t.gfp?"gfp":"gfa";return e?{id:t.id,title:e.titolo_apertura,subtitle:t.localita_web,supertitle:"",thumbnail:{url:z(e)},link:"/luoghi/".concat(t.slug,"?").concat(n)}:{}},D=n("ezIv"),M=n("YY8h"),G=n("c63D"),R=n("MJc2"),q=n.n(R),V=n("YuNf"),B=n("/mMR"),H=m.d.div.withConfig({displayName:"VicinoAMestyled__PageHeader",componentId:"sc-cpgkyd-0"})(["display:flex;flex-direction:column;gap:",";padding-bottom:",";@media (max-width:1023px){padding:0 ",";padding-bottom:",";}"],h.e.spacing.sm,h.e.spacing.xxl,h.e.spacing.lg,h.e.spacing.lg),U=m.d.h1.withConfig({displayName:"VicinoAMestyled__PageTitle",componentId:"sc-cpgkyd-1"})(["font-family:",";font-weight:",";font-size:",";color:",";line-height:normal;margin:0;@media (max-width:1023px){font-size:40px;color:#181d27;}"],h.e.fonts.heading,h.e.fontWeights.bold,h.e.fontSizes.xxxxl,h.e.colors.textPrimary),W=m.d.p.withConfig({displayName:"VicinoAMestyled__PageSubtitle",componentId:"sc-cpgkyd-2"})(["font-family:",";font-weight:",";font-size:",";color:",";line-height:24px;max-width:845px;margin:0;@media (max-width:1023px){font-family:",";font-size:",";max-width:none;}"],h.e.fonts.ui,h.e.fontWeights.regular,h.e.fontSizes.xl,h.e.colors.textTertiary,h.e.fonts.body,h.e.fontSizes.base),J=m.d.div.withConfig({displayName:"VicinoAMestyled__NoGeoContent",componentId:"sc-cpgkyd-3"})(["display:flex;flex-direction:column;gap:",";margin-top:",";"],h.e.spacing.lg,h.e.spacing.xs),K=m.d.p.withConfig({displayName:"VicinoAMestyled__NoGeoHeading",componentId:"sc-cpgkyd-4"})(["font-family:",";font-weight:",";font-size:",";color:",";line-height:24px;margin:0;@media (max-width:1023px){font-size:",";}"],h.e.fonts.body,h.e.fontWeights.bold,h.e.fontSizes.xl,h.e.colors.textPrimary,h.e.fontSizes.base),X=m.d.p.withConfig({displayName:"VicinoAMestyled__NoGeoDescription",componentId:"sc-cpgkyd-5"})(["font-family:",";font-weight:",";font-size:",";color:",";line-height:24px;max-width:746px;margin:0;"],h.e.fonts.body,h.e.fontWeights.regular,h.e.fontSizes.base,h.e.colors.textTertiary),Y=m.d.button.withConfig({displayName:"VicinoAMestyled__GeolocationButton",componentId:"sc-cpgkyd-6"})(["font-family:",";font-weight:",";font-size:",";color:",";background-color:",";border:none;border-radius:",";padding:12px ",";cursor:pointer;text-transform:uppercase;letter-spacing:0.5px;align-self:flex-start;@media (max-width:1023px){margin:0 ",";}&:disabled{opacity:0.5;cursor:not-allowed;}"],h.e.fonts.body,h.e.fontWeights.bold,h.e.fontSizes.sm,h.e.colors.textInverse,h.e.colors.brandPrimary,h.e.radii.sm,h.e.spacing.xl,h.e.spacing.lg),Q=m.d.div.withConfig({displayName:"VicinoAMestyled__SectionsContainer",componentId:"sc-cpgkyd-7"})(["@media (max-width:1023px){padding:0 ",";}.Background--grey{background-color:transparent;}.EventsGrid-row{background-color:transparent;flex-wrap:wrap;justify-content:flex-start;padding:0;gap:"," ",";}.EventsGrid-card,.EventsGrid--samesize .EventsGrid-card{flex:0 0 calc(25% - 6px);min-width:0;margin:0;cursor:pointer;}@media (max-width:1199px){.EventsGrid-row,.EventsGrid--vertical .EventsGrid-row{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}.EventsGrid-card,.EventsGrid--samesize .EventsGrid-card{flex:0 0 264px;min-width:264px;}}.ListOfCards-row{justify-content:flex-start;align-items:stretch;padding-left:0;}@media (max-width:1199px){.ListOfCards-row{flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;}.ListOfCards-row__card{flex-shrink:0;width:264px;}}.ListOfCards-row__card{display:flex;}.ListCard{border:1px solid #e6e6e6;border-radius:",";box-shadow:0px 4px 12px -2px rgba(10,13,18,0.06);}.ListOfCards-row__card > a{width:100%;}.ListOfCards-row__card > a > div{margin:0;}.Button--centered{left:0;transform:none;}@media (max-width:1023px){.Button--centered{left:50%;transform:translate(-50%,0);}}"],h.e.spacing.lg,h.e.spacing.base,h.e.spacing.sm,h.e.radii.sm),Z=m.d.a.withConfig({displayName:"VicinoAMestyled__DelegazioneCardStyled",componentId:"sc-cpgkyd-8"})(["display:flex;flex-direction:column;height:100%;text-decoration:none;background-color:#fff;border:1px solid #e6e6e6;border-radius:",";box-shadow:0px 4px 12px -2px rgba(10,13,18,0.06);padding:"," "," ",";color:",";&:hover{text-decoration:none;box-shadow:0px 4px 16px -2px rgba(10,13,18,0.12);}"],h.e.radii.sm,h.e.spacing.base,h.e.spacing.base,h.e.spacing.lg,h.e.colors.textPrimary),$=m.d.h4.withConfig({displayName:"VicinoAMestyled__DelegazioneCardTitle",componentId:"sc-cpgkyd-9"})(["font-family:",";font-weight:",";font-size:24px;color:",";line-height:1.2;margin:0 0 "," 0;"],h.e.fonts.heading,h.e.fontWeights.bold,h.e.colors.textPrimary,h.e.spacing.base),tt=m.d.span.withConfig({displayName:"VicinoAMestyled__DelegazioneCardLocation",componentId:"sc-cpgkyd-10"})(["font-family:",";font-weight:",";font-size:",";color:",";text-transform:uppercase;margin-top:auto;"],h.e.fonts.body,h.e.fontWeights.regular,h.e.fontSizes.xs,h.e.colors.textPrimary),et=c.a.createElement;function nt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function ot(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};
1e%2?nt(Object(n),!0).forEach((function(e){Object(r.a)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var rt={FL_NEAR_GF:"S",FL_NEAR_BENI:"S",FL_NEAR_EVENTI:"S",FL_NEAR_RT:"S",FL_NEAR_FAIXME:"S",FL_NEAR_LDC:"S"},it=function(t){return"S"===String(t||"S").toUpperCase()},at=function(t){var e=t.requestLocation;return c.a.useEffect((function(){e()}),[]),null},ct=function(t){return et(s.a,Object(i.a)({},t,{LinkComponent:q.a,subtitleSansSerif:!0}))},ut=function(t){return et(d.a,Object(i.a)({LinkComponent:q.a},t))},st=function(t){return et(l.a,Object(i.a)({samesize:"true",vertical:!0},t))},lt=function(t){var e=t.CardComponent,n=t.cards;return et(G.a,null,(function(t){var o=t.handleCardClick;return et(p.a,{wrap:"big",vertical:!0,cards:n,CardComponent:function(t){return et(e,Object(i.a)({},t,{handleCardClick:o}))}})}))};lt.defaultProps={cards:[]};var dt=function(t){var e=t.supertitle,n=t.title,o=t.link;return et(Z,{href:"string"===typeof o?o:null===o||void 0===o?void 0:o.as},et($,null,e),n&&et(tt,null,n))};dt.defaultProps={supertitle:"",title:"",link:"#"};var ft=function(t){t.membershipData;var e=t.membershipStatus,n=Object(u.d)(V.o),o=ot(ot({},rt),(null===n||void 0===n?void 0:n.flags)||{});return et("div",null,et(g.a,null,(function(t){var n=t.requestLocation,r=t.coords,i=t.status,a=t.code;return et(c.a.Fragment,null,!r&&!a&&"LOADING"!==i&&et(at,{requestLocation:n}),r?et(c.a.Fragment,null,e&&"active"!==e&&et(B.m,{membershipStatus:e}),et(H,null,et(U,null,"Vicino a me"),et(W,null,"Ovunque sei, il FAI \xe8 sempre con te: scopri le esperienze straordinarie che puoi fare con la tessera! Vicino a casa o in viaggio, anche solo per il weekend.")),et(Q,null,it(o.FL_NEAR_GF)&&et(k,{title:"Scopri i luoghi delle Giornate FAI vicini a te",getLuoghi:E.e,makeCard:T,CardComponent:ct,emptyStateType:"giornate",coords:r,status:i,requestLocation:n}),it(o.FL_NEAR_BENI)&&et(k,{title:"Scopri i Beni del FAI vicini a te",getLuoghi:E.a,makeCard:L.a,CardComponent:ct,emptyStateType:"beni",coords:r,status:i,requestLocation:n}),it(o.FL_NEAR_EVENTI)&&et(k,{title:"Scopri gli eventi vicini a te",getLuoghi:E.d,makeCard:N.a,CardComponent:ut,ContainerComponent:st,emptyStateType:"eventi",coords:r,status:i,requestLocation:n}),it(o.FL_NEAR_RT)&&et(k,{title:"Scopri i presidi FAI vicini a te",getLuoghi:E.c,makeCard:F.b,CardComponent:dt,emptyStateType:"presidi",coords:r,status:i,requestLocation:n}),it(o.FL_NEAR_FAIXME)&&et(k,{title:"Scopri le opportunit\xe0 vicine a te",getLuoghi:E.b,makeCard:I,CardComponent:f.a,emptyStateType:"convenzioni",coords:r,status:i,requestLocation:n}),it(o.FL_NEAR_LDC)&&et(k,{title:"Scopri i Luoghi del Cuore vicini a te",getLuoghi:E.f,makeCard:D.l,CardComponent:M.a,ContainerComponent:lt,emptyStateType:"ldc",coords:r,status:i,requestLocation:n}))):et(c.a.Fragment,null,et(H,null,et(U,null,"Vicino a me"),et(J,null,et(K,null,"Ops non hai condiviso la tua posizione"),et(X,null,"Condividi con noi la tua posizione e avrai accesso ai contenuti del sito personalizzati in base alla tua posizione geografica."))),et(Y,{type:"button",onClick:n,disabled:"LOADING"===i},"LOADING"===i?"Carico...":"ATTIVA GEOLOCALIZZAZIONE")))})))};ft.defaultProps={membershipData:null,membershipStatus:null};var pt=ft,gt=n("wjuK"),mt=Object(o.a)(pt);mt.getLayout=gt.a.getLayout;e.default=mt},xSgY:function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var o=function(t){var e;return"undefined"===typeof t||null===t?{}:{id:t.id,supertitle:t.titolo,title:(null===(e=t.luogo)||void 0===e?void 0:e.localita_web)||"",link:"/luoghi/rete-fai/".concat(t.slug)}};e.a=function(t){var e=t||"#",n=e.slug,o=e.titolo;return null===t?{}:{id:t.id,title:o,supertitle:"",link:"/luoghi/rete-fai/".concat(n)}}}},[["OUrE",1,0,5,7,3,2,6,4,8,9,10,11,13,12,17,20,25,26,31,32]]]);
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.