1(this["webpackJsonppaderno-dc43e"]=this["webpackJsonppaderno-dc43e"]||[]).push([[0],{135:function(e,a,t){"use strict";t.r(a);var c=t(1),n=t(41),s=t.n(n),r=(t(88),t(89),t(90),t(91),t(27)),o=t(13),i=t.n(o),l=t(18),d=t(42),u=t(43),j=t(81),m=t(80),b=t(6),h=t(21);t(97),t(136);h.a.initializeApp({apiKey:"AIzaSyC3Jl0NkizSoh7K7CYBRgz2b8G-L85wv6s",authDomain:"paderno-ea4ef.firebaseapp.com",databaseURL:"https://paderno-ea4ef.firebaseio.com",projectId:"paderno-ea4ef",storageBucket:"paderno-ea4ef.appspot.com",messagingSenderId:"648114918604",appId:"1:648114918604:web:e4cd982cccc8ec0712de69"});var p=h.a.auth(),O=h.a.firestore(),f=new h.a.auth.GoogleAuthProvider,x=function(){var e=Object(l.a)(i.a.mark((function e(a,t){var c,n,s,r;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return");case 2:return c=O.doc("users/".concat(a.uid)),e.next=5,c.get();case 5:if(e.sent.exists){e.next=16;break}return n=a.email,s=a.displayName,r=a.photoURL,e.prev=8,e.next=11,c.set(Object(b.a)({displayName:s,email:n,photoURL:r},t));case 11:e.next=16;break;case 13:e.prev=13,e.t0=e.catch(8),console.error("Error creating user document",e.t0);case 16:return e.abrupt("return",v(a.uid));case 17:case"end":return e.stop()}}),e,null,[[8,13]])})));return function(a,t){return e.apply(this,arguments)}}(),v=function(){var e=Object(l.a)(i.a.mark((function e(a){var t;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a){e.next=2;break}return e.abrupt("return",null);case 2:return e.prev=2,e.next=5,O.doc("users/".concat(a)).get();case 5:return t=e.sent,e.abrupt("return",Object(b.a)({uid:a},t.data()));case 9:e.prev=9,e.t0=e.catch(2),console.error("Error fetching user",e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(a){return e.apply(this,arguments)}}(),g=t(0),N=Object(c.createContext)({user:null}),C=function(e){Object(j.a)(t,e);var a=Object(m.a)(t);function t(){var e;Object(d.a)(this,t);for(var c=arguments.length,n=new Array(c),s=0;s<c;s++)n[s]=arguments[s];return(e=a.call.apply(a,[this].concat(n))).state={user:null},e.componentDidMount=Object(l.a)(i.a.mark((function a(){return i.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:p.onAuthStateChanged(function(){var a=Object(l.a)(i.a.mark((function a(t){var c;return i.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,x(t);case 2:(c=a.sent)&&(c.roles.includes("admin")||c.roles.includes("auth"))?e.setState({user:c}):(p.signOut(),null,e.setState({user:null}));case 4:case"end":return a.stop()}}),a)})));return function(e){return a.apply(this,arguments)}}());case 1:case"end":return a.stop()}}),a)}))),e}return Object(u.a)(t,[{key:"render",value:function(){var e=this.state.user;return Object(g.jsx)(N.Provider,{value:e,children:this.props.children})}}]),t}(c.Component),w=t(11),k=t(3),y=t(5),S=t(16),z=t(34),I=O.collection("/tutorials"),A=O.collection("/shopsLength"),L=new(function(){function e(){Object(d.a)(this,e)}return Object(u.a)(e,[{key:"getAll",value:function(){return I}},{key:"create",value:function(e){return I.add(e)}},{key:"update",value:function(e,a){return I.doc(e).update(a)}},{key:"updateComments",value:function(e,a,t){return I.doc(e).collection("comments").doc(a).update(t)}},{key:"setId",value:function(e,a){A.doc("ids").get().then(function(){var t=Object(l.a)(i.a.mark((function t(c){var n;return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=c.data().length+1,t.next=3,A.doc("ids").set({length:n});case 3:return t.next=5,I.doc(e).set(Object(b.a)(Object(b.a)({},a),{},{uniqueId:n}));case 5:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}},{key:"delete",value:function(e){return I.doc(e).delete()}}]),e}()),T=t(71),F=t.n(T),P=t(72),R=t(142),G=t(143),_=t(145),E=t(144),U=t(24),q=t.n(U),M=t(73),D=t(74),B=t(75);delete q.a.Icon.Default.prototype._getIconUrl,q.a.Icon.Default.mergeOptions({iconRetinaUrl:D.a,iconUrl:M.a,shadowUrl:B.a});var V=function(e){var a=e.center,t=e.markerChange,n=e.composedAddress,s=Object(c.useState)(a),r=Object(k.a)(s,2),o=r[0],i=r[1],l=Object(c.useRef)(null),d=Object(c.useMemo)((function(){return{dragend:function(){var e=l.current;null!=e&&(console.log(e.getLatLng()),i(e.getLatLng()),t(e.getLatLng()))}}}),[]);return Object(g.jsxs)("div",{className:"row",children:[Object(g.jsxs)("div",{className:"col-md-4",children:[Object(g.jsx)(F.a,{className:"form-row",inputClassName:"geolookup__input--nominatim form-control",buttonText:"Cerca",placeholder:"Indirizzo",disableAutoLookup:!0,onSuggestsLookup:function(e){console.log(e),console.log(n);return P.geocode({q:"Paderno Dugnano, Milan, Lombardy, "+e,addressdetails:!0})},onGeocodeSuggest:function(e){var a={};return e&&(console.log(e),a.nominatim=e.raw||{},a.location={lat:e.raw?parseFloat(e.raw.lat):"",lng:e.raw?parseFloat(e.raw.lon):""},a.placeId=e.placeId,a.isFixture=e.isFixture,a.label=e.raw?e.raw.display_name:"",i(a.location),t(a.location)),a},getSuggestLabel:function(e){return e.display_name},country:"it",initialValue:n}),Object(g.jsx)("small",{className:"form-text text-muted",children:"Cerca l'indirizzo e definisci la posizione precisa dell'esercizio commerciale muovendo il marker sulla mappa."})]}),Object(g.jsx)("div",{className:"col-md-8",children:Object(g.jsxs)(R.a,{center:o,zoom:13,scrollWheelZoom:!1,children:[Object(g.jsxs)(G.a,{position:"topright",children:[Object(g.jsx)(G.a.BaseLayer,{checked:!0,name:"OpenStreetMap",children:Object(g.jsx)(_.a,{attribution:'\xa9 <a href="http://osm.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"})}),Object(g.jsx)(G.a.BaseLayer,{name:"Satellite",children:Object(g.jsx)(_.a,{attribution:"Tiles \xa9 Esri \u2014 Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"})})]}),Object(g.jsx)(E.a,{draggable:!0,position:o,eventHandlers:d,ref:l})]})})]})},J=t(51),H=t(76),W=t.n(H),Z=(t(127),function(e){var a=e.book,t=e.phoneBookChange,n=Object(c.useState)(a),s=Object(k.a)(n,2),r=s[0],o=s[1],i=Object(c.useState)(),l=Object(k.a)(i,2),d=(l[0],l[1],Object(c.useState)(!0)),u=Object(k.a)(d,2),j=u[0],m=u[1];return Object(g.jsx)(g.Fragment,{children:r.map((function(e,a){var c=e.phone;return Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsxs)("div",{className:"form-row form-inline",children:[Object(g.jsx)(W.a,{inputProps:{name:"phone",id:"phone_".concat(a)},country:"it",onlyCountries:["it"],placeholder:"Enter phone number",disableDropdown:!0,countryCodeEditable:!1,
1containerClass:"w-auto",value:c,isValid:function(e,a,t,c){return!!j||"Numero non valido"},onChange:function(e,c,n,s){return function(e,a,c,n,s){0!==e.substring(2).length?Object(J.a)(n)?c.target.setCustomValidity(""):c.target.setCustomValidity("Phone number not valid"):c.target.setCustomValidity("");var i=Object(w.a)(r);i[s].phone=n,o(i),t(i)}(e,0,n,s,a)}}),Object(g.jsxs)("div",{className:"invalid-feedback",children:[" ","Numero di telefono non valido."," "]}),Object(g.jsx)("div",{className:"valid-feedback",children:" Numero di telefono valido. "}),Object(g.jsx)(y.a.Group,{children:Object(g.jsx)(y.a.Check,{className:"ml-2",type:"checkbox",label:"Whatsapp",checked:e.whatsapp,onChange:function(e){return function(e,a){var c=e.target.checked,n=Object(w.a)(r);n[a].whatsapp=c,o(n),t(n)}(e,a)}})}),Object(g.jsx)("div",{className:"btn-box",children:1!==r.length&&Object(g.jsx)("button",{onClick:function(e){!function(e,a){var c=Object(w.a)(r);c.splice(a,1),o(c),t(c)}(0,a)},className:"btn btn-danger ml-2 btn-sm",children:"Remove"})})]}),Object(g.jsx)("div",{className:"mt-2",children:r.length-1===a&&Object(g.jsx)("button",{onClick:function(e){!function(e){e.preventDefault();var a=Object(w.a)(r).slice(-1)[0];console.log(a),console.log(Object(J.a)(a.phone)),Object(J.a)(a.phone)?(m(!0),o([].concat(Object(w.a)(r),[{phone:"",whatsapp:!1}])),t([].concat(Object(w.a)(r),[{phone:"",whatsapp:!1}]))):m(!1)}(e)},className:"btn btn-success btn-sm",children:"Add"})})]},e.phone)}))})}),Q=t(37),K=t.n(Q),Y=t(58),X=function(e){var a=e.aperturaJSON,t=e.aperturaTT,n=Object(c.useState)(a),s=Object(k.a)(n,2),r=s[0],o=s[1],i=function(e,a){var c=a.split("_"),n=Object(w.a)(r);n[c[0]].hours[c[1]][c[2]]=Object(Y.timeFromInt)(e),o(n),t(n)};return Object(g.jsx)("div",{className:"table-responsive",children:Object(g.jsxs)("table",{className:"table table-sm table-striped",children:[Object(g.jsxs)("thead",{children:[Object(g.jsxs)("tr",{children:[Object(g.jsx)("th",{}),Object(g.jsx)("th",{className:"small",colSpan:"2",children:"Mattino"}),Object(g.jsx)("th",{className:"small",colSpan:"2",children:"Pomeriggio"})]}),Object(g.jsxs)("tr",{children:[Object(g.jsx)("th",{className:"small",children:"Giorno"}),Object(g.jsx)("th",{className:"small",children:"Dalle"}),Object(g.jsx)("th",{className:"small",children:"Alle"}),Object(g.jsx)("th",{className:"small",children:"Dalle"}),Object(g.jsx)("th",{className:"small",children:"Alle"})]})]}),Object(g.jsx)("tbody",{children:r.map((function(e,a){return Object(g.jsxs)("tr",{children:[Object(g.jsx)("td",{children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.open,name:e.id,onChange:function(e){return function(e){var a=e.target,c=a.name,n=a.checked,s=c.split("_"),i=Object(w.a)(r);i[s[0]].open=n,o(i),t(i)}(e)}}),Object(g.jsx)("span",{children:e.name})]})}),Object(g.jsx)("td",{hidden:!e.open,children:Object(g.jsx)(K.a,{format:24,start:"00:00",end:"23:59",step:30,name:e.id+"_morning_open",onChange:function(a,t){return i(a,e.id+"_morning_open")},value:e.hours.morning.open})}),Object(g.jsx)("td",{hidden:!e.open,children:Object(g.jsx)(K.a,{format:24,start:"00:00",end:"23:59",step:30,name:e.id+"_morning_close",onChange:function(a,t){return i(a,e.id+"_morning_close")},value:e.hours.morning.close})}),Object(g.jsx)("td",{hidden:!e.open,children:Object(g.jsx)(K.a,{format:24,start:"00:00",end:"23:59",step:30,name:e.id+"_aftern_open",onChange:function(a,t){return i(a,e.id+"_aftern_open")},value:e.hours.aftern.open})}),Object(g.jsx)("td",{hidden:!e.open,children:Object(g.jsx)(K.a,{format:24,start:"00:00",end:"23:59",step:30,name:e.id+"_aftern_close",onChange:function(a,t){return i(a,e.id+"_aftern_close")},value:e.hours.aftern.close})}),Object(g.jsx)("td",{hidden:e.open,colSpan:"4",children:Object(g.jsx)("input",{type:"text",name:e.id+"_close",value:"chiuso",disabled:!0})})]},e.id)}))})]})})},$=t(45),ee=t(46),ae=t(47),te=t(48),ce=t(49),ne=t(50),se=function(){var e={lat:45.571893998350326,lng:9.1621957357755},a=Object(c.useState)(e),t=Object(k.a)(a,2),n=t[0],s=t[1],r=Object(c.useState)(""),o=Object(k.a)(r,2),d=o[0],u=o[1],j=Object(c.useState)(!1),m=Object(k.a)(j,2),p=(m[0],m[1],Object(c.useState)("")),O=Object(k.a)(p,2),f=O[0],x=O[1],v=Object(c.useState)("1"),N=Object(k.a)(v,2),C=N[0],I=N[1],A=Object(c.useState)($),T=Object(k.a)(A,2),F=T[0],P=T[1],R=Object(c.useState)([0,1,1,1,1,1,1,1,1,1,1]),G=Object(k.a)(R,2),_=G[0],E=G[1],U=Object(c.useState)(!0),q=Object(k.a)(U,2),M=q[0],D=q[1],B=Object(c.useState)(!1),J=Object(k.a)(B,2),H=J[0],W=J[1],Q=Object(c.useState)(""),K=Object(k.a)(Q,2),Y=K[0],se=K[1],re=Object(c.useState)(""),oe=Object(k.a)(re,2),ie=oe[0],le=oe[1],de=Object(c.useState)([]),ue=Object(k.a)(de,2),je=ue[0],me=ue[1],be=Object(c.useState)(""),he=Object(k.a)(be,2),pe=he[0],Oe=he[1],fe=Object(c.useState)(""),xe=Object(k.a)(fe,2),ve=xe[0],ge=xe[1],Ne=Object(c.useState)(""),Ce=Object(k.a)(Ne,2),we=Ce[0],ke=Ce[1],ye=Object(c.useState)(""),Se=Object(k.a)(ye,2),ze=Se[0],Ie=Se[1],Ae=Object(c.useState)(""),Le=Object(k.a)(Ae,2),Te=Le[0],Fe=Le[1],Pe=Object(c.useState)(ee),Re=Object(k.a)(Pe,2),Ge=Re[0],_e=Re[1],Ee=Object(c.useState)(!1),Ue=Object(k.a)(Ee,2),qe=Ue[0],Me=Ue[1],De=Object(c.useState)(te),Be=Object(k.a)(De,2),Ve=Be[0],Je=Be[1],He=Object(c.useState)(ae),We=Object(k.a)(He,2),Ze=We[0],Qe=We[1],Ke=Object(c.useState)(""),Ye=Object(k.a)(Ke,2),Xe=Ye[0],$e=Ye[1],ea=Object(c.useState)(ce),aa=Object(k.a)(ea,2),ta=aa[0],ca=aa[1],na=Object(c.useState)(ne),sa=Object(k.a)(na,2),ra=sa[0],oa=sa[1],ia=Object(c.useState)(!1),la=Object(k.a)(ia,2),da=la[0],ua=la[1],ja=Object(c.useState)(null),ma=Object(k.a)(ja,2),ba=ma[0],ha=ma[1],pa=Object(c.useState)(!1),Oa=Object(k.a)(pa,2),fa=Oa[0],xa=Oa[1],va=function(e){var a=e.currentTarget,t=a.name,c=a.value;
1"title"===t?u(c):"email"===t?Oe(c):"website"===t?ge(c):"facebook"===t?ke(c):"instagram"===t?Ie(c):"twitter"===t?Fe(c):"address"===t?se(c):"numero"===t?le(c):"costoConsegna"===t?$e(c):"rscf"===t&&x(c)};function ga(e){for(var a=e.toLowerCase().split(" "),t=0;t<a.length;t++)a[t]=a[t].charAt(0).toUpperCase()+a[t].substring(1);return a.join(" ")}function Na(e){var a={};return e.map((function(e,t){e.subcat.map((function(t,c){!0===t.status&&(a[e.code]=e.maincat,a[t.code]=t.name)}))})),a}function Ca(e){var a=[];return e.map((function(e,t){if(!0===e.open){var c={d:e.name,mo:e.hours.morning.open,mc:e.hours.morning.close,ao:e.hours.aftern.open,ac:e.hours.aftern.close};a.push(c)}else a.push({d:e.name})})),a}function wa(e){var a=[];return e.map((function(e,t){if(!0===e.status){var c={n:e.label,s:e.discount,d:e.description};a.push(c)}})),a}var ka=function(){var e=Object(l.a)(i.a.mark((function e(a){var t,c,s,r,o,l,u,j;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.preventDefault(),t=new h.a.firestore.GeoPoint(n.lat,n.lng),c=ga(Y)+", "+ie,s=Na(F),r=Ca(Ge),o=Ca(Ve),l=Ca(Ze),u=wa(ra),j={published:!1,title:d.toUpperCase(),catApp:s,mainCategory:C,allcategory:F,address:c,numero:ie,rscf:f,location:t,phones:je,email:pe,website:ve,facebook:we,instagram:ze,twitter:Te,apertura:Ge,effetuapren:qe,prenotazioni:Ve,consegna:Ze,hApeApp:r,hPrenApp:o,hConsApp:l,modpag:ta,costoConsegna:Xe,sconti:ra,scontApp:u},console.log(j),L.create(j).then((function(){console.log("Created new item successfully!"),ua(!0)})).catch((function(e){console.log(e),ha(e)}));case 11:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),ya=Object(c.useState)(!1),Sa=Object(k.a)(ya,2),za=Sa[0],Ia=Sa[1];return Object(g.jsx)("div",{className:"container mt-3",children:Object(g.jsxs)("div",{className:"row",children:[null!==ba&&Object(g.jsx)("div",{className:"col-md-12",children:ba}),da?Object(g.jsx)("div",{className:"card mx-auto mt-3",children:Object(g.jsx)("div",{className:"card-body",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("h4",{children:"L'esercizio \xe8 stato inserito correttamente"}),Object(g.jsx)("h4",{children:"Le informazioni saranno verificate da un operatore comunale qualificato prima di essere pubblicate"})]})})}):Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)(y.a,{noValidate:!0,validated:za,onSubmit:function(e){!1===e.currentTarget.checkValidity()?(D(!1!==H),""==d||""==f||""==Y||""==ie||!1===H?window.scrollTo(0,0):!1===fa&&window.scrollTo(0,document.body.scrollHeight),e.preventDefault(),e.stopPropagation()):ka(e),Ia(!0)},children:[Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Informazioni generali"}),Object(g.jsxs)("div",{className:"card-body",children:[Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"col-md-8",children:[Object(g.jsxs)("div",{className:"row",children:[Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"title",children:[Object(g.jsx)(y.a.Label,{className:"required",children:"Insegna"}),Object(g.jsx)(y.a.Control,{required:!0,type:"text",value:d,onChange:function(e){return va(e)},name:"title",placeholder:"Nome dell'esercizio commerciale"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Il nome dell'esercizio commerciale \xe8 obbligatorio."})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"category",className:"required",children:"Tipologia merceologica"}),Object(g.jsx)("select",{className:"form-control",id:"category",name:"category",value:C,onChange:function(e){return function(e){var a=e.currentTarget,t=(a.name,a.value),c=t-1,n=new Array(11).fill(1);n.splice(c,0,0),I(t),E(n),Object(w.a)(F).map((function(e){e.code!=t&&e.subcat.map((function(e){e.status=!1}))}))}(e)},children:F.map((function(e,a){return Object(g.jsx)("option",{value:e.code,children:e.maincat})}))})]})]}),Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)(y.a.Group,{as:S.a,md:"12",controlId:"description",children:[Object(g.jsx)(y.a.Label,{className:"required",children:"Ragione sociale e Codice fiscale"}),Object(g.jsx)(y.a.Control,{required:!0,as:"textarea",rows:3,"aria-describedby":"inputGroupPrepend",value:f,onChange:function(e){return va(e)},name:"rscf",placeholder:"Questo dato verr\xe0 non verr\xe0 pubblicato online"})]})})]}),Object(g.jsxs)("div",{className:"form-group col-md-4",children:[Object(g.jsx)("div",Object(b.a)(Object(b.a)({className:"text-danger"},M?{hidden:!0}:{}),{},{children:"Seleziona almeno un valore"})),F.map((function(e,a){var t=1*e.code-1;return Object(g.jsx)("div",Object(b.a)(Object(b.a)({className:"form-check",name:e.code},0!==_[t]?{hidden:!0}:{}),{},{children:e.subcat.map((function(e){return Object(g.jsxs)("div",{children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:e.code,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("."),s=n[0]-1,r=n[1]-1,o=Object(w.a)(F);o[s].subcat[r].status=c,P(o);var i=[];Object(w.a)(F)[s].subcat.map((function(e){i.push(e.status)})),i.every((function(e,a,t){return e===t[0]}))&&0==i[0]?W(!1):W(!0)}(e)}}),Object(g.jsx)("span",{children:e.name}),Object(g.jsx)("br",{})]})}))}))}))]})]})})}),Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-9",children:[Object(g.jsx)("label",{htmlFor:"address",className:"required",children:"Indirizzo"}),Object(g.jsx)("input",{type:"text",className:"form-control",id:"address",value:Y,onChange:function(e){return va(e)},name:"address",placeholder:"Via o Piazza",required:"required"}),Object(g.jsx)("span",{className:"small",children:"20037, Paderno Dugnano (MI)"})]}),Object(g.jsxs)("div",{className:"form-group col-md-3",children:[Object(g.jsx)("label",{htmlFor:"numero",className:"required",children:"Numero civico"}),Object(g.jsx)("input",{type:"text",className:"form-control",id:"numero",value:ie,onChange:function(e){return va(e)},name:"numero",placeholder:"Inserisci il numero civico",required:"required"})]})]})})})]})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Posizione esercizio commerciale"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)("div",{className:"form-group col-md-12",children:Object(g.jsx)(V,{center:e,markerChange:function(e){return s(e)},composedAddress:Y})})})})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Contatti"}
1),Object(g.jsxs)("div",{className:"card-body",children:[Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"email",children:[Object(g.jsx)(y.a.Label,{children:"Indirizzo mail"}),Object(g.jsx)(y.a.Control,{type:"email",placeholder:"Inserisci email",value:pe,onChange:function(e){return va(e)},name:"email"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Email non valida."})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"website",children:"Sito web"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"website",value:ve,onChange:function(e){return va(e)},name:"website",placeholder:"Inserisci la URL del sito web"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Web site URL non valida"})]})]})})}),Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"col-md-6 form-group",children:Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"exampleInputEmail1",children:"Recapiti telefonici"}),Object(g.jsx)(Z,{book:[{phone:"",whatsapp:!1}],phoneBookChange:function(e){return me(e)}})]})})}),Object(g.jsxs)("div",{className:"col-md-6 form-group",children:[Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"facebook",children:"Facebook"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"facebook",value:we,onChange:function(e){return va(e)},name:"facebook",placeholder:"Link a pagina Facebook dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"URL facebook non valida"})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"instagram",children:"Instagram"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"instagram",value:ze,onChange:function(e){return va(e)},name:"instagram",placeholder:"Link a profilo Instagram dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Url Instagram non valida"})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"twitter",children:"Twitter"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"twitter",value:Te,onChange:function(e){return va(e)},name:"twitter",placeholder:"Link a profilo Twitter dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"URL Twitter non valida"})]})})]})]})})})]})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Orari"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{children:"Orari apertura"}),Object(g.jsx)("br",{}),Object(g.jsx)("span",{className:"small",children:"Specificare orari nei giorni di apertura e deselezionare i giorni di chiusura"}),Object(g.jsx)(X,{aperturaJSON:Ge,aperturaTT:function(e){return _e(e)}})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:qe,name:"checkCons",onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked;"checkCons"===t&&Me(c)}(e)}}),Object(g.jsx)("span",{children:"Effettua consegne a domicilio"})]})})}),Object(g.jsx)("div",{hidden:!qe,className:"form-row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Orari prenotazioni"}),Object(g.jsx)(X,{aperturaJSON:Ve,aperturaTT:function(e){return Je(e)}})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Orari consegna"}
1),Object(g.jsx)(X,{aperturaJSON:Ze,aperturaTT:function(e){return Qe(e)}})]})]}),Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"payment_method",children:"Modalit\xe0 di pagamento"}),ta.map((function(e,a){return Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:"checkPM_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("_"),s=Object(w.a)(ta);s[n[1]].status=c,ca(s)}(e)}}),Object(g.jsx)("span",{children:e.label})]})}))]}),Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"description",children:[Object(g.jsx)(y.a.Label,{children:"Costo consegna"}),Object(g.jsx)(y.a.Control,{as:"textarea",rows:3,"aria-describedby":"inputGroupPrepend",value:Xe,onChange:function(e){return va(e)},name:"costoConsegna",placeholder:"Insersci indicazioni riguardo al costo della consegna o altre informazioni utili"})]})]})]})})]})})})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Adesione carte sconto e scontistica"}),Object(g.jsx)("div",{className:"card-body",children:ra.map((function(e,a){return Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"form-group col-md-4",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:"checkCards_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("_"),s=Object(w.a)(ra);s[n[1]].status=c,oa(s)}(e)}}),Object(g.jsx)("span",{children:e.label})]})}),Object(g.jsx)("div",{hidden:!e.status,className:"form-group col-md-8",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Sconto applicato"}),Object(g.jsx)("input",{className:"ml-1",type:"number",value:e.discount,name:"discount_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.value,n=t.split("_"),s=Object(w.a)(ra);s[n[1]].discount=c,oa(s)}(e)},step:"5",min:"0",max:"100"}),Object(g.jsx)("span",{className:"ml-1",children:"%"})]}),Object(g.jsx)(y.a.Group,{as:S.a,md:"6",children:Object(g.jsx)(y.a.Control,{as:"textarea",rows:3,placeholder:"Specifiche sui prodotti scontati ed eventuali eccezioni","aria-describedby":"inputGroupPrepend",value:e.description,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.value,n=t.split("_"),s=Object(w.a)(ra);s[n[1]].description=c,oa(s)}(e)},name:"descr_"+a})})]})})]})})})}))})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Trattamento dati personali"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("label",{children:"Informativa sul trattamento dei dati personali"}),Object(g.jsx)("div",{children:Object(g.jsxs)("p",{className:"small",children:["Ai sensi dell'art. 13 del Regolamento UE 2016\\n. 679 - RGPD, il Comune di Paderno Dugnano, Titolare del trattamento dei dati personali, La informa che i dati raccolti con il presente modulo saranno trattati per scopi di promozione delle attivit\xe0 commerciali operanti sul territorio del Comune. La base di liceit\xe0 del trattamento \xe8 l'esercizio di un compito di interesse pubblico connesso alle finalit\xe0 istituzionali del Titolare del trattamento. I dati raccolti saranno trattati in modalit\xe0 prevalentemente informatica e telematica da personale autorizzato e\\o da collaboratori e imprese operanti in nome e per contro dell'ente in qualit\xe0 di Responsabili del trattamento; il trattamento, e la conseguente conservazione dei dati forniti, sar\xe0 effettuato per il tempo necessario a perseguire la finalit\xe0 di promozione delle attivit\xe0 operanti sul territorio comunale; i dati saranno soggetti a comunicazione e\\o a diffusione attraverso l'applicazione indicata e non saranno soggetti a trasferimento in Paesi terzi. Il Titolare non adotta alcun processo decisionale automatizzato, compresa la profilazione.",Object(g.jsx)("br",{}),"Il conferimento dei dati \xe8 facoltativo e in caso di mancata compilazione del form non le sar\xe0 possibile fruire della promozione on line derivante dall'iniziativa. Per l'esercizio dei suoi diritti potr\xe0 rivolgersi al Titolare del trattamento i cui dati di contatto sono riportati in calce al presente e potr\xe0, altres\xec, contattare il Responsabile della Protezione dei Dati al seguente indirizzo di posta elettronica ",Object(g.jsx)("a",{href:"mailto:[email protected]",children:"[email protected]"}),".",Object(g.jsx)("br",{}),"Potr\xe0 inoltre proporre reclamo all\u2019Autorit\xe0 Garante per la protezione dei dati personali qualora ne ravvisi la necessit\xe0. Per informazioni di maggiore dettaglio pu\xf2 consultare la sezione ",Object(g.jsx)("a",{href:"https://www.comune.paderno-dugnano.mi.it/info-e-contatti/privacy/privacy/index.html",children:"Privacy"})," del sito internet"]})})]}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)(y.a.Group,{controlId:"formBasicCheckbox",children:Object(g.jsxs)(y.a.Check,{type:"checkbox",children:[Object(g.jsx)(y.a.Check.Input,{required:!0,type:"checkbox",checked:fa,name:"policy",onChange:function(e){return function(e){var a=e.target,t=(a.name,a.checked);xa(t)}(e)}}),Object(g.jsx)(y.a.Check.Label,{className:"required",children:"Ho preso visione dell'informativa"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Questo campo \xe8 obbligatorio"})]})})})]})})})]}),Object(g.jsx)(z.a,{type:"submit",children:"Inserisci esercizio commerciale"})]})})]})})},re=t.p+"static/media/logo.4868b218.png";var oe=function(){var e=Object(c.useContext)(N);return Object(g.jsxs)("div",{className:"mb-2",children:[Object(g.jsx)("nav",{className:"navbar navbar-expand navbar-dark bg-banner",children:Object(g.jsxs)("div",{className:"container",children:[Object(g.jsx)("img",{className:"thumbnail",src:re,alt:"Logo"}),";",Object(g.jsx)(r.a,{className:"nav-link",to:"/",children:Object(g.jsxs)("div",{className:"navbar-brand",children:["APPaderno",Object(g.jsxs)("small",{children:["La rete del c
1ommercio e dei",Object(g.jsx)("br",{}),"servizi VICINO a te"]})]})}),Object(g.jsx)("button",{className:"navbar-toggler",type:"button","data-toggle":"collapse","data-target":"#navbar","aria-controls":"navbar","aria-expanded":"false","aria-label":"Toggle navigation",children:Object(g.jsx)("span",{className:"navbar-toggler-icon"})}),e?Object(g.jsxs)("div",{className:"collapse navbar-collapse",id:"navbar",children:[Object(g.jsxs)("ul",{className:"navbar-nav mr-auto",children:[Object(g.jsx)("li",{className:"nav-item",children:Object(g.jsx)(r.a,{className:"nav-link",to:"/",children:"Lista esercizi"})}),Object(g.jsx)("li",{className:"nav-item",children:Object(g.jsx)(r.a,{className:"nav-link",to:"addtutorial",children:"Aggiungi Esercizio"})})]}),Object(g.jsxs)("div",{className:"navbar-nav ml-auto",children:[Object(g.jsx)("button",{className:"btn btn-primary mr-2",onClick:function(){p.signOut()},children:"Sign out"}),Object(g.jsxs)("li",{className:"nav-item",children:[Object(g.jsx)("span",{className:"mr-2 text-white",children:e.displayName}),Object(g.jsx)("img",{className:"img-profile rounded-circle",src:e.photoURL})]})]})]}):Object(g.jsx)("div",{className:"collapse navbar-collapse",id:"navbar",children:Object(g.jsx)("ul",{className:"navbar-nav mr-auto",children:Object(g.jsx)("li",{className:"nav-item",children:Object(g.jsx)(r.a,{className:"nav-link",to:"nuovo_esercizio",children:"Inserisci il tuo esercizio"})})})})]})}),Object(g.jsx)(r.c,{children:Object(g.jsx)(se,{path:"nuovo_esercizio"})})]})},ie=function(e){var a=e.tutorial,t=e.setActiveTutorial,n=e.comments,s={lat:a.location.latitude,lng:a.location.longitude},r=Object(c.useState)(s),o=Object(k.a)(r,2),d=o[0],u=o[1],j=Object(c.useState)(a.published),m=Object(k.a)(j,2),p=m[0],O=m[1],f=Object(c.useState)(""),x=Object(k.a)(f,2),v=x[0],N=x[1],C=Object(c.useState)(null),I=Object(k.a)(C,2),A=I[0],T=I[1],F=Object(c.useState)(a.title),P=Object(k.a)(F,2),R=P[0],G=P[1],_=Object(c.useState)(a.rscf),E=Object(k.a)(_,2),U=E[0],q=E[1],M=Object(c.useState)(a.mainCategory),D=Object(k.a)(M,2),B=D[0],J=D[1],H=Object(c.useState)(a.allcategory),W=Object(k.a)(H,2),Q=W[0],K=W[1],Y=new Array(11).fill(1);Y.splice(a.mainCategory-1,0,0);var $=Object(c.useState)(Y),ee=Object(k.a)($,2),ae=ee[0],te=ee[1],ce=Object(c.useState)(!0),ne=Object(k.a)(ce,2),se=ne[0],re=(ne[1],Object(c.useState)(!1)),oe=Object(k.a)(re,2),ie=(oe[0],oe[1]),le=Object(c.useState)(a.familycard),de=Object(k.a)(le,2),ue=(de[0],de[1],Object(c.useState)(a.goldcard)),je=Object(k.a)(ue,2),me=(je[0],je[1],a.address.split(","));me.pop();var be=me.join(""),he=Object(c.useState)(be),pe=Object(k.a)(he,2),Oe=pe[0],fe=pe[1],xe=Object(c.useState)(a.numero),ve=Object(k.a)(xe,2),ge=ve[0],Ne=ve[1],Ce=0==a.phones.length?[{phone:"",whatsapp:!1}]:a.phones,we=Object(c.useState)(Ce),ke=Object(k.a)(we,2),ye=ke[0],Se=ke[1],ze=Object(c.useState)(a.email),Ie=Object(k.a)(ze,2),Ae=Ie[0],Le=Ie[1],Te=Object(c.useState)(a.website),Fe=Object(k.a)(Te,2),Pe=Fe[0],Re=Fe[1],Ge=Object(c.useState)(a.facebook),_e=Object(k.a)(Ge,2),Ee=_e[0],Ue=_e[1],qe=Object(c.useState)(a.instagram),Me=Object(k.a)(qe,2),De=Me[0],Be=Me[1],Ve=Object(c.useState)(a.twitter),Je=Object(k.a)(Ve,2),He=Je[0],We=Je[1],Ze=Object(c.useState)(a.apertura),Qe=Object(k.a)(Ze,2),Ke=Qe[0],Ye=Qe[1],Xe=Object(c.useState)(a.effetuapren),$e=Object(k.a)(Xe,2),ea=$e[0],aa=$e[1],ta=Object(c.useState)(a.prenotazioni),ca=Object(k.a)(ta,2),na=ca[0],sa=ca[1],ra=Object(c.useState)(a.conseg
1na),oa=Object(k.a)(ra,2),ia=oa[0],la=oa[1],da=Object(c.useState)(a.costoConsegna),ua=Object(k.a)(da,2),ja=ua[0],ma=ua[1],ba=Object(c.useState)(a.modpag),ha=Object(k.a)(ba,2),pa=ha[0],Oa=ha[1],fa=Object(c.useState)(a.sconti),xa=Object(k.a)(fa,2),va=xa[0],ga=xa[1],Na=function(){var e=Object(l.a)(i.a.mark((function e(t,c){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L.updateComments(a.id,t,{read:c}).then((function(){N("The Comment status was updated successfully!")})).catch((function(e){console.log(e)}));case 1:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),Ca=function(e){var a=e.currentTarget,t=a.name,c=a.value;"title"===t?G(c):"email"===t?Le(c):"website"===t?Re(c):"facebook"===t?Ue(c):"instagram"===t?Be(c):"twitter"===t?We(c):"address"===t?fe(c):"numero"===t?Ne(c):"costoConsegna"===t?ma(c):"rscf"===t&&q(c)},wa=function(){var e=Object(l.a)(i.a.mark((function e(t,c){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L.update(a.id,{published:c}).then((function(){O(c),N("The status was updated successfully!")})).catch((function(e){console.log(e)}));case 1:case"end":return e.stop()}}),e)})));return function(a,t){return e.apply(this,arguments)}}(),ka=function(){var e=Object(l.a)(i.a.mark((function e(c){return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:L.delete(a.id).then((function(){t(null)})).catch((function(e){console.log(e)}));case 1:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),ya=Object(c.useState)(!1),Sa=Object(k.a)(ya,2),za=Sa[0],Ia=Sa[1];function Aa(e){for(var a=e.toLowerCase().split(" "),t=0;t<a.length;t++)a[t]=a[t].charAt(0).toUpperCase()+a[t].substring(1);return a.join(" ")}function La(e){var a={};return e.map((function(e,t){e.subcat.map((function(t,c){!0===t.status&&(a[e.code]=e.maincat,a[t.code]=t.name)}))})),a}function Ta(e){var a=[];return e.map((function(e,t){if(!0===e.open){var c={d:e.name,mo:e.hours.morning.open,mc:e.hours.morning.close,ao:e.hours.aftern.open,ac:e.hours.aftern.close};a.push(c)}else a.push({d:e.name})})),a}function Fa(e){var a=[];return e.map((function(e,t){if(!0===e.status){var c={n:e.label,s:e.discount,d:e.description};a.push(c)}})),a}var Pa=function(){var e=Object(l.a)(i.a.mark((function e(t){var c,n,s,r,o,l,u,j;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.preventDefault(),c=new h.a.firestore.GeoPoint(d.lat,d.lng),n=Aa(Oe)+", "+ge,s=La(Q),r=Ta(Ke),o=Ta(na),l=Ta(ia),u=Fa(va),j={title:R.toUpperCase(),catApp:s,mainCategory:B,allcategory:Q,address:n,numero:ge,rscf:U,location:c,phones:ye,email:Ae,website:Pe,facebook:Ee,instagram:De,twitter:He,apertura:Ke,effetuapren:ea,prenotazioni:na,consegna:ia,hApeApp:r,hPrenApp:o,hConsApp:l,modpag:pa,costoConsegna:ja,sconti:va,scontApp:u},L.update(a.id,j).then((function(){N("Updated successfully!")})).catch((function(e){console.log(e),T(e)}));case 10:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}();return Object(g.jsx)("div",{className:"container",children:Object(g.jsxs)("div",{className:"row",children:[null!==A&&Object(g.jsx)("div",{className:"col-md-12",children:A}),Object(g.jsxs)("div",{className:"col-md-12",children:[p?Object(g.jsx)("button",{className:"badge badge-warning mr-2",onClick:function(e){wa(e,!1)},children:"Rimuovi da Pubblicazione"}):Object(g.jsx)("button",{className:"badge badge-primary mr-2",onClick:function(e){wa(e,!0)},children:"Pubblica"}),Object(g.jsx)("button",{className:"badge badge-danger mr-2",onClick:function(e){ka(e,!1)},children:"Cancella"}),Object(g.jsxs)(y.a,{noValidate:!0,validated:za,onSubmit:function(e){!1===e.currentTarget.checkValidity()?(e.preventDefault(),e.stopPropagation()):Pa(e),Ia(!0)},children:[Object(g.jsx)(z.a,{type:"submit",className:"badge badge-success",children:"Aggiorna"}),v&&Object(g.jsx)("p",{children:v}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Informazioni generali"}),Object(g.jsxs)("div",{className:"card-body",children:[Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"col-md-8",children:[Object(g.jsxs)("div",{className:"row",children:[Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"title",children:[Object(g.jsx)(y.a.Label,{className:"required",children:"Insegna"}
1),Object(g.jsx)(y.a.Control,{required:!0,type:"text",value:R,onChange:function(e){return Ca(e)},name:"title",placeholder:"Nome dell'esercizio commerciale"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Il nome dell'esercizio commerciale \xe8 obbligatorio."})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"category",className:"required",children:"Tipologia merceologica"}),Object(g.jsx)("select",{className:"form-control",id:"category",name:"category",value:B,onChange:function(e){return function(e){var a=e.currentTarget,t=(a.name,a.value),c=t-1,n=new Array(11).fill(1);n.splice(c,0,0),J(t),te(n),Object(w.a)(Q).map((function(e){e.code!=t&&e.subcat.map((function(e){e.status=!1}))}))}(e)},children:Q.map((function(e){return Object(g.jsx)("option",{value:e.code,children:e.maincat},e.code)}))})]})]}),Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)(y.a.Group,{as:S.a,md:"12",controlId:"description",children:[Object(g.jsx)(y.a.Label,{className:"required",children:"Ragione sociale e Codice fiscale"}),Object(g.jsx)(y.a.Control,{required:!0,as:"textarea",rows:3,"aria-describedby":"inputGroupPrepend",value:U,onChange:function(e){return Ca(e)},name:"rscf",placeholder:"Questo dato verr\xe0 non verr\xe0 pubblicato online"})]})})]}),Object(g.jsxs)("div",{className:"form-group col-md-4",children:[Object(g.jsx)("div",Object(b.a)(Object(b.a)({className:"text-danger"},se?{hidden:!0}:{}),{},{children:"Seleziona almeno un valore"})),Q.map((function(e){var a=1*e.code-1;return Object(g.jsx)("div",Object(b.a)(Object(b.a)({className:"form-check",name:e.code},0!==ae[a]?{hidden:!0}:{}),{},{children:e.subcat.map((function(e,a){return Object(g.jsxs)("div",{children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:e.code,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("."),s=n[0]-1,r=n[1]-1,o=Object(w.a)(Q);o[s].subcat[r].status=c,K(o);var i=[];Object(w.a)(Q)[s].subcat.map((function(e){i.push(e.status)})),i.every((function(e,a,t){return e===t[0]}))&&0==i[0]?ie(!1):ie(!0)}(e)}}),Object(g.jsx)("span",{children:e.name}),Object(g.jsx)("br",{})]},e.code+a)}))}),e.code)}))]})]})})}),Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-9",children:[Object(g.jsx)("label",{htmlFor:"address",className:"required",children:"Indirizzo"}),Object(g.jsx)("input",{type:"text",className:"form-control",id:"address",value:Oe,onChange:function(e){return Ca(e)},name:"address",placeholder:"Via o Piazza",required:"required"}),Object(g.jsx)("span",{className:"small",children:"20037, Paderno Dugnano (MI)"})]}),Object(g.jsxs)("div",{className:"form-group col-md-3",children:[Object(g.jsx)("label",{htmlFor:"numero",className:"required",children:"Numero civico"}),Object(g.jsx)("input",{type:"text",className:"form-control",id:"numero",value:ge,onChange:function(e){return Ca(e)},name:"numero",placeholder:"Inserisci il numero civico",required:"required"})]})]})})})]})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Posizione esercizio commerciale"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)("div",{className:"form-group col-md-12",children:Object(g.jsx)(V,{center:s,markerChange:function(e){return u(e)},composedAddress:Oe})})})})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Contatti"}),Object(g.jsxs)("div",{className:"card-body",children:[Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"email",children:[Object(g.jsx)(y.a.Label,{children:"Indirizzo mail"}),Object(g.jsx)(y.a.Control,{type:"email",placeholder:"Inserisci email",value:Ae,onChange:function(e){return Ca(e)},name:"email"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Email non valida."})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"website",children:"Sito web"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"website",value:Pe,onChange:function(e){return Ca(e)},name:"website",placeholder:"Inserisci la URL del sito web"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Web site URL non valida"})]})]})})}),Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"col-md-6 form-group",children:Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"exampleInputEmail1",children:"Recapiti telefonici"}),Object(g.jsx)(Z,{book:ye,phoneBookChange:function(e){return Se(e)}})]})})}),Object(g.jsxs)("div",{className:"col-md-6 form-group",children:[Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"facebook",children:"Facebook"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"facebook",value:Ee,onChange:function(e){return Ca(e)},name:"facebook",placeholder:"Link a pagina Facebook dell'esercizio"}
1),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"URL facebook non valida"})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"instagram",children:"Instagram"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"instagram",value:De,onChange:function(e){return Ca(e)},name:"instagram",placeholder:"Link a profilo Instagram dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Url Instagram non valida"})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"twitter",children:"Twitter"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"twitter",value:He,onChange:function(e){return Ca(e)},name:"twitter",placeholder:"Link a profilo Twitter dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"URL Twitter non valida"})]})})]})]})})})]})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Orari"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{children:"Orari apertura"}),Object(g.jsx)("br",{}),Object(g.jsx)("span",{className:"small",children:"Specificare orari nei giorni di apertura e deselezionare i giorni di chiusura"}),Object(g.jsx)(X,{aperturaJSON:Ke,aperturaTT:function(e){return Ye(e)}})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:ea,name:"checkCons",onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked;"checkCons"===t&&aa(c)}(e)}}),Object(g.jsx)("span",{children:"Effettua consegne a domicilio"})]})})}),Object(g.jsx)("div",{hidden:!ea,className:"form-row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Orari prenotazioni"}),Object(g.jsx)(X,{aperturaJSON:na,aperturaTT:function(e){return sa(e)}})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Orari consegna"}),Object(g.jsx)(X,{aperturaJSON:ia,aperturaTT:function(e){return la(e)}})]})]}),Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"payment_method",children:"Modalit\xe0 di pagamento"}),pa.map((function(e,a){return Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:"checkPM_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("_"),s=Object(w.a)(pa);s[n[1]].status=c,Oa(s)}(e)}}),Object(g.jsx)("span",{children:e.label})]},e.label)}))]}),Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"description",children:[Object(g.jsx)(y.a.Label,{children:"Costo consegna"}),Object(g.jsx)(y.a.Control,{as:"textarea",rows:3,"aria-describedby":"inputGroupPrepend",value:ja,onChange:function(e){return Ca(e)},name:"costoConsegna",placeholder:"Insersci indicazioni riguardo al costo della consegna o altre informazioni utili"})]})]})]})})]})})})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Adesione carte sconto e scontistica"}),Object(g.jsx)("div",{className:"card-body",children:va.map((function(e,a){return Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"form-group col-md-4",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:"checkCards_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("_"),s=Object(w.a)(va);s[n[1]].status=c,ga(s)}(e)}}),Object(g.jsx)("span",{children:e.label})]})}),Object(g.jsx)("div",{hidden:!e.status,className:"form-group col-md-8",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Sconto applicato"}),Object(g.jsx)("input",{className:"ml-1",type:"number",value:e.discount,name:"discount_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.value,n=t.split("_"),s=Object(w.a)(va);s[n[1]].discount=c,ga(s)}(e)},step:"5",min:"0",max:"100"}),Object(g.jsx)("span",{className:"ml-1",children:"%"})]}),Object(g.jsx)(y.a.Group,{as:S.a,md:"6",children:Object(g.jsx)(y.a.Control,{as:"textarea",rows:3,placeholder:"Specifiche sui prodotti scontati ed eventuali eccezioni","aria-describedby":"inputGroupPrepend",value:e.description,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.value,n=t.split("_"),s=Object(w.a)(va);s[n[1]].description=c,ga(s)}(e)},name:"descr_"+a})})]})})]})})},e.label)}))})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Commenti"}),Object(g.jsx)("div",{className:"card-body",children:n.map((function(e,a){return Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"form-group col-md-4",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{id:e.id,type:"checkbox",className:"form-check-input",checked:e.read,name:"checkComments_"+a,onChange:function(e){return function(e){var a=e.target,t=a.id,c=(a.name,a.checked);Na(t,c)}(e)}}),Object(g.jsx)("span",{children:"Visto"})]})}),Object(g.jsx)("div",{className:"form-group col-md-8",children:e.text})]})})},e.id)}))})]})]})]})]})})},le=(t(25),t(38)),de=function(e){var a=e.placeholder,t=e.name,c=e.value,n=e.onCh
1ange,s=void 0===n?function(){return null}:n;return Object(g.jsx)(y.a.Group,{children:Object(g.jsx)(y.a.Control,{placeholder:a,name:t,value:c||"",onChange:s})})},ue=function(e){return e.isSorted?e.isSortedDesc?" \ud83d\udd3d":" \ud83d\udd3c":""},je=function(e){var a=e.globalFilter,t=e.setGlobalFilter;return Object(g.jsx)(de,{value:a||"",onChange:function(e){t(e.target.value||void 0)},placeholder:"Cerca ..."})};var me=function(e){var a=e.columns,t=e.data,c=(e.setActiveTutorial,{text:function(e,a,t){return e.filter((function(e){var c=e.values[a];return void 0===c||String(c).toLowerCase().startsWith(String(t).toLowerCase())}))}}),n=Object(le.useTable)({columns:a,data:t,defaultColumn:{Filter:!0,minWidth:10,maxWidth:400},filterTypes:c},le.useFilters,le.useGlobalFilter,le.useSortBy),s=n.getTableProps,r=n.getTableBodyProps,o=n.headerGroups,i=n.rows,l=n.prepareRow,d=n.state.globalFilter,u=n.setGlobalFilter;return n.selectedFlatRows,Object(g.jsxs)("div",{children:[Object(g.jsx)("div",{className:"p-1 border-0 d-flex justify-content-end",children:Object(g.jsx)(je,{globalFilter:d,setGlobalFilter:u})}),Object(g.jsxs)("table",Object(b.a)(Object(b.a)({className:"table table-striped"},s()),{},{children:[Object(g.jsx)("thead",{className:"thead-dark",children:o.map((function(e){return Object(g.jsx)("tr",Object(b.a)(Object(b.a)({},e.getHeaderGroupProps()),{},{children:e.headers.map((function(e){return Object(g.jsxs)("th",Object(b.a)(Object(b.a)({},e.getHeaderProps()),{},{children:[Object(g.jsxs)("div",Object(b.a)(Object(b.a)({},e.getSortByToggleProps()),{},{children:[e.render("Header"),Object(g.jsx)("span",{children:ue(e)})]})),Object(g.jsx)("div",{children:e.canFilter&&e.render("Filter")})]}))}))}))}))}),Object(g.jsx)("tbody",Object(b.a)(Object(b.a)({},r()),{},{children:i.map((function(e,a){return l(e),Object(g.jsx)("tr",Object(b.a)(Object(b.a)({},e.getRowProps()),{},{children:e.cells.map((function(e){return Object(g.jsx)("td",Object(b.a)(Object(b.a)({},e.getCellProps()),{},{children:e.render("Cell")}))}))}))}))}))]}))]})},be=function(){var e=Object(c.useState)(!0),a=Object(k.a)(e,2),t=a[0],n=a[1],s=Object(c.useState)([]),r=Object(k.a)(s,2),o=r[0],i=r[1],l=Object(c.useState)([]),d=Object(k.a)(l,2),u=d[0],j=d[1],m=Object(c.useMemo)((function(){return[{Header:"Stato",accessor:function(e){return e.published.toString()},Cell:function(e){return"true"===e.value?Object(g.jsx)("span",{className:"green-dot"}):Object(g.jsx)("span",{className:"red-dot"})}},{Header:"Id",accessor:"uniqueId"},{Header:"Nome esercizio",accessor:"title",Cell:function(e){var a=e.row,t=e.value;return Object(g.jsx)("button",{className:"btn btn-link",onClick:function(){v(a.original)},children:t})}},{Header:"Indirizzo",accessor:"address"},{Header:"Categoria",accessor:function(e){var a=[];return Object.keys(e.catApp).map((function(t,c){a.push(e.catApp[t])})),a.join()}},{id:"cfb",Header:"Carta Famiglia Base",accessor:function(e){return e.sconti[0].status.toString()},Cell:function(e){return"true"===e.value?"SI":"NO"}},{id:"cfp",Header:"Carta Famiglia +",accessor:function(e){return e.sconti[1].status.toString()},Cell:function(e){return"true"===e.value?"SI":"NO"}},{id:"cg",Header:"Carta Oro",accessor:function(e){return e.sconti[2].status.toString()},Cell:function(e){return"true"===e.value?"SI":"NO"}},{Header:"Segnalazioni",accessor:function(e){return e.id},Cell:function(e){var a=e.value;return u.filter((function(e){return!e.read&&e.tutorial===a})).length>0?Object(g.jsx)("span",{className:"orange-dot"}):Object(g.jsx)("span",{className:"gray-dot"})}}]}),[o,u]);Object(c.useEffect)((function(){var e=h();return function(){e.forEach((function(e){return e()}))}}),[]);var h=function(){return n(!0),[L.getAll().orderBy("title","asc").onSnapshot((function(e){var a=[];e.forEach((function(e){a.push(Object(b.a)(Object(b.a)({},e.data()),{},{id:e.id}))})),i(a),n(!1)}),(function(e){console.error(e),n(!1)})),O.collectionGroup("comments").orderBy("createdAt","desc").onSnapshot((function(e){var a=[];e.forEach((function(e){a.push(Object(b.a)(Object(b.a)({},e.data()),{},{id:e.id,tutorial:e.ref.parent.parent.id}))})),j(a)}))]},p=Object(c.useState)(null),f=Object(k.a)(p,2),x=f[0],v=f[1];return Object(g.jsx)("div",{className:"container",children:x?Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("div",{className:"container",children:Object(g.jsx)("div",{className:"form-group",children:Object(g.jsx)("button",{className:"btn btn-outline-dark",onClick:function(){v(null)},children:"Torna alla lista degli esercizi"})})}),Object(g.jsx)(ie,{tutorial:x,setActiveTutorial:v,comments:u.filter((function(e){return e.tutorial===x.id}))})]})}):Object(g.jsx)("div",{className:"list row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("h4",{children:"Lista Esercizi"}),Object(g.jsx)("ul",{className:"list-group",children:!t&&Object(g.jsx)(me,{columns:m,data:o,setActiveTutorial:v})})]})})})},he=function(){var e={lat:45.571893998350326,lng:9.1621957357755},a=Object(c.useState)(e),t=Object(k.a)(a,2),n=t[0],s=t[1],r=Object(c.useState)(""),o=Object(k.a)(r,2),d=o[0],u=o[1],j=Object(c.useState)(!1),m=Object(k.a)(j,2),p=(m[0],m[1]),O=Object(c.useState)(""),f=Object(k.a)(O,2),x=f[0],v=f[1],N=Object(c.useState)("1"),C=Object(k.a)(N,2),I=C[0],A=C[1],T=Object(c.useState)($),F=Object(k.a)(T,2),P=F[0],R=F[1],G=Object(c.useState)([0,1,1,1,1,1,1,1,1,1,1]),_=Object(k.a)(G,2),E=_[0],U=_[1],q=Object(c.useState)(!0),M=Object(k.a)(q,2),D=M[0],B=(M[1],Object(c.useState)(!1)),J=Object(k.a)(B,2),H=(J[0],J[1]),W=Object(c.useState)(""),Q=Object(k.a)(W,2),K=Q[0],Y=Q[1],se=Object(c.useState)(""),re=Object(k.a)(se,2),oe=re[0],ie=re[1],le=Object(c.useState)([]),de=Object(k.a)(le,2),ue=de[0],je=de[1],me=Object(c.useState)(""),be=Object(k.a)(me,2),he=be[0],pe=be[1],Oe=Object(c.useState)(""),fe=Object(k.a)(Oe,2),xe=fe[0],ve=fe[1],ge=Object(c.useState)(""),Ne=Object(k.a)(ge,2),Ce=Ne[0],we=Ne[1],ke=Object(c.useState)(""),ye=Object(k.a)(ke,2),Se=ye[0],ze=ye[1],Ie=Object(c.useState)(""),Ae=Object(k.a)(Ie,2),Le=Ae[0],Te=Ae[1],Fe=Object(c.useState)(ee),Pe=Object(k.a)(Fe,2),Re=Pe[0],Ge=Pe[1],_e=Object(c.useState)(!1),Ee=Object(k.a)(_e,2),Ue=Ee[0],qe=Ee[1],Me=Object(c.useState)(te),De=Object(k.a)(Me,2),Be=De[0],Ve=De[1],Je=Object(c.useState)(ae),He=Object(k.a)(Je,2),We=He[0],Ze=He[1],Qe=Object(c.useState)(""),Ke=Object(k.a)(Qe,2),Ye=Ke[0],Xe=Ke[1],$e=Object(c.useState)(ce),ea=Object(k.a)($e,2),aa=ea[0],ta=ea[1],ca=Object(c.useState)(ne),na=Object(k.a)(ca,2),sa=na[0],ra=na[1],oa=Object(c.useState)(!1),ia=Object(k.a)(oa,2),la=ia[0],da=ia[1],ua=Object(c.useState)(null),ja=Object(k.a)(ua,2),ma=ja[0],ba=ja[1],ha=function(e){var a=e.currentTarget,t=a.name,c=a.value;"title"===t?u(c):"email"===t?pe(c):"website"===t?ve(c):"facebook"===t?we(c):"instagram"===t?ze(c):"twitter"===t?Te(c):"address"===t?Y(c):"numero"===t?ie(c):"costoConsegna"===t?Xe(c):"rscf"===t&&v(c)};function pa(e){for(var a=e.toLowerCase().split(" "),t=0;t<a.length;t++)a[t]=a[t].charAt(0).toUpperCase()+a[t].substring(1);return a.join(" ")}function Oa(e){var a={};return e.map((function(e,t){e.subcat.map((function(t,c){!0===t.status&&(a[e.code]=e.maincat,a[t.code]=t.name)}))}
1)),a}function fa(e){var a=[];return e.map((function(e,t){if(!0===e.open){var c={d:e.name,mo:e.hours.morning.open,mc:e.hours.morning.close,ao:e.hours.aftern.open,ac:e.hours.aftern.close};a.push(c)}else a.push({d:e.name})})),a}function xa(e){var a=[];return e.map((function(e,t){if(!0===e.status){var c={n:e.label,s:e.discount,d:e.description};a.push(c)}})),a}var va=function(){var e=Object(l.a)(i.a.mark((function e(a){var t,c,s,r,o,l,u,j;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:a.preventDefault(),t=new h.a.firestore.GeoPoint(n.lat,n.lng),c=pa(K)+", "+oe,s=Oa(P),r=fa(Re),o=fa(Be),l=fa(We),u=xa(sa),j={published:!1,title:d.toUpperCase(),catApp:s,mainCategory:I,allcategory:P,address:c,numero:oe,rscf:x,location:t,phones:ue,email:he,website:xe,facebook:Ce,instagram:Se,twitter:Le,apertura:Re,effetuapren:Ue,prenotazioni:Be,consegna:We,hApeApp:r,hPrenApp:o,hConsApp:l,modpag:aa,costoConsegna:Ye,sconti:sa,scontApp:u},console.log(j),L.create(j).then((function(){console.log("Created new item successfully!"),da(!0)})).catch((function(e){console.log(e),ba(e)}));case 11:case"end":return e.stop()}}),e)})));return function(a){return e.apply(this,arguments)}}(),ga=Object(c.useState)(!1),Na=Object(k.a)(ga,2),Ca=Na[0],wa=Na[1];return Object(g.jsx)("div",{className:"container",children:Object(g.jsxs)("div",{className:"row",children:[null!==ma&&Object(g.jsx)("div",{className:"col-md-12",children:ma}),la?Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("h4",{children:"You submitted successfully!"}),Object(g.jsx)("button",{className:"btn btn-success",onClick:function(a){da(!1),u(""),p(!1),A("1"),s(e),je([]),pe(""),ve(""),we(""),ze(""),Te(""),Y(""),ie(""),wa(!1)},children:"Add New"})]}):Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)(y.a,{noValidate:!0,validated:Ca,onSubmit:function(e){!1===e.currentTarget.checkValidity()?(e.preventDefault(),e.stopPropagation()):va(e),wa(!0)},children:[Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Informazioni generali"}),Object(g.jsxs)("div",{className:"card-body",children:[Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"col-md-8",children:[Object(g.jsxs)("div",{className:"row",children:[Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"title",children:[Object(g.jsx)(y.a.Label,{className:"required",children:"Insegna"}),Object(g.jsx)(y.a.Control,{required:!0,type:"text",value:d,onChange:function(e){return ha(e)},name:"title",placeholder:"Nome dell'esercizio commerciale"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Il nome dell'esercizio commerciale \xe8 obbligatorio."})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"category",className:"required",children:"Tipologia merceologica"}),Object(g.jsx)("select",{className:"form-control",id:"category",name:"category",value:I,onChange:function(e){return function(e){var a=e.currentTarget,t=(a.name,a.value),c=t-1,n=new Array(11).fill(1);n.splice(c,0,0),A(t),U(n),Object(w.a)(P).map((function(e){e.code!=t&&e.subcat.map((function(e){e.status=!1}))}))}(e)},children:P.map((function(e,a){return Object(g.jsx)("option",{value:e.code,children:e.maincat})}))})]})]}),Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)(y.a.Group,{as:S.a,md:"12",controlId:"description",children:[Object(g.jsx)(y.a.Label,{className:"required",children:"Ragione sociale e Codice fiscale"}),Object(g.jsx)(y.a.Control,{required:!0,as:"textarea",rows:3,"aria-describedby":"inputGroupPrepend",value:x,onChange:function(e){return ha(e)},name:"rscf",placeholder:"Questo dato verr\xe0 non verr\xe0 pubblicato online"})]})})]}),Object(g.jsxs)("div",{className:"form-group col-md-4",children:[Object(g.jsx)("div",Object(b.a)(Object(b.a)({className:"text-danger"},D?{hidden:!0}:{}),{},{children:"Seleziona almeno un valore"})),P.map((function(e,a){var t=1*e.code-1;return Object(g.jsx)("div",Object(b.a)(Object(b.a)({className:"form-check",name:e.code},0!==E[t]?{hidden:!0}:{}),{},{children:e.subcat.map((function(e){return Object(g.jsxs)("div",{children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:e.code,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("."),s=n[0]-1,r=n[1]-1,o=Object(w.a)(P);o[s].subcat[r].status=c,R(o);var i=[];Object(w.a)(P)[s].subcat.map((function(e){i.push(e.status)})),i.every((function(e,a,t){return e===t[0]}))&&0==i[0]?H(!1):H(!0)}(e)}}),Object(g.jsx)("span",{children:e.name}),Object(g.jsx)("br",{})]})}))}))}))]})]})})}),Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-9",children:[Object(g.jsx)("label",{htmlFor:"address",className:"required",children:"Indirizzo"}),Object(g.jsx)("input",{type:"text",className:"form-control",id:"address",value:K,onChange:function(e){return ha(e)},name:"address",placeholder:"Via o Piazza",required:"required"}),Object(g.jsx)("span",{className:"small",children:"20037, Paderno Dugnano (MI)"})]}),Object(g.jsxs)("div",{className:"form-group col-md-3",children:[Object(g.jsx)("label",{htmlFor:"numero",className:"required",children:"Numero civico"}),Object(g.jsx)("input",{type:"text",className:"form-control",id:"numero",value:oe,onChange:function(e){return ha(e)},name:"numero",placeholder:"Inserisci il numero civico",required:"required"})]})]})})})]})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Posizione esercizio commerciale"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)("div",{className:"form-group col-md-12",children:Object(g.jsx)(V,{center:e,markerChange:function(e){return s(e)},composedAddress:K})})})})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Contatti"}
1),Object(g.jsxs)("div",{className:"card-body",children:[Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"email",children:[Object(g.jsx)(y.a.Label,{children:"Indirizzo mail"}),Object(g.jsx)(y.a.Control,{type:"email",placeholder:"Inserisci email",value:he,onChange:function(e){return ha(e)},name:"email"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Email non valida."})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"website",children:"Sito web"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"website",value:xe,onChange:function(e){return ha(e)},name:"website",placeholder:"Inserisci la URL del sito web"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Web site URL non valida"})]})]})})}),Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"col-md-6 form-group",children:Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"exampleInputEmail1",children:"Recapiti telefonici"}),Object(g.jsx)(Z,{book:[{phone:"",whatsapp:!1}],phoneBookChange:function(e){return je(e)}})]})})}),Object(g.jsxs)("div",{className:"col-md-6 form-group",children:[Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"facebook",children:"Facebook"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"facebook",value:Ce,onChange:function(e){return ha(e)},name:"facebook",placeholder:"Link a pagina Facebook dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"URL facebook non valida"})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"instagram",children:"Instagram"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"instagram",value:Se,onChange:function(e){return ha(e)},name:"instagram",placeholder:"Link a profilo Instagram dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"Url Instagram non valida"})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{htmlFor:"twitter",children:"Twitter"}),Object(g.jsx)("input",{type:"URL",className:"form-control",id:"twitter",value:Le,onChange:function(e){return ha(e)},name:"twitter",placeholder:"Link a profilo Twitter dell'esercizio"}),Object(g.jsx)(y.a.Control.Feedback,{type:"invalid",children:"URL Twitter non valida"})]})})]})]})})})]})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Orari"}),Object(g.jsx)("div",{className:"card-body",children:Object(g.jsx)("div",{className:"row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsx)("div",{className:"form-row",children:Object(g.jsxs)("div",{className:"form-group col-md-12",children:[Object(g.jsx)("label",{children:"Orari apertura"}),Object(g.jsx)("br",{}),Object(g.jsx)("span",{className:"small",children:"Specificare orari nei giorni di apertura e deselezionare i giorni di chiusura"}),Object(g.jsx)(X,{aperturaJSON:Re,aperturaTT:function(e){return Ge(e)}})]})}),Object(g.jsx)("div",{className:"form-row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:Ue,name:"checkCons",onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked;"checkCons"===t&&qe(c)}(e)}}),Object(g.jsx)("span",{children:"Effettua consegne a domicilio"})]})})}),Object(g.jsx)("div",{hidden:!Ue,className:"form-row",children:Object(g.jsxs)("div",{className:"col-md-12",children:[Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Orari prenotazioni"}),Object(g.jsx)(X,{aperturaJSON:Be,aperturaTT:function(e){return Ve(e)}})]}),Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Orari consegna"}
1),Object(g.jsx)(X,{aperturaJSON:We,aperturaTT:function(e){return Ze(e)}})]})]}),Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{htmlFor:"payment_method",children:"Modalit\xe0 di pagamento"}),aa.map((function(e,a){return Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:"checkPM_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("_"),s=Object(w.a)(aa);s[n[1]].status=c,ta(s)}(e)}}),Object(g.jsx)("span",{children:e.label})]})}))]}),Object(g.jsxs)(y.a.Group,{as:S.a,md:"6",controlId:"description",children:[Object(g.jsx)(y.a.Label,{children:"Costo consegna"}),Object(g.jsx)(y.a.Control,{as:"textarea",rows:3,"aria-describedby":"inputGroupPrepend",value:Ye,onChange:function(e){return ha(e)},name:"costoConsegna",placeholder:"Insersci indicazioni riguardo al costo della consegna o altre informazioni utili"})]})]})]})})]})})})]}),Object(g.jsxs)("div",{className:"card",children:[Object(g.jsx)("div",{className:"card-header",children:"Adesione carte sconto e scontistica"}),Object(g.jsx)("div",{className:"card-body",children:sa.map((function(e,a){return Object(g.jsx)("div",{className:"row",children:Object(g.jsx)("div",{className:"col-md-12",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsx)("div",{className:"form-group col-md-4",children:Object(g.jsxs)("div",{className:"form-check",children:[Object(g.jsx)("input",{type:"checkbox",className:"form-check-input",checked:e.status,name:"checkCards_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.checked,n=t.split("_"),s=Object(w.a)(sa);s[n[1]].status=c,ra(s)}(e)}}),Object(g.jsx)("span",{children:e.label})]})}),Object(g.jsx)("div",{hidden:!e.status,className:"form-group col-md-8",children:Object(g.jsxs)("div",{className:"form-row",children:[Object(g.jsxs)("div",{className:"form-group col-md-6",children:[Object(g.jsx)("label",{children:"Sconto applicato"}),Object(g.jsx)("input",{className:"ml-1",type:"number",value:e.discount,name:"discount_"+a,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.value,n=t.split("_"),s=Object(w.a)(sa);s[n[1]].discount=c,ra(s)}(e)},step:"5",min:"0",max:"100"}),Object(g.jsx)("span",{className:"ml-1",children:"%"})]}),Object(g.jsx)(y.a.Group,{as:S.a,md:"6",children:Object(g.jsx)(y.a.Control,{as:"textarea",rows:3,placeholder:"Specifiche sui prodotti scontati ed eventuali eccezioni","aria-describedby":"inputGroupPrepend",value:e.description,onChange:function(e){return function(e){var a=e.target,t=a.name,c=a.value,n=t.split("_"),s=Object(w.a)(sa);s[n[1]].description=c,ra(s)}(e)},name:"descr_"+a})})]})})]})})})}))})]}),Object(g.jsx)(z.a,{type:"submit",children:"Inserisci esercizio commerciale"})]})})]})})},pe=t(78),Oe=t.n(pe),fe=t(61),xe=t.n(fe),ve=t(79),ge=t.n(ve),Ne=function(e){if(!e)return Object(g.jsx)("div",{className:"alert alert-danger",role:"alert",children:"This field is required!"})},Ce=function(){Object(c.useContext)(N);var e=Object(c.useRef)(),a=Object(c.useRef)(),t=Object(c.useState)(""),n=Object(k.a)(t,2),s=n[0],r=n[1],o=Object(c.useState)(""),i=Object(k.a)(o,2),l=i[0],d=i[1],u=Object(c.useState)(!1),j=Object(k.a)(u,2),m=j[0],b=j[1],O=Object(c.useState)(""),x=Object(k.a)(O,2),v=x[0],C=x[1];return Object(g.jsx)("div",{className:"container",children:Object(g.jsxs)("div",{className:"row",children:[Object(g.jsx)("div",{className:"col-md-4"}),Object(g.jsx)("div",{className:"col-md-4",children:Object(g.jsxs)("div",{className:"login-card card-container",children:[Object(g.jsx)("img",{src:"//ssl.gstatic.com/accounts/ui/avatar_2x.png",alt:"profile-img",className:"profile-img-card"}),Object(g.jsxs)(Oe.a,{onSubmit:function(t){t.preventDefault(),b(!0),e.current.validateAll(),0===a.current.context._errors.length?h.a.auth().signInWithEmailAndPassword(s,l).then((function(e){b(!1)})).catch((function(e){C(e.message),b(!1)})):b(!1)},ref:e,children:[Object(g.jsxs)("div",{className:"form-group",children:[Object(g.jsx)("label",{htmlFor:"email",children:"Email"}),Object(g.jsx)(xe.a,{type:"text",className:"form-control",name:"email",value:s,onChange:function(e){var a=e.target.value;
1r(a)},validations:[Ne]})]}),Object(g.jsxs)("div",{className:"form-group",children:[Object(g.jsx)("label",{htmlFor:"password",children:"Password"}),Object(g.jsx)(xe.a,{type:"password",className:"form-control",name:"password",value:l,onChange:function(e){var a=e.target.value;d(a)},validations:[Ne]})]}),Object(g.jsx)("div",{className:"form-group",children:Object(g.jsxs)("button",{className:"btn btn-primary btn-block",disabled:m,children:[m&&Object(g.jsx)("span",{className:"spinner-border spinner-border-sm"}),Object(g.jsx)("span",{children:"Login"})]})}),v&&Object(g.jsx)("div",{className:"form-group",children:Object(g.jsx)("div",{className:"alert alert-danger",role:"alert",children:v})}),Object(g.jsx)(ge.a,{style:{display:"none"},ref:a})]}),Object(g.jsx)("div",{className:"form-group",children:Object(g.jsx)("p",{className:"text-center",children:"OR"})}),Object(g.jsx)("div",{className:"form-group",children:Object(g.jsx)("button",{className:"btn btn-primary btn-block",onClick:function(){p.signInWithPopup(f)},children:"Sign in with Google"})})]})}),Object(g.jsx)("div",{className:"col-md-4"})]})})};var we=function(){var e=Object(c.useContext)(N);return Object(g.jsxs)("div",{children:[Object(g.jsx)(oe,{}),e?Object(g.jsxs)(r.c,{children:[Object(g.jsx)(be,{default:!0}),Object(g.jsx)(he,{path:"addtutorial"})]}):Object(g.jsx)(r.b,{children:function(e){if("/"===e.location.pathname)return Object(g.jsx)(Ce,{})}})]})};var ke=function(){return Object(g.jsx)(C,{children:Object(g.jsx)(we,{})})},ye=function(e){e&&e instanceof Function&&t.e(3).then(t.bind(null,146)).then((function(a){var t=a.getCLS,c=a.getFID,n=a.getFCP,s=a.getLCP,r=a.getTTFB;t(e),c(e),n(e),s(e),r(e)}))};s.a.render(Object(g.jsx)(ke,{}),document.getElementById("root")),ye()},45:function(e){e.exports=JSON.parse('[{"maincat":"ABBIGLIAMENTO E CALZATURE","code":"1","subcat":[{"name":"Abbigliamento Uomo/Donna","code":"1.1","status":false},{"name":"Abbigliamento Sportivo","code":"1.2","status":false},{"name":"Biancheria/Merceria","code":"1.3","status":false},{"name":"Abbigliamento Bambini","code":"1.4","status":false},{"name":"Calzature/Pelletteria","code":"1.5","status":false}]},{"maincat":"ALIMENTARI","code":"2","subcat":[{"name":"Supermarket","code":"2.1","status":false},{"name":"Minimarket","code":"2.2","status":false},{"name":"Gastronomia","code":"2.3","status":false},{"name":"Macelleria","code":"2.4","status":false},{"name":"Ortofrutta","code":"2.5","status":false},{"name":"Panificio","code":"2.6","status":false},{"name":"Pescheria","code":"2.7","status":false},{"name":"Pastificio","code":"2.8","status":false}]},{"maincat":"ARREDAMENTO E ARTICOLI PER LA CASA","code":"3","subcat":[{"name":"Arredamento e Illuminazione","code":"3.1","status":false},{"name":"Arte e Antiquariato","code":"3.2","status":false},{"name":"Casalinghi","code":"3.3","status":false},{"name":"Tappezzeria e Tendaggi","code":"3.4","status":false}]},{"maincat":"ATTIVITA\u2019 DI SERVIZI","code":"4","subcat":[{"name":"Calzolai","code":"4.1","status":false},{"name":"Falegnameria","code":"4.2","status":false},{"name":"Idraulico","code":"4.3","status":false},{"name":"Sartoria","code":"4.4","status":false}]},{"maincat":"AUTO, CICLI E MOTOCICLI","code":"5","subcat":[{"name":"Autofficina/Carrozzeria/Elettrauto","code":"5.1","status":false},{"name":"Autolavaggio","code":"5.2","status":false},{"name":"Autoscuola","code":"5.3","status":false},{"name":"Negozio di Biciclette","code":"5.4","status":false},{"name":"Ricambi accessori Auto e Moto","code":"5.5","status":false}]},{"maincat":"ELETTRONICA E INFORMATICA","code":"6","subcat":[{"name":"Audio/Video","code":"6.1","status":false},{"name":"Elettrodomestici","code":"6.2","status":false},{"name":"Forniture per Uffici","code":"6.3","status":false},{"name":"Informatica/PC","code":"6.4","status":false},{"name":"Telefonia e accessori","code":"6.5","status":false}]},{"maincat":"MEDICINA E SALUTE","code":"7","subcat":[{"name":"Erboristeria","code":"7.1","status":false},{"name":"Farmacie/Parafarmacie","code":"7.2","status":false},{"name":"Ortopedie","code":"7.3","status":false}
1,{"name":"Ottica/Fotografia","code":"7.4","status":false},{"name":"Poliambulatorio/Studio Fisioterapico","code":"7.5","status":false},{"name":"Studio dentistico/Odontotecnico","code":"7.6","status":false},{"name":"Veterinario","code":"7.7","status":false},{"name":"Assistenza alla Persona","code":"7.8","status":false}]},{"maincat":"NON ALIMENTARI","code":"8","subcat":[{"name":"Articoli da Regalo","code":"8.1","status":false},{"name":"Articoli per Animali","code":"8.2","status":false},{"name":"Cartoleria/Libreria","code":"8.3","status":false},{"name":"Colorificio","code":"8.4","status":false},{"name":"Edicola","code":"8.5","status":false},{"name":"Ferramenta","code":"8.6","status":false},{"name":"Fiorista","code":"8.7","status":false},{"name":"Giochi e Giocattoli","code":"8.8","status":false},{"name":"Gioielleria/Orologeria/Oreficeria","code":"8.9","status":false}]},{"maincat":"RISTORAZIONE","code":"9","subcat":[{"name":"Bar/Tabacchi","code":"9.1","status":false},{"name":"Bar","code":"9.2","status":false},{"name":"Gelateria","code":"9.3","status":false},{"name":"Pasticceria","code":"9.4","status":false},{"name":"Pub","code":"9.5","status":false},{"name":"Ristorante/Tavola Calda","code":"9.6","status":false},{"name":"Pizzeria","code":"9.7","status":false},{"name":"Pizzeria d\u2019asporto","code":"9.8","status":false}]},{"maincat":"SERVIZI ALLA PERSONA E BENESSERE","code":"10","subcat":[{"name":"Centro estetico/Salone di Bellezza","code":"10.1","status":false},{"name":"Lavanderia","code":"10.2","status":false},{"name":"Palestra","code":"10.3","status":false},{"name":"Parrucchiere Uomo/Donna","code":"10.4","status":false},{"name":"Profumeria","code":"10.5","status":false},{"name":"Tatuatori","code":"10.6","status":false},{"name":"Toelettatura animali","code":"10.7","status":false},{"name":"Assicurazioni","code":"10.8","status":false}]},{"maincat":"ALTRO","code":"11","subcat":[{"name":"Altro","code":"11.1","status":false}]}]')},46:function(e){e.exports=JSON.parse('[{"id":0,"name":"Lun","open":true,"hours":{"morning":{"open":"","close"
1:""},"aftern":{"open":"","close":""}}},{"id":1,"name":"Mar","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":2,"name":"Mer","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":3,"name":"Gio","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":4,"name":"Ven","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":5,"name":"Sab","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":6,"name":"Dom","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}}]')},47:function(e){e.exports=JSON.parse('[{"id":0,"name":"Lun","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":1,"name":"Mar","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":2,"name":"Mer","open":true,"hours":{"morning":{"open":"","close":""}
1,"aftern":{"open":"","close":""}}},{"id":3,"name":"Gio","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":4,"name":"Ven","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":5,"name":"Sab","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":6,"name":"Dom","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}}]')},48:function(e){e.exports=JSON.parse('[{"id":0,"name":"Lun","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":1,"name":"Mar","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":2,"name":"Mer","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":3,"name":"Gio","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":4,"name":"Ven","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close"
1:""}}},{"id":5,"name":"Sab","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}},{"id":6,"name":"Dom","open":true,"hours":{"morning":{"open":"","close":""},"aftern":{"open":"","close":""}}}]')},49:function(e){e.exports=JSON.parse('[{"label":"Contanti","status":false},{"label":"Carte di Credito","status":false},{"label":"Bancomat","status":false},{"label":"Bonifico Bancario","status":false},{"label":"Assegni","status":false},{"label":"Apple Pay","status":false},{"label":"Google Pay","status":false}]')},50:function(e){e.exports=JSON.parse('[{"label":"Carta Famiglia Base","status":false,"discount":0,"description":""},{"label":"Carta Famiglia +","status":false,"discount":0,"description":""},{"label":"Carta Oro","status":false,"discount":0,"description":""}]')},88:function(e,a,t){},91:function(e,a,t){}},[[135,1,2]]]); 2//# sourceMappingURL=main.8ee2926d.chunk.js.map
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.