PageSourceSearch

https://www.tecnichenuove.com/_next/static/chunks/3897.24c53a4a9b385bd1.js

js tecnichenuove.com collected 2026-10-02 05:54:51 UTC 17,134 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3897],{43897:function(l,e,n){n.r(e),n.d(e,{default:function(){return R}});var t,o,i,d,r=n(7297),u=n(85893),a=n(67294),s=n(29320),c=n(41125),v=n.n(c);function x(l){let{id:e,label:n,value:t,checked:o,onChange:i,productCount:d}=l;return(0,u.jsxs)("label",{className:"container flex items-center",children:[(0,u.jsxs)("span",{children:[n,d?(0,u.jsx)("span",{className:"text-neutral70 numeric-field",children:" (".concat(d,")")}):null]}),(0,u.jsx)("input",{id:e,type:"checkbox",value:t,checked:o,onChange:i}),(0,u.jsx)(s.default,{icon:"checkmark",fill:"white",className:"checkmark flex items-center justify-center"})]})}var p=n(21842),f=n(14141),h=n(11163);n(59780),n(63144),n(38546),n(19038);var m=n(34155);m.env.BIGCOMMERCE_STOREFRONT_API_URL,m.env.BIGCOMMERCE_STOREFRONT_API_TOKEN;var g=n(32221);let j=(l,e,n)=>{var t,o;n.query[l]||(n.query[l]="");let i=null===(t=null===(o=n.query[l])||void 0===o?void 0:o.toString())||void 0===t?void 0:t.split("|");(null==i?void 0:i.includes(e))||(i.push(e),n.query[l]=i.join("|")),delete n.query.startIndex},y=(l,e,n)=>{var t,o;n.query[l]=null===(t=null===(o=n.query[l])||void 0===o?void 0:o.toString())||void 0===t?void 0:t.split("|").filter(l=>l!==e).join("|"),n.query[l]||delete n.query[l],delete n.query.startIndex};function C(){let l=(0,r.Z)(["\n    width: 90%;\n    height: 5px;\n"]);return C=function(){return l},l}function b(){let l=(0,r.Z)(["\n    top: 50%;\n    transform: translateY(-50%);\n    height: 16px;\n    width: 16px;\n    border: 2px solid ",";\n    background-color: ",";\n    border-radius: 50%;\n    cursor: grab;\n"]);return b=function(){return l},l}function N(){let l=(0,r.Z)(["\n    top: 0;\n    bottom: 0;\n    background: ",";\n    border-radius: 999px;\n"]);return N=function(){return l},l}let I=(0,f.ZP)(p.Z).withConfig({componentId:"sc-2f4f03ed-0"})(C()),q=f.ZP.div.withConfig({componentId:"sc-2f4f03ed-1"})(b(),null===v()||void 0===v()?void 0:null===(t=v().theme)||void 0===t?void 0:null===(o=t.extend)||void 0===o?void 0:o.colors.neutral40,null===v()||void 0===v()?void 0:null===(i=v().theme)||void 0===i?void 0:null===(d=i.extend)||void 0===d?void 0:d.colors.secondary100),w=l=>(0,u.jsx)(q,{...l}),k=f.ZP.div.withConfig({componentId:"sc-2f4f03ed-2"})(N(),l=>{var e,n,t,o,i,d;return 2===l.index?null===v()||void 0===v()?void 0:null===(e=v().theme)||void 0===e?void 0:null===(n=e.extend)||void 0===n?void 0:n.colors.neutral40:1===l.index?null===v()||void 0===v()?void 0:null===(t=v().theme)||void 0===t?void 0:null===(o=t.extend)||void 0===o?void 0:o.colors.secondary100:null===v()||void 0===v()?void 0:null===(i=v().theme)||void 0===i?void 0:null===(d=i.extend)||void 0===d?void 0:d.colors.neutral40}),S=(l,e)=>(0,u.jsx)(k,{...l,index:e.index}),_=l=>null==l?void 0:l.sort(function(l,e){if(null==l?void 0:l.node){var n,t,o,i;if((null===(n=l.node)||void 0===n?void 0:n.name)<(null===(t=e.node)||void 0===t?void 0:t.name))return -1;if((null===(o=l.node)||void 0===o?void 0:o.name)>(null===(i=e.node)||void 0===i?void 0:i.name))return 1}else{if((null==l?void 0:l.name)<(null==e?void 0:e.name))return -1;if((null==l?void 0:l.name)>(null==e?void 0:e.name))return 1}return 0});function E(l){var e,n;let{isOpen:t,setIsOpen:o,setIsLoading:i,title:d,filter_tag:r,edges:a}=l,c=(0,h.useRouter)();return(0,u.jsxs)("div",{className:"flex justify-between",children:[(0,u.jsx)("p",{className:"text-[16px] font-bold capitalize",children:d}),(0,u.jsxs)("div",{className:"flex items-center gap-x-4",children:[(0,u.jsx)("button",{"aria-label":"rimuovi filtro ".concat(d),disabled:!c.query[r],className:"".concat(c.query[r]?"text-neutral100":"text-neutral60"," font-bold"),onClick:l=>{i(!0),delete c.query[r],delete c.query.startIndex,c.push(c)},children:"Cancella"}),(0,u.jsx)("button",{"aria-label":"".concat(t?"chiudi":"apri"," filtro ").concat(d),type:"button",onClick:()=>{o(l=>!l)},children:(0,u.jsx)(s.default,{className:"".concat(t?"rotate-180":""," transition-all duration-300 "),icon:"chevron-down",stroke:null===v()||void 0===v()?void 0:null===(e=v().theme)||void 0===e?void 0:null===(n=e.extend)||void 0===n?void 0:n.colors.neutral60})})]})]})}function O(l){var e,n,t,o,i,d;let{edge:r,filter_tag:c,setIsLoading:x}=l,[p,f]=(0,a.useState)(!1),[m,C]=(0,a.useState)(!1),b=(0,h.useRouter)();function N(l,e){var n,t,o,i,d;x(!0);let u=null==l?void 0:null===(n=l.currentTarget)||void 0===n?void 0:n.getAttribute("data-slug"),a=null===(t=null===(o=b.query[c])||void 0===o?void 0:o.toString())||void 0===t?void 0:t.split("|");(null==a?void 0:a.includes(u))||m&&1===e?(1===e&&(null==r||r.children.forEac
1h(l=>{b.query[c]=null==b?void 0:b.query[c].toString().split("|").filter(e=>e!==(0,g.mC)(null==l?void 0:l.path)).join("|")})),y(c,u,b),2===e&&(null===(i=null==r?void 0:null===(d=r.children)||void 0===d?void 0:d.filter(l=>{var e;return null===(e=null==b?void 0:b.query[c])||void 0===e?void 0:e.toString().split("|").includes((0,g.mC)(null==l?void 0:l.path))}))||void 0===i?void 0:i.length)===0&&j(c,(0,g.mC)(null==r?void 0:r.path),b)):(j(c,u,b),2===e&&y(c,(0,g.mC)(null==r?void 0:r.path),b)),b.push(b)}return(0,a.useEffect)(()=>{var l,e,n,t,o;(null===(l=null==r?void 0:null===(e=r.children)||void 0===e?void 0:e.filter(l=>{var e;return null===(e=null==b?void 0:b.query[c])||void 0===e?void 0:e.toString().split("|").includes((0,g.mC)(null==l?void 0:l.path))}))||void 0===l?void 0:l.length)>0||(null===(n=null==b?void 0:b.query[c])||void 0===n?void 0:n.toString().split("|").includes((0,g.mC)(null==r?void 0:r.path)))?f(!0):f(!1),(null===(t=null==r?void 0:null===(o=r.children)||void 0===o?void 0:o.filter(l=>{var e;return null===(e=null==b?void 0:b.query[c])||void 0===e?void 0:e.toString().split("|").includes((0,g.mC)(null==l?void 0:l.path))}))||void 0===t?void 0:t.length)>0?C(!0):C(!1)},[null==b?void 0:b.query]),(0,u.jsxs)("div",{children:[(0,u.jsxs)("button",{"aria-label":"".concat(p?"Chiudi":"Estendi"," filtro ").concat(null==r?void 0:r.name),type:"button",className:"flex items-center gap-x-3 font-normal cursor-pointer","data-slug":(0,g.mC)(r.path),onClick:l=>{N(l,1),f(l=>!l)},children:[(0,u.jsx)("span",{className:"".concat(p||m?"rotate-[225deg]":""," w-3 transition-all duration-300"),children:(0,u.jsx)(s.default,{icon:"plus",fill:null===v()||void 0===v()?void 0:null===(e=v().theme)||void 0===e?void 0:null===(n=e.extend)||void 0===n?void 0:n.colors.neutral80})}),(0,u.jsxs)("label",{className:"text-start text-[16px] leading-[18px] cursor-pointer ".concat(p||m?"font-bold text-secondary100":""),children:[r.name,(null==r?void 0:r.productCount)||(null==r?void 0:null===(t=r.node)||void 0===t?void 0:t.productCount)?(0,u.jsx)("span",{className:"text-neutral70 numeric-field",children:" (".concat((null==r?void 0:r.productCount)||(null==r?void 0:null===(o=r.node)||void 0===o?void 0:o.productC
1ount),")")}):null]})]}),p&&(m||!m&&(null==r?void 0:null===(i=r.children)||void 0===i?void 0:i.length))?(0,u.jsx)("ul",{className:"".concat(p||m?"max-h-[99rem] opacity-1":"max-h-0 opacity-0"," pt-2 pl-6 m-0 overflow-hidden transition-all duration-300 flex flex-col gap-y-2 font-light"),children:null===(d=_(null==r?void 0:r.children))||void 0===d?void 0:d.map((l,e)=>{var n,t,o;return(0,u.jsx)("li",{className:"cursor-pointer",children:(0,u.jsxs)("label",{className:"cursor-pointer ".concat((null===(n=null==b?void 0:b.query[c])||void 0===n?void 0:n.toString().split("|").includes((0,g.mC)(null==l?void 0:l.path)))?"text-secondary100 underline":""),"data-slug":(0,g.mC)(l.path),onClick:l=>{N(l,2)},children:[l.name,(null==l?void 0:l.productCount)||(null==l?void 0:null===(t=l.node)||void 0===t?void 0:t.productCount)?(0,u.jsx)("span",{className:"text-neutral70 numeric-field",children:" (".concat((null==l?void 0:l.productCount)||(null==l?void 0:null===(o=l.node)||void 0===o?void 0:o.productCount),")")}):null]})},l.name)})}):null]})}function R(l){var e,n,t,o,i,d,r,c,p;let{title:f,type:m,filter_tag:C,setIsLoading:b,edges:N,facets:q}=l,[k,R]=(0,a.useState)((null==N?void 0:N.length)>0),F=(0,h.useRouter)(),z=parseInt("".concat(null===(e=null===(n=null==q?void 0:q.filter(l=>"price"===l.attribute)[0])||void 0===n?void 0:n.buckets[0])||void 0===e?void 0:e.to))+1||100,[T,L]=(0,a.useState)(parseInt(null==F?void 0:null===(t=F.query)||void 0===t?void 0:null===(o=t.filtro_prezzo)||void 0===o?void 0:o.toString().split(",")[0])||0),[A,P]=(0,a.useState)(parseInt(null==F?void 0:null===(i=F.query)||void 0===i?void 0:null===(d=i.filtro_prezzo)||void 0===d?void 0:d.toString().split(",")[1])||z);if((0,a.useEffect)(()=>{var l,e;L(parseInt(null==F?void 0:null===(l=F.query)||void 0===l?void 0:null===(e=l.filtro_prezzo)||void 0===e?void 0:e.toString().split(",")[0])||0)},[F.query]),(0,a.useEffect)(()=>{var l,e;P(parseInt(null==F?void 0:null===(l=F.query)||void 0===l?void 0:null===(e=l.filtro_prezzo)||void 0===e?void 0:e.toString().split(",")[1])||z)},[F.query]),(0,a.useEffect)(()=>{R((null==N?void 0:N.length)>0)},[null==N?void 0:N.length]),!N||N.length<=0)return null;switch(m){case"options":return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"filters-group py-4 md:py-8 transition-all duration-300 ",children:[(0,u.jsx)(E,{title:f,isOpen:k,setIsOpen:R,setIsLoading:b,filter_tag:C,edges:N}),(0,u.jsx)("ul",{className:"".concat(k?"max-h-[274px] mt-5":"max-h-0"," p-0 m-0  overflow-auto transition-all duration-300 flex flex-col gap-y-[10px]"),children:"filtro_editori"===C?null===(r=null==N?void 0:N.sort((l,e)=>{var n,t,o,i;return(null==l?void 0:l.productCount)?(null==l?void 0:l.productCount)>(null==e?void 0:e.productCount)?-1:(null==l?void 0:l.productCount)<(null==e?void 0:e.productCount)?1:0:(null==l?void 0:null===(n=l.node)||void 0===n?void 0:n.productCount)>(null==e?void 0:null===(t=e.node)||void 0===t?void 0:t.productCount)?-1:(null==l?void 0:null===(o=l.node)||void 0===o?void 0:o.productC
1ount)<(null==e?void 0:null===(i=e.node)||void 0===i?void 0:i.productCount)?1:0}))||void 0===r?void 0:r.map((l,e)=>{var n,t,o,i,d,r,a;return(0,u.jsx)("li",{children:(0,u.jsx)(x,{id:(null==l?void 0:null===(n=l.node)||void 0===n?void 0:n.entityId)||(null==l?void 0:l.entityId),label:(null==l?void 0:null===(t=l.node)||void 0===t?void 0:t.name)||(null==l?void 0:l.name),value:(0,g.mC)(null==l?void 0:null===(o=l.node)||void 0===o?void 0:o.path)||(0,g.mC)(null==l?void 0:l.path),productCount:(null==l?void 0:l.productCount)||(null==l?void 0:null===(i=l.node)||void 0===i?void 0:i.productCount),checked:(null===(d=F.query[C])||void 0===d?void 0:d.toString().split("|").includes((0,g.mC)(null==l?void 0:null===(r=l.node)||void 0===r?void 0:r.path)||(0,g.mC)(null==l?void 0:l.path)))||!1,onChange:l=>{b(!0),l.target.checked?j(C,l.target.value,F):y(C,l.target.value,F),F.push(F)}})},(null==l?void 0:null===(a=l.node)||void 0===a?void 0:a.entityId)||(null==l?void 0:l.entityId))}):null===(c=_(N))||void 0===c?void 0:c.map((l,e)=>{var n,t,o,i,d,r,a;return(0,u.jsx)("li",{children:(0,u.jsx)(x,{id:(null==l?void 0:null===(n=l.node)||void 0===n?void 0:n.entityId)||(null==l?void 0:l.entityId),label:(null==l?void 0:null===(t=l.node)||void 0===t?void 0:t.name)||(null==l?void 0:l.name),value:(0,g.mC)(null==l?void 0:null===(o=l.node)||void 0===o?void 0:o.path)||(0,g.mC)(null==l?void 0:l.path),productCount:(null==l?void 0:l.productCount)||(null==l?void 0:null===(i=l.node)||void 0===i?void 0:i.productCount),checked:(null===(d=F.query[C])||void 0===d?void 0:d.toString().split("|").includes((0,g.mC)(null==l?void 0:null===(r=l.node)||void 0===r?void 0:r.path)||(0,g.mC)(null==l?void 0:l.path)))||!1,onChange:l=>{b(!0),l.target.checked?j(C,l.target.value,F):y(C,l.target.value,F),F.push(F)}})},(null==l?void 0:null===(a=l.node)||void 0===a?void 0:a.entityId)||(null==l?void 0:l.entityId))})})]})});case"accordion":return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"filters-group py-4 md:py-8 transition-all duration-300 ",children:[(0,u.jsx)(E,{title:f,isOpen:k,setIsOpen:R,setIsLoading:b,filter_tag:C,edges:N}),(0,u.jsx)("div",{className:"".concat(k?"max-h-[274px] mt-5":"max-h-0"," flex flex-col gap-y-4 overflow-auto transition-all duration-300 "),children:null===(p=_(N))||void 0===p?void 0:p.map((l,e)=>(0,u.jsx)(O,{edge:l,filter_tag:C,setIsLoading:b},l.entityId))})]})});case"slider":return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"filters-group py-4 md:py-8 transition-all duration-300 ",children:[(0,u.jsx)(E,{title:f,isOpen:k,setIsOpen:R,setIsLoading:b,filter_tag:C,edges:N}),(0,u.jsxs)("div",{className:"".concat(k?"h-[12rem] mt-5":"h-0"," flex flex-col gap-y-4 overflow-auto transition-all duration-300 "),children:[(0,u.jsx)("span",{className:"font-[300] cursor-pointer",onClick:l=>{L(0),P(10),b(!0),F.query[C]="".concat(0,",",10),delete F.query.startIndex,F.push(F)},children:"Fino a 10 €"}),(0,u.jsx)("span",{className:"font-[300] cursor-pointer",onClick:l=>{L(10),P(20),b(!0),F.query[C]="".concat(10,",",20),delete F.query.startIndex,F.push(F)},children:"10 a 20 €"}),(0,u.jsx)("span",{className:"font-[300] cursor-pointer",onClick:l=>{L(20),P(50),b(!0),F.query[C]="".concat(20,",",50),delete F.query.startIndex,F.push(F)},children:"20 a 50 €"}),(0,u.jsx)(I,{value:[T,A],min:0,max:z,renderTrack:S,renderThumb:w,onChange:(l,e)=>{L(l[0]),P(l[1])}}),(0,u.jsxs)("div",{className:"flex items-center justify-between",children:[(0,u.jsx)("input",{type:"number",value:T,min:0,max:z,className:"flex items-center p-2.5 border border-neutral50 rounded-[5px] bg-white",onChange:l=>{var e,n,t;parseFloat(null==l?void 0:null===(e=l.target)||void 0===e?void 0:e.value)>=0&&parseFloat(null==l?void 0:null===(n=l.target)||void 0===n?void 0:n.value)<=A&&L(parseFloat(null==l?void 0:null===(t=l.target)||void 0===t?void 0:t.value))}}),(0,u.jsxs)("div",{className:"flex items-center gap-x-2",children:[(0,u.jsx)("input",{type:"number",value:A,min:0,max:z,className:"flex items-center p-2.5 border border-neutral50 rounded-[5px] bg-white",onChange:l=>{var e,n,t;parseFloat(null==l?void 0:null===(e=l.target)||void 0===e?void 0:e.value)>=T&&parseFloat(null==l?void 0:null===(n=l.target)||void 0===n?void 0:n.value)<=z&&P(parseFloat(null==l?void 0:null===(t=l.target)||void 0===t?void 0:t.value))}}),(0,u.jsx)("button",{"aria-label":"Applica filtro prezzo",className:"flex items-center p-2.5 border border-neutral100 rounded-[5px] bg-white",onClick:()=>{b(!0),F.query[C]="".concat(T,",").concat(A),delete F.query.startIndex,F.push(F)},children:(0,u.jsx)("span",{className:"font-bold",children:"Applica"})})]})]})]})]})});case"stars":return(0,u.jsx)(u.Fragment,{children:(0,u.jsxs)("div",{className:"filters-group py-4 md:py-8 transition-all duration-300 ",children:[(0,u.jsx)(E,{title:f,isOpen:k,setIsOpen:R,setIsLoading:b,filter_tag:C,edges:N}),(0,u.jsxs)("div",{className:"".concat(k?"max-h-[274px]":"max-h-0"," flex flex-col gap-y-4 overflow-auto transition-all duration-300 "),children:[(0,u.jsxs)("div",{className:"flex items-center gap-x-2 cursor-pointer",children:[(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)("label",{children:"4 stelle e pi\xf9"})]}),(0,u.jsxs)("div",{className:"flex items-center gap-x-2 cursor-pointer",children:[(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)("label",{children:"3 stelle e pi\xf9"})]}),(0,u.jsxs)("div",{className:"flex items-center gap-x-2 cursor-pointer",children:[(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)("label",{children:"2 stelle e pi\xf9"})]}),(0,u.jsxs)("div",{className:"flex items-center gap-x-2 cursor-pointer",children:[(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.warning}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)(s.default,{icon:"star",fill:v().theme.extend.colors.neutral50}),(0,u.jsx)("label",{children:"1 stella e pi\xf9"})]})]})]})})}}},59780:function(l,e,n){var t,o,i,d;n.d(e,{g:function(){return o},k:function(){return t}}),(i=t||(t={})).RIVISTA="Rivista",i.LIBRO="Libro",i.CORSO="Corso",i.BUNDLE="Bundle",i.EVENTO="Evento",(d=o||(o={})).Available="Available",d.Preorder="Preorder",d.Unavailable="Unavailable"}}]);

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.