PageSourceSearch

https://loja.nissan.com.br/_next/static/chunks/942-0604ad7c260c2cc4.js

js nissan.com.br collected 2026-10-02 10:50:03 UTC 15,841 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[942],{47399:function(e,n,t){t.d(n,{Z:function(){return l}});var r=t(87462),o=t(67294),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"},i=t(42135),s=function(e,n){return o.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:a}))};var l=o.forwardRef(s)},50942:function(e,n,t){t.r(n),t.d(n,{default:function(){return Me}});var r,o,a,i,s,l,c,d=t(50029),u=t(87794),p=t.n(u),f=t(67294),h=t(26058),m=t(13573),x=t(98081),v=t(39505),g=t(39332),b=t(15452),j=t(47399),y=t(71383),w=t(61869),k=t(63960),Z=t(11189),O=t(11004),C=t(15437),P=h.Z.Content,S=(0,C.ZP)(w.Z)(r||(r=(0,y.Z)([""]))),D=(C.ZP.div(o||(o=(0,y.Z)(["\n  height: 400px;\n  overflow-y: auto;\n"]))),(0,C.ZP)(P)(a||(a=(0,y.Z)(["\n  height: calc(100vh - 64px);\n  display: flex;\n  flex-direction: column;\n"]))),(0,C.ZP)(k.Z)(i||(i=(0,y.Z)(["\n  .ant-input-affix-wrapper {\n    border: none !important;\n    // border-bottom: 2px solid #d9d9d9 !important;\n    border-bottom: 1px solid black !important;\n    border-radius: 0 !important;\n    box-shadow: none !important;\n    padding: 0 !important;\n  }\n\n  .ant-select-selection-search-input {\n    height: 32px;\n  }\n\n  .ant-select-selection-placeholder,\n  .ant-select-selection-item {\n    color: #8c8c8c !important;\n    font-size: 14px;\n  }\n\n  .ant-select-selection-search {\n    left: 12px;\n  }\n\n  .ant-select-selection-search-icon {\n    color: #8c8c8c !important;\n  }\n\n  .ant-input-prefix {\n    margin-right: 10px !important;\n  }\n"]))),(0,C.ZP)(m.Z)(s||(s=(0,y.Z)(["\n  .ant-select-selector:hover {\n    border-color: black !important;\n  }\n\n  .ant-select-selector {\n    border-color: black !important;\n    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0) !important;\n  }\n\n  .ant-select-focused {\n    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1) !important;\n  }\n"]))),(0,C.ZP)(Z.ZP)(l||(l=(0,y.Z)(["\n  background-color: transparent;\n  border-color: transparent;\n  color: #000;\n  font-weight: 500;\n  border-radius: 40px !important;\n  box-shadow: 0 2px 4px rgba(0, 0, 0, 0);\n  &:hover {\n    background-color: #000 !important;\n    border-color: #000 !important;\n    color: #fff !important;\n  }\n"])))),M=((0,C.ZP)(O.Z)(c||(c=(0,y.Z)(["\n  .ant-pagination-item-active {\n    background-color: black !important;\n    color: white !important;\n    border-color: black !important;\n  }\n\n  .ant-pagination-item-active a {\n    color: white !important;\n  }\n"]))),t(83658)),I=t(85893),E=t(65544),A=t(34926),q=t(49381),z=t(73035),N=t(37430);const Y=(0,q.G)((function(e,n){const t=(0,z.m)("Badge",e),{className:r,...o}=(0,E.L)(e);return(0,I.jsx)(N.m.span,{ref:n,className:(0,A.cx)("chakra-badge",e.className),...o,__css:{display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle",...t}})}));Y.displayName="Badge";var V=t(12519),B=t(70647),R=t(93977),F=t(90092),_=t(35082),L=t(63679);function H(e,n){return T.apply(this,arguments)}function T(){return(T=(0,d.Z)(p().mark((function e(n,t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{Authorization:"Bearer ".concat(t)}},e.abrupt("return",L.h.post("/vehicles-to-launch/sales-method",n,r));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return W.apply(this,arguments)}function W(){return(W=(0,d.Z)(p().mark((function e(n){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={headers:{Authorization:"Bearer ".concat(n)}},e.abrupt("return",L.h.get("/vehicles-to-launch/sales-method/registered",t));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e,n,t){return Q.apply(this,arguments)}function Q(){return(Q=(0,d.Z)(p().mark((function e(n,t,r){var o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o={headers:{Authorization:"Bearer ".concat(r)}},e.abrupt("return",L.h.put("/vehicles-to-launch/sales-method/registered/".concat(n),t,o));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function X(e,n){return $.apply(this,arguments)}function $(){return($=(0,d.Z)(p().mark((function e(n,t){var r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={headers:{Authorization:"Bearer ".concat(t)}},e.abrupt("return",L.h.delete("/vehicles-to-launch/sales-method/registered/".concat(n),r));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var J=t(54971),K=t(27484),ee=t.n(K),ne=(t(57548),t(79210)),te=t(59499),re=t(5490),oe=t(34614),ae=t(61571),ie=t(57391),se=t(42811),le=t(70010),ce=t(68029),de=t(8186),ue=t(54506),pe=t(30980),fe=t(73636),he=t(45443),me=t(38488),xe=t(87536),ve=t(17498),ge=t(76646);function be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function je(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};
1n%2?be(Object(t),!0).forEach((function(n){(0,te.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):be(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var ye=function(e){var n=e.isOpenModalitiesModal,t=e.onCloseModalitiesModal,r=e.callback,o=e.isEdit,a=void 0!==o&&o,i=e.modelOptions,s=void 0===i?[]:i,l=e.modelEdit,c=(0,f.useState)(!1),u=(c[0],c[1]),h=(0,f.useState)(!1),x=h[0],v=h[1],g=m.Z.Option,b=(0,xe.cI)({}),j=b.handleSubmit,y=b.register,w=(b.reset,b.setValue),k=b.formState,Z=k.errors,O=k.isSubmitting,C=b.control,P=(0,M.q)(),S=P.isOpen,D=P.onOpen,E=P.onClose,A=function(){t(),r&&r()},q=function(){var e=(0,d.Z)(p().mark((function e(n){var t;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(v(!0),t=localStorage.getItem("atk"),e.prev=2,!a){e.next=8;break}return e.next=6,G(l.id,n,t);case 6:e.next=10;break;case 8:return e.next=10,H(n,t);case 10:A(),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(2),u(!0);case 16:return e.prev=16,v(!1),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[2,13,16,19]])})));return function(n){return e.apply(this,arguments)}}();return(0,f.useEffect)((function(){if(a){var e=[];l.floorPlan&&e.push("FP"),l.vendaDireta&&e.push("VD"),l.pcd&&e.push("PCD"),w("modalities",e)}}),[n]),(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(re.u_,{isCentered:!0,isOpen:n,onClose:A,closeOnOverlayClick:!1,children:[(0,I.jsx)(oe.Z,{}),(0,I.jsxs)(ae.h,{children:[(0,I.jsxs)("div",{children:[(0,I.jsx)(ie.x,{children:a?"Editar Modalidades":"Adicionar Modalidades"}),(0,I.jsx)(V.h,{variant:"icon",onClick:A,children:(0,I.jsx)(se.E,{alt:"cross icon",src:"/assets/icons/cross.svg"})})]}),(0,I.jsxs)("form",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",justifyContent:"center"},noValidate:!0,onSubmit:j((function(e){var n={pcd:e.modalities.includes("PCD"),floorPlan:e.modalities.includes("FP"),vendaDireta:e.modalities.includes("VD")};if(a)q(je(je({},l),n));else{var t=s.find((function(n){return n.name===e.model}));q(je(je({},n),{},{model:t.name,productionYear:t.productionYear,modelYear:t.modelYear}))}})),children:[(0,I.jsx)(le.f,{children:(0,I.jsx)(ce.x,{width:"100%",display:"flex",flexDirection:"column",alignItems:"flex-end",children:(0,I.jsxs)(ce.x,{width:"100%",bg:"#ffffff",display:"flex",flexDirection:"column",children:[!a&&(0,I.jsx)(de.g,{width:"100%",children:(0,I.jsxs)(ue.NI,je(je({},y("modalities")),{},{isRequired:!0,isInvalid:Z.modalities,children:[(0,I.jsx)(pe.l,{children:"Modelo"}),(0,I.jsxs)(de.g,{w:"100%",mb:"10px !important",children:[(0,I.jsx)(fe.U,{w:"100%",flexDirection:"column",alignItems:["flex-start"],children:(0,I.jsx)(xe.Qr,{name:"model",control:C,render:function(e){var n=e.field;return(0,I.jsx)(ge.Z,je(je({},n),{},{style:{width:"100%"},placeholder:"Selecione o modelo",dropdownStyle:{zIndex:9999},onChange:function(e){n.onChange(e)},children:null===s||void 0===s?void 0:s.map((function(e){return(0,I.jsx)(g,{value:e.name,children:e.name},e.id)}))}))}})}),Z.modalities&&(0,I.jsx)(ve.Z,{children:Z.modalities.message})]})]}))}),(0,I.jsx)(de.g,{width:"100%",children:(0,I.jsxs)(ue.NI,je(je({},y("modalities")),{},{isRequired:!0,isInvalid:Z.modalities,children:[(0,I.jsx)(pe.l,{children:"Modalidades"}),(0,I.jsxs)(de.g,{w:"100%",mb:"10px !important",children:[(0,I.jsx)(fe.U,{w:"100%",flexDirection:"column",alignItems:["flex-start"],children:(0,I.jsx)(xe.Qr,{name:"modalities",control:C,render:function(e){var n=e.field;return(0,I.jsxs)(ge.Z,je(je({},n),{},{mode:"multiple",style:{width:"100%"},placeholder:"Selecione as modalidades",dropdownStyle:{zIndex:9999},onChange:function(e){!function(e){return!e.length||!e.includes("FP")||!e.includes("VD")}(e)?D():n.onChange(e)},children:[(0,I.jsx)(g,{value:"FP",children:"Floor Plan"}),(0,I.jsx)(g,{value:"VD",children:"Venda Direta"}),(0,I.jsx)(g,{value:"PCD",children:"Pessoa com Defici\xeancia"})]}))}})}),Z.modalities&&(0,I.jsx)(ve.Z,{children:Z.modalities.message})]})]}))})]})})}),(0,I.jsxs)(he.m,{display:["column","row"],children:[(0,I.jsx)(me.z,{disabled:O||x,mr:"12px",onClick:A,variant:"secondary",width:["100%","auto"],children:"Cancelar"}),(0,I.jsx)(me.z,{onClick:function(){return u(!1)},disabled:O||x,isLoading:O||x,type:"submit",variant:"primary",width:["100%","auto"],children:"Salvar"})]})]})]})]}),(0,I.jsxs)(re.u_,{isOpen:S,onClose:E,closeOnOverlayClick:!1,isCentered:!0,children:[(0,I.jsx)(oe.Z,{}),(0,I.jsxs)(ae.h,{children:[(0,I.jsx)(ie.x,{children:"Aten\xe7\xe3o"}),(0,I.jsx)(le.f,{children:(0,I.jsx)(F.x,{w:"100%",children:"N\xe3o \xe9 permitido selecionar as op\xe7\xf5es 'Floor Plan' e 'Venda Direta' ao mesmo tempo."})}),(0,I.jsx)(he.m,{gap:"1rem",children:(0,I.jsx)(me.z,{onClick:E,w:["100%","","auto"],variant:"primary",children:"Ok"})})]})]})]})},we=t(41822);function ke(e,n){var t="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(!e)return;if("string"===typeof e)return Ze(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ze(e,n)}(e))||n&&e&&"number"===typeof e.length){t&&(e=t);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,i=!0,s=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return i=e.done,e},e:function(e){s=!0,a=e},f:function(){try{i||null==t.return||t.return()}finally{if(s)throw a}}}}function Ze(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}ee().locale("pt-br");var Oe=h.Z.Header,Ce=(h.Z.Content,m.Z.Option,(0,f.forwardRef)((function(e,n){e.onOpenSuccess,e.onOpenError,e.onOpenConfirmDelete;var t=n.filterPortalRef,r=(n.footerPortalRef,(0,f.useState)([])),o=r[0],a=r[1],i=(0,f.useState)(!1),s=i[0],l=i[1],c=(0,f.useState)([]),u=c[0],h=c[1],m=(0,f.useState)(!1),y=m[0],w=m[1],k=(0,f.useState)(null),Z=k[0],O=k[1],C=(0,f.useState)(null),P=C[0],E=C[1],A=(0,M.q)(),q=A.isOpen,z=(A.onOpen,A.onClose),N=(0,M.q)(),L=N.isOpen,H=N.onOpen,T=N.onClose,W=(0,M.q)(),G=W.isOpen,Q=W.onOpen,$=W.onClose,K=function(e,n){e&&O(e),w(n),H()},te=function(){var e=(0,d.Z)(p().mark((function e(){var n;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=localStorage.getItem("atk"),e.next=3,X(P.id,n);case 3:$(),ie(),E(null);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=[{title:"Modelo",dataIndex:"name",key:"name",width:300},{title:"Modalidades",key:"modalities",width:150,render:function(e,n){return function(e){var n=[];return e.floorPlan&&n.push("Floor Plan"),e.pcd&&n.push("PCD"),e.vendaDireta&&n.push("Venda direta"),n}(n).map((function(e){return(0,I.jsx)(Y,{marginX:"1",children:e},e)}))}},{title:"A\xe7\xf5es",key:"actions",width:100,render:function(e,n){return(0,I.jsx)(x.Z,{size:"middle",children:n.isModel&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(V.h,{width:"17px",height:"17px",background:"none!important",p:"0",minW:"0",border:"1px solid",borderColor:"#000",borderRadius:"50%",onClick:function(){return K(n,!0)},children:(0,I.jsx)(B.E,{src:"/assets/icons/edit.png"})}),(0,I.jsx)(V.h,{width:"17px",height:"17px",background:"none!important",p:"0",minW:"0",border:"1px solid",borderColor:"#000",borderRadius:"50%",onClick:function(){E(n),Q()},children:(0,I.jsx)(B.E,{src:"/assets/icons/deleteCross.png"})})]})})}}],oe=function(e){var n,t,r=[],o=ke(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,i={id:a.id,isModel:!0,name:a.model,productionYear:a.productionYear,modelYear:a.modelYear,createdAt:(t=a.createdAt,ee()(t).format("DD/MM/YYYY")||"-"),floorPlan:a.floorPlan,pcd:a.pcd,vendaDireta:a.vendaDireta};r.push(i)}}catch(s){o.e(s)}finally{o.f()}return r},ae=function(){var e=(0,d.Z)(p().mark((function e(){var n,t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.prev=1,n=localStorage.getItem("atk"),e.next=5,(0,_.zs)(n);case 5:return t=e.sent,r=t.data.models,h(r),l(!1),e.abrupt("return",r);case 12:e.prev=12,e.t0=e.catch(1),l(!1),console.error("error",e.t0);case 16:case"end":return e.stop()}}),e,null,[[1,12]])})));return function(){return e.apply(this,arguments)}}(),ie=function(){var e=(0,d.Z)(p().mark((function e(){var n,t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=localStorage.getItem("atk"),e.next=4,U(n);case 4:t=e.sent,r=t.data,a(oe(r)),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.error("error",e.t0);case 12:return e.prev=12,e.finish(12);case 14:case"end":return e.stop()}}),e,null,[[0,9,12,14]])})));return function(){return e.apply(this,arguments)}}();return(0,f.useEffect)((function(){ie(),ae()}),[]),(0,I.jsxs)(v.ZP,{locale:J.Z,children:[(0,I.jsxs)(R.h,{containerRef:t,children:[(0,I.jsx)(Oe,{className:"site-layout-background",style:{backgroundColor:"white",width:"100%",display:"flex",justifyContent:"space-between",flexDirection:"row-reverse",alignItems:"center",flexWrap:"wrap",gap:"10px"},children:(0,I.jsx)(D,{type:"default",icon:(0,I.jsx)(j.Z,{}),onClick:function(){return K(null,!1)},children:(0,I.jsx)(F.x,{children:"ADICIONAR NOVO"})})}),(0,I.jsx)(g.Z.Paragraph,{style:{backgroundColor:"white",width:"100%",margin:0,padding:"0 2rem",paddingBottom:"15px"},children:"Escolha a modalidade dos modelos:"})]}),(0,I.jsx)(S,{scroll:{x:"100%"},columns:re,dataSource:o,pagination:!1,locale:{emptyText:(0,I.jsx)(b.Z,{preview:!1,src:"/assets/images/empty.png",alt:"Empty table"})},loading:s},null===o||void 0===o?void 0:o.length),(0,I.jsx)(ye,{callback:ie,isEdit:y,modelEdit:Z,modelOptions:u,isOpenModalitiesModal:L,onCloseModalitiesModal:T}),(0,I.jsx)(we.Z,{callback:te,isOpenModal:G,onCloseModal:$,text:"Esta a\xe7\xe3o \xe9 irrevers\xedvel e todos os dados associados ser\xe3o perdidos.",textHeader:"Tem certeza que deseja excluir esta modalidade do cadastro de lan\xe7amento?",textPrimaryButton:"Confirmar",textSecondaryButton:"Cancelar"}
1),(0,I.jsx)(ne.Z,{isOpenLoadingModal:q,onCloseLoadingModal:z})]})}))),Pe=Ce,Se=t(52277),De=t(79398);var Me=function(){return(0,I.jsx)(De.default,{deleteApi:Se.bb,children:(0,I.jsx)(Pe,{})})}},70647:function(e,n,t){t.d(n,{E:function(){return s}});var r=t(85893),o=t(376),a=t(49381),i=t(37430);const s=(0,a.G)(((e,n)=>(0,r.jsx)(i.m.img,{ref:n,as:o.Z,className:"chakra-image",...e})))}}]);

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.